Skip to content

feat: scroll to first diff after apply completes #7294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

uinstinct
Copy link
Contributor

@uinstinct uinstinct commented Aug 21, 2025

Description

Scroll to the first diff after apply completes irrespective of where the cursor is.

resolves CON-2190

AI Code Review

  • Team members only: AI review runs automatically when PR is opened or marked ready for review
  • Team members can also trigger a review by commenting @continue-general-review or @continue-detailed-review

Checklist

  • [] I've read the contributing guide
  • [] The relevant docs, if any, have been updated or created
  • [] The relevant tests, if any, have been updated or created

Screen recording or screenshot

feat.mp4

Tests

[ What tests were added or updated to ensure the changes work as expected? ]


Summary by cubic

Scroll to the first diff after applying changes, centering the editor on that line regardless of the current cursor. Addresses Linear CON-2190.

  • New Features
    • Capture the first changed line before clearing decorations and reveal it InCenter after apply.
    • Works even if the cursor was moved elsewhere during the apply.

@uinstinct uinstinct marked this pull request as ready for review August 22, 2025 06:08
@uinstinct uinstinct requested a review from a team as a code owner August 22, 2025 06:08
@uinstinct uinstinct requested review from tingwai and removed request for a team August 22, 2025 06:08
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Aug 22, 2025
Copy link
Collaborator

@RomneyDa RomneyDa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@uinstinct the goal is to stream to the first diff after apply finishes streaming, not after it is closed. The view should not move when diffs are accepted/rejected

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Aug 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M This PR changes 30-99 lines, ignoring generated files.
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants