Repository navigation
fix(ui): prevent order-dependent Workboard dashboard failures - #115173
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 28, 2026, 8:18 AM ET / 12:18 UTC. ClawSweeper reviewWhat this changesThe PR restores the pre-test browser URL after chat-board tests enable mock-board mode, preventing later Workboard dashboard tests from inheriting mock provider selection. Merge readiness✅ Ready for maintainer review The narrow test-isolation repair appears correct and has strong after-fix stress, browser, and Gateway proof. This PR must remain open for explicit maintainer handling because it carries the protected Priority: P3 Review scores
Verification
How this fits togetherThe Control UI’s chat-board tests change the shared jsdom URL to select a mock board provider. Workboard dashboard tests subsequently read that URL to choose a real Gateway-backed provider and assert its lifecycle behavior. flowchart LR
A[Chat-board tests] --> B[Shared jsdom URL]
B --> C[Mock-board query flag]
C --> D[Board provider selection]
D --> E[Workboard dashboard tests]
E --> F[Gateway provider lease assertions]
A --> G[Restore original URL]
G --> B
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +4. Total +4 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Land the focused URL-restoration cleanup after the protected-label maintainer review, preserving the shared-jsdom test model while preventing mock provider state from crossing test boundaries. Do we have a high-confidence way to reproduce the issue? Yes, at source level: in the non-isolated UI test environment, a chat-board test leaves Is this the best way to solve the issue? Yes. Restoring the complete original URL at the test boundary removes the leaked mutable shared state without changing production board-provider behavior or introducing a second fixture mechanism. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 10c6c0cb98dd. LabelsLabel changes:
Label 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.
|
What Problem This Solves
Fixes an intermittent Control UI test failure where running chat-board and Workboard dashboard tests together caused the dashboard to stop requesting
board.get, never attach its real Gateway provider, and fail provider-disposal assertions. This surfaced during a fresh 280-file cron, Workboard, gateway, task, CLI, and Control UI stress campaign onmain; isolated reruns incorrectly appeared healthy.Why This Change Was Made
The non-isolated UI Vitest project intentionally shares its jsdom environment. The chat-board surface test enabled
?mockBoard=1before every test but never restored the original URL, so later Workboard dashboard tests sometimes silently selected a mock board provider instead of the requested real Gateway client. Save the original path, query, and hash and restore them in the test that changes them. Production board-provider behavior is unchanged.User Impact
No production behavior changes. Developers and CI get deterministic, order-independent Workboard and Gateway board coverage, avoiding false failures that can obscure real scheduling, dispatch, and dashboard regressions.
Evidence
AI-assisted. Fresh
mainbaseline:20eda756fae6599bc9d776815016f555a64d77d6.Before: the eight-shard, 280-file mixed stress run failed in
ui/src/pages/workboard/workboard-card-dashboard.test.tsbecauseboard.getwas called zero times and the real provider lease was never acquired. The same six UI files passed independently, demonstrating the file-order-dependent shared-state leak.After, on the same isolated Blacksmith Testbox:
CHAOS_FIXED_ALL_8_SHARDS_PASSED FILES 280.WORKBOARD_MOCK_ISOLATION_ALL_6_SHUFFLED_PASSES_OK.Test Files 12 passed (12); Tests 61 passed (61).mock-openaiprovider; the generated QA summary was independently verified:QA_ARTIFACT_SUMMARY {"total":6,"passed":6,"failed":0,"skipped":0,"missing":[]}.pnpm check:changed -- ui/src/pages/chat/board-session-surface.test.tspassed, including conflict guards, formatting, dependency guards, UI i18n validation, TypeScript, and lint:QA_ARTIFACT_AND_CHANGED_GATE_PASSED..agents/skills/autoreview/scripts/autoreview --mode uncommitted:autoreview clean: no accepted/actionable findings reported.ClawSweeper's review reported sufficient behavior proof but could not complete its own source read because its sandbox returned
bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted. Its requested source/history rank-up check has been completed independently against the real maintained checkout and exact PR head:ui/AGENTS.md,test/vitest/vitest.ui.config.ts(isolate: false), the changing hooks inui/src/pages/chat/board-session-surface.test.ts, the downstream assertions inui/src/pages/workboard/workboard-card-dashboard.test.ts, the production consumer inui/src/pages/workboard/workboard-card-dashboard.ts, and the mock-selection and lease ownership inui/src/lib/board/provider.ts.git blame -L 13,30 -- ui/src/pages/chat/board-session-surface.test.tsconfirms the existing history and originalmockBoardmutation (06480d767cef). Nativescripts/pr review-checkout-main,review-checkout-pr, andreview-validate-artifactsindependently verified the current-main baseline and exact head; the validated recommendation isREADY FOR /prepare-pr, with zero findings. No source or history inspection is outstanding.The owned Testbox was stopped after proof. No browser recordings, QA artifacts, production files, configuration, or unrelated changes are included in the PR.