Skip to content

feat(ui): live-capture view — streaming timeline, controls, status#68

Merged
sepehr-safari merged 1 commit into
mainfrom
feat/live-capture-view
Jul 12, 2026
Merged

feat(ui): live-capture view — streaming timeline, controls, status#68
sepehr-safari merged 1 commit into
mainfrom
feat/live-capture-view

Conversation

@sepehr-safari

Copy link
Copy Markdown
Member

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 Surface toggle (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 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 (select_event, select_failure, payload-tree collapse, …) route to whichever surface is shown via Model.mutTrace, so one set of timeline widgets drives both.

The control strip (captureControls):

  • Two endpoint fields — listen (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).
  • A Start / Stop button — Start (primary) is gated on both endpoints being set; Stop (destructive) while running.
  • A status line: a colored 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 over the live trace.

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_line Msgs, exactly as the runtime + worker produce them):

  • Start/Stop toggles the control and status; streamed events append to the live timeline and the status bar counts them.
  • A streamed Invalid Authorize response lights up FAILED_AUTHORIZATION in the live failure panel — the failure list updates as the stream arrives.
  • The live timeline stays under the widget budget (< 1024 nodes) at 500 streamed events.
  • The live surface passes the a11y sweep (idle controls + capturing timeline/failure/detail).
  • "Live capture" from the empty state switches surfaces.

Model tests cover surface routing (live selection leaves the workspace put) and endpoint editing + freeze-while-capturing.

Verification

  • native test -Dplatform=null161/161.
  • native build (ReleaseFast) → clean — the live view compiles into the app, not just tests (lazy-analysis check).
  • zig fmt --check clean; studio ci still exits 0; the GUI launches without a startup crash (the Linux Xvfb smoke is the CI gate).

Not here (follow-up)

Closes #59.

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.
@sepehr-safari sepehr-safari merged commit ed2a08b into main Jul 12, 2026
3 checks passed
@sepehr-safari sepehr-safari deleted the feat/live-capture-view branch July 12, 2026 14:55
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.

feat(ui): live capture view — streaming timeline

1 participant