Skip to content

Refresh the plot's bus-error markers as errors arrive - #537

Merged
thebhef merged 1 commit into
mainfrom
fix-plot-marker-refresh
Oct 14, 2026
Merged

thebhef merged 1 commit into
mainfrom
fix-plot-marker-refresh

Conversation

@thebhef

@thebhef thebhef commented Oct 3, 2026

Copy link
Copy Markdown
Owner

The plot asked for bus-error episodes only from an area's resample and
from a gap-setting change. The resample loop runs only while
live-following, so a plot that was stopped, paused, or scrubbed back
into history never asked again, and new errors appeared only after a
pan or zoom (owner, on PEAK hardware). Even when something did ask,
useBusErrorMarkers memoised a request for an unchanged window after a
complete answer, so errors landing inside that window were dropped.

Both the trigger and the freshness token are now a model fact rather
than a timer: the host's per-bus errorCount from useBusHealth(),
which re-reads on bus-health-changed. The host's emitter publishes on
its poll tick whenever any health row changed, error count included,
so a count move always reaches the view.

  • PlotPanel sums the error count over the project's buses and, when
    it moves, asks again for the unmoved window — the same effect shape
    as the gap-setting refetch beside it.
  • BusErrorMarkerRequest gains errorsSeen: part of the memo key, not
    of the invoke arguments, so a fault since the last answer makes
    the same window a new request.
  • A complete: false answer was already never memoised; unchanged.

Tests: a hook test that the same window with a higher errorsSeen is
asked again (and the count is not sent), and a PlotPanel test that a
bus-health-changed with a higher count, after mount has settled,
issues exactly one new bus_error_episodes_in_window with the same
from/to and no area resample. Removing either half of the fix turns
them red. README's error-frames passage says markers refresh as errors
arrive.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

This was referenced Oct 3, 2026

thebhef commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner Author

Merge activity

  • Oct 14, 9:10 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Oct 14, 11:29 PM UTC: Graphite rebased this pull request as part of a merge.
  • Oct 14, 11:32 PM UTC: @thebhef merged this pull request with Graphite.

@thebhef
thebhef changed the base branch from ci-fmt-check to graphite-base/537 October 14, 2026 23:21
@thebhef
thebhef changed the base branch from graphite-base/537 to main October 14, 2026 23:27
The plot asked for bus-error episodes only from an area's resample and
from a gap-setting change. The resample loop runs only while
live-following, so a plot that was stopped, paused, or scrubbed back
into history never asked again, and new errors appeared only after a
pan or zoom (owner, on PEAK hardware). Even when something did ask,
`useBusErrorMarkers` memoised a request for an unchanged window after a
complete answer, so errors landing inside that window were dropped.

Both the trigger and the freshness token are now a model fact rather
than a timer: the host's per-bus `errorCount` from `useBusHealth()`,
which re-reads on `bus-health-changed`. The host's emitter publishes on
its poll tick whenever any health row changed, error count included,
so a count move always reaches the view.

- `PlotPanel` sums the error count over the project's buses and, when
  it moves, asks again for the unmoved window — the same effect shape
  as the gap-setting refetch beside it.
- `BusErrorMarkerRequest` gains `errorsSeen`: part of the memo key, not
  of the `invoke` arguments, so a fault since the last answer makes
  the same window a new request.
- A `complete: false` answer was already never memoised; unchanged.

Tests: a hook test that the same window with a higher `errorsSeen` is
asked again (and the count is not sent), and a PlotPanel test that a
`bus-health-changed` with a higher count, after mount has settled,
issues exactly one new `bus_error_episodes_in_window` with the same
from/to and no area resample. Removing either half of the fix turns
them red. README's error-frames passage says markers refresh as errors
arrive.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thebhef
thebhef force-pushed the fix-plot-marker-refresh branch from 391ec5a to 2da46a4 Compare October 14, 2026 23:28
@thebhef
thebhef merged commit be2cb5b into main Oct 14, 2026
11 checks passed
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.

1 participant