FluffyLabs / FluffyLabs/graypaper-reader

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

Open
#374 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
22
Forks
6
PR merge metrics
No merged PRs in 30d

Description

## 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](https://claude.com/claude-code)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.