Skip to content

Fix chart popover dimension windowing#224

Merged
ktsaou merged 1 commit into
mainfrom
agent/fix-popover-dimension-window
Jul 16, 2026
Merged

Fix chart popover dimension windowing#224
ktsaou merged 1 commit into
mainfrom
agent/fix-popover-dimension-window

Conversation

@ktsaou

@ktsaou ktsaou commented Jul 16, 2026

Copy link
Copy Markdown
Member

Summary

  • replace duplicated popover window arithmetic with one bounded shared helper
  • use the same fixed-size window for line and bar dimension popovers
  • cover empty, shorter, equal, longer, missing-selection, and odd-limit boundaries
  • add a component regression for a highlighted row in the lower half of a full window

Root cause

The previous end-window calculation could produce a negative start index. With 10 dimensions, a 10-row limit, and the highlighted dimension at sorted index 7, it calculated from = -1; slice(-1, 10) then rendered only the final dimension even though the complete ordered list was unchanged.

The duplicated bar implementation also rounded fractional boundaries outward for odd limits, which could render one row above the configured maximum.

Behavior after this change

  • the sorted dimension list remains unchanged for a fixed timestamp
  • vertical hover movement only shifts the visible window and its hidden-above/hidden-below counters
  • ranges are always non-negative, contiguous, and no larger than the configured limit
  • lists at or below the limit are rendered completely

Verification

  • yarn test --coverage --collectCoverageFrom=./src/**: 146 suites passed; 1,387 tests passed; 2 skipped
  • changed-file ESLint: passed
  • CommonJS and ES module production builds: passed
  • Chromium against the real app.mem_page_faults stacked chart: the same timestamp and 11-item ordering produced two correct 10-row windows, with exactly one item hidden above or below

Scope

No payload, chart data, sorting, selection, or rendering-engine behavior changes.

@ktsaou
ktsaou marked this pull request as ready for review July 16, 2026 14:21
@ktsaou
ktsaou merged commit 80d79c0 into main Jul 16, 2026
1 check passed
@ktsaou
ktsaou deleted the agent/fix-popover-dimension-window branch July 16, 2026 16:12
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