diff: expand collapsed context on demand - #133
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dacda7b496
ℹ️ 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".
dacda7b to
59ef5f3
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 59ef5f3fe0
ℹ️ 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".
59ef5f3 to
b5c81d8
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b5c81d8fde
ℹ️ 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".
b5c81d8 to
ea225ee
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ea225eeb84
ℹ️ 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".
ea225ee to
f64a486
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f64a486eb2
ℹ️ 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".
f64a486 to
e404701
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e40470129b
ℹ️ 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".
4de82cc to
c58e5c3
Compare
Collapsed "N unmodified lines" separators in the diff views are now interactive: Show 10 reveals the next chunk above the change and Show all expands the whole region, in both the unified and side-by-side views and in both shells. The core gains an ExpandableDiff that splices revealed context into the collapsed diff without rebuilding it, keeps region identity stable across repeated expansions, and re-highlights only visible lines. Side-by-side rows carry their context region directly so both shells read it off the row instead of re-deriving it positionally. Covered by core expand/collapse tests, GPUI component tests, JayJayDiffUI unit tests, and a new ContextExpansionScene UI test backed by a dedicated single-region fixture.
c58e5c3 to
ae81fbe
Compare
Collapsed "N unmodified lines" separators in the diff views are now interactive: Show 10 reveals the next chunk above the change and Show all expands the whole region — in both the unified and side-by-side views, in both shells.
Closes #132.
How it works
jj-diffgains anExpandableDiffthat splices revealed context into the collapsed diff in place instead of rebuilding it, keeps region identity stable across repeated expansions, and re-highlights only the visible lines through the sharedVisibleHighlightSource. Stale or invalid region requests surface as typed errors through UniFFI rather than panics.context_regiondirectly from core, so both shells read it off the row — the previous positional re-derivation in each shell is gone.Testing
Core expand/collapse/performance tests, GPUI component tests (
repo_diff_context, wrap-cache), JayJayDiffUI and JayJayTests unit coverage, and a newContextExpansionSceneUI test backed by a dedicated single-region fixture.