feat(btw): add switchable side conversation UI - #1019
Conversation
|
Ready for maintainer review. The focused 52-test BTW gate, root check, production build, changelog gate, isolated TUI QA, provider/session isolation checks, and post-rebase TUI smoke are green. Branch protection requires an approval/merge from a repository maintainer; this contributor account cannot enable auto-merge. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bf959fa4c6
ℹ️ 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".
| pi.registerShortcut(Key.ctrl("_"), toggleShortcut); | ||
| pi.registerShortcut(Key.ctrl("/"), toggleShortcut); |
There was a problem hiding this comment.
Route the side-switch shortcut through KEYBINDINGS
The switch is fixed to Ctrl+/ (plus its legacy encoding) here and again in BtwSidePanel, so users cannot rebind it. If a reserved action such as app.clear is configured to Ctrl+/, ExtensionRunner drops this parent shortcut as a conflict while the panel still hides on that key, leaving the advertised switch key unable to restore the side. Add a keybinding action/default and resolve it through KeybindingsManager in both locations.
AGENTS.md reference: packages/coding-agent/AGENTS.md:L62-L62
Useful? React with 👍 / 👎.
Summary
Supersedes closed #880 and keeps its branch-local BTW history/context work,
while replacing the one-shot widget and read-only viewer with the Codex-style
side UI the feature was intended to provide.
/btwand/sideopen one focused, multi-turn side overlay in the TUI.interrupt key (Escape by default) cancels only the current side answer.
btw-historycustom entries, never parent user/assistant messages.own PageUp/PageDown navigation, tall editors preserve scroll chrome, and the
primary hints remain visible at 80 columns.
ExtensionUIContext.customnow closes its own captured overlay handle ratherthan whichever overlay happens to be topmost.
Why
The previous attempt accumulated review fixes around history, sanitization, key
labels, provenance, and turn-atomic pruning, but its user surface was still a
single below-editor answer widget. This finishes the interaction without
introducing a persisted side session, adoption metadata, caches, or navigation
races.
Observed behavior
In an isolated real Senpi TUI with a localhost mock provider:
PARENT-WORKING./btw what is the main task doing?openedBTW side · main workingandstreamed
SIDE-FIRST.SIDE-FOLLOWUP./btw nested should stay side textremained side input, not a nestedcommand.
PARENT-WORKING PARENT-DONE.Provider inspection showed zero tools on all three side requests, inherited
parent context, and prior side history on follow-ups. Exactly one session JSONL
was created; side turns were custom entries only. The real auth digest was
unchanged.
QA receipt:
local-ignore/qa-evidence/20260820-pr-880-btw-ui/README.mdVerification
npm run checknpm run buildmock-loop.mjs --self-testtui-smoke.mjs --self-test: 5/5cli-smoke.mjs --self-test: 8/8The full coding-agent suite has unrelated existing process/MCP failures:
976 files and 8280 tests passed; 43 files and 179 tests failed. The changed
domain, root check, production build, changelog gate, and real TUI QA are clean.
Risk
The only cross-cutting change is scoped custom-overlay teardown in interactive
mode. A focused regression stacks a newer overlay above the completing custom
call and proves that only the owned handle closes.
Summary by cubic
Adds a switchable side conversation overlay for /btw and /side in the TUI, replacing the one‑shot widget and read‑only viewer. The side is multi‑turn and runs in parallel with the parent; non‑TUI still performs a one‑shot answer.
btw-historycustom entries. Side context includes recent side pairs with correct roles, pruned to the budget.interactive-modeoverlay completion.btw/index.ts,btw/side-controller.ts,btw/side-panel.ts,btw/non-tui.ts; host change inmodes/interactive/interactive-mode.ts. Tests cover controller, panel, history, query, and overlay ownership.Written for commit bf959fa. Summary will update on new commits.