Repository navigation
fix(ui): keep rewind confirmation controls accessible - #133791
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 1:05 AM ET / 05:05 UTC. ClawSweeper reviewWhat this changesThis PR keeps the Rewind confirmation dialog usable over its message context menu, adds browser coverage for checkbox and cancel interaction, and consolidates equivalent theme selectors. Merge readinessKeep open. The prior changelog finding is resolved, and no introduced correctness or security defect was found; current main and v2026.8.1 do not contain this repair. Exact-head CI is still in progress. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI opens Rewind from a message context menu, then shows a portaled confirmation before sending a session rewind request to the Gateway. The confirmation must remain above the menu and not let its internal clicks dismiss that menu. flowchart LR
A[Message context menu] --> B[Rewind action]
B --> C[Confirmation dialog]
C --> D{Cancel or confirm}
D -->|Cancel| E[Restore menu focus]
D -->|Confirm| F[Gateway rewind request]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +2, Tests +13. Total +15 across 3 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the portal-local event boundary and explicit overlay ordering, with the browser regression test protecting the retained-menu cancellation flow; land after exact-head checks complete successfully. Do we have a high-confidence way to reproduce the issue? Yes. Source establishes that the body-portaled dialog is outside the menu checked by its bubble-phase document click handler, and the submitted browser E2E exercises that exact interaction; this read-only review did not execute it. Is this the best way to solve the issue? Yes. Stopping only dialog-originated bubbled clicks at the portaled dialog owner fixes the ownership mismatch without weakening capture-phase dismissal or direct Cancel and Confirm handling. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0febe37e3ce7. 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)
|
|
Merged via squash.
|
* fix(ui): keep rewind confirmation controls accessible * chore: leave rewind release notes to changelog generation
What Problem This Solves
Opening Rewind from a message context menu places its confirmation below the still-connected menu, which intercepts pointer actions. Clicking the dialog's checkbox also bubbles to the menu's outside-click handler and removes both owners. Separately, repeated theme selectors leave the current UI bundle 25 compressed bytes over its existing CSS limit, failing build and test-runtime CI jobs.
Why This Change Was Made
Keep the confirmation portaled into the document body above its menu and contain its bubbling clicks at the dialog owner. Direct Cancel/Confirm handlers, checkbox activation, capture-phase dismissal, Escape, and cleanup remain intact. Cancel retains the menu and restores focus to its Rewind control.
Factor identical confirmation-button theme selectors while preserving all theme membership, declarations, specificity and source order. Attachment styles remain in the boot bundle for first-use offline rendering. Performance budgets are unchanged.
User Impact
Rewind confirmation controls are clickable and its preference checkbox no longer dismisses the dialog. The theme colors remain unchanged, and CI can build the UI within the existing budget.
Evidence
The unchanged baseline failed a real mocked-app pointer interaction, and the extended existing archived-actions E2E failed when checking the checkbox before production edits. The baseline canonical UI build reproduced 54,809 CSS gzip bytes against a 54,784-byte limit. The candidate full build passes at 54,758 bytes, saving 51 bytes without changing the limit; finalized sidecar verification also passes.
The built-app archived-actions E2E passes all three existing desktop, mobile, and cold-archive cases. The extended case now checks preference toggling, Cancel without an RPC, retained menu/focus, reopening, and the original archived-session inertness behavior. The focused confirmation unit selection passes 18 tests; all five contrast tests pass.
Real browser interactions against the synthetic Gateway fixture compare 24 normal/hover theme states before and after: computed paint values match exactly. The repaired context-menu flow also verifies preference toggling, Cancel, one correctly addressed rewind RPC on confirmation, and restored draft text. This is local browser proof with a synthetic Gateway, not an authenticated external-provider session.
The required changed-file gate passes formatting, dead exports, i18n verification, core-test/UI types, lint and style checks. Independent Codex review is scoped-clean at its configured P0 threshold. Production is +32/-30 (net +2 for the dialog-owned event boundary), tests +13/-0; no changelog diff. No test cases were added.
Provenance: the failure is reproduced on the current baseline. The exact commit that first crossed the CSS budget is unknown; the repair preserves the existing attachment boot-loading fix.
Screenshots
Synthetic captures of the same context-menu confirmation, before and after. The original capture shows the menu covering the buttons; the repaired capture shows the accessible controls.
Review follow-up
Removed the direct changelog entry requested by the completed ClawSweeper review. Release-note context stays in this body for release generation. The UI source and E2E files are byte-identical to the originally validated commit; the follow-up changes only that changelog line.