Repository navigation
fix(ui): prevent chat crashes after copying a message - #153281
roboclaw-bot wants to merge 2 commits into
Conversation
Keep hovered virtual rows uncontained through native mouse focus, preserving keyboard focus rings and offscreen layout skipping. The unchanged desktop Copy/right-click E2E fails on main and passes with this repair. Co-authored-by: steipete <[email protected]>
|
🦞👀 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. |
Consume the canonical repair in #153281; retain append-only publication history. Land the prerequisite before this image-gallery PR. Co-authored-by: vyctorbrzezowski <[email protected]>
|
Codex review: needs maintainer review before merge. Reviewed September 19, 2026, 8:54 PM ET / September 20, 2026, 00:54 UTC (Revision 2). ClawSweeper reviewWhat this changesThe PR keeps hovered chat message bubbles fully rendered to prevent the reported Chromium crash when right-clicking a message after copying it. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep open: current main still lacks this targeted repair, and the refined selector preserves the existing focus and metadata-tooltip contracts. No actionable patch defect was found. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI renders conversation history in virtualized rows that skip offscreen layout work. This CSS controls when an interacting row remains fully rendered so message actions and keyboard focus can work reliably. flowchart TD
A[Conversation history] --> B[Virtualized chat rows]
B --> C{Focus or bubble hover?}
C -->|Yes| D[Keep row fully rendered]
C -->|No| E[Allow offscreen layout skipping]
D --> F[Copy and context menu interaction]
E --> G[Contained metadata with top-layer tooltip]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +1. Total +1 across 1 file. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep the repair in the existing row-layout CSS, preserving keyboard focus, contained metadata tooltips, and offscreen rendering optimization. Do we have a high-confidence way to reproduce the issue? A precise reproduction path is documented: Copy a message, then right-click its bubble in Chrome for Testing 153.0.8010.12. Source inspection confirms the interaction and containment transition, but this read-only review did not independently reproduce the browser crash. Is this the best way to solve the issue? Yes: the narrow CSS exception addresses the reported containment transition without replacing the context-menu owner, removing keyboard focus support, or disabling virtualization globally. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e0a092d59e13. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Limit mouse uncontainment to hovered message bubbles so metadata retains its top-layer containment contract. Keep focus-within as a separate selector for touch keyboard focus through the existing hover guard. All 25 unchanged related E2E cases, seven end-follow browser tests, and the metadata context test pass. Co-authored-by: steipete <[email protected]>
Consume the canonical reviewed repair in #153281; its own landing remains a prerequisite. Co-authored-by: vyctorbrzezowski <[email protected]>
|
Superseded by #153260, merged as 03328bc. I verified that main now removes the focus-driven containment transition and keeps tool-summary focus rings inside their controls. Keeping this alternative would reintroduce the retired mechanism. Closing the duplicate and continuing #153241 against the landed repair; the proof and discussion remain available here. |
What Problem This Solves
Fixes: Chromium can crash the chat renderer when a user copies a message and then right-clicks that message. This also blocks the toolbar fix in #153241.
Landing status: While this revision was in CI, #153260 merged at 00:54:21 UTC on September 20, 2026 (
03328bcdb525d61eca0f3a32e61c0a343a57964b). That change removes the same focus-driven row-containment switch and moves tool-summary focus rings inside their controls. This PR now conflicts with that landed repair. Preparation and merge are paused rather than reintroducing the removed containment rule.User Impact
Copy and message context menus work together without crashing. Keyboard focus rings remain visible, and unrelated offscreen rows keep their layout-skipping optimization. No settings, dependency, or test-expectation changes.
Why This Change Was Made
The focus-ring repair in #149002 switches a virtual row from visible content back to automatic containment when mouse focus leaves its Copy button. Keeping the row visible while its message bubble is hovered avoids changing containment during the same native mouse operation, while preserving the original focus-ring repair. Metadata-only hover retains automatic containment and the existing top-layer tooltip path; the separate focus selector also remains active on touch devices.
Evidence
Reproduced the unchanged desktop message-actions test on unmodified main
741d65bcf703fff8834442f5fccc30f22c96f83a, with the exact CI Chrome for Testing 153.0.8010.12 and Node 24.19.0. It crashes during trusted right-mousedown, before the custom context-menu event.The same original test invocation passes with this source fix, with screenshot capture disabled.
All 16 existing cases pass across
chat-message-actions,chat-content-copy,chat-transcript-focus, andchat-collapsed-reply-reveal. This covers desktop/mobile actions, clipboard behavior, and focus retention with fewer than 30 mounted rows from a 200-message transcript.Fresh scoped autoreview found no actionable findings. Targeted oxfmt, stylelint, and
git diff --checkpass. No tests are skipped or weakened, and the browser version is unchanged.Blacksmith Testbox hosting run. The test commands completed successfully before the lease was stopped; the hosting workflow cancellation is cleanup, not the test verdict.
Exact-head CI on the initial revision caught the existing metadata-tooltip containment contract. The source selector was narrowed to hovered message bubbles rather than changing that assertion. The unchanged tooltip test now passes, together with all 25 E2E cases across message actions, content copy, focused-row retention, collapsed replies, and history prepend, plus all seven end-follow browser cases. Fresh scoped autoreview, oxfmt, stylelint, and diff checks pass.
Refinement proof hosting run: commands passed before explicit lease cleanup; its cancellation is not a CI verdict. The earlier end-follow and one-frame prepend CI failures did not reproduce in focused baseline or refined-source runs. No assertion, retry count, timeout, dependency, or browser version was changed; the new exact-head required CI remains the landing gate.
Before
Actual bundled UI with synthetic Gateway data, replaying only the previous containment declarations. The screenshot shows Copy completed; the following right-click reproduces the renderer crash.
After
The same bundled UI and interaction with the source fix: the context menu opens normally.
Worked on by
Work sessions
View the OpenClaw team session