Skip to content

Timeline virtualizer's fixed row-height estimate loses the cursor in narrow panes #412

Description

@kevinswiber

The timeline's virtual-window math uses a fixed per-row height estimate (ROW_H = 52 in
src/cli/inspect/web/src/lenses/timeline.ts). Real row heights vary: when the master pane is
narrow — now easy to produce with the resizable divider (#411), or on narrow viewports — the
.event meta line wraps and rows render taller than the estimate. The window math then drifts:
the highlighted cursor row can scroll out of the painted window ("the cursor gets lost in the
stack", found in owner live-testing of #411).

OVERSCAN absorbs small variance and the reveal path's final scrollIntoView corrects exact
offsets, but neither fixes systematic drift when every row is taller than the estimate.

Candidate directions:

  • measure a representative painted row and derive the estimate from live layout (re-measure on
    divider release / resize / density toggle);
  • or track cumulative measured heights for painted rows (classic dynamic-height virtualization,
    substantially more machinery);
  • or clamp the meta line to one non-wrapping ellipsized row so the fixed estimate stays true —
    cheapest, trades away wrapped metadata.

Related: the per-entry scroll-memory work in #411 is unaffected (detail pane, not the list).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions