Skip to content

fix: IAM layout fixes for iPhone Duo, resizable scenes and tall content - #1795

Merged
fadi-george merged 3 commits into
mainfrom
iam-fixes
Nov 6, 2026
Merged

fadi-george merged 3 commits into
mainfrom
iam-fixes

Conversation

@fadi-george

@fadi-george fadi-george commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Description

One Line Summary

Merge the reviewed IAM layout fixes from iam-fixes into main.

Details

Motivation

IAMs were laid out wrong on iPhone Duo and resizable scenes, and tall HTML IAMs were clipped with no way to reach the bottom in landscape. These fixes were reviewed and merged into iam-fixes one at a time.

Scope

Rolls up already reviewed PRs, rebased onto main:

Only In-App Messaging UI changes. No public API changes.

Follow-ups

  • SDK-5699: guard the iOS 27.1 reserved region call and match the app window by size, raised in review here. Should land before the next release that includes this PR.
  • message.height is not updated when a page resizes. That was already the case before these changes.

Testing

Unit testing

OSInAppMessageInsetsTests and OSInAppMessageScrollTests cover the inset math and the scroll and drag rules.

Manual testing

Demo app on simulators: iPhone Duo (folded portrait and landscape, unfolded both shapes), iPhone 18 Pro (portrait and both landscapes) and iPad Pro 11-inch (portrait and landscape). Checked every IAM type plus push notifications. Recaptured screenshots for all poses from this branch.

Affected code checklist

  • Notifications
    • Display
    • Open
    • Push Processing
    • Confirm Deliveries
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
  • I have reviewed this PR myself, ensuring it meets each checklist item

🤖 Generated with Claude Code

fadi-george and others added 3 commits November 6, 2026 13:09
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…it (#1791)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multi-model review

Claude Opus 5.5, GPT 5.6 Sol, and Grok 4.7 independently reviewed this iam-fixes → main rollup (#1789, #1791, #1793). Substantive diff: 868 lines (excluding project.pbxproj). GPT reported no findings; Opus and Grok overlapped on layout, reserved-region, and scroll-handoff risks. Those were checked against the current code.

Act on

  • sceneView only accepts a window whose frame is bitwise-equal to the scene bounds. During a fold or resize that match fails, so the lookup falls back to the banner-sized window whose insets the comments say are unstable — the case this PR is trying to fix. (Grok; verified)
  • iOS 27.1 reserved-region lookup uses NSClassFromString and informal protocols with no respondsToSelector: / nil-class guard, and it runs on every viewDidLayoutSubviews. A renamed or missing selector is an unrecognized-selector crash on the main thread for every non-fullscreen IAM. (Opus+Grok)

Consider

  • updateVerticalInsets still reads self.view.safeAreaInsets while banner window height uses sceneView insets. If the overlapping-edge inset also shrinks, the card can sit in the notch / home indicator. (Grok)
  • message.height is not updated on page change or page resize (assignment still commented out), so a later taller page stays uncapped and cannot scroll. New tests only cover the pure helpers, not pan/scroll handoff. (Opus+Grok)
  • Fullscreen is always treated as capped; a 1pt WK overflow (e.g. safe-area padding on 100vh) changes drag-to-dismiss to edge-only. (Opus+Grok)
  • beginPanAtLocation still toggles the web pan off and on in the same turn while simultaneous recognition is enabled — card and document can both move. (Grok; leftover from #1793)

Noted

  • Banner/height-cap gating in updateScrollEnabled and cancelling maxDisplayTime when the content pan begins — both raised on #1793 — are in this rollup.

Dismissed

  • Vertical MAX(margin, safe area) vs sum — documented as intentional.
  • Demo LogView .background(_:ignoresSafeAreaEdges:) — this API is iOS 15+, not 17+; demo ships 16.0.
  • GPT’s clean bill of health — not used to drop the verified Opus/Grok issues.
Open in Web View Automation 

Sent by Cursor Automation: PR Reviews

@fadi-george

Copy link
Copy Markdown
Collaborator Author

Replies to the summary items:

  • message.height on page resize: that line was already commented out before these changes, will follow up separately.
  • Fullscreen 1pt overflow: measured on sim in fix: [SDK-5662] scroll tall IAM content that doesn't fit #1793, contentSize matches bounds exactly once laid out (778/778, 354/354, 402/402) and a middle swipe dismisses.
  • beginPanAtLocation toggle: disabling the content pan cancels its scroll, so only the card moves. Verified on Duo.

@nan-li nan-li left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are already reviewed PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants