Repository navigation
Scroll a long iOS Worktree sheet instead of overflowing the screen - #1031
Merged
Merged
Conversation
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]>
Collaborator
Author
There was a problem hiding this comment.
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:742high: 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:709medium: 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:758medium: 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
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


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
.fitAllContentbottom 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:
OpenCodeBottomSheetkeeps the body's last measure and applies it once the overlay has a size, and again after a height policy change.Checks
Risks / Follow-ups
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.