Skip to content

feat(dashboard): one timeline of events and the journal (ADR-0067 addendum) - #334

Merged
7schmiede merged 1 commit into
mainfrom
feat/journal-timeline
Oct 27, 2026
Merged

7schmiede merged 1 commit into
mainfrom
feat/journal-timeline

Conversation

@7schmiede

Copy link
Copy Markdown
Member

Closes #331.

Review card (approved in #331)

  1. /v1/events gains {type: "journal", entry}, sent when the daemon appends an entry: the same entry GET /v1/journal returns, a lane's with lane.
  2. The dashboard's Events page becomes one timeline of events and journal entries: on opening it loads GET /v1/journal, then both arrive live; a journal row shows its client (via), a refused one (status ≥ 400) its error.
  3. The dashboard labels a journal row from its method and path with a table of the mutating routes; a path the table does not know shows as METHOD path; the journal's format stays as it is.
  4. /v1/journal joins the read-only paths of /hub/pool/shared/{lease}/api/...: whoever views a shared lane sees its journal.
  5. The dashboard shows main_served on the lane that holds the main ports and last_action in the service view.

As built

  • Daemon: Journal::subscribe (a broadcast of each recorded entry); every supervisor follows it (follow_journal) and sends the entries for its tree (Entry::for_tree) as events with its own seq, so the stream's gap detection holds.
  • Node: viewable lets v1/journal through (point 4; the allowlist lives in the node, not the hub).
  • Dashboard: ui/src/lib/journal.ts (route table, forTree, viaText); the store keeps journal apart from events, fetches ?since= after each snapshot (connect, reconnect, lag) and dedupes against the stream; EventsView merges both (title Activity, route unchanged); StackHeader says "serves the main ports since 10:42, set via the dashboard"; the service's details get Last action. An older daemon without /v1/journal just shows events.
  • Mock: a seeded journal; every mutating mock request is journaled and emitted.
  • Docs: docs/dashboard-api.md (the event, the viewer paths), ADR-0067 addendum, CHANGELOG.

A lane on a node (and a shared one) reads its own daemon's journal there, which runs as a main tree, so its entries have no lane; forTree keeps them all.

Checked

  • cargo clippy / cargo fmt --check clean; cargo test -p devstack-daemon --lib (165), node viewer test.
  • npm run typecheck, vitest (79, incl. new journal.test.ts); the page looked at in the mock.

🤖 Generated with Claude Code

…endum, #331)

- /v1/events carries `{type: "journal", entry}` for every entry the daemon
  records: the main tree's stream all of them, a lane's its own.
- The Events page becomes Activity: it loads GET /v1/journal on each
  snapshot and merges it with the live events; journal rows show their
  client, refused ones their error; filters by client and lane.
- Rows are named from method and path by a table of the mutating routes;
  an unknown path shows as it came.
- A viewer of a shared lane may read its /v1/journal (the node's allowlist).
- The lane on the main ports says since when and through what; a
  service's details show its last action.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@7schmiede
7schmiede force-pushed the feat/journal-timeline branch from 6cf27ca to 09b1dee Compare October 27, 2026 22:31
@7schmiede
7schmiede merged commit 9663e4c into main Oct 27, 2026
13 checks passed
@7schmiede
7schmiede deleted the feat/journal-timeline branch October 27, 2026 22:38
@7schmiede 7schmiede mentioned this pull request Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard: one timeline of events and the journal (ADR-0067)

1 participant