Skip to content

fix(log-viewer): leave zero-duration top-level lines out of the Inspector call tree - #1182

Merged
lcottercertinia merged 2 commits into
mainfrom
bug-inspector-empty-roots
Oct 16, 2026
Merged

lcottercertinia merged 2 commits into
mainfrom
bug-inspector-empty-roots

Conversation

@lukecotter

@lukecotter lukecotter commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

With nothing selected, the Inspector call tree showed zero-duration top-level lines as rows with no time, for example USER_INFO.

Cause

The whole-log tree built each top-level event with realSubtree, which keeps its root whatever its duration, as a selection is kept.

Fix

subtreeRoots takes a dropEmpty option. Only the whole-log tree turns it on: it leaves out a top-level row that has no duration and nothing timed below it. A selection still always shows. The Call Tree tab still shows USER_INFO as a row.

Tests

  • New: "leaves out a top-level line with no duration, as the Inspector does for any row". It fails without the fix.
  • pnpm lint: pass
  • pnpm test: 2881/2881 pass, after merging main (refactor(log-viewer): remove Tabulator #1174)

CHANGELOG

No entry. The USER_INFO row is itself unreleased, so this most likely never reached users.

…ctor call tree

With nothing selected, each top-level event was kept whatever its duration, as
a selection is. A line such as USER_INFO then showed as a row with no time.
@lcottercertinia
lcottercertinia merged commit dc00c9c into main Oct 16, 2026
10 checks passed
@lcottercertinia
lcottercertinia deleted the bug-inspector-empty-roots branch October 16, 2026 16:48
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