Skip to content

feat(mobile): add iPhone Duo workspace layouts and controls - #33221

Closed
zytakeshi wants to merge 19 commits into
stablyai:mainfrom
zytakeshi:feat/iphone-duo-workspace
Closed

zytakeshi wants to merge 19 commits into
stablyai:mainfrom
zytakeshi:feat/iphone-duo-workspace

Conversation

@zytakeshi

@zytakeshi zytakeshi commented Oct 24, 2026 •

Copy link
Copy Markdown

ELI5

Orca should use an iPhone Duo like a foldable workspace: more terminal space when open, a keyboard-friendly upper display when half folded, and reachable controls in the side strip. This is the main PR for that experience, with independent terminal panes supplied by #33210.

Latest series status

Contribution Current head Review scope
Main Duo workspace and controls, #33221 a2583f4eb1d91d732e760143419d30a73fca3095 Includes the companion, Duo refinements and current main reconciliation
Split panes and session continuity, #33210 f1e64ef830690f0914437ecde16ab49ac010963b Generic mobile/tablet prerequisite

The main PR includes narrow-header actions in …, removal of the synthetic top band and Duo input-dock bottom reservation, and keyboard alignment scoped to the visible terminal dock. Native chat, browser, Markdown and file views retain their existing keyboard clearance. Review the companion first, then the Duo-only comparison.

What Changed

User-facing feature Main PR: Duo workspace and controls Supporting PR: split panes and continuity
Use the cover and unfolded screen's available area Yes —
Half-fold portrait keyboard layout, like a small laptop Yes —
Compact top/bottom controls on Duo, preserving other devices Yes —
Remove the synthetic top band and bottom terminal-input reservation Yes —
Readable, tappable tabs on narrow headers; workspace buttons move into … Yes —
Refit complete terminal rows into each available pane frame — Yes
Full shortcut set in a vertically scrollable right rail Yes —
D-pad with press-and-hold directions Yes —
Manage shortcuts, toggle the D-pad, and hide duplicate arrow keys by default on Duo Yes —
Preserve Live input and use it to show or hide the keyboard Yes —
Choose One terminal, Auto, Side by side, or Stacked — Yes
Choose side by side while the workspace sidebar stays open — Yes
Tap, scroll, and control either visible terminal directly — Yes
Keep a useful split pair when selecting a third tab — Yes
Retain the workspace and active terminal through rotation/resizing — Yes
Reliable top tabs, actions, and sidebar toggle through layout changes Controls and hit regions Navigation and state ownership
  • Adapt the workspace to usable screen and fold regions, including the portrait half-fold keyboard layout.
  • Move the terminal accessory controls into the Duo's scrollable side rail while retaining Live input, attachments and dictation. Show the full configured shortcut set and provide a configurable D-pad.
  • Keep shortcut visibility and keyboard controls consistent across keyboard-open, keyboard-closed and resized layouts; remove duplicate reserved footer space.
  • Keep shared terminal sizing and host ownership in their existing paths. The root consumes the Duo side insets once without a synthetic top band; measured fold/occlusion/keyboard geometry reaches the page through optional bridge fields. The rail acknowledges controls before the dock removes them. Native rail views and their scroll position survive pane focus changes, while input-owner updates cancel stale held keys. Rail claims survive same-document host rebuilds and clear for new documents. Compact headers retain escalated connection warnings and a reconnect action when one is available.

Why

On the open Duo, redundant bottom rows and unused layout space cost terminal lines. A small fixed subset of side shortcuts also makes the side strip less useful than the normal accessory row. This keeps Orca's existing input behavior while moving the complete control set into the available side area.

The split-pane and navigation changes are isolated in the supporting PR so they can be reviewed on other mobile/tablet layouts independently. Review and merge #33210 first, then this PR. Both PRs target main; this aggregate includes #33210 as a dependency. Review and land the generic split PR first, then update this aggregate PR against main again if main advances. Duo-only comparison excludes the companion changes.

Linked Issue

Fixes #33200.

Part of #22597. That broader issue remains open for its remaining device, accessibility, IME and transition acceptance criteria.

This series proposes a broader replacement for the narrow Duo compatibility work in #32733 by @larskghf. Its two SDK/scene/fold groundwork commits retain @larskghf’s authorship, and the controls, layout choices and continuity are added here.

Related Expo 58 proposals #33155 and #33157 by @kazu-42 remain separate. This series stays on current upstream’s Expo 55. Maintainers decide the disposition of those PRs.

Visual Proof

