feat(ui): search & filter — close out S3#40
Merged
Conversation
Make large traces navigable and close the Inspector UI milestone. - Free-text search field (a real search_field with a clear affordance) matching action / unique id / payload substring, case-insensitive. The model owns the query as a fixed buffer + caret and applies edit deltas via TextEditState, so the filter state stays trivially copyable (no self-referential slice). - Toggle facets — message type, direction, and severity (participates in a failure of level X) — that AND-compose with the search. - The filtered index set is derived in the build arena and becomes the virtual list's source, so filtering a huge trace materializes no hidden rows and stays viewport-sized. The status bar shows "N of M events"; an empty result shows a quiet "no matching events". The search-field clear (x / Escape) arrives as a `.clear` edit through the same input path, restoring the full timeline. Tests: the free-text predicate (action / id / payload, case-insensitive), the facet toggles, search build/clear through edit events, a filtered large trace's node count staying viewport-sized, the empty-result state, and the a11y sweep over the filter bar. Closes #32
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
Makes large traces navigable with search & filter, and closes out S3 —
Inspector UI (0.2.0).
search_field(with its built-in clearaffordance) matching action / unique id / payload substring, case-insensitive.
from CSMS), and severity (participates in a failure of level X). Facets
AND-compose with each other and the search.
arena and becomes the virtual list's source, so a filtered huge trace never
materializes hidden rows. The status bar shows
N of M events; an empty resultshows a quiet "no matching events".
.cleareditthrough the same input path; a
Clearbutton resets every facet and the query.Design notes
LoadedTracevalues are memcpy'dduring tab compaction, which would dangle a self-referential search slice. The
Modelhas a stable address, and the query is stored as a fixed buffer + lengthFilterstays triviallycopyable. Edits apply into a scratch buffer then copy back — no aliasing.
TextEditState.TextInputEventis an edit delta, soupdatereconstructs the query withapplyTextInputEvent. The headless testsdrive the exact
msgForTextEditpath the runtime uses.viewcomputes the filtered indices a single time and threadsthem to both the timeline and the status bar; unfiltered traces allocate no
index array at all.
Testing
native test -Dplatform=null— 89 headless tests green (macOS local; CI runsboth OSes). New coverage:
bounded), and the facet toggle + clear logic.
narrowing the count and the
Clearbutton restoring it.(no hidden-row materialization).
native check --strictclean;native build(ReleaseFast) builds. Living docs(
CURRENT_STATE.md,ROADMAP.md,AGENTS.md) updated in-branch and S3 markedcomplete.
Deferred (tracked, not blockers)
Interactive open — native dialog + drag-drop (#33) — and the timeline viewport
scroll on jump both need an ejected runner (ADR-0006).
Closes #32