mirror of
https://github.com/openai/codex.git
synced 2026-02-01 14:44:17 +00:00
## Summary Refines the bottom footer layout to keep `% context left` right-aligned while making the left side degrade cleanly ## Behavior with empty textarea Full width: <img width="607" height="62" alt="Screenshot 2026-01-26 at 2 59 59 PM" src="https://github.com/user-attachments/assets/854f33b7-d714-40be-8840-a52eb3bda442" /> Less: <img width="412" height="66" alt="Screenshot 2026-01-26 at 2 59 48 PM" src="https://github.com/user-attachments/assets/9c501788-c3a2-4b34-8f0b-8ec4395b44fe" /> Min width: <img width="218" height="77" alt="Screenshot 2026-01-26 at 2 59 33 PM" src="https://github.com/user-attachments/assets/0bed2385-bdbf-4254-8ae4-ab3452243628" /> ## Behavior with message in textarea and agent running (steer enabled) Full width: <img width="753" height="63" alt="Screenshot 2026-01-26 at 4 33 54 PM" src="https://github.com/user-attachments/assets/1856b352-914a-44cf-813d-1cb50c7f183b" /> Less: <img width="353" height="61" alt="Screenshot 2026-01-26 at 4 30 12 PM" src="https://github.com/user-attachments/assets/d951c4d5-f3e7-4116-8fe1-6a6c712b3d48" /> Less: <img width="304" height="64" alt="Screenshot 2026-01-26 at 4 30 51 PM" src="https://github.com/user-attachments/assets/1433e994-5cbc-4e20-a98a-79eee13c8699" /> Less: <img width="235" height="61" alt="Screenshot 2026-01-26 at 4 30 56 PM" src="https://github.com/user-attachments/assets/e216c3c6-84cd-40fc-ae4d-83bf28947f0e" /> Less: <img width="165" height="59" alt="Screenshot 2026-01-26 at 4 31 08 PM" src="https://github.com/user-attachments/assets/027de5de-7185-47ce-b1cc-5363ea33d9b1" /> ## Notes / Edge Cases - In steer mode while typing, the queue hint no longer replaces the mode label; it renders as `tab to queue message · {Mode}`. - Collapse priorities differ by state: - With the queue hint active, `% context left` is hidden before shortening or dropping the queue hint. - In the empty + non-running state, `? for shortcuts` is dropped first, and `% context left` is only shown if `(shift+tab to cycle)` can also fit. - Transient instructional states (`?` overlay, Esc hint, Ctrl+C/D reminders, and flash/override hints) intentionally suppress the mode label (and context) to focus the next action. ## Implementation Notes - Renamed the base footer modes to make the state explicit: `ComposerEmpty` and `ComposerHasDraft`, and compute the base mode directly from emptiness. - Unified collapse behavior in `single_line_footer_layout` for both base modes, with: - Queue-hint behavior that prefers keeping the queue hint over context. - A cycle-hint guard that prevents context from reappearing after `(shift+tab to cycle)` is dropped. - Kept rendering responsibilities explicit: - `single_line_footer_layout` decides what fits. - `render_footer_line` renders a chosen line. - `render_footer_from_props` renders the canonical mode-to-text mapping. - Expanded snapshot coverage: - Added `footer_collapse_snapshots` in `chat_composer.rs` to lock the distinct collapse states across widths. - Consolidated the width-aware snapshot helper usage (e.g., `snapshot_composer_state_with_width`, `snapshot_footer_with_mode_indicator`).
306 B
306 B