Repository navigation
Conversation
The dock-pane + chrome:'surface' shell drew a frame it did not fully own: the top rule and side bars came from the pane while the bottom edge relied on the editor's splice row, so the box leaked and body text overflowed. Replace it with a BtwView mounted through mayflyEditorPanels (the /agents attach shape): the view owns the whole frame (top rule, framed rows, inline follow-up prompt, guidance) and its half-screen height budget. - the waiting loader yields to the first reply bytes and disappears when the side agent settles instead of trailing the finished answer - dismiss unmounts the view synchronously before draining the side agent, so Esc/q close immediately even while a running agent's dispose is still pending; disposal failures no longer escape as unhandled rejections from a key press - Escape and the arrows resolve through mayflyKeymap, so kitty CSI-u and modifyOtherKeys encodings close and scroll exactly like legacy bytes
This was referenced Sep 4, 2026
Collaborator
Author
|
Closing: branch has gone stale and conflicts with main. The /btw rework can be picked up from a fresh branch when revisited. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
/btwside-question panel is rebuilt from a dock pane withchrome: 'surface'into aBtwViewmounted into the editor slot throughmayflyEditorPanels— the same shape as the/agentsattach view. The view now owns its entire frame (a╭ BTW ─ ● running ─╮top rule,│-framed body rows, an inline follow-up prompt, and a guidance row) and its own half-screen height budget.User-visible bugs fixed
├┤splice row as the bottom edge; the box visually leaked and body text could overflow. The view now draws and closes the whole box itself, at every width (minimum width 5, wraps inside the frame).thinking...loader: the loader now yields as soon as the first reply bytes land and disappears when the side agent returns to idle (kimi parity), instead of trailing the finished answer.dismiss()awaited the side agent'sdispose()— which stops the agent loop and awaits its exit — before unmounting, so closing during streaming hung on the drain. The view now unmounts synchronously and disposes in the background; disposal failures no longer become unhandled rejections from a key press.data === '\x1b'. On terminals where pi-tui negotiates the kitty keyboard protocol, the Escape key arrives as CSI-u (\x1b[27u) and the comparison never matched. Escape and the arrow keys now resolve throughmayflyKeymap(ACTION_CANCEL/ACTION_MOVE_UP/DOWN), which normalizes legacy, kitty, and modifyOtherKeys encodings — the same path every other panel uses.The fork/seed/watermark/follow-up logic is unchanged;
/btwwithout input still dismisses, and a new question still replaces the single slot.Verification
pnpm run verify:changedgreen;pane-btw.tsat 100% statement/branch/function/line coverage (27 specs, including kitty-encoded Esc/arrows, pending/rejecting disposal, scroll clamping, and width scans).│…│at 80 and 40 columns, inline follow-up continues the same side session, and a kitty-encoded Esc dismisses the view immediately mid-stream.Notes
chrome: 'surface'plumbing,connectedAbove,mayfly/btw-command) is left in place and unused; removing it is a separate cleanup.'\x1b'comparison still exists inattach-view.ts,canonical-panel.ts, andplan-review-panel.ts— tracked in a follow-up issue.