The following media show the community implementation before the public port. The earlier and later simulator prototypes use neutral local fixtures. They are neither a matched comparison against current upstream main nor final-head acceptance evidence. Final-branch validation is listed separately below.

Motion overview (actual simulator captures with labeled explanatory motion graphics):

orca-duo-x.mp4

Keyboard space: earlier and later prototypes

Earlier prototype: unused band above keyboard Later prototype: terminal fills the available height
Earlier unfolded portrait prototype with an unused keyboard band Later unfolded portrait prototype with terminal and Live input above the keyboard

The exact builds and fixture output differ; this illustrates layout rather than a controlled pixel-difference measurement.

Complete controls in the side strip

Earlier prototype: bottom row plus partial rail Later prototype: full rail, D-pad and Live input
Earlier prototype with bottom shortcuts and a partial side rail Later prototype with full scrollable rail, D-pad and Live input

The pane arrangements differ; this is a control-placement comparison, not a measured terminal-height gain.

Half-fold keyboard layout

Half-fold portrait simulator prototype with terminal and input above the keyboard

The simulator keyboard menu exposed the keyboard for this capture. This still image demonstrates layout; it does not prove that the application's Show keyboard control opened it.

All prototype media and provenance.

Testing

Latest contributor device feedback

On October 25, 2026, Takeshi Matsumoto (@zytakeshi) checked the latest combined implementation on his physical iPhone Duo and reported that the layout looks good after the added edge gaps were removed. This is contributor-reported layout feedback for the combined implementation. It does not establish exhaustive touch, home-gesture, rotation or keyboard acceptance, or a separate native run of the rebased public branch.

  • Final public branch manually tested locally. Automated local coverage is below. The rebased public native app has not been manually exercised; the physical-device contribution is recorded separately.
  • Focused automated checks completed. Pinned implementation head: f8180bfa04c9435b490aef2ebd193ed427b17b61 (base 41d25c07).
Check Observed result
Mobile Vitest: complete web-shell suite plus changed layout/session/terminal tests 1,583 passed, 131 files
ORCA_BACKGROUND_LAUNCH=1 ./node_modules/.bin/vitest run config/scripts/mobile-web-page-routes.test.mjs src/shared/mobile-web-bundle/manifest-contract.test.ts 53 passed, 2 files
./node_modules/.bin/tsc --noEmit --project mobile/tsconfig.json --pretty false Exit 0
Mobile test typecheck ratchet through TSX/source conditions Exit 0; 111 existing grandfathered error files, no new failures
ORCA_BACKGROUND_LAUNCH=1 ./node_modules/.bin/tsx --conditions=orca-source config/scripts/check-changed-code-quality.mjs 41d25c07 All seven scans: zero new findings
Oxfmt over changed files Exit 0
ORCA_BACKGROUND_LAUNCH=1 node config/scripts/build-mobile-web-app-bundle.mjs Exit 0; 16 routes, 144 assets
cd mobile && node node_modules/expo/bin/cli prebuild --platform ios --no-install Exit 0; generated scene delegate/manifest; plutil accepts Info.plist
Reserved-regions Swift module typecheck, Xcode/SDK 27.1 Exit 0 against matching Expo 55 native headers; existing capture warnings remain

Regression controls failed before the relevant repair and passed afterward: reconnect availability, non-Duo live/buffered spacing, rail view continuity across pane focus, immediate keys after host rebuild, plus the companion PR’s pane/rotation/legacy-storage controls.

Exact mobile regression selection
cd mobile
ORCA_BACKGROUND_LAUNCH=1 ./node_modules/.bin/vitest run \
  src/mobile-web-shell \
  src/components/terminal-shortcut-settings-custom-keys.test.tsx \
  src/layout/fold-division.test.ts \
  src/layout/side-rail-strip.test.ts \
  src/layout/side-safe-area.test.tsx \
  src/layout/top-chrome-space.test.ts \
  src/navigation/route-handoff-host-area.web.test.tsx \
  src/platform/keyboard-occlusion.test.tsx \
  src/session/MobileSessionCommandDock.test.tsx \
  src/session/MobileSessionHeader.test.tsx \
  src/session/MobileSessionTabStrip.test.tsx \
  src/session/TerminalPaneView.test.tsx \
  src/session/mobile-session-preference-startup.test.ts \
  src/session/mobile-session-terminal-frame-layout.test.tsx \
  src/session/mobile-terminal-layout-choice.test.tsx \
  src/session/mobile-terminal-pane-layout.test.ts \
  src/session/mobile-terminal-split-gestures.test.tsx \
  src/session/mobile-terminal-split-input.test.tsx \
  src/session/shell-terminal-key-rail.web.test.tsx \
  src/session/use-mobile-session-keyboard-state.test.tsx \
  src/session/use-mobile-session-terminal-subscription.test.tsx \
  src/session/use-terminal-split-layout.test.tsx \
  src/terminal/terminal-accessory-layout.test.ts \
  src/terminal/terminal-cell-box-refit.test.tsx \
  src/terminal/terminal-foreground-recovery.test.ts \
  src/transport/mobile-web-bundle-reply-schemas.test.ts \
  src/session/mobile-session-connection-retry.test.tsx \
  src/session/shell-terminal-key-rail.test.tsx \
  --maxWorkers=2

Full repository CI and a complete native app build from the public rebase have not run.

Takeshi Matsumoto (@zytakeshi) tested the earlier implementation on his physical iPhone Duo, including the disappearance of the large unused terminal band. This is user-reported physical-device evidence for that implementation; final public-branch results are recorded separately above.

Reviewer exercise: open a terminal, fold/unfold and rotate; show/hide the keyboard through Live input and the side control; scroll to every configured rail shortcut; change shortcut visibility and D-pad setting; verify the terminal's last complete row remains visible and input reaches the active pane.

Local automated checks ran on Apple Silicon macOS with Xcode 27.1. The final public native app has not been exercised on physical iPhone Duo, other iPhones/iPad, Android, Windows/Linux or live SSH. The screenshots are from the earlier simulator implementation. The native reserved-region source matches the module used for those captures; this is not a substitute for building and testing the complete rebased app.

AI Disclosure

Implementation assistance: Codex GPT-6 Astra (high) during device iteration, Codex GPT-6.1 Sol (xhigh) during upstream preparation, and Claude Code Opus 5.5 (high) on the public continuity/storage port. Independent public-diff reviews and motion graphics: Claude Code Opus 5.5 (xhigh).

The initial product code at 4ce77df4 passed a fresh Claude Code Opus 5.5 xhigh review with zero P1/P2 or in-diff defects. Subsequent CodeRabbit and independent Codex reviews led to the runtime repairs listed in the follow-up below; the current follow-up also passed fresh independent standards, behavior and source reviews. Current execution results are recorded above.

Review

Fresh Claude Code Opus 5.5 xhigh review covered the aggregate public diff and the standalone companion. It identified the missing reconnect control and non-Duo spacing change, plus rail scroll/rebuild behavior and unnecessary prototype compatibility code. Those paths were repaired with regression evidence. A fresh final pass over the repair diff is recorded in the AI disclosure above. The runner-label concern was checked against current GitHub documentation and image inventory; it is a supported hosted label.

CodeRabbit and review follow-up

CodeRabbit follow-up head: f8180bfa04c9435b490aef2ebd193ed427b17b61. Companion reviewed head: f1e64ef830690f0914437ecde16ab49ac010963b. Both PRs target main; land #33210 first, then rebase this aggregate. The Duo-only comparison above excludes the companion changes.

Finding Repair
Matching routes could combine independent ownership flags Require both declarations on one matching route; preserve the legacy wide-only fallback
Keyboard clipped the inactive visible pane Apply each visible pane's lift using its own grid and metrics, in both split directions
Native rail reconciled on unrelated renders and could retain stale held callbacks Keep its node stable, dispatch through the latest committed callback, and reject old-owner input during handoff
Suspended React renders could expose pending web, published-rail or D-pad callbacks Commit callback, owner and enabled-state refs in layout effects; retain the committed receiver until a transition commits
D-pad text assumed the rail was on the right Use orientation-neutral side-rail wording
Repeated safe-area parsing/warnings on unchanged inputs Memoize the measured geometry result

New regressions failed on the prior implementations for the intended reason and pass after repair, including overlapping route patterns, inactive-pane bottom rows, held-owner handoff, and real Suspense/transition input delivery. The bot's docstring percentage is advisory here: this repository asks for concise comments only where code needs explanation, so boilerplate docstrings were not added.

Narrow header follow-up

At e15c0ba16820c0e6446f53c96cd86bca09f7f4d1, a narrow one-row header reserves its width for scrollable tabs and the Back/More controls. Terminal layout, New tab, Quick commands, File explorer and Source control move into the existing … sheet when the measured header is below 600 points. Wider headers retain the inline buttons. This also handles a sidebar narrowing an otherwise wide window without adding a row or changing terminal height.

The menu reuses the existing action handlers, connection/capability restrictions, and sheet-dismissal sequencing. The terminal-layout chooser has one stable session owner, and the tab strip remains mounted across width changes.

Follow-up check Observed local result
Complete mobile session and web-shell Vitest selection, two workers 4,211 tests passed, 410 files
Focused header, tab strip, sheets and split-layout regressions after final formatting 14 passed, 5 files
Mobile production TypeScript Exit 0
Mobile test typecheck ratchet Exit 0; no new failing test files
Changed-code-quality gate since f8180bfa All seven scans, zero new findings
Production mobile web bundle Exit 0; 16 routes, 144 assets
Fresh independent source review No confirmed defect

The narrow-header regression fails on the preceding implementation. The integration test exercises retained tab identity/selection through resizing, every collapsed action, and the wait for menu dismissal before opening another sheet. These are local source/automated results; fresh physical-device acceptance and full upstream CI are not claimed.

Edge spacing follow-up

At b82ca3f5cd5e5c52bef4f4c9578917bb8a860b11, remove the synthetic 20-point top guard and the terminal input dock's bottom reservation on Duo layouts, including portrait without the side rail. Existing system occlusion handling and side-inset protection remain. Ordinary devices retain their original bottom spacing.

With no bottom inset reserved while the Duo terminal dock is visible, the shared keyboard lift uses the full keyboard overlap. This keeps the input row and terminal panes on the same boundary when the keyboard opens. Native chat, browser, Markdown and file modes retain their previous keyboard calculation and safe-area handling, as do ordinary devices. The presentation hook remains the single lift writer; its terminal/dock/toast and reader/chat/browser consumers keep their existing contracts.

Follow-up check Observed local result
Focused side-area, command-dock, keyboard-boundary and reconnect tests 41 passed, 4 files
Mobile production TypeScript Exit 0
Mobile test typecheck ratchet Exit 0; no new failing files
Changed-code-quality gate since e15c0ba1 All seven scans, zero new findings
Production mobile web bundle Exit 0; 16 routes, 144 assets
Fresh independent source review No blocking source defects

The updated regressions fail on the previous spacing/keyboard implementation. The latest contributor device feedback is recorded above. Exhaustive native touch, home-gesture, orientation and keyboard acceptance remains open; the latest spacing change has no new simulator acceptance run.

Root layout measurement follow-up

At 353a4054de653fdf9c8ed51ab0e29944ea480ee9, remeasure the shell when its root view lays out, including when the WebView's local frame and screen dimensions stay unchanged. This refreshes the status-area geometry after a root-only move, without requiring rotation or remounting the WebView.

The root-movement regression fails on the preceding public head and passes with the fix. On this PR branch, the focused mobile selection passed 36 tests across 8 files; mobile production TypeScript, the test typecheck ratchet, all seven changed-code-quality scans, formatting, and git diff --check passed. An independent source review found no blocking defect. Physical Duo confirmation of this intermittent symptom and full upstream CI are not claimed.

Upstream main conflict reconciliation

Merge commit a2583f4eb1d91d732e760143419d30a73fca3095 incorporates upstream main at 9149d77de4a588f0ec20f8a37c68a92ca57b2eb6. The 34 reported conflicts are resolved, including Duo rail and pane behavior alongside upstream route, bridge, keyboard, test and comment changes. Both the upstream @expo/cli patch and this branch’s expo-router patch remain in the mobile lockfile; a frozen install passed. The Duo-only comparison linked above ends before this merge so it excludes the repository-wide main changes.

On this merged head, pnpm tc passed; the mobile Vitest sweep passed 4,972 tests across 492 files; route and shared mobile-bundle tests passed 50 tests across 2 files; and the changed-code-quality gate reported zero new findings across 155 source files. The merged PR is currently reported mergeable by GitHub. Upstream CI and physical-device acceptance are separate pending checks.

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

  • Build against iOS 27.1 for the Duo canvas and reserved regions. The workflow selects GitHub’s documented xcode-27 hosted runner; the October 23 image includes Xcode 27.1. No release workflow was triggered for this contribution.
  • Runtime/SDK availability guards leave older iOS and devices without these regions on their existing layout. Compact input spacing is scoped to Duo/usable-rail geometry; baseline spacing remains on other devices.
  • New bridge fields and route ownership are optional. Released old pages do not claim the new rail, and old native shells ignore its new ready metadata. New preference keys are negotiated before entering init snapshots.
  • Direction-pad visibility and individual shortcut visibility remain independent saved settings. Turning the pad off does not rewrite a user’s arrow-key preferences.
  • Folder workspaces and SSH use the existing terminal/session paths. No signed app, app identity or notification-server changes are included.

