Skip to content

fix(mobile): put the session tabs in the top bar on a landscape phone - #29070

Merged
brennanb2025 merged 9 commits into
mainfrom
brennanb2025/mobile-landscape-session-tabs
Oct 18, 2026
Merged

brennanb2025 merged 9 commits into
mainfrom
brennanb2025/mobile-landscape-session-tabs

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​6 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​5
Prod 4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​230 $\color{#cf222e}{\Huge{\mathbf{−}}}$​145 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​85

ELI5

On a phone turned sideways, the session screen spent two rows on its header: the top bar (back, title, folder / branch / more), then the tab strip under it. A sideways phone is only about 390pt tall, so that was about a fifth of the screen, and the top bar's middle was empty. Now, on a sideways phone, the tabs sit in that empty middle of the top bar and the second row is gone.

What Changed

  • Before (sideways phone): two header rows, about 82pt. Top bar: back · title · empty space · folder / branch / more. Second row: tabs · "+" · quick commands.
  • After (sideways phone): one 44pt row: back · title (capped at 160pt) · 12pt of space · tabs · "+" · quick commands · folder / branch / more. About 37pt more room for the terminal or chat, roughly two more terminal lines. The tab strip has a fixed divider on its left edge, so a tab scrolled partly out of view is cut off at the divider instead of looking like part of the title, and the 12pt keeps that divider off the title's last letter. A long title ends in "…" at its 160pt cap.
  • Tab edges (both orientations): in one row beside the title and icons, the tabs had nothing marking where one ended. Each tab now has a 1pt border on both sides, running the full height of the bar, and the active tab gets the raised fill. This is how the desktop tab strip draws tabs. The tab strip is one component, so portrait gets the same edges.
  • Unchanged: portrait and tablet-class canvases (both dimensions at least 600pt) keep two rows; only the tab edges are new there. Compact tablet splits and web windows use the existing phone-like layout rule. Tab sizes, sideways scrolling, long-press, and scrolling the active tab into view work the same.

Mechanism:

  • The tab strip (tabs, "+", quick commands) moved out of MobileSessionHeader.tsx into its own MobileSessionTabStrip.tsx, preserving tab actions and keyboard handling.
  • The header renders that one strip either inside the top bar or below it. There is no second copy of the tab strip. Its cached position and measurements reset when a replacement scrolling view attaches, so rotating an already-scrolled strip can reveal the same active tab.
  • The decision is a new isLandscapePhone flag in responsive-layout-metrics.ts: wider than tall, not tablet-class (the same 600pt short-side rule the app already uses for tablets), and at least 568pt wide, so a short, narrow web window keeps two rows. The same code runs in the native app and in the web version of the session page, so both change.
  • Tapping a long title to see all of it is deliberately not in this PR (Brennan: a separate PR with its own design).

Why

A user in the community Discord asked for exactly this ("when phone is turned sideways … scoot the tabs up here. It's wasted space").

Alternatives considered:

  • Hide the header in landscape: that would remove back and panel access.
  • Lock phones to portrait: Orca already supports rotation, and people use landscape for terminals.

Moving the strip keeps every control and costs no new state.

Linked Issue

No GitHub issue. Reported in the Orca community Discord ("For mobile app when phone is turned"). This is the first of five separate PRs from that thread.

Visual Proof

On a phone turned sideways, the session header goes from two rows to one, with the tabs in the top bar, a divider, and space before those tabs.

Before (main) After (this PR)
iPhone 17 Pro landscape main: two header rows this PR: one row, tabs in the top bar
iPhone SE landscape main: two header rows this PR: one row, tabs in the top bar
iPhone 17 Pro portrait main: two header rows this PR: two rows, tab edges differ
extra-large text (labels clip on main too) main: two header rows this PR: one row, tabs in the top bar
this PR, SE landscape: title, 14pt gap, divider

At the default text size, the iPhone 17 Pro landscape header is 100pt on main and 63pt on this PR, and portrait is 144pt on both; the iPhone SE landscape header is 82pt on main and 45pt on this PR; the crop's ink-to-divider gap is 14pt (28px at 2x), and the title frame ends 12pt (24px at 2x) before the divider.

Testing

  • responsive-layout-metrics.test.ts covers the new flag: a landscape phone gets it; a portrait phone, a landscape iPad and a short, narrow window don't.
  • Mobile Checks (typecheck, tests, lint) and the full PR workflow, including its "PR checks passed" gate, succeeded on the current head 98c8b4c6ca5.
  • Current head checked on the iOS Simulator (iPhone SE and iPhone 17 Pro), landscape and portrait, before and after: see Visual Proof
  • Automated tests added/updated

Review

Review loop complete on 98c8b4c6ca5 with no open findings; see the status comment on this PR. Earlier rounds found and fixed a selected tab disappearing from the strip after rotation (the replacement scrolling view now starts with fresh measurements) and the tab strip moving into the top bar of short, narrow web windows.

Intended: keep existing rotation support, visible session tabs and all existing header actions; use the existing compact-canvas rule rather than physical device identity; share the approved full-height tab borders and active fill across orientations.

Agent skill upstream boundary

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

Notes

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Current-head before/after screenshots or videos attached for UI changes; existing images predate final changes
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • CI validation passed on the current head; no local lint/typecheck/test run is claimed

A sideways phone is about 390pt tall and the session header spent two rows
on it. On a landscape phone the tab strip now shares the top bar with the
back button, title and panel icons. Portrait and tablet layouts are unchanged.
@brennanb2025
brennanb2025 marked this pull request as ready for review October 15, 2026 08:35
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 26254020-c8d1-44b4-b7b9-47a8f821655a
📥 Commits

Reviewing files that changed from the base of the PR and between 8a3dce6 and 98c8b4c.

📒 Files selected for processing: 1
  • mobile/src/session/mobile-session-frame-styles.ts

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

📝 Walkthrough

The responsive layout metrics now identify landscape phones. The session header uses this classification to place the session tab strip in the top bar on landscape phones, and below the top bar otherwise. The extracted tab strip renders session tabs and provides tab selection, long-press actions, new-tab creation, and quick commands.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 98c8b

The landscape tab layout keeps its pinned actions reachable at the qualifying width. No actionable merge-blocking issue is established in the reviewed changes.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title is concise, specific, and accurately describes the primary change: moving session tabs into the top bar on landscape phones.
Description check Passed The description is detailed and covers the user impact, implementation, rationale, visual proof, testing, review status, and compatibility considerations. It does not provide a GitHub issue link and l…
Full details: Description check

Explanation

The description is detailed and covers the user impact, implementation, rationale, visual proof, testing, review status, and compatibility considerations. It does not provide a GitHub issue link and leaves the current-head visual-proof checklist unchecked, but it explains the issue source and provides relevant before/after evidence.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • 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: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 602eb1e9-4721-4bf5-8425-51a32a3dd8a2
📥 Commits

Reviewing files that changed from the base of the PR and between caa4155 and efc1d72.

📒 Files selected for processing: 5
  • mobile/src/layout/responsive-layout-metrics.test.ts
  • mobile/src/layout/responsive-layout-metrics.ts
  • mobile/src/session/MobileSessionHeader.tsx
  • mobile/src/session/MobileSessionTabStrip.tsx
  • mobile/src/session/mobile-session-frame-styles.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.

@brennanb2025
brennanb2025 marked this pull request as draft October 15, 2026 19:05
In the landscape top bar the tabs sat between the title and the panel
icons with nothing marking where one tab ended. Each tab now has a 1pt
border on its sides, running the full height of the bar, and the active
tab gets the raised fill, as the desktop tab strip draws them. The same
strip is used in portrait, so both orientations match.
@brennanb2025

brennanb2025 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor Author

On a sideways phone, the session header used two rows while the middle of the top row was empty. This PR moves the tabs and their creation buttons into that space, keeping navigation and panel actions available. It adds full-height tab borders and an active fill, and leaves a 12pt gap between the session title and the fixed divider so a partially scrolled tab stays visibly separate from the title.

Status: review loop done on 98c8b4c6ca51e01690c39e7e373295d158e84721 (full path).

  • Review: the completed review covered the full PR through 8a3dce67afc. The narrow re-review of the approved spacing change and the main merge found no new proven issues. Earlier fixes reset scrolling measurements after rotation, keep two rows below 568pt of width, and give the landscape strip a fixed divider.
  • QA: the coordinator's iOS Simulator run passed on 98c8b4c6ca5, using iPhone SE and iPhone 17 Pro. In landscape, the divider moves exactly 12.0pt on both phones; a tab scrolled halfway past the left edge remains separated from the title; a long title ends in an ellipsis before the gap. Portrait matches the before image pixel for pixel and the first tab retains its left border. The screenshots use accessibility extra large text. QA cleanup was verified.
  • CI: PR Checks, including PR checks passed, and Mobile Checks succeeded on this exact head. The PR is out of draft, has no conflicts, and all review threads are resolved.
  • Deferred: tapping to expand a long title is outside this PR and belongs in a separate change. Android and narrow tablet split windows remain unverified at runtime.
  • Out of scope: the coordinator's native simulator probe found a separate defect already on main: useKeyboardPersistingTaps at mobile/src/platform/keyboard-persisting-taps.ts:41 throws container.addEventListener is not a function when the screen renders natively. This is not caused by this PR.

Intended differences: retain rotation support and the existing compact-window layout rule; share the approved tab borders and active fill across orientations; add the approved 12pt title-to-divider gap in landscape.

For Brennan's review: the Visual Proof section contains before/after images for the SE at the start of the strip, a half-scrolled tab, a long title, 17 Pro landscape, and 17 Pro portrait. For the latest change, the human judgment is the approved spacing at mobile-session-frame-styles.ts:102.

@brennanb2025
brennanb2025 marked this pull request as ready for review October 16, 2026 23:50
… top-bar tabs

A short, narrow window (a ~390x350 web window) is wider than tall, so it
counted as a landscape phone and moved the tabs into a top bar that has no
width left for them. Top-bar tabs now also need at least 568pt of width,
the narrowest landscape phone.
…o scrolled tabs never read as part of the title
@brennanb2025
brennanb2025 marked this pull request as draft October 17, 2026 04:18
@brennanb2025
brennanb2025 marked this pull request as ready for review October 17, 2026 20:40
@brennanb2025
brennanb2025 marked this pull request as draft October 17, 2026 20:45
@brennanb2025
brennanb2025 marked this pull request as ready for review October 17, 2026 20:45
@brennanb2025
brennanb2025 merged commit ff294f0 into main Oct 18, 2026
62 checks passed
@brennanb2025
brennanb2025 deleted the brennanb2025/mobile-landscape-session-tabs branch October 18, 2026 17:54
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.

1 participant