Show dismissed commands as an answer footer chip; move Copy to the left gutter
Dismissed shell runs leave the transcript and fold into a "N commands" chip in the footer of the first answer at or after each run (the last answer for newer runs, or a row of its own without any answer). The chip opens the turn sheet (wide) or a full-screen page (narrow) listing the commands; each opens its output read-only with Copy output, Send to agent and Restore. On a wide conversation the answer's Copy button moves out of the footer into a 48 px gutter left of the reading column (chatCopyGutter), shown on hover or focus on desktops and always on touch; narrow widths keep it in the footer.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
# Answer Copy button in the left gutter
|
||||
|
||||
Operator request: "Let's move the copy button from the answer to the left,
|
||||
outside the chat, to the left."
|
||||
|
||||
- On a wide conversation the answer's Copy icon button sits in a strip left
|
||||
of the reading column, outside the answer, bottom-aligned with the
|
||||
answer's footer row. The footer now starts with the chips, model and time.
|
||||
- The rule is centralized in `conversation/chat_reading_width.dart`:
|
||||
`chatCopyGutter(width)` is `kChatCopyGutterWidth` (48 px) when the margin
|
||||
beside the centred 760 px reading column is at least that wide, else 0.
|
||||
With 0 (phones, narrow panes) Copy stays first in the footer as before.
|
||||
- The transcript list starts the gutter's width further left; answer rows
|
||||
draw the gutter themselves (`ChatCopyGutterRow`, provided through the
|
||||
`ChatCopyGutter` inherited width) and every other row and notice is inset
|
||||
past it (`chatCopyGutterInset`), so the column itself does not move.
|
||||
- Visibility: touch platforms always show it. Desktops
|
||||
(`prefersCompactHitTargets`) show it while the pointer is over the answer
|
||||
or the button has keyboard focus. Hidden, it stays in the focus order and
|
||||
the semantics tree (tooltip and name "Copy").
|
||||
- Files: `lib/features/chat/ui/transcript/chat_copy_gutter.dart`,
|
||||
`chat_message_view.dart`, `conversation/chat_reading_width.dart`,
|
||||
`conversation/chat_thread_view.dart`.
|
||||
- Tests: `test/features/chat/ui/transcript/chat_copy_gutter_test.dart` (the
|
||||
rule, footer vs gutter placement, alignment with the footer, hover and
|
||||
focus on macOS, semantics while hidden, a 1400 px vs 560 px conversation).
|
||||
- Verification (2026-11-09): `tool/memwatch/full.sh test/features/chat`:
|
||||
`PASS: 1161 passed, 0 failed`; `tool/analyze.sh` clean. Real Chrome
|
||||
captures (Material light and dark): at 1400x900 the gutter Copy hidden and
|
||||
shown on hover, aligned with the footer chip; at 560x1000 Copy back in the
|
||||
footer. Touch platforms (always visible) were checked by widget tests only.
|
||||
Reference in New Issue
Block a user