Skip to content

Split screen: right pane selection should use its own synctex data #374

@tomusdrw

Description

@tomusdrw

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:

  1. Add a versionOverride prop to CodeSyncProvider
  2. Create a SplitCodeSyncProvider that wraps the right pane and overrides the version
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions