Repository navigation
app/: live updates over SSE (sc-8900, ported sc-8897) - #94
Closed
ndbroadbent wants to merge 1 commit into
Closed
ndbroadbent wants to merge 1 commit into
ndbroadbent wants to merge 1 commit into
Conversation
… and a build page each follow a server-sent event stream (GET …/projects/{project}/live and …/builds/{number}/live) and read their data again when it says changed; the streams carry no data of their own, are open to the project's members (anyone for a public project, a 404 otherwise, as the pages), gather a burst of notifications into one event, say changed after a reconnection or when they fell behind, and end after 30 minutes so the browser reconnects and access is checked again; BuildChanged, a new build and a build starting to process notify build:<id> and project:<id>; the frontend's useLive hook invalidates the page's queries and the pages poll only while no stream is open (today's server has none); design doc
ndbroadbent
marked this pull request as draft
December 3, 2026 00:00
ndbroadbent
added a commit
that referenced
this pull request
Dec 3, 2026
… keep the rewrite post's sentence
ndbroadbent
added a commit
that referenced
this pull request
Dec 3, 2026
… keep the rewrite post's sentence
ndbroadbent
added a commit
that referenced
this pull request
Dec 3, 2026
… keep the rewrite post's sentence
ndbroadbent
added a commit
that referenced
this pull request
Dec 3, 2026
* Blog draft: a Laravel Rust starter kit for a production SaaS * Blog: publish the starter kit post; live updates did make the cutover * Blog: live updates are the transport only; the SSE streams are in #94; keep the rewrite post's sentence * Blog: the starter kit's description doesn't promise live updates yet
This was referenced Dec 3, 2026
Member
Author
|
Superseded by #149: rebuilt on current main and fixed against the review findings (a snapshot on every open, connection limits, the shared Principal including vca_ tokens, and the CLI's --wait). |
ndbroadbent
added a commit
that referenced
this pull request
Dec 3, 2026
…s --wait (sc-8897, sc-8900); CLI 0.2.23
Every stream starts with a snapshot of the current state; streams authorize with the same Principal as the API and
MCP (vca_ tokens on their own resource); open streams are capped per principal, per build and per process (429 with
Retry-After); idle streams hold no database connection. The CLI's --wait follows /api/v1/live/builds/{id} and falls
back to polling when there's no stream. Supersedes #94.
Co-Authored-By: Claude <noreply@anthropic.com>
ndbroadbent
added a commit
that referenced
this pull request
Dec 3, 2026
…s --wait (sc-8897, sc-8900); CLI 0.2.23 (#149) Every stream starts with a snapshot of the current state; streams authorize with the same Principal as the API and MCP (vca_ tokens on their own resource); open streams are capped per principal, per build and per process (429 with Retry-After); idle streams hold no database connection. The CLI's --wait follows /api/v1/live/builds/{id} and falls back to polling when there's no stream. Supersedes #94. Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports live updates to app/.
GET /api/ui/orgs/{org}/projects/{project}/liveand.../builds/{number}/live: server-sent events on Postgres LISTEN/NOTIFY (live::subscribe). Achangedevent goes out at most every 300 ms. A lagged receiver or the*topic sends one too, so a page that missed notifications reads everything again. Streams end after 30 minutes or at shutdown, and send a keep-alive every 15 seconds.tell_open_pagesonBuildChanged, plus build creation and processing inhttp/api/builds.rs.useLiveinvalidates the page's queries onchangedand when the stream reopens. Polling runs only while no stream is open.app/tests/live_pages.rs(5 tests) andsrc/__tests__/live.test.tsx(3 tests).docs/design.mddescribes it under Stack and hosting.Stacked on #77 (laravel-forge-sync). It will be retargeted to main when #77 merges.