refactor(rail): adopt Core 0.46.0 per-viewport rail-visuals predicate (v3.53.1.0)#197
Merged
Merged
Conversation
Bump RailReader.* packages 0.45.2 -> 0.46.0 and replace the shell-side IsFreePanningThisViewport band-aid (RailPaused && ReferenceEquals to the focused viewport, from #196) with the new per-viewport RailNav predicates: - BuildOverlayState gates on Rail.VisualsVisible (= Active && !Paused && HasAnalysis), the canonical "draw rail visuals now?" check. - BuildPageState line-focus dim gates on Rail.Paused alone, preserving the exact prior condition (no NavigableCount>0 requirement, per the Core author's note). The four remaining RailPaused reads are input/lifecycle paths that correctly act on the focused viewport and are left as-is. Behaviour- preserving; the "rail visuals live" rule is no longer duplicated in the shell. Completes the railreader2 follow-up to RailReaderCore#83. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
Adopts RailReaderCore 0.46.0's new per-viewport rail-visuals API (RailReaderCore#83), deleting the shell-side
IsFreePanningThisViewportband-aid introduced in #196.Core 0.46.0 adds two per-viewport
RailNavmembers:Paused— this view's rail is paused by an in-progress free pan (distinct fromActive, which stays true so resume can restore the prior block/line).VisualsVisible—Active && !Paused && HasAnalysis; the canonical "draw rail visuals now?" predicate.Changes
RailReader.*packages0.45.2 → 0.46.0(RailReader2, Cli, Export.Tests).DocumentView.BuildOverlayState→ gate on_viewport?.Rail is { VisualsVisible: true }(equivalent to the oldActive && HasAnalysis && NavigableCount>0 && !free-panguard).DocumentView.BuildPageStateline-focus dim → gate on_viewport?.Rail.Paused != true, usingPausedalone to preserve the exact prior condition (noNavigableCount>0requirement, per the Core author's note).IsFreePanningThisViewport(vm)(theRailPaused && ReferenceEquals(view, FocusedViewport)workaround).The four remaining
RailPausedreads (ViewportPanel.EndGesture,MainWindowCtrl-release,Documents.SelectTab, the VM passthrough) are input/lifecycle paths that correctly act on the focused viewport and are left as-is. The "rail visuals live" rule is no longer duplicated in the shell.Behaviour-preserving (Core's change is additive/behaviour-preserving; the shell conditions are equivalent).
Verification
dotnet build RailReader2.slnx -c Release— 0 errors, 0 warnings.dotnet test tests/RailReader.Export.Tests— 83/83 pass./simplify(4 parallel cleanup agents: reuse, simplification, efficiency, altitude) — clean; only a duplicated comment clause trimmed.🤖 Generated with Claude Code