Repository navigation
feat(tui): start a chat draft from any block but the terminal panel - #693
Merged
Merged
Conversation
`type_to_compose` refused Footer, TaskStrip and Sidebar as control surfaces, so a printable key with no local binding there was dropped: a click on the transcript column (SIDEBAR) left the keystroke with nowhere to go, and the composer stayed the only way in. Only `Panel` keeps an unconsumed printable key now — its PTY owns every byte the panel does not claim. Everywhere else the block's own bindings are matched first, so a displayed shortcut never loses to a draft (`n`/`s`/`d` in the session list, `x`/`a`/`d`/`i` in the transcript, the footer chips), and focus moves with the character, so a draft is never inserted behind a pane still painted as the keyboard owner. This reverses two deliberate guards: 56deb92 kept the footer's keys so a shell line typed after one Tab could not become a draft, and 212deec (#665) kept `:q`/`/quit` out of chat from the session list and the transcript. Both inputs are reachable again; they surface the text in the composer instead of swallowing it. Docs: the README keyboard table and FORGE-DESIGN 8.3 carry the rule and its exception. The tests pinned to the old drop behavior are rewritten, with new coverage for the terminal carve-out and for bound keys beating type-to-chat. Paste is unchanged: bracketed paste still only reaches the composer from the composer block.
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.
Widens the surface that reaches the chat input: any printable key the focused block has no binding for now starts (or continues) a draft in the composer, from every block except the terminal panel.
Why
type_to_composetreatedFooter,TaskStripandSidebaras control surfaces that kept every keystroke. A printable key with no local binding in those blocks was dropped, so focusing the composer stayed the only way in — clicking the transcript column (theSIDEBARblock) left the keystroke with nowhere to go.What changed
Panelkeeps an unconsumed printable key (app/input.rs::keeps_unconsumed_typing); its PTY owns every byte the panel does not claim.n/s/din the session list,x/a/d/iin the transcript, the footer chips.This reverses two deliberate guards — please confirm the call
56deb92fexcludedFooterso a shell line typed after one Tab could not become a draft whoseEnterwas submitted to the model.212deecf(fix(tui): slash hijack, fork feedback, help geometry #665) excludedTaskStrip/Sidebarso:q//quitcould not leak into chat.Both inputs are reachable again. The text now lands, visibly, in the composer instead of being swallowed — but the footer path in particular is the same one-keypress-from-Tab hazard.
Left alone
handle_navigator_tab_row_keyreturnsOk(true)for anything unmodified, pinned bysession_verbs_do_not_fire_from_the_tab_row). Happy to make it follow the same rule if the row should behave like the panes.Ctrl+Shift+Vstill only reaches the composer from the composer block. Widening it means mirroring every field owner (editor, search filter, navigator buffers), or paste would land in the wrong pane.Verification
cargo test --package forge-tui --locked app::→ 514 passed, 5 failed. All 5 fail identically on a cleanmainin this environment (sandbox-deniedbashtool calls plus one file-watcher test), so they are environment failures, not regressions.cargo fmt --all -- --checkclean.cargo clippy --package forge-tui --all-targets --locked -- -D warningsclean.terminal_panel_keeps_unbound_typingandcontrol_surface_verbs_still_beat_type_to_chat.