Skip to content

feat(minimap): draw the drawn pen across the archive (#91) - #108

Merged
mrcsin merged 1 commit into
masterfrom
minimap-overview
Oct 5, 2026
Merged

mrcsin merged 1 commit into
masterfrom
minimap-overview

Conversation

@mrcsin

@mrcsin mrcsin commented Oct 5, 2026

Copy link
Copy Markdown
Member

Problem

The minimap was a navigation strip with no data on it, and its window marker left the strip once the chart followed live data past the extent read at start (#91): the marker's left edge was not clamped, and the strip's right bound stayed at the startup extent.

What changed

  • MinimapGeometry.MarkerSpan keeps the marker inside the strip at any zoom.
  • The right bound is the later of the extent's last sample and ChartNavigationController.NewestSample, which the navigation raises on every write, sticky or not.
  • MinimapBandFeed reads the drawn pen's band over the whole extent at the layer LayerForWidth(span, previous, 250) picks, on start, an extent reload, a drawn-pen change and clamp(span / 1000, 2 s, 60 s) after each read lands. A read for a pen no longer drawn is dropped; OutageReport reports the first failure of an outage and logs repeats, for the band and the extent re-read alike.
  • MinimapGeometry.BandFigures turns the envelope into one figure per non-NaN run (finite values only, a flat pen at mid-height, a lone column 2 px wide); MinimapBand draws them in the pen's colour.
  • The line through the middle of the strip is gone; the end labels sit in a row under the strip (the window's minimap row takes the view's own height), and hovering shows a 1 px line with its time to the minute.
  • trend-interaction.md, charting.md, data-integration.md, ui-theme.md, bench.md, testing-strategy.md, TM-4 and CLAUDE.md follow the code; the plan moves to docs/plans/completed/.

Verification

  • dotnet build SemiPlot.slnx: 0 warnings. Unit 1668/1668 under --blame-hang.
  • AWindowPastTheExtent_KeepsItsMarkerInsideTheStrip and ANewerSampleThanTheExtent_MovesTheRightBoundAndItsLabel failed by assertion against the code before their fixes; TheMinimapRow_ShowsTheWholeLabelRowUnderTheStrip fails with the old Height="36".
  • Manual run on the demo stand: the band and its gaps, a pen switch, a recolour, hiding the drawn pen, a 5-minute live follow, deep zoom at both ends, drag navigation, re-reads without jumps, the label row and the hover.

Closes #91

Per-task commits before collapse
9a78c94 docs(plans): record the label row and hover run
ff4dc5d refactor(minimap): address hover smells and comments
a8e13f9 fix(minimap): address label row review findings
de4fe94 docs(minimap): document the label row and the hover
66d5fea feat(minimap): show the time under the pointer
6b95339 feat(minimap): label the strip's ends under it
8a7d47b docs(plans): add the minimap label row and hover
d9cb8aa docs(plans): record the minimap-overview run
2d7504f refactor(minimap): drop restating comments
2384475 refactor(minimap): address smells findings
ed9df90 fix(minimap): address review findings
087e52a docs(minimap): describe the band, bounds and marker
9ace485 docs(plans): record the minimap acceptance run
4e0ed47 feat(minimap): draw the band on the strip
c83a577 feat(minimap): read the drawn pen's band
1a28c89 feat(minimap): shape the band in core
7de132c fix(minimap): move the right bound with the newest sample
02caa09 fix(minimap): keep the window marker inside the strip
73a1bd8 docs(plans): add minimap overview plan

https://claude.ai/code/session_01PfZJa7neMMKPzycFR6iuhD

The minimap was a navigation strip with no data on it, and its window
marker left the strip once the chart followed live data past the
extent read at start: the marker's left edge was not clamped, and the
strip's right bound stayed at the startup extent.

The marker now stays inside the strip at any zoom, and the right bound
follows the newest sample the chart has seen, sticky or not. The strip
draws the min/max band of the pen whose axis the chart draws, from the
coarsest layer that still gives it 250 columns, scaled to its own
range, in the pen's colour; a break in the archive is a gap. The band
is re-read at start, after an extent reload, when the drawn pen
changes, and every span/1000 between 2 s and 60 s, so it trails the
right bound by about a pixel. A read for a pen no longer drawn is
dropped, and an outage reports once and logs each repeat.

The line through the middle of the strip is gone. The end labels sit
in a row under the strip, clear of the chart's time labels, and
hovering the strip shows a line with its time to the minute.

Claude-Session: https://claude.ai/code/session_01PfZJa7neMMKPzycFR6iuhD
@mrcsin
mrcsin marked this pull request as ready for review October 5, 2026 14:31
@mrcsin mrcsin closed this Oct 5, 2026
@mrcsin mrcsin reopened this Oct 5, 2026
@mrcsin
mrcsin merged commit c232258 into master Oct 5, 2026
2 of 4 checks passed
@mrcsin
mrcsin deleted the minimap-overview branch October 5, 2026 14:36
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.

Minimap: the window marker leaves the strip once live data passes the startup extent

1 participant