Skip to content

feat(mobile): iPhone Duo support — split view + Gatefold mode - #14813

Merged
dylanjeffers merged 2 commits into
mainfrom
feat/mobile-iphone-duo
Dec 2, 2026
Merged

dylanjeffers merged 2 commits into
mainfrom
feat/mobile-iphone-duo

Conversation

@dylanjeffers

@dylanjeffers dylanjeffers commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Makes the mobile app adapt to the iPhone Duo's fold. The playback layouts take after Spotify's tablet Now Playing view and Apple Music's synced lyrics.

  • Closed (outer screen): the phone UI, unchanged.
  • Unfolded (window ≥ 600pt): split view. Browsing stays on the left, and a docked Now Playing panel on the right has the artwork, waveform with comment bubbles, controls, actions and Up Next. The pull-up Now Playing drawer is not rendered in this mode. The artwork is sized to the space left over, so the controls and actions always fit in the visible panel.
  • Half-open hinge with a vertical fold (Gatefold): while something plays, the left page has the artwork and controls and the right page has the track's timestamped comments, highlighted in time with playback. Tap a comment to seek to it. ✕ goes back to the split view, which then sits on the fold. Each page lays out within the modal's measured bounds and its own safe-area insets. When the inner screen is rotated so the fold runs horizontally, the app shows the split view instead of Gatefold.
  • Dynamic Island logo: the iOS screenshot logo only renders when the top safe-area inset is tall enough to hide it (Dynamic Island or notch). On the Duo it used to sit next to "Your Feed" and "Now Playing".
  • Resizable layout: removed static Dimensions.get reads (drawer height, artwork, queue, chat, top tab bars, sign-up), so folding or unfolding mid-session reflows. Split columns read their width through useContentWidth.
  • Native: AudiusHinge wraps UIHingeInteraction (iOS 27.1+, compile-guarded for older SDKs), and SceneDelegate attaches it to the window. This needs a new binary. OTA builds on old binaries get the split view but never Gatefold.

Testing

  • Rebased on main (comment purge). tsc, eslint, jest (85 tests) and the comment ratchet pass.
  • Release sim build (Xcode 27.2, iOS 27.2 SDK) with this branch's JS swapped in. Native code is unchanged since the last build.
  • iPhone 17 Pro, iOS 26.5: the Feed, play bar and full-height Now Playing drawer are unchanged. No panel, and the hinge module is inert on iOS < 27.1.
  • iPhone Duo sim (iOS 27.2 iPhone19-4 runtime), real UIHingeInteraction events through simulator postures:
    • Closed (466×678): phone layout and play bar, no logo overlap.
    • Open (951×669 and rotated 669×951): split view with the Now Playing panel. Controls and actions are fully visible, and elapsed and total time sit on the same line.
    • Half-open at 100–110° (951×669): Gatefold. The artwork, title, waveform and controls fit the left page. The synced comment highlight advanced with playback, tapping a comment seeked to it, and ✕ went to a 50/50 split.
    • Half-open rotated (669×951): split view, no Gatefold.
    • Transitions: closed → open → half-open → ✕ → closed → half-open (Gatefold comes back) → rotate → closed. All of them reflowed live without a relaunch.
    • No track playing at half-open: split view without a panel, no Gatefold.

Not yet verified

  • A real Duo: actual hinge angle thresholds, real fold geometry and insets, and how the camera punch-hole looks on hardware.
  • Android tablets ≥ 600pt wide also get the split view. Not tested there and not behind a flag.

Notes

  • iPad is unaffected (the app target is iPhone-only).

🤖 Generated with Claude Code

@changeset-bot

changeset-bot Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 31f91e9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@socket-security

socket-security Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Dependency limit exceeded — report not shown.

This pull request scan exceeded the 10,000-dependency limit applied to this scan, so the results are incomplete and may be inaccurate. To avoid reporting false positives, Socket has not posted a report.

Upgrade your plan to raise the dependency limit and get complete reports, or view the partial scan in the dashboard.

Socket is always free for open source. If this is a public open source project under an OSI-approved license, contact us to request a free Business plan upgrade.

dylanjeffers and others added 2 commits November 30, 2026 11:12
- Layout reacts to window size changes (fold/unfold) instead of reading
  Dimensions once at startup; drawer height is now a hook.
- Wide windows (>= 600pt) show a split view with a docked Now Playing
  panel (artwork, waveform, controls, Up Next) in place of the drawer.
- Half-open hinge shows Gatefold: artwork and controls on the left page,
  timestamped comments synced to playback on the right; tap to seek.
