Repository navigation
fix(ui): copy chat content from its context menu - #146679
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 1:59 AM ET / 05:59 UTC (Revision 5). ClawSweeper reviewWhat this changesAdds content-specific chat context-menu copying for messages, code, tables, and attachment links, and repairs clipboard fallback inside modal dialogs. Merge readiness✅ Ready for maintainer review This PR remains useful: current main still lacks the broader context-copy behavior. Both earlier findings are addressed, and no new blocking defect was found. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI renders conversation messages and attachments received from the Gateway. Its transcript context menu selects the clicked content’s existing copy payload and sends it through the shared browser clipboard helper. flowchart TD
A[Rendered chat content] --> B[Right-click handler]
B --> C{Native browser control?}
C -->|Yes| D[Browser context menu]
C -->|No| E[Existing message or content payload]
E --> F[Chat copy menu]
F --> G[Shared clipboard helper]
G --> H[Clipboard result and feedback]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +70, Tests +444, Other 0. Total +514 across 14 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep context-copy actions connected to existing content serializers and the shared clipboard lifecycle, including modal-safe fallback. Do we have a high-confidence way to reproduce the issue? Yes: current-main source exposes the footer dependency and body-mounted fallback, and the supplied browser cases exercise footerless copying and modal clipboard failure. This review did not execute them. Is this the best way to solve the issue? Yes: the patch extends the existing transcript handler, reuses canonical payload serializers, and fixes modal fallback in the shared clipboard owner without introducing competing state. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 47e4150c30ee. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
|
@clawsweeper re-review Both findings from the earlier review are addressed at
All 15 tests in the three affected browser suites pass, as do 29 clipboard/context tests, production UI types, UI test types, typed lint, and formatting. The earlier 424-test chat/context pass is retained. Final independent P0-P2 review of the complete staged candidate is clean; the published source tree matches it. The previous type/lint failures are from #146660 leaving The second run's browser-extension bootstrap failure is unrelated: the complete extension tree, runner, and dependencies match its base and tested merge, and that exact-base main job passed. Required new-head CI still must pass; no gate waiver or automerge is requested. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Ready for native landing at reviewed head
|
|
Merged via squash.
|
* commit '2acbeee461474b6ba41f5186ae1a4e0e80f4087a': (117 commits) fix(ui): import the shared deferred helper in sidebar scope tests (#146862) fix(ui): copy chat content from its context menu (#146679) perf(memory): defer legacy sidecar writer imports (#146815) fix(e2e): accept expected Kitchen Sink worker rejection (#146681) fix(ui): distinguish absolute and relative file links (#146572) feat(ui): keep file previews in tabs and render HTML (#146672) refactor: reuse shared deferred promises in UI tests (#146670) fix: gateway stop/restart refuses a healthy gateway when the Windows process snapshot misses (#146387) improve(crabbox): keep healthy cloud desktops warm on resume (#146816) fix: report blocked SQLite WAL checkpoints in status and doctor (#146775) feat: share browser dashboards with agents (#146702) fix(doctor): continue repairs after legacy agent directory collisions (#146092) feat(agents): retry cyber-refused embedded turns on Daybreak (#145291) fix: restore media uploads through protected egress (#144902) refactor(qa): share capture filter rendering (#146696) fix(cli): keep running stream jobs visible as running (#146793) refactor(parallels): share gateway readiness loop (#146694) fix(sessions): avoid rewriting already-consumed input on release (#146795) fix: preserve scheduled conversation delivery after Doctor (#146794) perf(ui): avoid redundant session-row provenance work (#146797) ...
* fix(ui): copy chat content from its context menu * test(ui): verify copying archived and oversized content * fix(ui): copy text from active modal dialogs
What Problem This Solves
Fixes missing or wrong-scope copy actions when right-clicking chat content. Message copying depended on footer actions, while code, tables, and attachment cards offered no content-specific context action.
Related: #146618
User Impact
Download links have the same access and lifetime as the existing download action. No configuration, state migration, or runtime restart is required by this source change.
Why This Change Was Made
The transcript menu now uses the clicked content's existing source and copy payload. Whole-message copy no longer requires a visible footer or truncates to the reply preview. Expanded-table menus stay inside their modal so they remain clickable. The legacy clipboard fallback also places its temporary text field inside the active modal, where browser focus and selection are permitted.
This reuses the code/table serializers and current clipboard feedback owner. The shared-feedback refactors proposed in #117430 and #122391 are not duplicated here.
Evidence
Final independent review of the complete staged candidate found no actionable P0-P2 issues. All changed-file repository checks passed, including typechecks, lint, formatting, i18n, assertion safety, and dead-export scans. Hosted CI remains required before landing.
CI follow-up
The first hosted run found two existing browser tests that expected the old menu: archived transcripts and oversized tool output. Both now assert the added Copy as markdown action and actual clipboard contents, preserving all archive/reply restrictions. Those assertions remain covered in the final 15-test browser pass. Production UI types, UI test types, typed lint, formatting, and 29 clipboard/context tests pass after the modal fix.
The unused-import blocker introduced by #146660 is fixed on main by #146689 at
4c47e8a06e5770afec242aff611a48c9ae798340. No security-owned source changes are needed in this PR.The superseded run for
94214fa4failed its required real-Gateway lane on two inherited cases:mcp-app-conformance.e2e.test.ts:925expectsno-storefor the versioned sandbox, which correctly returns immutable caching. Existing canonical fix: test(ui): match versioned MCP sandbox cache policy #146677.quota-reset-status.real-gateway.e2e.test.ts:156leaves automatic quota recovery at Signed in instead of Ready. Existing canonical fix: fix: refresh model availability after stored-account quota recovery #146691.Both prerequisite failures are now fixed on main: #146691 merged at
a13a0105deaa6258ff2fd46eba4e4ab386b2d87b; #146677 was closed because #146667 merged the canonical cache-expectation repair at2f663805b4c76be46199eb5b524bb1f3372f853d. Both commits are included in the refreshed base52ea55b7b9367a5f7cf0a2ea0ae8513a5432d5ff.The exact-head-guarded branch refresh published signed head
6034bc7e6b5c4f2c1f4517df994a2c46ed2ac6f9. Its complete copy patch is unchanged. All 13 changed production/test file blobs match the tested and reviewed candidate; only the shared assertion baseline incorporates other main changes. Fresh independent P0-P2 review is clean. Existing Chromium proof is retained, not described as rerun. Current-head CI must pass before native preparation and merge. The previous failed run remains recorded.The recent ClawSweeper review of
94214fa4has no remaining findings; the refreshed patch is identical. The separate browser-extension selected-tab bootstrap failure from the previous run did not recur in the final-head run. No assertions, timeout limits, or required checks were waived.