feat(ui): inspector shell — workspace model + trace loading#34
Merged
Conversation
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
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
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.
canvas.Uibuilder 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.nativeis removed.src/ui/workspace.zig) — theModel/Msg/
updatehalf 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.
studio path/to/trace.json …readseach file in
mainthroughinit.io(unbounded — the large-trace path buildson this) and seeds the workspace. A built-in embedded sample backs the empty
state's "Open sample" and the smoke test.
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=null— 61/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.Uitree and driven viamsgForPointer, the error state, anaccessibility sweep (empty + loaded), and engine layout.
native check --strictclean;native buildproduces the ReleaseFast binary.scripts/smoke.shupdated to launch with the sample trace and assert theloaded overview — the CI Linux · Xvfb job drives the real window.
Scope notes
here — the zero-config
UiAppexposes no view/effect path toshowOpenDialogor file-drop routing, so it needs an ejected runner. Tracked in feat(ui): interactive open — native dialog + drag-drop (ejected runner) #33 with an
eject ADR, per the S3 planning decision.
following S3 issues (feat(ui): virtualized event timeline #28–feat(ui): search & filter — close out S3 #32).
Closes #27