Skip to content

feat(log-viewer): show the Inspector tables in lv-grid - #1173

Merged
lcottercertinia merged 18 commits into
mainfrom
feat-inspector-lv-grid
Oct 16, 2026
Merged

lcottercertinia merged 18 commits into
mainfrom
feat-inspector-lv-grid

Conversation

@lukecotter

@lukecotter lukecotter commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #1169.

What changes

The three Inspector tables move from Tabulator to lv-grid:

  • Call Stack: the frames that led to the event, with Total and Self.
  • Call Tree: Time Order, Aggregated and Bottom-Up. The whole-log tree follows the Timeline window as it moves.
  • Database time: the paths from your code to each statement, closed at the start.

All three share one controller for these features:

  • hover marks the row's frames in the tab on screen
  • a pick reveals the row, or holds a mark on every frame of a merged row
  • the row menu
  • the marks for the frames under the pointer in the tab
  • Escape drops a pick

User-visible changes

  • Time Order opens the parent rows of the active frame. It scrolls only when the frame is out of view.
  • A right-click opens the row menu, but does not select the row. This is the same as the Call Tree tab.
  • A right-click on a row with no frame, or over selected text, shows the browser's own menu.
  • A click on the selected row clears it, as in the Call Tree tab. The active frame keeps its mark.
  • A screen reader names each grid: "Call stack", "Call tree, " and "Database call tree".

Commits

  1. feat(grid): these changes support the Inspector tables.
    • deselect() returns whether it cleared a selection.
    • goTo waits for a source set in the same turn.
    • The docs say a calc's scope is read on each run.
  2. refactor: the shared Inspector grid controller, and the inline query and Calls columns. The Database tables use the same inline query column.
  3. feat: the Inspector tables on lv-grid. The code that only the old tables used is removed.
  4. feat(grid): a goTo gives way to a newer goTo, a deselect, a click or a key. The select event says whether the user made it (user).
  5. fix: the Inspector hears a click made while the active frame is still being selected. The controller now reports a pick only when the user made the select.
  6. refactor: markActive is renamed selectActive.
  7. fix: each Inspector grid has a label for a screen reader.
  8. docs(changelog): the Tables entry names the Inspector tables. It makes no new speed claim.
  9. refactor: the controller listens for the grid events itself. The hosts no longer bind them.
  10. refactor: the controller marks the rows again whenever the grid's rows change. The hosts no longer call remark().
  11. refactor: the Tabulator row marker is removed from locatedRow.ts. stampRowPath stays, because the grid bench's Tabulator contender uses it.
  12. refactor: the Inspector Calls columns use countColumn, like the main tables. callsColumn is removed.
  13. fix: a row with no frame leaves the browser's menu.
  14. refactor: the marks are compared with sameMembers.
  15. refactor(grid): setCurrentMatch no longer waits for a new source. Its matches come from the rows found before.
  16. test: the query and time columns.
  17. test: test steps that other tests already cover are removed.
  18. test: the Inspector menu, picks and marks.

Tests

  • pnpm lint: pass
  • pnpm test: 2996/2996 pass (log-viewer: 2627)
  • Grid bench, 580k-row log: this branch is the same as main's lv-grid.ts to within 4 ms on every step. Find is 504 ms on this branch and 506 ms on main. CSV export is 760 ms on both. No frames are dropped.
  • pnpm test:e2e:web: 2/2 pass before the rebase onto main. It was not run after the review commits. CI runs it.
  • Dev host: Call Stack, Call Tree (3 views, moving window) and Database time checked before the review commits.

@lukecotter
lukecotter force-pushed the feat-analysis-lv-grid branch from 5344e58 to 83a6582 Compare October 16, 2026 09:10
@lukecotter
lukecotter force-pushed the feat-inspector-lv-grid branch from 96bd81f to ca9e923 Compare October 16, 2026 09:10
@lukecotter
lukecotter force-pushed the feat-analysis-lv-grid branch 2 times, most recently from 29c3236 to f2eab46 Compare October 16, 2026 14:51
Base automatically changed from feat-analysis-lv-grid to main October 16, 2026 14:53
…urce

deselect() returns true when it cleared a selection. goTo and setCurrentMatch wait for a source set in the same turn. The Calc docs say the scope is read on each run.
…y columns

The controller holds the hover locate, the pick, the row menu, the marks and the Escape drop of an Inspector grid. The inline query column and the Calls column are shared, and the Database tables use the inline query column.
The Call Stack, Call Tree and Database time sections use lv-grid. Remove the code that only the Tabulator tables used. The Tabulator half of locatedRow.ts stays until Tabulator is removed, because the grid bench's Tabulator contender imports it.

Refs #1169
@lukecotter
lukecotter force-pushed the feat-inspector-lv-grid branch from ca9e923 to 606c4cd Compare October 16, 2026 14:55
…he user made

lv-grid-select reports user: true for a click or a key. A goTo that waits for its
path to open no longer selects when a newer goTo, a deselect, a click or a key
selected in the meantime.
…frame is selected

The Inspector tables kept the echo guard up for the whole of a select that waits
for its path to open, so a click in that time was lost and the selection went
back to the active frame. They now count only the selections the user made.
…lectActive

It moves the selection, where a mark in the Inspector is the hover highlight.
@lcottercertinia
lcottercertinia merged commit 9e46d2a into main Oct 16, 2026
10 checks passed
@lcottercertinia
lcottercertinia deleted the feat-inspector-lv-grid branch October 16, 2026 15:46
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.

2 participants