Repository navigation
fix: [SDK-5662] scroll tall IAM content that doesn't fit - #1793
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fadi-george
requested review from
abdulraqeeb33 and
nan-li
and removed request for
nan-li
November 6, 2026 01:15
There was a problem hiding this comment.
Multi-model review of 69bae311...a15e006 (788 substantive lines; project.pbxproj excluded). Models: Claude Opus 5.5, GPT 5.6 Sol, Grok 4.7.
The overflow helper and edge-gated dismiss idea look right for tall landscape IAMs. A few gesture/layout gaps should be fixed before merge.
Act on
updateScrollEnabledhas no banner / height-cap check (3/3).contentSizeoverflow can turn scrolling on for banners and fitting modals; a top banner then only dismisses after the leftover scroll is at the bottom.- While the user is scrolling,
gestureRecognizerShouldBeginrejects the dismiss pan, somaxDisplayTimeis never cancelled (GPT, verified). A tall IAM can auto-dismiss mid-read. beginPanAtLocationalways togglescontentPan.enabled(Opus, verified). After the first drag of a fitting message, the web view pan stays enabled even thoughscrollEnabledis stillNO.
Consider
- Reserved-region calls have no class/selector checks (Opus+Grok). A mismatch with the older-SDK shims is an unrecognized-selector crash on every layout.
- Demo
LogViewuses iOS 17.background(_:ignoresSafeAreaEdges:)with a 16.0 deploy target (Grok). scrollEnabledunlocks horizontal pans; a slightly-too-wide document can drift or steal carousel swipes (Grok).- Vertical
MAX(margin, safeArea)sits existing portrait banners/modals flush to the notch vs today's margin + safe-area sum (Opus).
Noted
- Unit tests only cover the two pure helpers, not the gesture/timer paths.
displayBounds/sceneViewstill key offkeyWindow.- Duplicate
#import <UIKit/UIKit.h>inOSInAppMessageScroll.h.
Dismissed
- Fullscreen skipping region frames is documented as HTML handling insets itself.
- Nested
contentOffsetfromlayoutSubviewslooks bounded by the early return.
Sent by Cursor Automation: PR Reviews
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…view Only height-capped messages scroll, scrolling cancels the display timer, the drag no longer re-enables a disabled content pan, and horizontal drift is pinned. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
abdulraqeeb33
approved these changes
Nov 6, 2026
abdulraqeeb33
left a comment
Contributor
There was a problem hiding this comment.
Reviewed at 2997060 against iam-fixes. The three earlier "act on" items are fixed, the helper is pure and correct, KVO and gesture target wiring are clean, and the header stays out of the umbrella.
Approving with nits. Inline:
contentScrollAllowedis snapshotted once inaddConstraintsForMessagewhile the height cap keeps tracking the vertical guide, so a later safe area change can clip a center modal with scrolling still off. Cheap to recompute inviewDidLayoutSubviews.- Fullscreen position is always allowed to scroll, so a middle swipe only dismisses if WebKit's
contentSizematches the card within 1pt. Please confirm on a real fullscreen template before merge; the test list covers HTML, center modal and carousel but not fullscreen. - The x pin in
scrollViewDidScrolljudders on a wide document rather than locking. Fine for now. - Tests leave
kEdgeToleranceunpinned in (1.0, 1.5). Three asserts close it.
nan-li
approved these changes
Nov 6, 2026
… tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.


Description
One Line Summary
Let IAM content scroll when it's taller than the space available, such as on a short landscape screen.
Details
Motivation
A tall IAM in landscape had its bottom clipped and couldn't be scrolled. Swiping dragged the whole card instead. The web view's scrolling has been disabled since 2018, and the message height is capped at the available space, so any overflow was unreachable.
Scope
contentSizeand layout, not the JS height, because full screen messages report a height of 0.OSInAppMessageScroll.Testing
Unit testing
OSInAppMessageScrollTestscovers the overflow threshold, fitting content, top and bottom edges, the middle of the content, near-edge tolerance and zero vertical movement. Ran locally on an iOS 26.5 simulator (the unit test host app doesn't launch on the iOS 27 runtime, which is unrelated to this change).Manual testing
Demo app built from this branch, Xcode 27.1:
Before / After
iPhone Duo folded, landscape, HTML message.
Before
html-old-bug.mov
After
html-fix.mov
Affected code checklist
Checklist
Overview
Testing
Final pass
🤖 Generated with Claude Code