Skip to content

Highlight the lines that just changed in the open file - #9

Merged
anishshobithps merged 2 commits into
mainfrom
feat/change-highlight
Nov 10, 2026
Merged

anishshobithps merged 2 commits into
mainfrom
feat/change-highlight

Conversation

@anishshobithps

Copy link
Copy Markdown
Contributor

Summary

  • When the open file's content changes in place, the lines that changed are marked in the editor: a tinted line, a gutter strip and an overview ruler mark, fading after about 2.4 seconds.
  • A new changedLineRanges in the viewer core compares the old and new text: it trims the common start and end, then matches the middle by longest common subsequence. If either changed region is over 1,000 lines it marks the whole region instead of comparing, so the cost stays bounded.
  • Pure deletions mark nothing, since no new line changed.
  • Under reduced motion the tint is static instead of animated.
  • It is off for the tiers that turn off change highlighting (very large files).

Not included

Running the comparison in a worker and scrolling follow mode to the changed line. The comparison is capped, so it stays on the main thread for now.

Test plan

  • turbo run check-types lint
  • 251 tests (9 new for the line comparison)
  • Browser check on the fixture demo session: live edits to the open file produced the highlighted line with the fade animation and a gutter marker
  • CI

@vercel

vercel Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
website-vw4l Ready Ready Preview Nov 10, 2026 3:50pm UTC

@anishshobithps
anishshobithps merged commit 5c86162 into main Nov 10, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
Preview – website-vw4l — 296a6432 Deployed Nov 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant