Skip to content

feat(framework): hosted run relay — watch one run from multiple browsers (#230)#278

Merged
suleimansh merged 1 commit into
mainfrom
feat/hosted-run-relay
Jul 5, 2026
Merged

feat(framework): hosted run relay — watch one run from multiple browsers (#230)#278
suleimansh merged 1 commit into
mainfrom
feat/hosted-run-relay

Conversation

@suleimansh

Copy link
Copy Markdown
Member

Closes #230.

First concrete slice toward shared team sessions (#204): prove two people can watch the same run before we build any accounts/teams/billing.

  • framework relay hosts a relay (a tiny HTTP server).
  • framework "..." --share <relay-url> publishes the run's event stream to it and prints a shareable URL.
  • Open that URL from any machine and you get the same dashboard over SSE, replaying the run's full history and then following live. Two teammates watch one build together.

Why it's small: the dashboard is already a multi-client SSE projection of one event stream with per-client history replay. This factors the SSE serving into a shared helper and makes the page's stream/stop paths relative so they resolve both on the localhost dashboard (/events) and under the relay (/r/<id>/events). The genuinely new pieces are the relay server (multi-run, keyed by id) and the CLI publisher. New exports: startRelay, relayPublisher.

Out of scope by design (keeps it a keystone): accounts/auth, teams, RBAC, billing, authorized steering. The relay is unauthenticated — anyone with a run URL can watch — and never runs an agent; it only projects the stream. Those layer on later via vike-auth/-rbac/-data.

Verified end to end: hosted a relay, ran --fake --share against it, then a viewer connecting after the run finished replayed the full 42-event run (session -> ... -> end ok=true); /r/:id redirects to the trailing-slash page; the page loads its SSE relatively. 150 framework tests green (relay: two browsers replay one run, HTTP publish re-serves live, run isolation, redirect + page, healthz + bad-publish handling).

Note: run streams accumulate in memory for the process lifetime (late joiners replay) — fine for the keystone; a TTL/cap is a follow-up. Real hosting + identity is the next layer, not this PR.

@suleimansh suleimansh added enhancement New feature or request priority: medium Worth doing, not urgent labels Jul 5, 2026
@suleimansh suleimansh self-assigned this Jul 5, 2026
@suleimansh suleimansh merged commit 385c953 into main Jul 5, 2026
2 checks passed
@suleimansh suleimansh deleted the feat/hosted-run-relay branch July 5, 2026 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: medium Worth doing, not urgent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hosted run relay: watch one run's dashboard from multiple browsers (shared-session keystone)

1 participant