fix(mobile): respect Duo safe areas in overlays#22977

merged2
duo/toolbars
duo/safe-areas
opened3d agobyJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 3d ago

Custom overlays used root insets or omitted side insets, allowing controls and content into the Duo reserved regions. Give the arrangement modal its own safe-area provider and sized surface, and apply existing reserved-region calculations to the command palette and preview handle.

Verified the arrangement modal folded and unfolded; its content stays clear of the rail. Focused reserved-region tests and mobile typecheck passed. Command palette and preview changes were inspected, but not exercised on device.

Before: Before: arrangement content extends under rail

After: After: arrangement content respects side inset

Implemented with Claude Opus 5.5 in Claude Code; integrated and reviewed with GPT-6.1 in Codex.

Restack

Restacked onto main a12d6ed942 on 2026-10-21. The commits are unchanged apart from lockfile peer strings. The recordings above show the pre-restack commits they name.

Checks

Checks in progress
Synced from GitHub

Thread transfer impact

⚠️ The latest CI run did not produce a thread transfer result for e4779fd.

This comment will update automatically after the next completed run.

Synced from GitHub

Approvability

Verdict: Approved at 8b4d3a4

Macroscope's review found this PR approvable — This is a focused mobile UI fix that applies existing Duo safe-area calculations to the command palette and preview handle and gives the arrangement modal its own measured safe area. The thread behavior remains intact, and the remaining header adjustment is limited to native control layout behavior.

No code changes detected at e4779fd. Prior analysis still applies.

You can add or adjust custom eligibility rules. Learn more.

Synced from GitHub

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Team
  • Run ID: 19997bb8-d1bd-4d76-a8f6-e3028006761c
📥 Commits

Reviewing files that changed from the base of the PR and between 420b39bb06eadbc385e4193d2e20841808085be6 and 8b4d3a4790bcae76f8ac7db24666d3dea0f8ff0e.

📒 Files selected for processing: 4
  • apps/mobile/src/features/devices/DevicePreviewRouteScreen.tsx
  • apps/mobile/src/features/keyboard/CommandPalette.tsx
  • apps/mobile/src/features/settings/components/SettingsEnvironmentFilterHeader.tsx
  • apps/mobile/src/features/threads/ThreadArrangementSheet.tsx
💤 Files with no reviewable changes: 1
  • apps/mobile/src/features/settings/components/SettingsEnvironmentFilterHeader.tsx

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

📝 Walkthrough

Mobile overlays now use native layout bounds or safe-area context within the modal. Two iOS settings header items no longer specify horizontal-only axis behavior.

Changes: Mobile inset handling

Layer / File(s)Summary
Fold-aware overlay positioning
apps/mobile/src/features/keyboard/CommandPalette.tsx, apps/mobile/src/features/devices/DevicePreviewRouteScreen.tsx
The command palette calculates horizontal padding and width from native layout bounds. The device preview reveal handle uses those bounds for horizontal translation while retaining its existing vertical position.
Modal-local safe-area layout
apps/mobile/src/features/threads/ThreadArrangementSheet.tsx
The modal uses a SafeAreaProvider and SafeAreaView in its own hierarchy instead of padding based on the presenting screen’s insets. The arrangement UI and interaction logic remain unchanged.

Settings header configuration

Layer / File(s)Summary
iOS header axis behavior
apps/mobile/src/features/settings/components/SettingsEnvironmentFilterHeader.tsx
The environment-filter and close-settings native glass header items no longer set axisBehavior: "horizontalOnly". Android behavior and filtering logic are unchanged.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: bmdavis419

Merge Risk: ⚪ Minimal · up to 8b4d3

The overlay changes are ready to merge after normal checks; no actionable placement defect was identified.

Pre-merge checks: Passed 4
Check nameStatusExplanation
Title checkPassedThe title is concise, specific, and accurately summarizes the mobile overlay safe-area fix.
Description checkPassedThe description covers the problem, implementation, verification results, screenshots, untested areas, and agent usage. It does not explicitly link a triaged issue or maintainer approval, or explain w…
Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description covers the problem, implementation, verification results, screenshots, untested areas, and agent usage. It does not explicitly link a triaged issue or maintainer approval, or explain why this focused fix qualifies for an exemption.

✨ Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Added 2 commits

  • fix(mobile): custom iPhone Duo overlays respect side insets and the fold270b27e
  • fix(mobile): keep the arrangement safe-area content sized and themede4779fd