Skip to content

feat(mobile): adapt Duo layout and terminal keys on Expo 58 - #33157

Draft
kazu-42 wants to merge 7 commits into
stablyai:mainfrom
kazu-42:kazu-42/mobile-duo-expo58
Draft

kazu-42 wants to merge 7 commits into
stablyai:mainfrom
kazu-42:kazu-42/mobile-duo-expo58

Conversation

@kazu-42

@kazu-42 kazu-42 commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Keep the terminal on one side of a vertical fold in a book-like iPhone Duo posture, and put its extra keys in the usable space below the system's vertical status column. Layout changes use the same workspace and terminal instead of introducing another session.

What Changed

  • Adapt the feature commit from Lars Keggenhoff's feat(mobile): support iPhone Duo (iOS 27.1 SDK, fold-aware layout, terminal key rail) #32733, preserving its author and original commit reference. Use the supported Expo runtime from chore(mobile): adopt Expo 58 and the supported iOS scene lifecycle #33155 instead of carrying the Expo 55 AppDelegate generator, deployment-target workaround or Router patch.
  • Read active divisions and occlusions through react-native-reserved-regions 0.2.0, the library recommended in Expo's Duo guide. Replace the original custom iOS geometry module. Measure the provider's origin, translate its frames to window points, and remeasure when the status column switches sides without a window-size change.
  • Reuse the wide host sidebar and existing terminal viewport refit path. Pass the fold through an optional page initialization field so native and page-rendered layouts use the same usable bounds.
  • Draw the terminal key rail in the free side strip, reduced by keyboard occlusion. Keys that do not fit remain in the bottom row. Chat, files and pushed screens do not claim the rail.
  • Keep the bridge grant, initialization fields and terminal-key notifications optional. Older shells/pages keep their current key row. The key enum uses existing terminal input and clipboard paths.

Why

The SDK provides scenes and geometry APIs, but it cannot decide where Orca's terminal, workspace sidebar or custom keys belong. This keeps those decisions in the app and reuses its current connection, keyboard and resize ownership. Layout follows active reserved regions rather than hinge angles or a device-model check.

Depends on #33155. Both PRs target main because the runtime branch is in the contributor fork. Until the prerequisite lands, GitHub's full diff includes it. The Duo-only comparison shows the feature separately. Rebase this branch after the runtime PR merges.

Linked Issue

Related to #22597. Keep that issue open until the runtime prerequisite, remaining posture design and acceptance checks below are completed. #32733 is the original implementation this adaptation builds on; this PR does not claim its author's device results as evidence for the new provider.

Visual Proof

Pending for this branch; this is a draft. The original design has screenshots in #32733, but this branch changes the runtime and geometry provider, so those screenshots are not acceptance evidence for these changes. No Duo simulator/runtime is installed on this workstation.

Testing

On macOS:

  • Full mobile suite: 1,118 suites passed, 2 skipped; 11,396 tests passed, 6 skipped.
  • Production typecheck and test typecheck ratchet passed. The test program contains 1,115 files; the existing 112-file baseline was not expanded.
  • Tests cover fold/side-strip geometry, provider-to-window coordinates, side-inset changes without resizing, clearing inactive regions, key grants, older bridge peers, host/sidebar ownership and existing terminal refit behavior.
  • Mobile lint and native import checks passed. The dependent runtime also passes the web-bundler contract tests.
  • pnpm build:mobile-web and its packaged-bundle verifier passed: 16 routes, 144 assets, within the existing size budget.
  • iOS prebuild, CocoaPods installation and the arm64 iPhone simulator compile passed with Xcode 27.2 beta 2. The compile reported no errors; this does not claim app-launch or physical Duo acceptance.

Still required before release: native Duo open/closed/book/tabletop poses, both directions of rotation and Split View; drafts, IME composition and pending questions; keyboard, repeat/paste, terminal dimensions and VoiceOver; ordinary iPhone/iPad, Android and web runtime regressions. No simulator launch, physical-device or release-archive acceptance is claimed.

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

AI Disclosure

Original feature authored by Lars Keggenhoff in #32733. Expo 58 integration, provider replacement and verification performed with OpenAI Codex (GPT-6).

Review

Review coordinate-space conversion, the sidebar's ownership on page-rendered routes, keyboard clipping and optional bridge behavior. The provider's first measurement is asynchronous; an initial empty result is not proof of unsupported hardware. Reverting the Duo commits restores the preceding layout while retaining the supported runtime; removing the native dependency also requires rebuilding the app.

Agent skill upstream boundary

  • Not applicable; this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Android retains its existing layout policy; older iOS reports no active reserved regions. Transport and execution-host ownership are unchanged: resizing does not create a terminal, launch an agent, resend input or approve a prompt. SSH and folder workspaces use the same existing input paths.

The custom split currently aligns the sidebar to vertical divisions. Horizontal/tabletop poses do not get a separate custom terminal arrangement in this patch; they remain part of the required native acceptance/design check before closing the full issue.

Checklist

  • Duo feature separated from its runtime prerequisite
  • User-facing effect, mechanism and alternatives explained
  • Current-branch screenshots and native transition evidence attached
  • Self-reviewed for correctness, security and performance
  • Cross-platform, SSH/remote and workspace impact considered
  • Native acceptance and hosted CI completed

kazu-42 and others added 7 commits October 24, 2026 21:51
Align React Native and native packages with Expo SDK 58, preserve input and WebView protections, and await asynchronous file operations. Keep the existing release-age policy and document the iOS 16.4 minimum.

Window-controls scene attachment adapted from stablyai#32733.

Co-authored-by: Lars Keggenhoff <[email protected]>
Apply the narrow bridge-proxy runtime fix from serenity-kit/react-native-libsodium#109. Preserve the existing C++ crypto implementation and synchronous installation path.
Use Expo public module APIs, preserve Android cleartext access through build-properties, and use legacyResolver at the microphone permission callback boundary.
Keep splash options in the supported plugin and share React Native Web numeric image IDs with SVG. Validate the actual bundled SVG resolver against the web registry.
Keeps the host sidebar left of the fold in book posture so the terminal
never crosses the crease, and draws the terminal keys in the strip below
the Duo's status column on session routes.

(cherry picked from commit fdc23ff)
Replace the custom iOS geometry module with react-native-reserved-regions, translate provider coordinates into window points, and preserve the existing terminal refit and optional bridge grants.

This branch has not been deployed

No deployments
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