Repository navigation
fix: prevent leaked chat preview Escape listeners in tests - #143191
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 real behavior proof before merge. Reviewed September 9, 2026, 10:51 AM ET / 14:51 UTC. ClawSweeper reviewWhat this changesThe PR clears the rendered chat-preview test fixture so its Escape listener cannot interfere with later picker tests. Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this is a focused, correct fixture-lifecycle repair that current main still needs. No actionable patch defects were found. Priority: P3 Review scores
Verification
How this fits togetherThe Control UI conversation rail previews messages and captures Escape to dismiss previews. Its tests share a browser-like environment, so fixture teardown must release listeners before subsequent tests run. flowchart TD
A[Markdown preview test] --> B[Render conversation rail]
B --> C[Window Escape listener]
A --> D[Clear rendered fixture]
D --> E[Directive teardown]
E --> F[Remove Escape listener]
F --> G[Later picker tests receive Escape]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +1. Total +1 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep fixture cleanup at the rendering owner, preserving the Markdown safety cases and existing picker assertions. Do we have a high-confidence way to reproduce the issue? Yes: source shows the preview listener surviving DOM-only fixture removal, and the PR describes the failing rail-to-picker order. No tests were executed during this read-only review. Is this the best way to solve the issue? Yes: rendering nothing invokes the existing Lit teardown contract at the fixture owner without weakening assertions or changing production listeners. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 425a90d0ccfc. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
…er-ownership-20260909 * origin/main: (147 commits) fix(cli): reject blank account selectors before command startup (#143088) fix(update): repair young runs after recorded drivers exit (#143136) test(telegram): close model callback fixture connections (#143197) improve(test): reduce Telegram policy fixture startup overhead (#143192) test(ci): stabilize systemd manager shim timing (#143134) fix(test): retire chat preview Escape listeners during teardown (#143191) test(memory-wiki): share visibility test callbacks (#143181) fix(ci): accept native iOS keychain filenames (#142968) fix(ci): show publication observations in FRV status (#143171) fix(github): point the stuck-FAQ auto-response at a live anchor (#143194) docs: correct verified accuracy defects in CLI, tools, and automation pages (#143179) refactor(tests): remove duplicate Mistral cache-cost test (#143172) fix(doctor): complete canonical model-reference migration (#142284) fix(ci): reject stale and empty timing sample cohorts (#143182) fix(ui): remove first-reply confetti from chat (#143167) docs: split help/faq into 13 topic pages (#143150) refactor(docs): require caller-owned route indexes (#143164) fix(android): distinguish connection status from chat readiness (#143128) refactor: share agent-turn execution test defaults (#143166) fix(cli): print immutable-config refusals without crash framing (#143140) ...
Related: #139428
Additional instructions
The branch is hosted in this repository and remains editable by repository maintainers.What Problem This Solves
Resolves a problem where shared UI test runs lose Escape events after the chat position rail Markdown preview tests, causing two otherwise passing picker tests to fail.
Why This Change Was Made
Clear the table's Lit-rendered fixture before disconnecting its transcript controller. This invokes the existing directive teardown and removes the preview's window listener. Removing the DOM alone does not notify a Lit AsyncDirective that its root part was disconnected.
User Impact
No product behavior changes. Developers get isolated test fixtures while retaining both Markdown preview cases and all existing picker assertions.
Evidence
78e9b1432867356d47682de04ec68b6f840bbe45on macOS/Node 26.8.1; the original failure was recorded on Linux/Node 24.19. This is not a full-suite performance acceptance result.