- New AudiusHinge native module wraps UIHingeInteraction (iOS 27.1+).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Size Now Playing panel and Gatefold artwork from the space left after
  the controls, so the play controls stay on screen.
- Gatefold pages flex within the modal's measured width and apply its
  own safe-area insets, including left/right.
- Gatefold only on a vertical fold (window wider than tall).
- Render the Dynamic Island logo only when the top inset can hide it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dylanjeffers
dylanjeffers force-pushed the feat/mobile-iphone-duo branch from f8e82e8 to 31f91e9 Compare November 30, 2026 19:33
@dylanjeffers
dylanjeffers marked this pull request as ready for review November 30, 2026 20:06
@dylanjeffers
dylanjeffers merged commit 9bc1614 into main Dec 2, 2026
13 checks passed
@dylanjeffers
dylanjeffers deleted the feat/mobile-iphone-duo branch December 2, 2026 21:44
dylanjeffers added a commit that referenced this pull request Dec 2, 2026
## Summary
- Moves the two iOS build jobs (release candidate and production) from
`macos-26` to the `xcode-27` runner image, and selects Xcode 27.2 (the
version #14813 was tested with locally).

## Why
- CI was building with Xcode 26.6 and the iOS 26.5 SDK. `AudiusHinge.m`
only compiles the `UIHingeInteraction` code when
`__IPHONE_OS_VERSION_MAX_ALLOWED >= 270100`, so 1.1.204 build 2 has no
hinge support and Gatefold can't appear on the iPhone Duo.
- App Store Connect flagged both build 2 uploads with ITMS-90725: the
iOS 27 SDK is required for uploads from April 2027.

## Notes
- `xcode-27` is still a preview image on GitHub, so it may queue longer
or have rough edges.
- Building with the iOS 27 SDK opts the app into iOS 27 SDK behaviors
for everyone on iOS 27, not just Duo users. The resulting build should
get a regression pass on regular iPhones before release.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
dylanjeffers added a commit that referenced this pull request Dec 3, 2026
## Summary
- Bumps `versionName` in `packages/mobile/android/app/build.gradle` from
1.1.540 to 1.1.541.

## Why
Play production already lists 1.1.540, so the Android fastlane
`build_and_upload` lane skips the build (`buildFileVersion >
releasedVersion` is false). The manual Android run after #14813 exited
without building or uploading. With this bump, the next Android native
build produces and uploads a new binary.

Android only. iOS and `package.json` are unchanged.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
dylanjeffers added a commit that referenced this pull request Dec 5, 2026
…andscape (#14830)

Before: With the Duo unfolded and held upright (669×951), the app used
the wide split layout, so the Now Playing panel came in from the right
and the feed was squished. In landscape the left nav was only a
slide-over drawer, and it took most of the screen, and on pushed screens
there was no way to open it at all. On short screens Settings at the
bottom of the left nav was cut off with no way to scroll to it.

After: Unfolded and upright, the app uses the normal phone layout with
the bottom Now Playing drawer. The split layout is only used in
landscape. In landscape with nothing playing, the left nav stays open
beside the content on every screen, with a Hide menu button at the top
of the nav. Once hidden, the root screens show a Show menu button at the
top left, and every other screen shows a small handle on the left edge
that brings it back. The choice is remembered. Once something plays, the
nav goes back to a drawer so the Now Playing panel has room, and the
edge handle opens that drawer from any screen. The drawer is at most 75%
of the window and never wider than 340pt, and it scrolls, so Settings is
always reachable. Logged-out guests never get a pinned nav, since their
drawer is empty.

How: `FoldLayoutContext` now requires `width > height` for `isWide`. A
new `LeftNavPinContext` works out whether the layout is wide landscape
with an account and whether the nav can be pinned (also no track), and
keeps the person's choice in AsyncStorage, open by default.
`AppDrawerScreen` switches the drawer to `drawerType: 'permanent'` at
280pt while pinned and renders `LeftNavEdgeHandle` over pushed screens
when the nav is hidden. `AppTabsScreen` narrows `ContentWidthContext` by
the pinned width. `LeftNavDrawer` has the Hide menu button while pinned
and wraps its content in a `ScrollView` that respects the safe area
insets. `MobileRootHeader` shows the Show menu button and hides the
account picture while the nav is pinned.

This changes the rotated case from #14813, which showed the split view
at 669×951.

Found while testing on an iPhone Duo.

---
_Generated by [Claude Code](https://claude.ai/code)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant