GeezerVison is showing github.com — Scroll a long iOS Worktree sheet instead of overflowing the screen by ivanfenenko · Pull Request #1031 · opencode-mobile/opencode-mobile
Conversation
ivanfenenko
commented
Nov 11, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
On iOS, the New session Worktree sheet with many worktrees grew taller than the screen: the header went off the top, and the list could not scroll (a swipe dragged the card, which then sprang back).
Cause: a .fitAllContent bottom sheet measures its body before the overlay has a size and ignores that measure on purpose. Worktree rows have a fixed height, so the body never measures again, and the sheet never learns how tall its list is. It stays a compact card sized to its content instead of resting at its height limit and scrolling.
Fix: OpenCodeBottomSheet keeps the body's last measure and applies it once the overlay has a size, and again after a height policy change.
Checks
- Reproduced the bug in the real app against a throwaway opencode v2 server, using a project with 40 git worktrees (iPhone 17 simulator, iOS 27.2).
- With the fix, the sheet rests below the status bar with its header showing, scrolls to the last worktree, and still scrolls after closing and reopening.
- Screenshots are in a comment below.
Risks / Follow-ups
- iOS only. Android was not checked for the same overflow.
- Unit tests were not run; the change is in the sheet view, not in the tested layout math.
🤖 Generated with Claude Code
![Autofix with [code]smith](/api/image?u=https%3A%2F%2Fcamo.githubusercontent.com%2F33b6f70f3541c4e93f4503d29cbfec051fa1b040d8e0ae9313a51c4ece44a627%2F68747470733a2f2f70722d636f6d6d656e74732d6173736574732e626c61636b736d6974682e73682f636f6465736d6974682f6175746f6669782d776974682d636f6465736d6974682d6461726b2d33782e706e67)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
A fit-all bottom sheet measured its body before the overlay had a size and
ignored that measure. Fixed-height rows never measured again, so a long
Worktree list stayed a compact card taller than the screen that could not
scroll. Keep the last body measure and apply it once the overlay has a size
(and after a height policy change).
The gallery Bottom Sheet gains a 40-item option for long fit-all lists.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
iOS, New session → Worktree, project with 40 worktrees (throwaway server, sample data).
| Before |
After |
 |
 |
|
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.
Automated review: 1 finding(s) that 2+ of 3 passes agreed on.
Outside the diff lines:
ios/OpenCode Mobile/OpenCode Mobile/Components/Chrome/OpenCodeBottomSheet.swift:742 high: Reapplied zero-width body measure can permanently lock a short sheet into scrollable mode
2 finding(s) from a single pass, not posted
ios/OpenCode Mobile/OpenCode Mobile/Components/Chrome/OpenCodeBottomSheet.swift:709 medium: Stale zero-width measure is kept and later promotes short content (muse-spark-1.3-contributor)
ios/OpenCode Mobile/OpenCode Mobile/Components/Chrome/OpenCodeBottomSheet.swift:758 medium: Height-policy change restores content height but never re-evaluates mode (muse-spark-1.3-contributor)
opencode pr-review · passes: muse-spark-1.3-contributor, glm-5.3-flash, deepseek-v4.1-flash · $0.039 · 1 pass(es) stopped early
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
ivanfenenko
added a commit
that referenced
this pull request
Nov 11, 2026
…1032)
#1031 replayed the body measure taken before the overlay had a size. That
measure wraps text at no width and reads far too tall, so replaying it
could lock a short sheet to the scrollable detent; replaying after a height
change could also apply the previous page's height.
Report the body's size instead of its height. A body measured at no width
reports again once it has a width, even when single-line rows keep the same
height, so the long Worktree list still learns its real height without a
replay. Only measures with a width count, and the presentation mode waits
for a sized container.
Also drops the gallery's 40-item option from #1031; it never reproduced
the bug.
Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
|