Repository navigation
fix(chart): keep the live edge free of unread spans - #114
Merged
Merged
Conversation
A pen in follow mode lost samples the viewer had received or the archive held, and the line drew one straight segment across the hole until a gesture read the window again. Three defects caused it. A history apply replaced every column, so the live samples that arrived between the read's snapshot and its apply were lost: the realtime poll never delivers a sample twice. ReplaceColumns keeps the columns appended past the last history X that lie after the new last column and at or before the right edge the read asked for, then trims to the cap. A pan into the past asks for a range that ends before the follow tail, so the band just read keeps the whole buffer. At a coarse layer a live sample folds into the last column. When the coarse read did not apply, the columns were still Raw, every sample of the coarse phase folded into one Raw column, and a zoom back to the same width found the Raw fetch covering the window and read nothing. A fold over a Raw fetch clears it, so the return to Raw reads Raw. A fold that meets a gap column opens a column past it instead of dropping the sample and freezing the reading. The fresh tail clamped four point spacings back from the requested right edge, which the prefetch margin puts one window past the visible end, so a coarse read never reached the newest raw rows. It clamps at the earlier of that edge and the present; the provider takes the clock as an injected TimeProvider. Every history read logs one Debug entry with its layer, range, outcome, envelope count and duration, beside the realtime poll's per-tick entry, so a straight segment on the bench can be matched against the reads around it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A pen in follow mode lost samples the viewer had received or the archive held, and the line drew one
straight segment across the hole until a gesture read the window again. Three defects caused it:
apply were lost; the realtime poll never delivers a sample twice.
columns were still Raw, the whole coarse phase folded into one Raw column, and a zoom back to the same
width found the Raw fetch covering the window and read nothing.
puts one window past the visible end, so a coarse read never reached the newest raw rows.
Change
EnvelopeLine.ReplaceColumns(columns, requestedEndX)keeps the columnsappended past the last history X that lie after the new last column and at or before the requested edge,
then trims to the cap. A pan into the past drops the follow tail, so the band just read keeps the buffer.
ClearColumnsis gone: a pen absent from a result keeps its live tail.CurrentValuereads the mergedcolumns.
that meets a gap column opens a column past it instead of dropping the sample and freezing the reading.
PostgresDataProvidertakes an injected
TimeProvider(TryAddSingleton(TimeProvider.System)).envelope count, duration) beside the realtime poll's per-tick entry.
docs/architecture/charting.mdanddata-integration.md; the plan moves todocs/plans/completed/.Verification
AReturnToRawAfterAHeldCoarseReadReadsRaw,AnApplyKeepsTheLiveColumnsPastItsSnapshot,TheRangeTheChartAsksForReachesTheRawLayersNewest(09:04:50 UTC against 09:04:00),AValueAfterACoarseEnvelopeEndingOnAGapTakesTheReading;AHistoryReadLogsItsRequestOutcomeAndDurationpins the log.
dotnet test SemiPlot.slnx: unit 1822/1822, integration 147/147.dotnet format --verify-no-changesclean.
Per-task commits before collapse