Repository navigation
feat(agent): make the pane fit any terminal and feel friendlier - #411
Conversation
The conversation pane kept ~64 columns at any size, leaving the editor 12 columns at 80 wide and 5 at 60. Conversation panes now take at most 45% of the terminal at their declared width (never under 32), a user-chosen width still leaves the editor 40 columns, and a terminal too narrow for both turns the pane into a compact overlay that covers the editor only while focused. Plugins learn when a compact pane is out of view, so the Agent pane still announces finished turns. Polish found in a real-Codex walkthrough: - Space A focuses the composer in Insert mode, like the first open. - :qa, :qa!, :quitall, :x, :exit, :wqa and :xa work. - Table columns keep whole words; grids that cannot fit fall back to key/value records instead of splitting words mid-way. - Queued follow-ups render as dimmed "You · queued" cards. - Each turn gets one working verb, stops read "Stopped at your request.", and notices and the empty states are friendlier. - The prompt dialog shows first-time tips. - Agent instructions keep open_file/select_text for explicit requests and say once that builds and tests cannot run in pair mode. - Push-only diagnostics refreshes answer at once when the text was already reported, and a timeout returns the last known reports.
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9526594683
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- Record the queued block kind and the panel view event in the pending 0.21.0 API manifest and docs. - Never dock a conversation pane below 32 columns, and clamp resizes to it. - Allocate conversation pane widths jointly, so a second pane that does not fit becomes compact instead of overlapping the editor; reservation, placement, and text layout share one allocation. - Only skip a push-only diagnostics wait when the report names the document version the server holds for the current text. - Defer :wqa and :xa (and any quit) until every pending format-on-save finishes, and cancel it with a message when one fails.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 15167fc981
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…zoomed compact panes in view - Only the first message sent while a thread starts looks sent; later ones render as queued cards. - Diagnostics whose protocol version is older than the server's current document version are labelled stale. - An explicitly zoomed compact pane counts as visible, so the plugin is not told it was hidden.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5f6dec292b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ver, skip queued cards in turn actions - A diagnostics report's protocol version is recorded with the report itself, after it is accepted, so a rejected late notification can no longer relabel an earlier one. - Each report remembers its server, and freshness compares its version with that attachment's own document version. - With the transcript cursor on a queued card, turn actions refer to the sent prompt above it.
The rejected-report test looked its stamp up by a hard-coded Unix URI, which Windows normalizes differently.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6229977b4e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…queued cards in every format - A push-only refresh only trusts a report from the same server instance; a restarted server reuses the key and version numbers. - Queued cards are dimmed for markdown and code blocks too.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2e20393843
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Clear rebuilt the unsent messages as sent cards; it now shares the queued classification with the normal render.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 250a76049c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The bang was ignored, so both refused to overwrite files changed on disk. A new ForceSaveAll writes every modified buffer with the forced save, as Vim's :wqall! does; a failed write still keeps Red open.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 95b20f3f51
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Like :wq, ':x file' now saves a modified buffer to that file (forced with '!') before quitting, instead of ignoring the name.
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
A real-Codex walkthrough of pair mode in tmux at 180×50, 120×40, 100×30, 80×24 and 60×18 turned up a layout problem that makes the Agent pane unusable on small terminals, plus a handful of rough edges that made the pane feel unfinished. This PR fixes the layout and polishes the rest.
Why
Narrow terminals squeezed the editor to nothing. The Agent pane is created at 62 columns and kept about 64 at every terminal size. At 80 columns the editor got 12 columns, at 60 it got 5, and every source line wrapped into an unreadable ribbon:
Smaller rough edges found along the way:
Space Alanded the composer in Normal mode, so the first characters typed were read as commands.:qa,:qa!,:wqaand:xareported "unknown command".open_fileon its own and switched the user's buffer.What changed
Responsive pane layout (
src/plugin/panel.rs,src/editor.rs). Side panes with a composer (conversation panes) now size themselves:Escfrom the pane's transcript returns to the editor in compact mode; docked panes keep their currentEscbehaviour.panel:event:<id>withaction: "view"andtext: "hidden"or"visible"when a compact pane leaves or rejoins the screen. The Agent pane uses it to printAgent finished · Space A to viewfor turns that finish while the pane is covered.side_panel_widths) drives the editor's reservation, the pane placements, and text layout, so they always agree.Polish:
FocusTextPanelComposer(whatSpace Auses) always lands in Insert mode. Switching between composer and transcript with Tab still keeps the composer's own mode.:qa/:qall/:quitall(with!),:x/:xit/:exit(writes only if modified, to a given filename if one is passed), and:wqa/:wqall/:xa/:xall(write all, then quit; with!the writes overwrite files changed on disk). A quit now waits for every pending format-on-save, and a failed save cancels it with a message.:estill means:edit.queuedtext-panel block kind, recorded in the pending0.21.0API entry along with theviewevent: a dimmedYou · queuedprompt card that doesn't take the "current prompt" accent or turn actions. The Agent pane uses it for follow-ups held behind a running turn or a paused queue. Only the first message, sent while a thread starts, looks sent.plugins/agent.hk:src/codex/mod.rs) and theopen_file/select_texttool descriptions (src/agent_tools.rs) say these tools move the user's view, so they are only for explicit requests, and thatread_fileis for reading code. The instructions also say once that builds and tests can't run in pair mode, so the agent names the command to run in one sentence instead of hedging. Non-follow mode still switches buffers foropen_file, because a user who asks to open something expects to see it.src/editor/agent_lsp.rs):versionofpublishDiagnostics. With a push-only server, a refresh returns immediately, withrefresh_status: "already_reported", only when the report names the document version that server holds for the current text; otherwise it waits as before. A report naming an older version is labelledstale.ok: false,status: "timeout"and a note that this is not a clean result.docs/PLUGIN_API.md(thequeuedkind, responsive and compact panes, theviewevent),docs/AGENT_WORKFLOW.mdanddocs/GETTING_STARTED.md(the new quit commands).How to Test
Space Aand ask "In two sentences, what does this file do?".Escuntil you are back in the editor (Insert → Normal → transcript → editor). Expected: the editor uses all 60 columns.Escback to the editor while it runs. Expected:Agent finished · Space A to viewappears when the turn ends, andSpace Abrings the pane back in Insert mode.Escin the composer (Normal mode), go to the editor withCtrl-w h, then pressSpace A. Expected: the footer showsINSERT.You · queuedcard.Ctrl-c. Expected: "Stopped at your request." and1 held · :AgentSendQueued to send.:qa. Expected: Red refuses and lists the unsaved buffer.:qa!quits;:xawrites and quits.I ran flows 1, 3, 4 and 5 against a real Codex app-server in tmux on this build, and the same tour on the previous build for comparison. All the before/after rows above come from those captures.
Targeted tests:
cargo test --lib conversation_panes_size_responsively_and_go_compact_when_crampedcargo test --lib a_cramped_conversation_pane_covers_the_editor_only_while_focusedcargo test --lib escape_from_a_compact_transcript_returns_to_the_editorcargo test --lib refocusing_a_composer_lands_in_insert_mode_but_region_toggles_keep_its_modecargo test --lib quit_all_and_exit_commands_follow_vimcargo test --lib narrow_table_columns_wrap_between_wordscargo test --lib welcome_tips_wrap_between_words_and_drop_what_does_not_fitcargo test --lib bundled_agent_announces_turns_that_finish_while_a_compact_pane_is_coveredcargo test --lib bundled_agent_names_a_requested_stop_and_gives_each_turn_one_working_verbcargo test --test lsp_lazy agent_lsp_push_only