Skip to content

🤖 tests: setupWorkspaceView and withSharedWorkspace wait for workspace setup to end - #7546

Merged
ThomasK33 merged 1 commit into
mainfrom
tests/ui-helpers-wait-setup
Oct 26, 2026
Merged

ThomasK33 merged 1 commit into
mainfrom
tests/ui-helpers-wait-setup

Conversation

@ThomasK33

Copy link
Copy Markdown
Member

Summary

setupWorkspaceView (tests/ui/helpers.ts) and withSharedWorkspace (tests/ipc/sendMessageTestHelpers.ts) now return only after workspace setup has ended. UI tests no longer race the controls that setup holds back: the row's actions menu, quick archive, and the Review panel.

Fixes #7543

Background

While metadata.isInitializing is true, a sidebar row shows a cancel button in place of its actions menu, hides quick archive, and the Review tab shows a placeholder. setupWorkspaceView did not wait for setup, and withSharedWorkspace waited for init-end only 1.5 s, best effort. #7450 and #7541 fixed this race in single tests. In an instrumented run of all of tests/ui, 224 of 328 setupWorkspaceView calls found the row still in setup.

Implementation

  • setupWorkspaceView: after it selects the row, it waits up to 30 s for the row's actions-menu trigger (button[data-workspace-id=<id>][aria-haspopup]). The row renders that trigger only after setup. The wait uses this positive signal, not the absence of the cancel button's label text: if the trigger ever goes away, the wait fails loudly instead of passing at once. The helper has no ORPC client, so it waits on the DOM.
  • withSharedWorkspace: env.services.initStateManager.waitForInit(workspaceId) replaces the 1.5 s best-effort wait, as createAppHarness already does. It never throws.
  • The three per-test waitForInitComplete calls from 🤖 tests: the lifecycle archive tests wait for workspace setup before using the row's archive controls #7541 in lifecycle.test.ts are no longer needed, so they are removed. 🤖 tests: the review focus test waits for the real panel before Ctrl+2 #7450's Review-panel mount wait in focus.test.ts stays, because the test uses that element. No caller needs the workspace during setup: actionsMenu.test.ts uses createAppHarness and its own init wait, and initMessage.test.ts is a component test. So there is no opt-out.

Validation

  • Forced setup window: a scratch .xum/init hook with sleep 8, committed in the test repo (not in this PR), and the lifecycle archive tests without their per-test waits. With this PR: 3/3 pass. With main's helpers: 3/3 fail (Quick archive button not found, Workspace actions menu button not found).
  • All of tests/ui (91 suites, 482 tests) passes. Run time: main 428/523/761 s and this change 325/654/672/338/642 s, interleaved on a shared host, so the difference is within noise. The new waits add 80 s in total over 328 calls (max 587 ms). That is at most about 5% of wall time with 4 workers, and less in practice, since createAppHarness callers waited for init anyway.

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $266.13

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T08:41:02.451297Z 7243068 PR opened
🔒 Security Review ✅ Completed 2026-10-26T08:41:09.243798Z 7243068 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

🟢 e2e stories (Haiku): 14 passed

27 agent steps · 7 replayed from cache · 32 model calls · 224.9k tokens (72% cached)
Spend: $0.10 of the $1.00 cap (proxy ledger)

All 14 tests in 9 files
Test Agent Time
🟢 chatRestart.e2e.ts · 1 passed 2 steps · 4 calls 26.6s
🟢 a chat survives a restart of the server 2 steps · 4 calls 26.6s
🟢 compaction.e2e.ts · 1 passed 3 steps · 7 calls 45.9s
🟢 /compact replaces the old chat with a summary 3 steps · 7 calls 45.9s
🟢 pluginTrustRestart.e2e.ts · 1 passed 4 steps · 2 calls 9.9s
🟢 a trusted plugin hook stays trusted after the server restarts 4 steps · 2 calls 9.9s
🟢 settingsRoundTrip.e2e.ts · 1 passed 3 steps · 5 calls 31.6s
🟢 a chat survives trips through Settings 3 steps · 5 calls 31.6s
🟢 sidebarPerWorkspace.e2e.ts · 1 passed 4 steps · 1 call 7.7s
🟢 a new workspace starts with its right sidebar collapsed while another keeps it open 4 steps · 1 call 7.7s
🟢 smoke.e2e.ts · 1 passed 2 steps · 1 call 2.5s
🟢 the agent opens the playground workspace 2 steps · 1 call 2.5s
🟢 streamErrors.e2e.ts · 1 passed 1 step · 1 call 6.8s
🟢 stream errors show in the chat, and the chat recovers 1 step · 1 call 6.8s
🟢 todoNudge.e2e.ts · 1 passed 2 steps · 5 calls 24.0s
🟢 the agent finishes open TODO items after the turn-end nudge 2 steps · 5 calls 24.0s
🟢 touchAlignment.e2e.ts · 6 passed 6 steps · 6 calls 25.6s
🟢 the Settings close button is level with the title on a touch screen 390px wide 1 step · 1 call 3.8s
🟢 the Settings close button is level with the title on a touch screen 768px wide 1 step · 1 call 4.6s
🟢 Backup settings checkboxes are small and level with their labels on a touch phone 1 step · 1 call 8.1s
🟢 the heartbeat checkbox is small and level with its label on a touch phone 1 step · 1 call 3.3s
🟢 a reply's model and time stay on one line on a touch phone 1 step · 1 call 3.0s
🟢 the workspace actions menu stays on the title row on a touch phone 1 step · 1 call 2.9s

e2e 0.20.0 · 3m 4s · web · run artifacts

🟢 e2e Electron stories (Haiku): 3 passed

3 agent steps · 3 model calls · 7.9k tokens (22% cached)
Spend: $0.02 of the $1.00 cap (proxy ledger)

All 3 tests in 3 files
Test Agent Time
🟢 electron/deepLink.e2e.ts · 1 passed 1 step · 1 call 4.9s
🟢 a deep link of a second launch starts a chat in the running app 1 step · 1 call 4.9s
🟢 electron/menuBar.e2e.ts · 1 passed 1 step · 1 call 5.9s
🟢 the workspace menu bar is the desktop title bar 1 step · 1 call 5.9s
🟢 electron/smoke.e2e.ts · 1 passed 1 step · 1 call 5.2s
🟢 Xum Electron opens the playground workspace 1 step · 1 call 5.2s

e2e 0.20.0 · 18.2s · electron · run artifacts

🟢 e2e agent repros (Haiku): no tests selected

Spend: $0.00 of the $1.00 cap (proxy ledger)

e2e 0.20.0 · 5.3s · 2 targets (web, phone) · run artifacts

@ThomasK33
ThomasK33 added this pull request to the merge queue Oct 26, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 26, 2026
@ThomasK33
ThomasK33 added this pull request to the merge queue Oct 26, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 26, 2026
@ThomasK33
ThomasK33 added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit e24f436 Oct 26, 2026
63 of 66 checks passed
@ThomasK33
ThomasK33 deleted the tests/ui-helpers-wait-setup branch October 26, 2026 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🤖 tests: setupWorkspaceView and withSharedWorkspace do not wait for workspace setup, so UI tests race setup-gated controls

1 participant