fix(mobile): the iPhone Duo's search field and composer line up with its tab bar#23150

merged1
duo/feed-anchoring
duo/bottom-line
opened3d agobyJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 3d ago

UIKit floats the iPhone Duo's tab bar 24 pt above the bottom edge, below the 34 pt safe area. The list's search field sat on the safe area, 10 pt higher, and the composer added its 6 pt gutter on top, 16 pt higher, so the three bottoms didn't line up.

The layout metrics observer now also reports UIKit's bar layout region for a 48 pt bar on the bottom edge (iOS 27.1), measured in each column. On the Duo, the search field and the composer pill end on it, level with the tab bar, and the workspace list keeps its last row clear of the field. Other devices keep their safe-area placement.

Verification

  • Software-keyboard clearance checked folded and unfolded.
  • Measured at this PR's base 5b5e9062d3e and head 38a2aba508e (restacked commits), on one development client built from the stack's tip on current main (fingerprint a6c8232e). Both sides run on it, because this layer's native inputs don't change except the bar region the head reads:
Bottom edge (pt)BeforeAfterTab bar
Folded composer636652652
Unfolded composer627643643
Search field text, folded632642

Implemented with Claude Opus 5.5 in Claude Code, running in T3 Code.

๐Ÿค– Generated with Claude Code

Checks

All checks passed
Synced from GitHub

Thread transfer impact

โš ๏ธ The latest CI run did not produce a thread transfer result for 5877d50.

This comment will update automatically after the next completed run.

Synced from GitHub

Approvability

Verdict: Approved at 38a2aba

Macroscope's review found this PR approvable โ€” This is a narrowly scoped Duo-specific layout fix that reports the iOS floating bottom-bar inset and applies it to existing composer, search, and toolbar positioning. Older iOS versions and non-Duo devices retain their previous behavior, with no schema or configuration changes.

No code changes detected at 5877d50. Prior analysis still applies.

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

Synced from GitHub

Review in Change Stack โ†’

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

โš™๏ธ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Team
  • Run ID: c20ecb59-f1d4-40be-a1b1-9830a4f99a36
๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between 38a2aba508e3ced919ffea3a72f8dadab980387b and 5877d50a540f0e8d4cc0e6b8d51252a431443901.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ๐Ÿ” Trigger review

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: d94b303d-3220-4c7f-9ce5-8cb0009fad53
๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between 5b5e9062d3ecec8c4a26f94cc1cb8b701bc45122 and 38a2aba508e3ced919ffea3a72f8dadab980387b.

๐Ÿ“’ Files selected for processing: 7
  • apps/mobile/modules/t3-native-controls/ios/T3LayoutMetricsView.swift
  • apps/mobile/src/features/threads/ThreadComposer.tsx
  • apps/mobile/src/features/threads/ThreadDetailScreen.tsx
  • apps/mobile/src/features/workspace/WorkspaceRootScreen.tsx
  • apps/mobile/src/features/workspace/WorkspaceToolbar.ios.tsx
  • apps/mobile/src/lib/reserved-regions.ts
  • apps/mobile/src/native/native-layout-metrics.tsx

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

๐Ÿ“ Walkthrough

The iOS native layout metrics now publish an optional Duo bottom-bar inset. A hook exposes it to thread and workspace screens, which use it in bottom spacing calculations.

Changes: Duo bottom-bar inset

Layer / File(s)Summary
Publish and expose the bottom-bar inset
apps/mobile/lib/reserved-regions.ts, apps/mobile/modules/t3-native-controls/ios/T3LayoutMetricsView.swift, apps/mobile/src/native/native-layout-metrics.tsx
The native metrics include an optional bottomBarInset on supported iOS versions. useDuoBottomBarInset returns the value for Duo devices and undefined for other devices.
Apply the inset to thread composer spacing
apps/mobile/src/features/threads/ThreadComposer.tsx, apps/mobile/src/features/threads/ThreadDetailScreen.tsx
The collapsed composer uses the exported six-point gutter. The thread detail screen uses the Duo inset when available and retains its existing fallback and focused or expanded behavior.
Apply the inset to workspace spacing
apps/mobile/src/features/workspace/WorkspaceRootScreen.tsx, apps/mobile/src/features/workspace/WorkspaceToolbar.ios.tsx
The workspace clearance and bottom search toolbar use the Duo inset when available, with fallback spacing otherwise.

Priority: โž– Normal

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

Change: Bug fix

Sequence Diagram(s)

mermaid
1sequenceDiagram
2 participant UIKit
3 participant T3LayoutMetricsView
4 participant useDuoBottomBarInset
5 participant ThreadDetailScreen
6 participant WorkspaceRootContent
7 participant WorkspaceToolbar
8 UIKit->>T3LayoutMetricsView: provide bottom-edge bar metric
9 T3LayoutMetricsView->>useDuoBottomBarInset: publish bottomBarInset
10 useDuoBottomBarInset->>ThreadDetailScreen: return inset for Duo device
11 useDuoBottomBarInset->>WorkspaceRootContent: return inset for Duo device
12 useDuoBottomBarInset->>WorkspaceToolbar: return inset for Duo device

Suggested reviewers: maria-rcks, shivamhwp

Merge Risk: โšช Minimal ยท up to 38a2a

The optional Duo inset has safe-area fallbacks, and no concrete merge-blocking behavior is established.

Pre-merge checks: Passed 4
Check nameStatusExplanation
Title checkPassedThe title clearly and concisely identifies the main change: aligning the iPhone Duo search field and composer with the tab bar.
Description checkPassedThe description explains the problem, the implementation, and the observed verification results. It includes UI evidence and identifies the development tooling used. The scope and approval section is โ€ฆ
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 explains the problem, the implementation, and the observed verification results. It includes UI evidence and identifies the development tooling used. The scope and approval section is not explicit, but the description is otherwise sufficiently complete for this focused fix.

โœจ 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 1 commit

  • fix(mobile): the iPhone Duo's search field and composer line up with its tab bar5877d50