Skip to content

feat(rex): full-size review tab, now the default placement - #176

Merged
backnotprop merged 1 commit into
mainfrom
feat/rex-full-placement
Nov 20, 2026
Merged

backnotprop merged 1 commit into
mainfrom
feat/rex-full-placement

Conversation

@backnotprop

Copy link
Copy Markdown
Contributor

Behavior change

Rex Annotate now opens reviews full size, in a tab of their own, by default, the way Herdr's overlay does. Before this change the default was a split beside the agent's pane. To keep the split, set [rex] placement = "split", pass --placement split, or set placement = "split" in the Lua module. A config that already sets split or popup keeps working.

What it does

  • New placement: --placement tab, [rex] placement = "tab", and the Lua module's placement = "tab" open the review as a new Rex window in the agent's session. The Mac app shows each of these windows as a tab.
  • Contents and label: the tab holds only the review. Its label is Annotate · followed by the file, agent or folder under review, for example Annotate · claude or Annotate · plan.md.
  • Unchanged behavior: Send still goes to the agent that launched the review, and P still lists every agent. Gated opens (rex open --gate [--result-file]) work the same way.
  • Back to the agent on close:
    • When a window's last block exits, Rex closes the window and shows a neighbouring tab, which is not always the agent's tab.
    • The review pane now gets PLANNOTATOR_TUI_REX_RETURN=<launching block>. When the review ends, it calls session.focus_block on that block, so you land back in the agent's tab and pane.
    • It does this only while the review's tab is the active one. If the review ends while you are in another tab, focus stays where you are.

Tests

  • Unit tests: the placement parses and rejects bad values; the session.new_window arguments; the tab label; the return variable in the pane argv, including with --gate.
  • Return-focus check: the "is the review's tab showing" test against a session.view shape.
  • Integration (rex review 7): with no setting it calls session.new_window and passes the return variable. With --placement split it calls session.new_split and does not pass it.
  • Existing split tests: these now ask for --placement split explicitly.
  • Isolated Rex server, by hand: the review opens in its own tab, and closing it shows the agent's tab and pane again. A gated open with a result file approves, writes {"decision":"approved"}, sends the approval to the agent, and returns focus to it. A review closed from another tab leaves focus where it is.

cargo fmt --check, cargo clippy --locked --workspace --all-targets -- -D warnings and cargo test --locked --workspace pass locally. A check-only clippy run for x86_64-pc-windows-msvc also passes.

`--placement tab` (also `[rex] placement = "tab"` and the Lua module's
`placement` option) opens the review as a new Rex window in the agent's
session, which the Mac app shows as a tab. It holds only the review and
is named `Annotate · ` and the file, agent or folder it reviews. Send
still goes to the launching agent and `P` still lists every agent.

When the review ends, Rex closes its tab and would show a neighbouring
tab; the pane now focuses the block it was opened from instead, so you
are back in the agent's tab and pane. It does so only while the
review's tab is the one showing, so a review that ends while you are in
another tab moves nobody. Gated opens work the same way.

`tab` is the new default, as Herdr's overlay is. `split` and `popup`
stay available, and a config that sets them keeps working.
@backnotprop
backnotprop added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit 3ea3192 Nov 20, 2026
3 checks passed
@backnotprop
backnotprop deleted the feat/rex-full-placement branch November 20, 2026 02:07
@backnotprop backnotprop mentioned this pull request Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant