GeezerVison is showing github.com — feat(app): fold tall file diffs in the timeline by Tarquinen · Pull Request #65329 · anomalyco/opencode
Conversation
Tarquinen
commented
Nov 21, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Issue for this PR
No linked issue.
Type of change
- Bug fix
- New feature
- Refactor / code improvement
- Documentation
What does this PR do?
With edits set to expanded, a file diff in the timeline has no height limit, so a 300-line write takes over 7,000px. These blocks were capped at 420px (240px for writes) with inner scrolling until aaf8317 removed the caps when it added the expand setting.
Now an opened file diff shows at most 420px. A taller one fades out under a "Show more" button. "Show less" folds it again and keeps the button where it was pressed. Shorter diffs look the same as before. It covers writes, edits and patches in both timelines.
- It folds instead of scrolling inside the block, following the long user message fold (
UserMessageFold) and its existing ui.common.showMore / showLess strings, so there is no nested scrolling.
- The limit always applies and the button lies over the faded end, so measuring the diff never changes its height. Shrinking it after measuring raised a "ResizeObserver loop" error each time a tall diff mounted.
- Whether a diff is shown in full is component state, not kept in the timeline's disclosure store, so it does not survive the row being unmounted. Storing it means touching every
fileOpen call site.
- Pressing "Show more" while the timeline follows the end keeps the view pinned to the end, as opening a collapsed file already does.
- Three existing specs change because an opened file now has a second button and long diffs open folded.
- No flag: nothing in the timeline UI reads flags.
How did you verify your code works?
- Added a case to
packages/session-ui/component-tests/file-tool.spec.ts that opens a 200-line write, presses "Show more" and "Show less". It fails without the fix.
- Loaded a 300-line write in the app timeline with the Detailed preset: the opened file is 7,201px on dev and 421px here, with no ResizeObserver loop error. A diff that wraps past the limit in a narrow window loses the button when the window widens and gets it back when it narrows.
- strobe's "expand an edit" case, run once per side headless (
--check --base origin/dev, 7 runs): main.work 35.9ms on dev, 34.6ms here. The timed comparison would not run on my machine (tiled window, on battery), so this is a reading, not a verdict.
bun run check, the session-ui component suite, and the patch-sticky-header, patch-border, timeline-geometry and session-timeline-tool-projection e2e specs pass.
Screenshots / recordings
| dev |
this PR |
 |
 |
Checklist
- I have tested my changes locally
- I have not included unrelated changes in this PR
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as described. I mounted the long-write story in the component harness: the opened file goes from 4,801px on dev to 453px here, with the fade and the "Show more" toggle (screenshots below). The session-ui type check (tsc -b) and the full component suite (235 tests) pass. I did not run the app e2e specs or check the Show less scroll compensation by hand.
Public API: unchanged. This is UI only, in packages/session-ui.
No blocking concerns. One small point: tall is only ever set to true. If a diff later becomes shorter than the threshold, for example when a wider window unwraps its lines, it keeps a "Show more" toggle that reveals nothing. Resetting it in the resize callback would cover that.


Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new commits still work as described. In the component story, the opened 200-line write is 421px, 4,833px after "Show more" and 421px after "Show less". On dev it is 4,801px. The session-ui type check (tsc -b) and the full component suite (235 tests) pass.
My earlier point is addressed: tall is now measured again on every resize, so a diff that drops below the limit no longer keeps a toggle that reveals nothing.
Public API: unchanged.
No new concerns.


Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|