Original community implementation credit is preserved for @larskghf. The media illustrate a broader workspace proposal; maintainers decide the disposition of other contributors' open PRs.

Checklist

  • Generic split/continuity work is separated into the linked companion PR
  • Explained the user-facing behavior and why
  • Before/after prototype screenshots and video attached with provenance
  • Final public diff self-reviewed and independently reviewed
  • Cross-platform, SSH/remote, folder-workspace and compatibility impact considered
  • Required lint, typecheck, test and build checks pass, with exact results above

larskghf and others added 9 commits October 25, 2026 01:17
Builds against an older SDK run letterboxed in compatibility mode on
iPhone Duo. Moving to Xcode 27.1 needs the UIScene lifecycle the SDK
makes mandatory, a floor for pod deployment targets Xcode 27 rejects,
and one availability guard in expo-router.
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.
@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9a15626d-4c59-4c3b-bd73-8e8363b0545f
Commits

Reviewing files that changed from the base of the PR and between e15c0ba and b82ca3f.

Files selected for processing: 6
  • mobile/src/layout/side-safe-area.test.tsx
  • mobile/src/session/MobileSessionCommandDock.test.tsx
  • mobile/src/session/MobileSessionCommandDock.tsx
  • mobile/src/session/mobile-session-connection-retry.test.tsx
  • mobile/src/session/mobile-session-keyboard-edge-layout.test.tsx
  • mobile/src/session/use-mobile-session-presentation.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Walkthrough

The pull request adds iOS reserved-region reporting and uses fold, safe-area, and keyboard geometry in mobile layouts. It extends the web-shell bridge with geometry, terminal-key rail, and storage state. Mobile sessions add configurable side controls and split-terminal layouts, with updates to input handling, pane sizing, and responsive session controls. Route declarations and policies add cross-layout host-area ownership.

Priority: Normal

Merge Risk: Low · up to b82ca

The remaining known issue is low-cost repeated geometry parsing, with possible repeated warnings for malformed data. It does not block merging.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Out of Scope Changes check Warning The whole PR still includes generic split-pane and workspace-continuity implementation assigned to companion PR #33210. Examples include mobile/src/session/mobile-terminal-pane-layout.ts, `use-termi… Move the generic split-pane, pane interaction, and responsive workspace-continuity implementation and dedicated tests to PR #33210, or remove those changes from this PR. Keep Duo-specific geometry, side-rail, keyboard, shortcut, D-pad, and …
Docstring Coverage Warning Docstring coverage is 28.95% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 114 functions across 79 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: adding iPhone Duo workspace layouts and controls.
Linked Issues check Passed Direct issue #33200 requirements are implemented at the reviewed head. The PR adds fold and occlusion geometry, half-fold placement, compact Duo spacing, terminal-cell refit, and keyboard-aware sizing…
Description check Passed The pull request description closely follows the required template. It explains the user-facing changes and rationale, links issues, includes visual proof, testing results, AI disclosure, review notes…
Full details: Linked Issues check

Explanation

Direct issue #33200 requirements are implemented at the reviewed head. The PR adds fold and occlusion geometry, half-fold placement, compact Duo spacing, terminal-cell refit, and keyboard-aware sizing. It adds a vertically scrollable terminal rail with configured shortcuts, keyboard/display/input/custom-key controls, Live input keyboard control, and a repeating configurable D-pad. It preserves Duo arrow preferences, refreshes settings for a mounted workspace, and carries optional geometry and rail state through mixed-version bridge paths. Header tests cover touchable tabs and actions through width changes.

Full details: Description check

Explanation

The pull request description closely follows the required template. It explains the user-facing changes and rationale, links issues, includes visual proof, testing results, AI disclosure, review notes, compatibility considerations, and checklist status. It also clearly states that full CI, complete native builds, and final physical-device validation remain pending.

Full details: Out of Scope Changes check

Explanation

The whole PR still includes generic split-pane and workspace-continuity implementation assigned to companion PR #33210. Examples include mobile/src/session/mobile-terminal-pane-layout.ts, use-terminal-split-layout.ts, split rendering and interaction in TerminalPaneView.tsx, pane lifecycle changes, and their split, rotation, gesture, input, and continuity tests. These changes are not required by direct issue #33200. The PR description states that this work is separated, but the reviewed diff still contains it.

Resolution

Move the generic split-pane, pane interaction, and responsive workspace-continuity implementation and dedicated tests to PR #33210, or remove those changes from this PR. Keep Duo-specific geometry, side-rail, keyboard, shortcut, D-pad, and required bridge integration changes.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 3

