fix(ui): keep the editor cross-highlight in view on large documents - #589
Merged
Conversation
With a big resource, both editor panes grew with their content and the page scrolled instead — so the reveal that keeps the highlighted counterpart visible had no scrollbar to move, and hovering a row lit JSON lines far off screen (#573 follow-up). Both panes are now viewport-bound scroll columns (70vh), each scrolling independently, and the one missing reveal direction is wired: hovering a JSON line also brings the matched form row into its pane's viewport. Covered by a spec that overflows both panes with a 40-identifier Patient and asserts the counterpart lands inside the visible pane both ways.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
smunini
approved these changes
Aug 19, 2026
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.
Manual-review follow-up to #573: the cross-highlight works, but on a large document the highlighted counterpart could sit far off screen — both editor panes grew with their content, the page scrolled, and the reveal that keeps the counterpart visible had no scrollbar of its own to move.
The fix
Tests
A new spec overflows both panes with a 40-identifier Patient and asserts both directions: hovering the deepest form row scrolls the JSON pane until the lit line sits inside its visible box, and hovering a deep JSON line scrolls the tree to the matched row. Writing it caught a real timing subtlety — leaving raw mode shows the previous fold view before the re-render lands, so the spec waits for the new document's rows (worth knowing for future editor specs).
Full hermetic suite: 141 passed.