🤖 fix: gate immersive review diff hydration#3446
Conversation
|
@codex review Please review the hydration reveal-gate fix, especially the overlay identity invariant, stale compact cursor remapping, and minimap redraw ordering. |
|
Codex Review: Didn't find any major issues. You're on a roll. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
705e1fd to
e4ffaa6
Compare
|
@codex review Pushed a follow-up to replace the flaky scrollIntoView-based stale-cursor test with a deterministic active-line data contract while keeping the hydration cursor remap behavior covered. |
e4ffaa6 to
5caf31d
Compare
|
@codex review Replaced the CI-flaky DOM/scroll stale-cursor regression with a pure cursor-preservation contract test. Local targeted tests, typecheck, lint, diff-check, and static-check pass. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5caf31d12c
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
5caf31d to
0214ac4
Compare
|
@codex review Pushed final stabilization: replaced the flaky DOM cursor test with a pure cursor-preservation helper contract, and pinned |
0214ac4 to
49d1cfc
Compare
|
Addressed Codex finding @codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 49d1cfc29e
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Keep geometry-changing immersive review overlay swaps hidden until the new diff/minimap have been positioned, including same-file hydration from hunk-only overlays to full-file context. --- _Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$71.64`_ <!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=71.64 -->
49d1cfc to
81ee968
Compare
|
Addressed Codex finding @codex review |
|
Codex Review: Didn't find any major issues. Hooray! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Prevents Immersive Review from painting unpositioned diff geometry while compact hunk overlays hydrate into full-file context. The reveal gate now keys on the rendered overlay identity instead of file path alone, so file switches, hydration swaps, and filtered hunk-content swaps stay hidden until the selected hunk has been scrolled into place.
Background
PR #3442 fixed hunk-to-hunk scroll thrash and assisted-banner reflow, but the remaining flash came from a different invariant: while full-file content loaded asynchronously, the visible diff could swap from a compact hunk-only overlay to a much taller full-file overlay. That changes row indices and minimap geometry even when the selected hunk is unchanged.
Implementation
{ filePath, overlayData.content }, not just file path.aipackage to the already-locked 6.0.175 release so lockfile-free static checks avoid the currently broken 6.0.196 tarball.Validation
bun test src/browser/features/RightSidebar/CodeReview/ImmersiveReviewView.test.tsx src/browser/features/RightSidebar/CodeReview/ImmersiveMinimap.test.tsxmake typecheckmake lintgit diff --checkmake static-checkmake static-check-fullmake static-checkafter rebasing onto latestorigin/main.Risks
Moderate, localized to Immersive Review diff/minimap reveal behavior. The main user-visible tradeoff is that geometry swaps may briefly show the existing loading scrim instead of painting an unanchored diff. The code intentionally keeps normal same-file hunk navigation out of the reveal gate unless the overlay content changes.
The
aidependency pin narrows the package range to the version already resolved inbun.lock; this is intended to make lockfile-free package checks deterministic while npm metadata advertises a latest tarball that returns 404.Generated with
mux• Model:openai:gpt-5.5• Thinking:xhigh• Cost:$71.64