Repository navigation
Description
Story
As a person using xmd repl, I want to scroll the pane or drawer beneath my mouse pointer with the wheel, so reading longer content does not require focusing and repeatedly activating Earlier/Later buttons.
For example, I keep keyboard focus in the Sidekick composer, move the pointer over its conversation and scroll upward to read older messages. Only that conversation's visible window moves. Typing still goes to the composer, and the selected round and History position stay unchanged.
Current gap
Windowed REPL readings expose [↑ earlier] and [↓ later] controls. They take screen space and add Tab stops for an ordinary scrolling action. Equivalent Scroll up/Scroll down controls appear in settings.
The installed terminal input library already reports wheel direction and pointer coordinates. The current REPL input normalizer drops those events. Existing viewport offsets and visible-row admission provide a starting point; the lack of a renderer-owned scrolling API does not establish a need to replace the renderer or upgrade dependencies. Completed #875 explicitly excludes wheel-driven scrolling and retains the buttons.
Contract
- Replace the Earlier/Later window-scrolling controls throughout the REPL with mouse-wheel scrolling. Inventory every affected pane, list and drawer, including round lists, conversation/session lists, execution readings, Sidekick conversations, retained-value readings, questions, permissions and History-list drawers. Include equivalent Scroll up/Scroll down buttons where they provide the same window-scrolling mechanism.
- Wheel up moves toward content above the current window; wheel down moves toward content below it. Target the visible scrollable region beneath the pointer, including noninteractive text and blank space within its viewport. A click or keyboard-focus change is not required.
- Scrolling changes that reading's viewport only. It does not activate a row, select a round or History checkpoint, answer a question, submit a draft or move keyboard focus.
- An open modal permits scrolling only its visible interactive subtree. A wheel event does not reach covered content behind it. At a region's beginning or end, scrolling stops without wrapping or moving a neighboring pane.
- Preserve complete content reachability after removing the buttons. Keyboard users navigate and reveal off-screen children through Navigate
xmd replby focus regions and their children #895's accepted region model; long read-only content also has a documented keyboard scrolling path. Settle that path with Navigatexmd replby focus regions and their children #895's arrow-editing rules so composers retain ordinary text editing. - Only visible rows participate in rendering, focus and pointer targeting. Changing a viewport must keep these in agreement, including when the focused child would otherwise leave the window. Specify the focus-preserving behavior for that case without making wheel input steal focus.
- Preserve each reading's independent viewport and existing live-tail behavior. After scrolling away from live output, background activity does not unexpectedly pull the reader back. Sidekick's execution Follow checkbox remains a separate behavior.
- Keep close controls, headings, draft controls and required actions reachable as content scrolls. Removing window buttons does not remove real previous/next selection controls or redefine chronological History navigation.
Product verification
- With a non-empty draft focused, wheel-scroll another pane in both directions. Capture the actual scrolled content and visible focus, then type again: text reaches the original draft and its previous contents remain.
- Exercise long versions of every inventoried reading through real terminal wheel input. All content and actionable rows remain reachable without Earlier/Later scrolling buttons, including wide, intermediate and narrow layouts.
- Open a question, permission, configuration or retained-reading drawer. Wheel over its content and blank viewport cells, then over the covered background. Only the permitted drawer reading moves; no underlying control activates and no answer is fabricated.
- Scroll to both boundaries and through a resize. Verify offsets clamp, no neighboring pane scrolls, no stale target receives input and selection remains unchanged.
- Exercise keyboard-only navigation and long read-only content under Navigate
xmd replby focus regions and their children #895. Reveal further rows and reach actions without the removed buttons; arrow editing in both composers remains correct. - Scroll away from active output while an agent continues working. New output does not steal focus or discard the inspected position; the documented return-to-live behavior still works.
Use the existing REPL input, composition and real-terminal regression suites for focused evidence. Helper-only offset tests do not establish wheel delivery, pointer targeting or visible behavior.
Architecture and sequencing
Normalize terminal wheel events through the existing host/input boundary and dispatch them using the committed frame and mounted component ancestry. Reuse owned viewport state, admission and Freedom's sole focus owner. A scroll target covers a viewport even when its cells contain no clickable control; it is not inferred solely from existing button hit targets. Specify wheel-step size and focused-child visibility behavior before implementation.
The Product Owner chooses #895 before the next UI redesign. Deliver this scrolling follow-up after #895 and before the next UI pass relies on the removed buttons. Coordinate their region and keyboard contracts during design.
This changes the existing specification's window-control requirements. Update specs/repl-spec.md, affected architecture descriptions, help, fixtures and current mockup expectations together. #1002 owns the Entry-to-Round rename; use Round in the resulting experience without expanding this story into that rename.
Related: #895 (focus regions), #875 (completed layout/admission foundation), #971 (next layout and Follow experience), #1001 (large-value inspection measurements). This story adds no new execution, Journal or agent-continuation semantics.
Activity