Repository navigation
feat(chat): copy raw input and output from tool details - #1565
Conversation
An opened work row now labels its Input and Output (or Error) and puts a quiet copy at the end of each label. The input copy takes part.input as the agent sent it, never the drawn diff, checklist or question card. The output copy takes the loaded whole output when there is one, else part.output, including a todo call's raw answer that the list view leaves out. Its name says the scope: Copy output for a complete output, Copy partial output while a cut output's rest has not loaded (also after a failed load), Copy whole output once it has. An omitted input keeps its explanation and gets no copy; an empty input gets a disabled one. Opening a row loads and copies nothing. A refused copy shows the existing "Couldn't copy" line and never Copied. On touch the copies are 44px targets. Checked with the new scripts/tool-copy-demo-regression.ts (enrolled in the browser lane) on the production demo build at 1440 and 390: it reads the real clipboard back for raw input whitespace, partial and whole output, todo and error output, omitted and empty input, a held and a failed load with retry, and a refused clipboard. ko/ja/zh entries, a DESIGN.md entry and a changelog fragment are included.
Draw the copy focus ring inside the button so the detail edge no longer clips it, raise the copy labels to the chat body size on touch and 14px with a mouse, keep a disabled copy at --text-dim instead of an opacity that fell below AA, and give a mouse press the inset accent plate of .icon-button:active.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Merge Risk: ⚪ Minimal · up to
|
#1572) ## Change Remove two features added after v0.4.12 because the maintainer judged them unnecessary during manual QA of main: - **Next agent needing attention** (#1563): remove Mod+Shift+A, the command palette action and aliases, its Settings > Shortcuts binding, action-only navigation code, translations in all three translated locales, documentation, and feature-only tests. - **Raw tool detail copying** (#1565): remove the raw input/output copy buttons, copy-only state and styling, translations, documentation, and feature-only browser test. Restore the pre-#1565 tool detail layout. Deliberately keep the `agentRoster.ts` extraction and App-owned sidebar activity state because the sidebar still uses them. Preserve the roster regression test as `agentRoster.test.ts`. Keep the existing Output/Error headings, typed tool input, whole-output loading, and message/Markdown copying. Stored overrides for the removed shortcut are ignored by the existing shortcut-ID allowlist. Existing settings tests already cover unknown stored IDs, so no duplicate test or storage migration is needed. Neither `git tag --contains 626204f` nor `git tag --contains 0cd899f` lists a tag (both exit 0). Delete both unreleased changelog fragments rather than adding a Removed entry. No new UI design is introduced; the tool detail returns to its existing pre-#1565 design. ## Validation - `bun run check fast`: exit 0; 5,810 passed, 0 failed, 8 skipped. Generated types/themes, workflow syntax, typechecks, build, and unit tests passed. - Affected unit files: exit 0. `bun test src/lib/shortcuts.test.ts src/lib/settings.test.ts src/lib/agentRoster.test.ts src/lib/sidebarOrder.test.ts src/lib/sidebarActivity.test.ts scripts/ci-browser.test.ts scripts/pages-gate.test.ts` - Browser-lane bookkeeping tests after final cleanup: exit 0. `bun test scripts/ci-browser.test.ts scripts/pages-gate.test.ts` - `bun scripts/sidebar-activity-demo-regression.ts`: exit 0. - `bun scripts/shortcut-exact-modifiers-demo-regression.ts`: exit 0. Both used a fresh shared demo build and isolated fictional fixtures. - Manual browser QA of the actual built client at desktop and phone sizes, light and dark: no tool-detail copy controls; Output/Error and whole-output loading remain; removed palette action and shortcut setting are absent; old saved/default chords do not navigate; the existing palette and Settings shortcuts still work. - `git diff --check`: exit 0. - Independent Codex final review: **APPROVE**, no concrete blockers. The reviewer inspected all 12 desktop/phone, light/dark screenshots. Its only initial finding was a dead reference to the removed browser script in the parallel runner; that reference is removed. The Omo reviewer could not start because this session reached its nesting limit. All checks used isolated fixtures, not the maintainer's live herdr session.
Change
An opened tool call in Chat (a work row's detail) now labels its Input and Output (or Error). Each label has a quiet copy button at the end of its line, so you can take the call's raw data without selecting text out of a bounded box.
part.inputexactly as the agent sent it, whitespace and trailing newline included. It never copies the diff, checklist, question card or command view drawn from it. If the input was omitted for size, the row keeps its "Arguments omitted (too large)" explanation and offers no input copy. An empty input shows a disabled copy.CopyButtonfeedback the message copies use.--chip-htall and gets the same 24px hit expander the message copies have. The hover plate applies only on hover-capable pointers..icon-button:active's plate at once, as an inset accent edge that moves nothing; a finger's press is the app's usual dim. A disabled copy turns--text-dim(5.29:1 light, 6.12:1 dark) instead of fading below AA.Design: I found no Codex or Claude app precedent for this. It follows the copy that Agent of Empires puts inside its opened tool cards, without its wrap toggle (output here already wraps in a bounded box) and without its silent failure on a refused copy. It keeps the quiet row chrome this app shares with the Codex and Claude apps: no toolbar, and nothing on a folded row. DESIGN.md's Work block section records this. No code was adapted, so THIRD_PARTY_NOTICES.md is unchanged.
Validation
bun scripts/tool-copy-demo-regression.tsis new and enrolled inscripts/ci-browser.sh. It runs on the production demo build at 1440 and at 390 with mobile touch, and reads the real browser clipboard back. It covers:It passes on its own and under
bun run check run --build.bun run check fastpasses workflow syntax, generated types and themes, typecheck and build. Of the unit tests, every suite this change touches passes (i18n, conventions, ci-browser, changelog fragments). Under the PC's load (load average 60-130 on 32 cores),server/portal.test.ts,scripts/check.test.ts,server/session-history.test.ts,server/omp.test.tsandscripts/install-star.test.tstimed out. Run alone,install-star.test.ts,omp.test.tsandportal.test.tspass. Thecheck.test.tssource-identity case and thesession-history.test.tsrollback-journal case fail the same way on unchanged main.Screenshots: 390 (iPhone 14 emulation) and 1440, light and dark, plus Korean at 390. They cover rest, hover, focus, pressed, copied, disabled, loading, retry, a failed copy, error, omitted, partial, whole and long-output states. No horizontal page scroll, 44px touch targets, label sizes, an unclipped focus ring and AA contrast (opacity included) were measured.