Repository navigation
fix(tui): scroll the transcript while the transcript itself is focused - #674
Merged
Merged
Conversation
Clicking the transcript focuses `FocusBlock::Sidebar`, whose wheel arm was a v1 no-op and whose keys are owned by the background-task strip. So the wheel and PageUp/PageDown only reached the conversation while the composer held focus — the one state the operator leaves the moment they click the pane they want to read. - Route Sidebar through `mouse_scroll_conversation`, merging its arm with Composer's: both own the conversation column. - Page by the measured `conversation_page_rows()` on shift+wheel rather than the file tree's fixed 5 rows, so the mouse and the keyboard agree with §8.6. The file tree keeps its own step. - Declare Sidebar's PageUp/PageDown as `SemanticCommand::PageConversation`, so every binding for the block stays in one table. - Record `TaskStrip` as a deliberate wheel no-op, in the comment that used to claim the transcript had no scroll target. `shift_wheel_pages_conversation_like_pagedown` was replaced: it never drew, so it asserted against the pre-draw fallback and passed for the wrong reason. Hints are unchanged; the `> Chat` marker and the accent scrollbar thumb already signal ownership of the pane.
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.
Clicking the transcript focuses
FocusBlock::Sidebar, whose wheel arm was a v1 no-op; its keys are owned by the background-task strip. So the wheel andPageUp/PageDownonly ever reached the conversation while the composer held focus — the state the operator leaves the moment they click the pane they want to read.Changes
mouse.rs— Sidebar joins the Composer arm: both own the conversation column, so both scroll it. The_ => {}bucket now recordsTaskStripas a deliberate no-op instead of claiming the transcript has no scroll target.conversation_page_rows()instead of the file tree's fixedWHEEL_PAGE = 5, so the mouse and the keyboard agree with §8.6. The file tree keeps its own step, andWHEEL_PAGE's comment is corrected to say what it actually does.SemanticCommand::PageConversation(bool)— Sidebar'sPgUp/PgDnare declared in its key table (commands.rs) rather than handled inline, so every binding for the block stays declarative and covered by the exact-mapping test.> Chattitle marker and the accent scrollbar thumb already signal ownership of the pane.Behaviour change worth reviewing
Shift+wheel over the transcript used to move 5 rows; it now moves a full measured page. That is deliberate (§8.6: the wheel matches the keyboard page/step size), but it is the most visible thing in this diff.
Tests
PageDowndoes; andTaskStrip's wheel staying a no-op.shift_wheel_pages_conversation_like_pagedown— it never calleddraw_app, so it asserted against the pre-draw fallback of 5 and passed for the wrong reason. The replacements draw first and assert againstarea.height - 2, as the keyboard test already did.cargo fmt --all -- --checkandcargo clippy --workspace --all-targets --locked -- -D warningsclean. Targeted suites green:wheel10,paging3,sidebar_key_bindings1,focus66,scroll12,conversation121,transcript22.No
FORGE-DESIGN.mdchange: §8.6 already specified this behaviour, and the code was what disagreed.