Skip to content

feat(ui): inspector shell — workspace model + trace loading#34

Merged
sepehr-safari merged 1 commit into
mainfrom
feat/inspector-shell
Jul 11, 2026
Merged

feat(ui): inspector shell — workspace model + trace loading#34
sepehr-safari merged 1 commit into
mainfrom
feat/inspector-shell

Conversation

@sepehr-safari

Copy link
Copy Markdown
Member

Summary

The foundation of the S3 native inspector — the placeholder counter is gone and
the inspector's shell, workspace state, and trace-loading path are in.

  • Zig builder view, not markup (ADR-0006). The main view is a hand-written
    canvas.Ui builder view (src/ui/inspector.zig), because the event timeline
    (next issue) needs the builder-only windowed virtual list to stay within the
    1024 widget-node budget at dataset scale. src/app.native is removed.
  • Bounded multi-trace workspace (src/ui/workspace.zig) — the Model / Msg
    / update half of the loop. Each open trace owns a private engine arena
    (parse → timeline → detection) that is freed on close; the model allocates
    nothing per rebuild.
  • Trace loading from the command linestudio path/to/trace.json … reads
    each file in main through init.io (unbounded — the large-trace path builds
    on this) and seeds the workspace. A built-in embedded sample backs the empty
    state's "Open sample" and the smoke test.
  • The shell — empty state, a workspace tab strip when more than one trace is
    open, a per-trace overview (event / session / failure / warning counts), an
    error state for unreadable or malformed traces, and a status bar. The window
    grows to inspector size (1200×800, min 900×560).

Verification

  • native test -Dplatform=null61/61 pass (macOS; CI also runs Linux).
    New coverage: workspace transitions (open / select / close / bounds / malformed,
    leak-checked with the testing allocator), the view built through the real
    canvas.Ui tree and driven via msgForPointer, the error state, an
    accessibility sweep (empty + loaded), and engine layout.
  • native check --strict clean; native build produces the ReleaseFast binary.
  • scripts/smoke.sh updated to launch with the sample trace and assert the
    loaded overview — the CI Linux · Xvfb job drives the real window.

Scope notes

Closes #27

Replace the placeholder counter with the foundation of the native
inspector (S3):

- A Zig `canvas.Ui` builder view instead of `.native` markup (ADR-0006):
  the event timeline needs the builder-only windowed virtual list, so
  the main view is a builder view. `src/app.native` is removed.
- A bounded multi-trace workspace `Model` / `Msg` / `update` in
  `src/ui/`, each open trace owning a private engine arena that is freed
  on close (leak-tested with the testing allocator).
- Trace loading from command-line path arguments, read unbounded in
  `main` via `init.io`, plus a built-in embedded sample. The window
  opens on an empty state or the loaded trace's overview.
- A larger inspector window; the automation smoke test now launches with
  the sample trace and asserts the loaded overview, exercising the CLI
  load path live.

Interactive open (native dialog + drag-drop) is deferred to a follow-up
issue — it needs an ejected runner (see ADR-0006).

Closes #27
@sepehr-safari sepehr-safari added this to the S3 — Inspector UI milestone Jul 11, 2026
@sepehr-safari sepehr-safari added type:feature New capability area:ui Native markup views labels Jul 11, 2026
@sepehr-safari sepehr-safari merged commit 5a497b2 into main Jul 11, 2026
3 checks passed
@sepehr-safari sepehr-safari deleted the feat/inspector-shell branch July 11, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ui Native markup views type:feature New capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(ui): inspector shell — workspace model + trace loading

1 participant