Skip to content

Snapshot Inspector view in the sidebar#12

Merged
azizbecha merged 1 commit into
mainfrom
feat/snapshot-inspector
May 3, 2026
Merged

Snapshot Inspector view in the sidebar#12
azizbecha merged 1 commit into
mainfrom
feat/snapshot-inspector

Conversation

@azizbecha

Copy link
Copy Markdown
Owner

Summary

  • Third sidebar view alongside Settings and Devices: a clickable tree of refs from the most recent snapshot -i
  • Subscribes to the existing SnapshotIndex.onDidChange — no new daemon traffic
  • Each row: typed codicon, @eN ref in monospace, label + type next to it
  • Click row → insert @eN at the active editor's cursor (auto-focuses a visible .ad editor first)
  • Hover-only actions: → Insert and ⧉ Copy
  • Sticky search filters by id / type / label; Esc clears
  • Honors leading-whitespace indentation (2 spaces or 1 tab = 1 depth level)

Test plan

  • npm run compile clean
  • No snapshot run yet → empty state ("Run snapshot -i to capture one")
  • Run snapshot -i against a booted sim → refs appear with codicons by type
  • Click a row → @eN inserted at the cursor of the active .ad file
  • Hover a row → Insert + Copy buttons fade in; Copy briefly shows ✓
  • Search "sign in" → only matching rows visible; Esc clears
  • Re-snapshot in another app → tree refreshes

A third sidebar view alongside Settings and Devices that renders the
most recent snapshot as a clickable tree. Subscribes to
SnapshotIndex.onDidChange — no new daemon traffic, refs come from
the same stdout we already capture on each successful snapshot step.

Each row shows a typed codicon, the @en ref in monospace, and the
element's label/type. Click anywhere on a row to insert @en at the
active editor's cursor (auto-focuses a visible .ad editor first).
Hover reveals an explicit "→ Insert" plus a "⧉ Copy" button.

Toolbar has a sticky search input that filters by id/type/label;
Esc clears. Tree honors leading-whitespace indentation in the
snapshot output, so hierarchical formats render with correct depth.

SnapshotIndex.SnapshotRef gains a depth field; parseSnapshotRefs
counts leading whitespace (2 spaces or one tab = one level).
@azizbecha azizbecha merged commit 15ac05c into main May 3, 2026
1 check passed
@azizbecha azizbecha deleted the feat/snapshot-inspector branch May 3, 2026 15:58
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.

1 participant