Repository navigation
test(ui): share browser page cleanup across layout fixtures - #146805
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, 6:04 AM ET / 10:04 UTC (Revision 3). ClawSweeper reviewWhat this changesThis PR shares browser-page cleanup across UI layout tests while retaining their scenarios, assertions, and existing browser ownership. Merge readiness✅ Ready for maintainer review The cleanup remains useful and has no actionable correctness findings. It preserves fixture ownership and belongs to the active maintainer-requested test audit; current main still uses the repeated cleanup pattern. Priority: P3 Review scores
Verification
How this fits togetherControl UI layout tests load fixtures into Chromium and inspect rendering and interaction behavior. The shared helper awaits each test body and closes its page while existing fixtures continue to own browsers and contexts. flowchart TD
A[Layout test scenario] --> B[Existing page factory]
B --> C[Shared page helper]
C --> D[Run and await assertions]
D --> E[Close page on success or failure]
E --> F[Preserve test result]
G[Suite teardown] --> H[Close shared contexts and browser]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests -194. Total -194 across 5 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep page cleanup centralized while leaving page creation, shared contexts, and borrowed app-page lifetimes with their existing fixture owners. Do we have a high-confidence way to reproduce the issue? Not applicable: this consolidates existing test cleanup rather than repairing a reported product defect; tests were not executed during this read-only review. Is this the best way to solve the issue? Yes. The narrow page helper preserves existing failure handling and ownership without introducing the broader E2E harness's context lifecycle. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b938f093b1e4. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Merged via squash.
|
* refs/heads/temp/pr-146883: (159 commits) fix: retain route ownership while discovering conversations (#146927) refactor: reuse plugin fixture shell runner (#146920) fix(worker): stop preparing disabled live previews (#146896) fix(runtime): support Bun across tooling suite (#146807) chore(i18n): refresh native locales (#146924) perf(secrets): limit expiry metadata to transient credentials (#146882) fix(ui): preserve queued refreshes during session discovery (#146535) test(ui): wait for quiet scrolling and close named file tabs (#146836) fix(ui): prevent Usage hour filters from freezing during DST (#146919) test(ui): share browser page cleanup across layout fixtures (#146805) ci: balance complete PR runtime test groups (#146916) improve(infra): reduce scheduling work for session notice bursts (#146818) improve: prepare Gateway skill commands asynchronously (#146812) improve(agents): skip unused assistant delivery parsing (#146858) improve(ui): reuse date formatters across timestamp lists (#146789) fix(tests): isolate installer and Docker shell snippets (#146897) test(heartbeat): share explicit channel configuration fixtures (#146853) fix: retain conversation reply claims through write admission (#146866) perf(sessions): bound history reads and stabilize cursor paging (#146770) fix(ui): let slow dashboard downloads finish before recovery (#146881) ...
* refs/heads/temp/pr-146833: (43 commits) fix(memory): preserve newer indexes and disclose automatic rebuild costs (#146908) fix: retain route ownership while discovering conversations (#146927) refactor: reuse plugin fixture shell runner (#146920) fix(worker): stop preparing disabled live previews (#146896) fix(runtime): support Bun across tooling suite (#146807) chore(i18n): refresh native locales (#146924) perf(secrets): limit expiry metadata to transient credentials (#146882) fix(ui): preserve queued refreshes during session discovery (#146535) test(ui): wait for quiet scrolling and close named file tabs (#146836) fix(ui): prevent Usage hour filters from freezing during DST (#146919) test(ui): share browser page cleanup across layout fixtures (#146805) ci: balance complete PR runtime test groups (#146916) improve(infra): reduce scheduling work for session notice bursts (#146818) improve: prepare Gateway skill commands asynchronously (#146812) improve(agents): skip unused assistant delivery parsing (#146858) improve(ui): reuse date formatters across timestamp lists (#146789) fix(tests): isolate installer and Docker shell snippets (#146897) test(heartbeat): share explicit channel configuration fixtures (#146853) fix: retain conversation reply claims through write admission (#146866) perf(sessions): bound history reads and stabilize cursor paging (#146770) ...
* temp/pr-146802: (51 commits) improve: reduce worktree filesystem stalls and archive syncs (#146906) fix(ui): avoid extra chat rail work while replies stream (#146883) improve(ui): speed up populated Usage timelines (#146947) test(gateway): retain auth recovery failure diagnostics (#146925) fix(tests): create private temporary home directories (#146931) fix(backup): preserve discovery under concurrent state writes (#146912) fix: keep queued deliveries in their original state directory (#146917) fix(discord): settle voice waveform work before releasing input (#146885) fix(memory): preserve newer indexes and disclose automatic rebuild costs (#146908) fix: retain route ownership while discovering conversations (#146927) refactor: reuse plugin fixture shell runner (#146920) fix(worker): stop preparing disabled live previews (#146896) fix(runtime): support Bun across tooling suite (#146807) chore(i18n): refresh native locales (#146924) perf(secrets): limit expiry metadata to transient credentials (#146882) fix(ui): preserve queued refreshes during session discovery (#146535) test(ui): wait for quiet scrolling and close named file tabs (#146836) fix(ui): prevent Usage hour filters from freezing during DST (#146919) test(ui): share browser page cleanup across layout fixtures (#146805) ci: balance complete PR runtime test groups (#146916) ...
…ssion-list-roster-batch-20260913 * commit 'f513c0f345f7f2514c49ccfbc00adc3f78b9a755': (46 commits) chore(i18n): refresh native locales (#146924) perf(secrets): limit expiry metadata to transient credentials (#146882) fix(ui): preserve queued refreshes during session discovery (#146535) test(ui): wait for quiet scrolling and close named file tabs (#146836) fix(ui): prevent Usage hour filters from freezing during DST (#146919) test(ui): share browser page cleanup across layout fixtures (#146805) ci: balance complete PR runtime test groups (#146916) improve(infra): reduce scheduling work for session notice bursts (#146818) improve: prepare Gateway skill commands asynchronously (#146812) improve(agents): skip unused assistant delivery parsing (#146858) improve(ui): reuse date formatters across timestamp lists (#146789) fix(tests): isolate installer and Docker shell snippets (#146897) test(heartbeat): share explicit channel configuration fixtures (#146853) fix: retain conversation reply claims through write admission (#146866) perf(sessions): bound history reads and stabilize cursor paging (#146770) fix(ui): let slow dashboard downloads finish before recovery (#146881) fix: share Doctor lifecycle coordination with SQLite workers (#146714) fix: retain native session model provenance (#146801) fix: settle embedded transcript repairs before session cleanup (#146842) feat(macos): improve agent navigation and chat layout (#146531) ...
What Problem This Solves
The browser layout tests repeat the same page cleanup around dozens of otherwise distinct scenarios.
User Impact
Internal-only test maintenance; there is no user-visible or visual change.
Why This Change Was Made
Use one narrow helper for the existing page acquisition, awaited test body, and awaited cleanup in 81 source blocks. Keep shared browser/context ownership, setup-failure cleanup, mobile fixtures, and borrowed app-window pages with their existing owners. The helper preserves the existing handling of close errors; it adds a promise continuation before cleanup, with no runtime speedup claim.
This removes 194 net test/support lines, including the new helper and 32 lines of formatter growth. Production code is unchanged.
Evidence
All 148 cases in the four complete browser files passed before and after the change on Node 24.19.0 and Chrome 152.0.7977.83, with identical per-file names, ordering, and outcomes and no skipped cases. Source comparison preserves every factory expression and test body and reconstructs each original file exactly. Six controls against the actual helper and unchanged close owner cover acquisition/body failures, cleanup error handling, page identity, ordering, and awaited completion. Independent P2 review found no actionable findings. The mapped changed gate passed, including core test and UI types, formatting, lint, i18n, and dead-export checks.
Earlier hosted runs exposed unrelated mainline workflow-fixture and file-tab selector failures. The branch includes both canonical repairs; its five-file cleanup patch is unchanged. Original failure evidence is retained, and validation is running on the new head.