Give the status page a live, always-flowing activity view - #745
Merged
Merged
Conversation
Step 4: the scrubber built for REWIND (Step 1) now also renders a bounded 2-hour rolling window fed by the activity tail (Step 3), sharing the same subject-neutral document renderer. mount() gains a `follow` option that pins the cursor to the live edge and drops replay controls that assume a closed timeline, plus an `onScrub` callback so page.html can pause its own re-rendering the instant a viewer grabs the cursor rather than fight the drag. Activity events bucket into the same seven domains as the live tables (many-to-one: Dataset/Distribution/Acquisition all land on "Datasets", say) plus an "Other" catch-all, so the lane count is fixed and the layout never reflows. Rebuilds the whole timeline document from an accumulated client-side buffer on each update rather than patching the SVG incrementally: measured event volumes are tiny against the tick cadence, so this stays well inside budget without the added complexity. Also fixes a real bug found while wiring this in: page.html's message handler had no real `kind` switch, so an "activity" message (added in Step 3, unread by the frontend until now) would have fallen through the same path as a snapshot and blanked every live table the moment flowing mode's data started arriving in production. Co-Authored-By: Claude Sonnet 5 <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.
Summary
Step 4 of the status-page work (Steps 1-3 landed as #741, #742, #743). The scrubber built for REWIND now also renders a bounded 2-hour rolling window fed by the activity tail from Step 3, sharing the same subject-neutral document renderer:
scrubber.js:mount()gains afollowoption that pins the cursor to the live edge and drops Play/"jump to last event" (both assume a closed timeline) by default, plus anonScrubcallback so a caller can pause its own re-rendering the instant a viewer grabs the cursor rather than fight the drag. Also fixes a real gap:renderReadoutassumed every non-primary lane was a "series" lane with a value; a non-primary markers lane (every domain lane in flowing mode) would have shownundefinedin the readout. And a marker-label density cap (MAX_MARKER_LABELS), since a busy domain lane over 2 hours can hold far more points than a REWIND run's handful of lifecycle events.page.html: a new "Live activity" section accumulates"activity"messages into a client-side buffer, bucketed many-to-one into the same seven domains as the live tables (Dataset/Distribution/Acquisitionall land on "Datasets", say) plus an "Other" catch-all for the rest of the 42-type event vocabulary, so the lane count is fixed and the layout never reflows. Rebuilds the whole timeline document and callsmount()again on each update rather than patching the SVG incrementally (measured event volumes are tiny against the tick cadence, so this stays well inside budget). A "Paused: N new events" status line and a "Resume following" control complete the pause/resume loop.page.html's message handler had no actualkindswitch — anything that wasn'trun_history_indexor a connection-state frame fell through the same path as a snapshot. An"activity"message (added in Step 3, never read by the frontend until now) would have blanked every live table the moment flowing mode's data started arriving in production. Now a realswitch (msg.kind)with an explicitdefaultthat logs and drops, matching the relay's own forward-compatibility posture.Test plan
docs/stack/frontend.md):kind-switch fix actually prevents the bug it was written for.active→paused→active→ended) and series-lane reading both still correct after therenderReadoutgeneralization.node --checkon bothscrubber.jsand the inline script inpage.html.Not deployed to arcturus/lyra — this lands on
mainonly.🤖 Generated with Claude Code