Files
pipelines/app/notes/chat-horizontal-overflow.md
T

32 lines
1.8 KiB
Markdown

# Chat code and table overflow affordances
Code blocks and markdown tables now show an explicit 'Scroll horizontally'
footer with a physical direction arrow and a persistent native scrollbar only
when content actually overflows. The thumb has its own gutter and the cue sits
below the viewport; neither overlays code/table text. The cue is excluded from
selection, so copying a transcript never includes UI instructions.
The viewport retains its own ScrollController, and existing vertical wheel /
trackpad forwarding is unchanged. Touch dragging and native scrollbar dragging
still work. Keyboard users can focus the overflowing viewport, see a theme
focus outline and use unmodified left/right arrows. Selection-focused arrow
keys and modifier chords are left alone. Screen readers get content-specific
labels ('Horizontally scrollable code block' / '... table') and directional
scroll actions. Indicators update at both endpoints, including RTL. Short
content has no extra cue or gutter.
Changed: transcript/chat_horizontal_viewport.dart, chat_transcript_selection.dart,
chat_markdown_view.dart and an optional controller on the shared
ui/layout/wheel_scroll_forwarding.dart HorizontalScrollView.
181 transcript, selection, copy/hover, wheel-forwarding and new affordance tests
passed (/tmp/memwatch/out.Ut4aN1, peak1457MB,12s). New tests cover Material and
Cupertino light/dark at2x text, no overflow, endpoint changes, keyboard focus,
RTL, retained offsets, vertical wheel forwarding, horizontal touch and code/table
semantics. Analyzer clean (flutter-analyze.jBzTTK). One initial gesture test used
the center of unconstrained text beyond the viewport; corrected to a visible
viewport point before the successful run.
Integrated browser capture/review is with the parent task; no production chats,
shared services or physical devices were touched by this lane.