🧹 Nitpick comments: 1
mobile/src/mobile-web-shell/page-fold-division.ts: 1

88-88: Trivial · Performance & Scalability · Quick win

Memoize measuredPageSafeAreaInsets to avoid per-render Zod parsing and repeated warnings.

usePageFoldDivision calls measuredPageSafeAreaInsets on every render of MobileWebShellScreen. Each call runs two Zod safeParse operations. It also returns a new object when the geometry is valid.

If the native module sends malformed geometry, each re-render logs console.warn('[web-shell] invalid measured safe-area geometry', ...). Keyboard events, route changes, and layout updates all trigger re-renders. The log would flood.

Memoize the result on its inputs. This keeps the parse and the warning to one per input change.

♻️ Proposed change
-  const safeAreaInsets = measuredPageSafeAreaInsets(windowSafeArea, frame, insets)
+  const safeAreaInsets = useMemo(
+    () => measuredPageSafeAreaInsets(windowSafeArea, frame, insets),
+    [windowSafeArea, frame, insets]
+  )

insets comes from useSafeAreaInsets, which is expected to be referentially stable between changes. Confirm this before relying on the memo.


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 813b543a-d1fb-412d-bf61-ac8e993f94c7
Commits

Reviewing files that changed from the base of the PR and between 265f143 and e41b09a.

