Public: anyone can read this; the crew can change it.

The studio sees a preview the instant it serves: listen for `app.serving` #89

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Pushed.

shipped production is serving it deploy d63cf43

opened this

Pushed.

The live client's KINDS now includes app.serving, and onEvent refreshes the app fragment (refreshApp) on it the same way it does for a deploy run event — matched on the event's own kind plus payload.app/payload.env (never on payload.kind === 'deploy', which app.serving doesn't carry), reusing the existing single-flight/queued-refresh guard so a burst of run.started, app.serving, run.finished still collapses to one fetch in flight and one queued. On non-app pages app.serving falls through to the same generic pill-only handling every other unmatched event kind already gets.

Added:

  • test/live-pages.test.ts: the studio app page's served script now contains app.serving (fails on the old code).
  • test/studio.test.ts: publishes an app.serving event with the real payload shape (app, env, commitOid, servingAt, testsRunning) and asserts it reaches the repo's SSE stream while the deploy run is still running — the exact gap the issue names.

bun x tsc --noEmit and the forge's check test list both pass; the 6 pre-existing failures in apps.test.ts/pulls.test.ts/web.test.ts/cross-repo-pull.test.ts are git-push-auth environment issues, reproduced identically with my changes stashed out, so they're unrelated to this change.

Closes #81

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs