Skip to content

feat(log-viewer): inspector, grid ownership and VS Code web support - #1058

Closed
lukecotter wants to merge 8 commits into
mainfrom
refactor-inspector-tab-controller
Closed

lukecotter wants to merge 8 commits into
mainfrom
refactor-inspector-tab-controller

Conversation

@lukecotter

@lukecotter lukecotter commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

📝 PR Overview

The inspector work and everything that landed alongside it: 61 commits, 268 files. Pushed and opened for review as a whole, rather than left only on a laptop.

Written up from the commit history — worth a read-through before merging, since the branch spans several concerns.

🛠️ Changes made

Inspector

  • Variables in scope at the selected frame, a class instance opened in place, and a comparison across a merged row's calls.
  • Sections arranged and sized; one wiring call per tab; the inspector's mark and the tab it points at kept in step.
  • A pick marks every row it names, not just the rendered ones, and points at one row rather than the chain above it.

Timeline

  • A selected frame is outlined instead of the chart being dimmed; the frame the inspector picks is brought into view.
  • The chart spans the whole log; resizes are smooth; governor limits come only from the log.

Grids

  • One owner for the columns, one helper for a grid's body, the located row styled once instead of in six grids.
  • Search highlights kept in step with the rows on screen; a row marked without a rebuild.

Lifecycle

  • The find bus, the inspector wiring and document/window listeners all tied to the connected lifetime, with a controller for the listeners.
  • The call tree rebuilt after a re-attach; a visibility wait releases its listener.

Performance

  • Call Tree grids 24% faster; the minimap skyline built once per log rather than once per pixel; no grid header re-render on every row selection.

VS Code web

  • A web entrypoint, the extension bundled as a single file, browser log viewer assets embedded, and URI-safe file access through workspace.fs.

🧩 Type of change (check all applicable)

  • 🐛 Bug fix - something not working as expected
  • ✨ New feature – adds new functionality
  • ♻️ Refactor - internal changes with no user impact
  • ⚡ Performance Improvement

🔗 Related Issues

See the individual commits; several carry their own issue references.

✅ Tests added?

  • 👍 yes

📚 Docs updated?

  • 🔖 CHANGELOG.md

Anything else we need to know? [optional]

PR #1059 stacks on this branch with two fixes for faults introduced here: the find-result panel on the Timeline, and a highlighted frame that could be lost on some themes. Merge this one first.

Five views each declared an identical find event type, and a sixth copy sat
in the flame chart's types. One module now names them, keyed by event name so
a listener's payload follows the name it subscribed to.

Also drops a SearchOptions that collided by name with a different
SearchOptions in the same feature folder.
…window

Subscribes in hostConnected and unsubscribes in hostDisconnected, so a
listener on a global target lives exactly as long as its host is connected.

Handlers are passed as inline arrows: this package compiles with
useDefineForClassFields:false, so a field initialiser cannot reference a field
declared below it, and addEventListener with an undefined handler is a silent
no-op. The constructor throws instead.
Seven views registered a global listener in the constructor and removed it in
disconnectedCallback, so a re-attached view heard nothing. FindWidget never
removed either of its two.

Each view's event subset is unchanged. The adapter fields and the casts they
needed are gone, and FindWidget now reads the shared results type rather than
its own copy carrying a count no view sends.
The three tab views wired the inspector in their constructor and released it
in disconnectedCallback, so a re-attached view lost mark, reveal and clear.
The call moves beside wireCategoryColoring, which already had this shape, and
all three constructors are now empty and gone.

AnalysisView's suite mounted a bare element and relied on the constructor
doing the wiring; it now attaches to the document and awaits updateComplete.
Detaching the view destroys its three tables, but the only build path runs when
the log first arrives, so the view came back with its subscriptions and no
table. It now rebuilds on connect, for the view on show, under the filters and
grouping it was left with.
Five grids each carried their own copy of the column view, its overrides, and
the reads and writes either side of them. One controller holds that now, so a
grid declares only its section, presets and tables.
…d life

Three views each held an emphasis, called the wiring by hand on connect and
released it on disconnect. A controller does both now and owns the emphasis,
since nothing outside the subscription decides what it holds. A view that comes
back lights the pick again. The flame chart keeps the plain function: it is no
Lit host, and rests the emphasis itself.
The abort listener stayed on the signal after the element came on screen, so
the observer and the element it watched were held until the controller went.
@lukecotter

Copy link
Copy Markdown
Collaborator Author

Superseded. Five of its eight commits are already in #1048; the three that were not are now in #1062, stacked on it. The two fixes are in #1061, straight onto main. This PR's description also described work already merged upstream — it was written against a stale fork main.

@lukecotter lukecotter closed this Sep 17, 2026
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