Skip to content

fix(e2e): warm Turbopack before the suite (partially addresses #114) - #318

Merged
KrasimirKralev merged 2 commits into
betafrom
fix/e2e-warmup-turbopack
Aug 8, 2026
Merged

KrasimirKralev merged 2 commits into
betafrom
fix/e2e-warmup-turbopack

Conversation

@KrasimirKralev

@KrasimirKralev KrasimirKralev commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Partially addresses #114 (does not close it β€” see below).

Root cause

The e2e job serves the app with bun run dev (workers: 1), so the first request to a route pays its full on-demand Turbopack compile. Under GitHub Actions load the cold compile of / (the desktop shell) can outlast the 15s expect timeout. That's why chat-popup started failing the moment the next 16.2 bump (#315) nudged that compile past the threshold, and it's one half of #114.

Fix

A Playwright globalSetup loads / and /setup once, before any test clock starts, so the one-time compile happens up front.

What the CI run proved

The warmup reliably fixes the cold-compile class:

It does not fix the interaction-lag class β€” five specs still time out at their first DOM click / context-menu on GH Actions (a deeper post-mount/hydration lag under workers: 1): browser-vnc, desktop-selection, installed-app-settings, mascot-context, clawkeep-interactions. Those stay fixme'd with an accurate note and remain tracked in #114.

Net

Compile-latency root cause fixed + 1 of the 6 flaky specs restored + chat-popup made robust. The remaining 5 need the deeper CI-infra work (production build for e2e, or sharding/workers: 2) β€” the production-build path is entangled with the dev-bundle coverage report, so it's its own task. Leaving #114 open for that.

The e2e job serves the app with `bun run dev` (workers:1), so the FIRST hit to
a route pays its full on-demand Turbopack compile. Under GitHub Actions load
the cold compile of `/` (the desktop shell) can outlast the 15s expect timeout,
which is why six specs failed only on CI while passing on the Jetson β€” and why
chat-popup started timing out on `getByTestId('desktop-root')` after the
next 16.2 bump nudged that compile past the threshold.

Add a Playwright global-setup that loads `/` and `/setup` once before any test
clock starts, paying the compile up front. Re-enable the six specs that were
`test.fixme`'d for this exact GH-Actions-only flake:

- browser-vnc, desktop-selection, installed-app-settings,
  mascot-context, terminal-reconnect, clawkeep-interactions

Left as-is: clawkeep-flow's two fixmes (a separate ClawKeep-redesign gap, not
this flake).

Closes #114.
@KrasimirKralev
KrasimirKralev requested a review from a team as a code owner August 8, 2026 17:52
@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@KrasimirKralev, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 12 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
βš™οΈ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d9570f53-a7d0-43fe-bf59-ce9e6d346e54

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 2a0585c and e62b15f.

πŸ“’ Files selected for processing (8)
  • e2e/browser-vnc.spec.ts
  • e2e/clawkeep-interactions.spec.ts
  • e2e/desktop-selection.spec.ts
  • e2e/global-setup.ts
  • e2e/installed-app-settings.spec.ts
  • e2e/mascot-context.spec.ts
  • e2e/terminal-reconnect.spec.ts
  • playwright.config.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

πŸ¦€ ClawReview

Your friendly reef crab, here with the lay of the land.

Adds a new Playwright globalSetup (e2e/global-setup.ts) that pre-warms the Turbopack dev server β€” loading / and /setup with generous 120 s timeouts before any test clock starts β€” so the one-time cold-compile cost doesn't race the 15 s expect timeout on CI. One previously-fixme'd spec (terminal-reconnect) surfaces from the depths and is fully re-enabled; five others (browser-vnc, desktop-selection, installed-app-settings, mascot-context, clawkeep-interactions) remain fixme'd with updated comments attributing their continued failure to a deeper post-mount hydration lag the warmup doesn't address.

At a glance

  • πŸ§ͺ Tests Β· touches E2E test suite + Playwright CI configuration
  • Base branch: beta Β· +4 source / +64 tests across 8 files
  • βœ… base beta matches the beta-first convention
  • βœ… conventional PR title

Good to know

  • 🟑 The PR title/body says 6 specs are re-enabled, but only terminal-reconnect actually moves from test.fixme to test in the diff; the other 5 still carry test.fixme with new notes about a remaining hydration-lag flake.
  • ℹ️ The globalSetup uses 120 s timeouts on two sequential route loads, which can add up to ~4 min of upfront overhead to every CI e2e run before a single test executes.
  • ℹ️ No production or runtime code is touched β€” changes are confined to e2e/ and playwright.config.ts.

β€” ClawReview πŸ¦€, your resident reef crab. Just orientation β€” CodeRabbit does the line-by-line, humans do the merge. Conventions: docs.

@github-actions github-actions Bot added the area: ci-e2e Auto-triage area label Aug 8, 2026
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

CI Summary

βœ… Tests

  • Result: passed
  • View run
  • Coverage: statements 70.54%, branches 60.91%, functions 66.31%, lines 72.45%

βœ… E2E

βœ… E2E Install

The CI run showed the global-setup warmup reliably fixes the cold-compile class
(chat-popup's desktop-root render, and terminal-reconnect's WebSocket race) but
NOT the five DOM-interaction specs β€” those still time out at their first click /
context-menu on GitHub Actions, a deeper post-mount/hydration lag under
`bun run dev` workers:1 that a route warmup doesn't touch.

Re-fixme the five interaction-lag specs (browser-vnc, desktop-selection,
installed-app-settings, mascot-context, clawkeep-interactions) with an accurate
note; keep terminal-reconnect enabled (verified green). The residual stays
tracked in #114.
@KrasimirKralev KrasimirKralev changed the title fix(e2e): warm Turbopack before the suite, re-enable 6 flaky CI specs (closes #114) fix(e2e): warm Turbopack before the suite (partially addresses #114) Aug 8, 2026
@KrasimirKralev
KrasimirKralev merged commit cce2026 into beta Aug 8, 2026
8 checks passed
@KrasimirKralev
KrasimirKralev deleted the fix/e2e-warmup-turbopack branch August 8, 2026 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci-e2e Auto-triage area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant