I3219 — The Observatory is told what happened over the live channel, and asks only when it cannot be told
Let /ui/observatory and /ui/kiosk be told what the journal appended: the journal tells its subscribers every append, /events serves it as a topic carrying the client's logical clock, and PR #1178's observatory-stream.js applies each frame to the scene model the page already builds; the page falls back to its cursor read of /api/v1/observatory/events only when the socket is refused, saying so; the published replay is untouched.
PŘIPRAVENO vlna 0 · p2 · profil implementation · bezpečné souběžně
Připraveno. Všechny závislosti jsou hotové, takže majordomus plan start I3219 bude přijato.
Cíl
Let /ui/observatory and /ui/kiosk be told what the journal appended: the journal tells its subscribers every append, /events serves it as a topic carrying the client's logical clock, and PR #1178's observatory-stream.js applies each frame to the scene model the page already builds; the page falls back to its cursor read of /api/v1/observatory/events only when the socket is refused, saying so; the published replay is untouched.
Proč
Owner, 2026-10-14: Observatory content must be live and streamed over WebSocket. ADR 0158 states the journal-follow is not a true push and anticipates a display that is told rather than asks. Proposed in ADR 0216 (Every live surface follows one channel with named follow streams, and nothing polls where a stream exists) (proposed; it carries no authority until the owner accepts it). Sources: chatgpt-majordomus:c260#0, chatgpt-majordomus:c260#3.
Aktuální stav
Verified on master 707a04c7ce8: share/ui/observatory.js fetches /api/v1/observatory/events?after=<cursor> on an interval; I2679 (DONE) made that cursor read; PR #1178 (open, conflicting) holds observatory-stream.js and names the journal follow as its next leaf; I2985 (5a, taken) adds a blackboard scene, not the transport.
Cílový stav
One socket client and one status machine per page, #1178's observatory-stream.js extended with the journal topic; LIVE is shown only while frames arrive.
Rozsah
- share/ui/observatory.js
- share/ui/observatory-kiosk.js
- apps/majordomus-cli/src/ui/observatory.rs
- docs/MAJORDOMUS_UI.md
Mimo rozsah
- Any write over the socket
- New scenes
Závislosti
Žádné. Tento úkol je kořenem grafu.
Co na tom čeká
- I3221BLOCKED Every live surface says in ADR 0158's words whether it is live, reconnecting, stale, polling, a snapshot or a replay
- I3231BLOCKED The Observatory shows its own stream health: lag, dropped frames, resyncs and frame rate
Kritéria přijetí
- A journal append reaches an open Observatory without its cursor read running
- With the socket refused the page reads by cursor and labels itself so
- The public replay still says REPLAY
Validace
- bash test/run.sh 3011_the_observatory_draws_nothing_it_did_not_read
- cargo test --manifest-path apps/majordomus-cli/Cargo.toml --test observatory
- scripts/ui audit --only /ui/observatory
Požadované důkazy
- case_the_observatory_is_told
Důkazy
Nic nezaznamenáno. Za každým tokenem výše musí stát příkaz nebo artefakt, než lze tento úkol dokončit; vyprávění se odmítá.
Časová osa
- zahájeno
- —
- ověřeno
- —
- dokončeno
- —
Tato tři pole, důkazy výše a stav závislostí jsou vše, z čeho se stav skládá. Neexistuje žádné pole stavu, které by s nimi mohlo být v rozporu.
Canonical record: .ai/repo/project/issues/I3219.yaml. Read it back with majordomus plan show I3219.