Skip to content

Comments

🤖 fix: auto-select full hunk when jumping with J/K#2549

Open
ibetitsmike wants to merge 1 commit intomainfrom
mike/immersive-active-hunk-outline
Open

🤖 fix: auto-select full hunk when jumping with J/K#2549
ibetitsmike wants to merge 1 commit intomainfrom
mike/immersive-active-hunk-outline

Conversation

@ibetitsmike
Copy link
Contributor

@ibetitsmike ibetitsmike commented Feb 23, 2026

Summary

This PR updates immersive review hunk navigation so pressing J / K automatically selects the full target hunk range after a successful hunk jump, making immediate comment actions operate on the whole hunk.

Background

The previous iteration focused on outlining the active hunk, but that did not match the intended workflow. The goal is keyboard-first review speed: after jumping hunks with J / K, the user should be ready to comment on the full hunk without manually selecting lines.

Implementation

  • Reverted the active-hunk outline rendering changes.
  • Added a pending "select-all-on-jump" marker in immersive review state.
  • On successful hunk jump (
    navigateHunk from J / K), store the target hunk ID and switch hunks.
  • In the selected-hunk alignment effect, when the selected hunk matches that pending jump marker:
    • set active line to the hunk anchor line (first modified line, fallback to hunk start)
    • set selectedLineRange to the full hunk range
  • Cleared the pending marker in non-J/K hunk-selection paths (file navigation, review-note navigation, cursor-driven hunk switches, line click selection) so the behavior stays scoped to J/K navigation only.

Validation

  • make static-check

Risks

Low. The change is scoped to immersive review keyboard navigation state and does not affect backend APIs or persistence.


Generated with mux • Model: openai:gpt-5.3-codex • Thinking: xhigh • Cost: 338259{COSTS}

@ibetitsmike
Copy link
Contributor Author

@codex review

Please review this immersive review mode UI change.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 43526d9f05

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@ibetitsmike ibetitsmike force-pushed the mike/immersive-active-hunk-outline branch from 43526d9 to 97649db Compare February 23, 2026 12:55
@ibetitsmike
Copy link
Contributor Author

@codex review

Addressed the prior feedback:

  • active hunk outline now renders via an absolute overlay so it remains visible above diff cell backgrounds
  • active hunk range prop is now memoized with stable references to preserve SelectableDiffRenderer memoization

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. 🎉

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@ibetitsmike ibetitsmike force-pushed the mike/immersive-active-hunk-outline branch from 97649db to 311c607 Compare February 24, 2026 10:25
@ibetitsmike
Copy link
Contributor Author

@codex review

Addressed the inline-comments regression: active hunk outline now remains continuous through inline note/composer rows and bottom-edge placement accounts for post-line rows.

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Nice work!

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@ibetitsmike ibetitsmike force-pushed the mike/immersive-active-hunk-outline branch from 311c607 to 7d41dd9 Compare February 24, 2026 11:31
@ibetitsmike ibetitsmike changed the title 🤖 fix: subtly outline the active immersive-review hunk 🤖 fix: auto-select full hunk when jumping with J/K Feb 24, 2026
@ibetitsmike
Copy link
Contributor Author

@codex review

Updated per product direction: J/K hunk jumps now auto-select the entire target hunk range for immediate commenting; prior active-hunk-outline rendering changes were removed.

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. What shall we delve into next?

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

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