Files ignored due to path filters: 1
  • mobile/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 157
  • .github/workflows/mobile-ios-release.yml
  • config/scripts/build-mobile-web-app-bundle.mjs
  • config/scripts/mobile-web-page-routes.mjs
  • config/scripts/mobile-web-page-routes.test.mjs
  • mobile/app.json
  • mobile/app/_layout.tsx
  • mobile/app/h/[hostId]/index.web.tsx
  • mobile/app/h/_layout.tsx
  • mobile/modules/orca-reserved-regions/expo-module.config.json
  • mobile/modules/orca-reserved-regions/ios/OrcaReservedRegions.podspec
  • mobile/modules/orca-reserved-regions/ios/OrcaReservedRegionsModule.swift
  • mobile/modules/orca-reserved-regions/package.json
  • mobile/modules/orca-reserved-regions/src/index.ts
  • mobile/modules/orca-window-controls-inset/ios/OrcaWindowControlsInsetSubscriber.swift
  • mobile/patches/expo-router@55.0.18.patch
  • mobile/plugins/ios-pod-deployment-target-floor.js
  • mobile/plugins/ios-scene-lifecycle.js
  • mobile/pnpm-workspace.yaml
  • mobile/src/components/TerminalShortcutSettings.tsx
  • mobile/src/components/terminal-shortcut-settings-custom-keys.test.tsx
  • mobile/src/layout/fold-division.test.ts
  • mobile/src/layout/fold-division.ts
  • mobile/src/layout/reserved-regions.ts
  • mobile/src/layout/reserved-regions.web.ts
  • mobile/src/layout/side-rail-strip.test.ts
  • mobile/src/layout/side-rail-strip.ts
  • mobile/src/layout/side-rail.tsx
  • mobile/src/layout/side-safe-area.test.tsx
  • mobile/src/layout/side-safe-area.tsx
  • mobile/src/layout/top-chrome-space.test.ts
  • mobile/src/layout/top-chrome-space.ts
  • mobile/src/layout/use-fold-split.ts
  • mobile/src/layout/use-fold-split.web.ts
  • mobile/src/layout/use-shell-side-rail.ts
  • mobile/src/layout/use-shell-side-rail.web.ts
  • mobile/src/layout/use-top-chrome-space.ts
  • mobile/src/mobile-web-shell/MobileWebShellScreen.test.tsx
  • mobile/src/mobile-web-shell/MobileWebShellScreen.tsx
  • mobile/src/mobile-web-shell/bridge-host-back.ts
  • mobile/src/mobile-web-shell/bridge-host-contract.ts
  • mobile/src/mobile-web-shell/bridge-host-notify.ts
  • mobile/src/mobile-web-shell/bridge-host-route.ts
  • mobile/src/mobile-web-shell/bridge-host-terminal-key-rail.test.ts
  • mobile/src/mobile-web-shell/bridge-host.ts
  • mobile/src/mobile-web-shell/bridge/bridge-back-round-trip.test.ts
  • mobile/src/mobile-web-shell/bridge/bridge-client-inbound-frames.ts
  • mobile/src/mobile-web-shell/bridge/bridge-client-init-handshake.ts
  • mobile/src/mobile-web-shell/bridge/bridge-client-notifications.ts
  • mobile/src/mobile-web-shell/bridge/bridge-client-session.ts
  • mobile/src/mobile-web-shell/bridge/bridge-client-shell-session.ts
  • mobile/src/mobile-web-shell/bridge/bridge-client-terminal-keys.ts
  • mobile/src/mobile-web-shell/bridge/bridge-envelope.ts
  • mobile/src/mobile-web-shell/bridge/bridge-fold-division.test.ts
  • mobile/src/mobile-web-shell/bridge/bridge-fold-division.ts
  • mobile/src/mobile-web-shell/bridge/bridge-init-frame.ts
  • mobile/src/mobile-web-shell/bridge/bridge-notify-envelope.ts
  • mobile/src/mobile-web-shell/bridge/bridge-notify-grants.ts
  • mobile/src/mobile-web-shell/bridge/bridge-page-geometry.test.ts
  • mobile/src/mobile-web-shell/bridge/bridge-page-geometry.ts
  • mobile/src/mobile-web-shell/bridge/bridge-port-pair-test-harness.ts
  • mobile/src/mobile-web-shell/bridge/bridge-rpc-client-frames.test.ts
  • mobile/src/mobile-web-shell/bridge/bridge-rpc-client.ts
  • mobile/src/mobile-web-shell/bridge/bridge-terminal-key.test.ts
  • mobile/src/mobile-web-shell/bridge/bridge-terminal-key.ts
  • mobile/src/mobile-web-shell/bridge/page-async-storage.ts
  • mobile/src/mobile-web-shell/host-area-layout-class-change.test.tsx
  • mobile/src/mobile-web-shell/host-area-leave-session.test.tsx
  • mobile/src/mobile-web-shell/host-area-session.test.ts
  • mobile/src/mobile-web-shell/host-area-sidebar-matrix.test.tsx
  • mobile/src/mobile-web-shell/host-root-responsive-content.test.tsx
  • mobile/src/mobile-web-shell/mobile-web-shell-keyboard-overlay-screen.test.tsx
  • mobile/src/mobile-web-shell/mobile-web-shell-screen-test-harness.tsx
  • mobile/src/mobile-web-shell/mobile-web-shell-screen-test-mocks.tsx
  • mobile/src/mobile-web-shell/page-fold-division.ts
  • mobile/src/mobile-web-shell/page-route-policy.ts
  • mobile/src/mobile-web-shell/page-safe-area-insets.test.ts
  • mobile/src/mobile-web-shell/page-safe-area-insets.ts
  • mobile/src/mobile-web-shell/page-storage-keys-negotiation.test.ts
  • mobile/src/mobile-web-shell/page-storage-keys.ts
  • mobile/src/mobile-web-shell/terminal-direction-pad.test.tsx
  • mobile/src/mobile-web-shell/terminal-direction-pad.tsx
  • mobile/src/mobile-web-shell/terminal-key-rail.test.tsx
  • mobile/src/mobile-web-shell/terminal-key-rail.tsx
  • mobile/src/mobile-web-shell/use-mobile-web-shell-bridge.test.ts
  • mobile/src/mobile-web-shell/use-mobile-web-shell-bridge.ts
  • mobile/src/mobile-web-shell/use-shell-page-storage-refresh.test.tsx
  • mobile/src/mobile-web-shell/use-shell-page-storage-refresh.ts
  • mobile/src/navigation/route-handoff-host-area.web.test.tsx
  • mobile/src/platform/keyboard-occlusion.test.tsx
  • mobile/src/platform/keyboard-occlusion.ts
  • mobile/src/platform/shell-storage.ts
  • mobile/src/platform/shell-storage.web.ts
  • mobile/src/session/MobileSessionActiveContent.tsx
  • mobile/src/session/MobileSessionCommandDock.test.tsx
  • mobile/src/session/MobileSessionCommandDock.tsx
  • mobile/src/session/MobileSessionHeader.test.tsx
  • mobile/src/session/MobileSessionHeader.tsx
  • mobile/src/session/MobileSessionTabStrip.test.tsx
  • mobile/src/session/MobileSessionTabStrip.tsx
  • mobile/src/session/MobileTerminalLiveInputRow.tsx
  • mobile/src/session/MobileTerminalLiveInputStatus.tsx
  • mobile/src/session/TerminalPaneView.test.tsx
  • mobile/src/session/TerminalPaneView.tsx
  • mobile/src/session/mobile-session-command-input-styles.ts
  • mobile/src/session/mobile-session-connection-retry.test.tsx
  • mobile/src/session/mobile-session-preference-startup.test.ts
  • mobile/src/session/mobile-session-terminal-frame-layout.test.tsx
  • mobile/src/session/mobile-terminal-layout-choice.test.tsx
  • mobile/src/session/mobile-terminal-pane-layout.test.ts
  • mobile/src/session/mobile-terminal-pane-layout.ts
  • mobile/src/session/mobile-terminal-split-gestures.test.tsx
  • mobile/src/session/mobile-terminal-split-input.test.tsx
  • mobile/src/session/shell-terminal-key-rail.ts
  • mobile/src/session/shell-terminal-key-rail.web.test.tsx
  • mobile/src/session/shell-terminal-key-rail.web.ts
  • mobile/src/session/use-mobile-session-accessory-selection.ts
  • mobile/src/session/use-mobile-session-controller.ts
  • mobile/src/session/use-mobile-session-keyboard-state.test.tsx
  • mobile/src/session/use-mobile-session-keyboard-state.ts
  • mobile/src/session/use-mobile-session-lifecycle.ts
  • mobile/src/session/use-mobile-session-presentation.ts
  • mobile/src/session/use-mobile-session-screen-state.ts
  • mobile/src/session/use-mobile-session-startup.ts
  • mobile/src/session/use-mobile-session-tab-application.ts
  • mobile/src/session/use-mobile-session-tab-switching.ts
  • mobile/src/session/use-mobile-session-terminal-runtime.ts
  • mobile/src/session/use-mobile-session-terminal-stream-display.ts
  • mobile/src/session/use-mobile-session-terminal-subscription.test.tsx
  • mobile/src/session/use-mobile-session-terminal-subscription.ts
  • mobile/src/session/use-mobile-session-terminal-webview.ts
  • mobile/src/session/use-terminal-key-rail-toolbar.ts
  • mobile/src/session/use-terminal-split-layout.test.tsx
  • mobile/src/session/use-terminal-split-layout.ts
  • mobile/src/storage/mirrored-storage-keys.ts
  • mobile/src/storage/preferences.ts
  • mobile/src/terminal/document/mouse-click-drag.ts
  • mobile/src/terminal/document/surface-touch-gestures.ts
  • mobile/src/terminal/document/wheel-scroll.ts
  • mobile/src/terminal/terminal-accessory-layout.test.ts
  • mobile/src/terminal/terminal-accessory-layout.ts
  • mobile/src/terminal/terminal-accessory-repeat.ts
  • mobile/src/terminal/terminal-cell-box-refit.test.tsx
  • mobile/src/terminal/terminal-custom-keys.ts
  • mobile/src/terminal/terminal-foreground-recovery.test.ts
  • mobile/src/terminal/terminal-foreground-recovery.ts
  • mobile/src/terminal/terminal-viewport-refit-options.ts
  • mobile/src/terminal/terminal-viewport-refit.ts
  • mobile/src/terminal/terminal-webview-contract.ts
  • mobile/src/terminal/terminal-webview-notification-dispatch.ts
  • mobile/src/terminal/use-terminal-webview-controller.ts
  • mobile/src/transport/mobile-web-bundle-reply-schemas.test.ts
  • mobile/src/transport/mobile-web-bundle-reply-schemas.ts
  • mobile/vitest.setup.ts
  • mobile/web-entry/index.tsx
  • mobile/web-entry/web-overrides.json
  • src/shared/mobile-web-bundle/manifest-contract.test.ts
  • src/shared/mobile-web-bundle/manifest-contract.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@AmoabaKelvin

Copy link
Copy Markdown
Collaborator

Thanks @zytakeshi, this is the Duo design we want. We've carried it over in #35177 so it merges on current main. Your commits and those from #33210 are kept as you wrote them, and our fixes for main's themes, lazy terminal mounts and the route grant cap are on top. We'll leave this PR open until that one merges.

AmoabaKelvin added a commit that referenced this pull request Oct 30, 2026
…d half-fold layout (#35177)

Carries over #33221 and #33210. Replaces our #34484 Duo support with the community design, on top of main's rebuilt terminal key bar (#36166).

Fixes #33200

Co-authored-by: Takeshi Matsumoto <zytakeshi520@gmail.com>
Co-authored-by: Lars Keggenhoff <lars@kghf.io>
@AmoabaKelvin

Copy link
Copy Markdown
Collaborator

Thank you! This landed in #35177 with your commits intact, merged with main's newer terminal key bar. The Duo rail keeps your design and D-pad, and now lists that bar's keys.

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.

iPhone Duo: reclaim terminal space and provide configurable side controls

3 participants