Skip to content

Wait for vite to serve before the titlebar, find, shortcuts and settings smokes navigate - #12501

Merged
danielhanchen merged 1 commit into
mainfrom
studio/titlebar-blur-wait-for-vite
Oct 2, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
studio/titlebar-blur-wait-for-vite

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

Frontend build + bundle sanity failed on #12475 (a sidebar IME fix) in the titlebar smoke:

Loading http://127.0.0.1:5491/smoke-titlebar-blur.html
playwright._impl._errors.Error: Page.goto: net::ERR_CONNECTION_REFUSED at http://127.0.0.1:5491/smoke-titlebar-blur.html

start_vite() in tests/studio/_playwright_robust.py returns as soon as npm run dev is spawned, not once vite listens. Most drivers follow it with wait_for_smoke_page(url, entry, proc=server). tests/studio/playwright_titlebar_blur.py (added in #12433) navigates straight away, so it races vite's startup. Three older drivers do the same: playwright_find_in_page.py, playwright_keyboard_shortcuts.py and playwright_settings_tabs.py.

Locally, main's titlebar driver fails 3 out of 3 runs with exactly that ERR_CONNECTION_REFUSED. In CI it usually wins the race only because the dev server comes up fast enough.

Change

  • The four drivers call wait_for_smoke_page on their own page and entry module (smoke-titlebar-blur-main.tsx, smoke-find-in-page-main.tsx, smoke-shortcuts-main.tsx, smoke-settings-main.tsx) right after start_vite. The titlebar driver only waits when it started the server, so SMOKE_URL still works. wait_for_smoke_page also stops early if vite exits, instead of polling out its timeout.
  • tests/studio/test_playwright_server_lifecycle.py::test_every_driver_that_starts_vite_waits_for_it_to_serve parses every tests/studio/playwright_*.py and fails if a driver calls start_vite without wait_for_smoke_page or wait_for_health. It also asserts it found a realistic number of start_vite callers, so it cannot pass by scanning the wrong place.

Verification

Driver main this PR
playwright_titlebar_blur.py ERR_CONNECTION_REFUSED, 3 of 3 runs passed (18 s)
playwright_find_in_page.py 178/178 checks passed
playwright_keyboard_shortcuts.py 116/116 checks passed
playwright_settings_tabs.py PASS

The new guard run against main's drivers fails, naming all four. tests/studio/test_playwright_server_lifecycle.py (36 passed) and tests/test_formatter_fixed_point.py pass.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 2, 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-02T03:47:37.951135Z ed1e0ee Manual request
🔒 Security Review ⚠️ Failed 2026-10-02T03:45:42.545927Z ed1e0ee 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: ed1e0ee346

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit da07ae0 into main Oct 2, 2026
@danielhanchen
danielhanchen deleted the studio/titlebar-blur-wait-for-vite branch October 2, 2026 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant