Expose horizontal chat overflow with native scrollbars and keyboard controls

This commit is contained in:
2026-11-07 20:35:13 +00:00
parent 5ddd52f817
commit 004979ccd0
6 changed files with 432 additions and 4 deletions
+31
View File
@@ -0,0 +1,31 @@
# 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.