Problem
When split screen is active with two different versions, the right pane's SelectionProvider uses CodeSyncContext which loads synctex data for the main (left) version only. This means:
- Selection coordinates from the URL are interpreted using the wrong version's synctex mapping
- Block positions may not match the right pane's PDF layout
- Selection overlay may render in the wrong position or not at all
Proposed solution
The right pane needs its own CodeSyncProvider (or a version-aware wrapper) that loads synctex data for the right pane's version. This is a non-trivial change because CodeSyncProvider currently reads locationParams.version from the shared LocationContext.
Options:
- Add a
versionOverride prop to CodeSyncProvider
- Create a
SplitCodeSyncProvider that wraps the right pane and overrides the version
- Extend
CodeSyncProvider to load synctex data for both versions when split is active
Impact
Selection rendering on the right pane when comparing different versions. Same-version split is unaffected.
Generated with Claude Code
Problem
When split screen is active with two different versions, the right pane's
SelectionProviderusesCodeSyncContextwhich loads synctex data for the main (left) version only. This means:Proposed solution
The right pane needs its own
CodeSyncProvider(or a version-aware wrapper) that loads synctex data for the right pane's version. This is a non-trivial change becauseCodeSyncProvidercurrently readslocationParams.versionfrom the sharedLocationContext.Options:
versionOverrideprop toCodeSyncProviderSplitCodeSyncProviderthat wraps the right pane and overrides the versionCodeSyncProviderto load synctex data for both versions when split is activeImpact
Selection rendering on the right pane when comparing different versions. Same-version split is unaffected.
Generated with Claude Code