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

A write from the terminal reaches the page live: one event bus across processes #9

shipped production is serving it opened this has it
opened this

src/live.ts says it plainly today — "the bus is this process's: the terminal is another process, and its writes show on the next load rather than live" — but AGENTS.md asks that a write made at the terminal reach web viewers live like any other. Close that gap before there are votes to miss.

What done looks like

Files I expect to change: src/live.ts, src/live.test.ts (new), src/db.ts, src/server.ts (starting and stopping the follower), README.md.

Risks: the tick is the one thing here that runs forever — give it a single timer for the whole process, not one per connection, and stop it when the last stream closes. Serialize data as JSON at the boundary and parse it once on the way out; a row that will not parse is skipped, never thrown. Keep the common request under 50ms: the follower's query is indexed by the primary key and asks for nothing when the highest id has not moved. Issue #2 also appends a migration — whichever lands second appends after the other and edits nothing that has run.

Fit: Hearth — a supervisor, a stream, and an honest statement of what is live. A person assigns; I do not.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs