feat(ui): live-capture view — streaming timeline, controls, status#68
Merged
Conversation
Part 2 of #59: the interactive live-capture surface, on top of the pt1 streaming model (update_fx + LiveCapture, ADR-0009). A new `Surface` toggle (traces | live) puts a live-capture surface beside the opened-trace workspace, reached from an always-present "Live" tab (and the empty state). It renders through the SAME timeline / detail / failure widgets as an opened trace, driven off `model.live.trace` — which the model re-derives from the streamed NDJSON — so a live session correlates, detects, and stays viewport-bounded for free. Selection/toggle mutations route to whichever surface is shown (`Model.mutTrace`). The control strip: two endpoint fields (listen / upstream, seeded with example defaults and edited in place; read-only while capturing), a Start/Stop button (Start gated on both endpoints being set), a colored status dot + label (Ready / Capturing… / Stopped / Failed(reason)), and an "N events · M KB recorded" readout. Empty/error states show a state-appropriate note; the live status bar mirrors the trace one. Tests: view tests drive the surface through the real dispatch path — Start/Stop toggles, streamed events append to the live timeline, a streamed Invalid Authorize lights up FAILED_AUTHORIZATION, the timeline stays under the widget budget at 500 streamed events, and the surface passes the a11y sweep (idle + capturing). Model tests cover surface routing and endpoint editing/freeze. 161/161 green; ReleaseFast build clean. Closes #59.
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.
Part 2 of #59 — the interactive live-capture surface, on top of the pt1 streaming model (
update_fx+LiveCapture, ADR-0009 / #67). This is the last issue in the S5 flagship before notifications (#60).What's here
A new
Surfacetoggle (traces|live) puts a live-capture surface beside the opened-trace workspace, reached from an always-present "Live" tab (and a button on the empty state). It renders through the same timeline / detail / failure widgets as an opened trace — driven offmodel.live.trace, which the model re-derives from the streamed NDJSON — so a live session correlates, detects, and stays viewport-bounded for free. Selection/toggle mutations (select_event,select_failure, payload-tree collapse, …) route to whichever surface is shown viaModel.mutTrace, so one set of timeline widgets drives both.The control strip (
captureControls):host:port) and upstream (ws:// URL) — seeded with example defaults and edited in place (caret tracked model-side, mirroring the search field). Read-only while capturing (the session is bound to them for its life).Ready/Capturing…/Stopped/Failed (reason)) and anN events · M KB recordedreadout.The filter bar stays a traces-surface affordance (the live surface always shows the full stream).
Tests (161/161, +7)
View tests drive the surface through the real dispatch path (
msgForPointer/capture_lineMsgs, exactly as the runtime + worker produce them):Authorizeresponse lights upFAILED_AUTHORIZATIONin the live failure panel — the failure list updates as the stream arrives.< 1024nodes) at 500 streamed events.Model tests cover surface routing (live selection leaves the workspace put) and endpoint editing + freeze-while-capturing.
Verification
native test -Dplatform=null→ 161/161.native build(ReleaseFast) → clean — the live view compiles into the app, not just tests (lazy-analysis check).zig fmt --checkclean;studio cistill exits 0; the GUI launches without a startup crash (the Linux Xvfb smoke is the CI gate).Not here (follow-up)
services.showNotification+ anotificationspermission), the last S5 issue.Closes #59.