Skip to content

fix(mobile): hide tab bar when only one tab on compact-height phones - #2622

Merged
devswha merged 13 commits into
devswha:mainfrom
davidgamero:fix/compact-single-tab-height
Nov 4, 2026
Merged

devswha merged 13 commits into
devswha:mainfrom
davidgamero:fix/compact-single-tab-height

Conversation

@davidgamero

@davidgamero davidgamero commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

hello ovis has been super useful for me and i am grateful for maintainer's work on it
hoping to contribute an improvement on compactness for small displays:

the tab bar occupies high vertical space percentage on smaller screens like the external screen on iphone duo which is above the existing 600px density cutoff

proposing to hide the tab bar when there is only one tab on displays below 700px to optimize space when this bar occupies ~8% of usable vertical space excluding safe areas that could be redirected to additional chat/terminal text lines instead

worked on this with opencode and gpt 5.6sol

Change

A workspace's only tab row now steps out on compact-height phone viewports up to 700px tall, instead of only up to 600px. This includes the iPhone Duo's 466x678-point outer display and recovers the row's 44px for the chat or terminal. A regular 390x844 phone still keeps the row, and two or more tabs keep it at every height.

When the row is absent, the lone pane draws no overflow button of its own; the header's More menu carries the pane's and the tab's actions instead (see Maintainer changes below). The phone glass-header browser regression now checks the Duo outer size before returning to the regular-height and keyboard-open cases, and the media query has a focused unit test.

Design reference: this extends the compact-height behavior introduced in #747 and hardened in #1778/#1784. It follows Apple's iPhone Duo outer-display guidance to preserve vertical content room rather than adding a device-specific check; DESIGN.md records that precedent.

Before and after

Both captures use the demo's fictional Idempotent payments workload at the iPhone Duo outer-display size: 466×678 CSS points at 3× (1398×2034 pixels). They use the same pane with one tab and the keyboard closed; no live herdr session or user data was captured.

Before: 600px cutoff After: 700px cutoff
Before: the fictional Idempotent payments chat on a simulated iPhone Duo outer display, with a single-tab row taking space below the header After: the same fictional chat and display with the redundant single-tab row hidden and more conversation visible

With the on-screen keyboard open

This second comparison keeps the Duo's 466×678 layout viewport and simulates iOS reducing only the visual viewport to 466×360 while the message field is focused. Headless Chromium cannot draw Apple's native keyboard, so the images honestly show only the app area above it. In this state the 44px tab row takes 12.2% of the visible app height.

Before: app area above keyboard After: app area above keyboard
Before with a simulated on-screen keyboard: the single-tab row uses part of the short app area above the keyboard After with a simulated on-screen keyboard: the tab row is absent and another workload line fits above the composer

Validation

  • bun test src/lib/paneCanvas.test.ts: 8 pass, 0 fail.
  • bun scripts/phone-glass-header-demo-regression.ts: PASS at 466x678, 390x844 and the existing 390x470 keyboard case; the view-only banner/menu overlap case also passes.
  • bun scripts/tab-menu-regression.ts: PASS at 390x844 and the narrow regular-height 320x720 case.
  • git diff --check: pass.
  • bun run check fast: generated types/themes, typecheck and build pass. The macOS unit lane did not pass in this checkout: unrelated Git-signing/temp-repository, BSD tar, SQLite/WAL and loopback-relay tests failed or timed out. The changed unit test passes separately as above. CI still needs to run the complete isolated suite.
  • Skipped locally: Integration and browser lanes other than the focused regression; native Windows.

Maintainer changes

Pushed on this branch by the maintainers after review (no force push):

  • With the row hidden, the lone pane no longer draws its own ⋯ below the glass header. The header's More menu carries, after a divider, a split tab's panes, the pane's actions (Rename pane, Clear pane name, Close pane, Unzoom when zoomed) and the row's tab actions: New terminal, New tab with agent… and Rename tab. Where the row is drawn nothing changes.
  • Rename tab opens a dialog in place of the row's inline field; the palette's Rename tab and its shortcut open it too while the row is hidden.
  • Move to workspace and Close tab without the row are follow-up Compact-height lone tab: Move to workspace and Close tab are unreachable without the tab row #2675.
  • Tests: PaneCanvas.appLayout.test.tsx and CommandPalette.appLayout.test.tsx cover the hidden-row menu, the missing pane head and the palette entry; phone-glass-header-demo-regression.ts checks the header menu at 466x678 and with the keyboard up, runs New tab with agent… and Rename tab (menu and palette), and checks nothing changes at 390x844.
  • Validation at db44d1f: bun run check fast passed (unit 10950 pass / 0 fail); omo review CLEAR, Codex review no HIGH.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: devswha/ovis
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: b2d9e5d
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7feeb9dd-4f6e-4f5f-8c70-5cda0db3fa18

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.

Summary

Summary by CodeRabbit

  • Interface Improvements
    • On compact-height phones, including landscape, keyboard-shortened screens, and foldable outer displays, a workspace’s single tab no longer takes up a separate row above the pane.
    • The pane menu stays at the top right on these screens, with pane banners positioned below it.

The compact-height query now covers phone screens up to 700px tall. Tests and the phone regression scenario cover lone-tab behavior on compact-height screens, including the iPhone Duo outer display.

Changes: Compact-height single-tab layout

Layer / File(s) Summary
Compact-height visibility condition
DESIGN.md, src/lib/paneCanvas.ts, src/lib/paneCanvas.test.ts, src/components/TabStrip.tsx, changelog.d/compact-height-single-tab.md
The query’s maximum height changes from 600px to 700px; its 768px width limit remains. Tests check the query and the lone-tab condition. The design text and changelog describe the compact-height layout.
Phone viewport regression coverage
scripts/phone-glass-header-demo-regression.ts
The regression scenario checks the one-tab glass header at 466×678, then restores a regular-height viewport before testing keyboard-up behavior. Evidence screenshots use the current viewport width and a height capped at 160px.

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

Change: Bug fix

Suggested reviewers: devswha

Merge Risk: Low · previous review 8b55f

On compact-height phones up to 700px tall, a workspace with one split tab loses its direct pane picker; panes can still be switched through the command palette. The change otherwise recovers vertical space as intended. This is a bounded UX tradeoff to be aware of, not a merge blocker.

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 with cyclomatic complexity of at least 2. Documentat… 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 clearly describes the primary change: hiding the tab bar when a workspace has one tab on compact-height phones.
Description check Passed The description includes the required Change and Validation sections. It clearly explains the behavior, affected viewports, regression coverage, test results, skipped checks, and known unrelated failu…
Full details: Description check

Explanation

The description includes the required Change and Validation sections. It clearly explains the behavior, affected viewports, regression coverage, test results, skipped checks, and known unrelated failures. It references related issues and design precedent, although it does not provide a direct issue link for maintainer approval.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 4 files. (2 skipped: 2 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
Generate unit tests (beta)
  • 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
Recent review info
Run configuration
  • Source mode: Auto
  • Repository: devswha/ovis
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 05c9133
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b54b56cd-a02b-49d8-9614-c790898458f8
Commits

Reviewing files that changed from the base of the PR and between 05c9133 and 8b55fc8.

Files selected for processing: 6
  • DESIGN.md
  • changelog.d/compact-height-single-tab.md
  • scripts/phone-glass-header-demo-regression.ts
  • src/components/TabStrip.tsx
  • src/lib/paneCanvas.test.ts
  • src/lib/paneCanvas.ts

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

@davidgamero davidgamero changed the title fix(mobile): hide lone tab on compact-height phones fix(mobile): hide tab bar when only one tab on compact-height phones Nov 3, 2026
…e tab row is hidden

On a compact-height phone a workspace's only tab draws no row, which took
the row's + (New terminal), New tab with agent... and a split tab's pane
picker with it. The lone pane's menu now carries them while the row is out.
@devswha

devswha commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Thanks @davidgamero! I pushed two commits on top of your branch (no force push):

  • Merged current main (1a54d8e), no conflicts.
  • 9391f21: keep New tab reachable when the row is hidden. The lone tab's row was also the only place with its + (New terminal), New tab with agent… and, for a split tab, the pane picker. While the row is left out (loneTabHidden), the lone pane's own ⋯ menu now carries them: the tab's panes first, then the pane's actions, then New terminal and New tab with agent…. Nothing changes where the row is drawn.
  • phone-glass-header-demo-regression.ts now opens that menu at 466x678 and checks New terminal is offered and New tab with agent… opens the New tab dialog (fails without the fix, passes with it). DESIGN.md and the changelog fragment mention the entries.

Validation: bun run check fast passed (typecheck, build, unit 10884 pass / 0 fail); bun scripts/phone-glass-header-demo-regression.ts PASS. Not run locally: the rest of Integration and browser, native Windows (CI runs them).

… canvas

Without the row, the lone pane's menu offered Split and Zoom, which a
canvas showing one pane at a time cannot draw (zooming made the pane picker
look dead). Offer only Unzoom there, as the row's menu does, and drop a
New terminal failure that answers after the tab changed.
…w is hidden

With the row left out, a lone tab could no longer be renamed: the row's
inline name field, the palette's Rename tab and the shortcut all need the
row. The lone pane's menu now offers Rename tab, in the dialog panes are
renamed in (unless the Herdr app owns the layout).
@devswha

devswha commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Two more maintainer commits after review (no force push):

  • c6e690f: without the row, the lone pane's menu offered Split and Zoom, which a canvas showing one pane at a time cannot draw. It now offers only Unzoom there, as the row's menu does. A New terminal failure that answers after the tab changed is dropped.
  • 20f8823: a lone tab could no longer be renamed without its row (the inline field, the palette entry and the shortcut all need the row). The lone pane's menu now offers Rename tab in the same dialog panes are renamed in (not on a PC whose layout the Herdr app owns). The regression renames the tab at 466x678 and checks the row shows the new name at 390x844.

Reviews at 20f8823: omo CLEAR, Codex (Terra) no HIGH. Not changed here, on purpose:

  • Move to workspace… and Find hiding the pane's ⋯ without the row (both already true below 600px on main): follow-up Compact-height lone tab: Move to workspace and Close tab are unreachable without the tab row #2675.
  • Close tab: closing the lone tab closes its workspace, which Close pane (one-pane tab) and the sidebar's Close workspace already do.
  • LOW / unreproduced: picking a sibling pane while the tab is zoomed in herdr does nothing until Unzoom (same as the row's menu on main; Unzoom is in the same menu); the palette's Rename tab and its shortcut stay off while the row is hidden (as below 600px on main).

CodeRabbit skipped this PR, so no CodeRabbit review ran on these commits.

Validation: bun run check fast passed at 20f8823 (typecheck, build, unit 10884 pass / 0 fail); bun scripts/phone-glass-header-demo-regression.ts PASS (fails on the PR's earlier head at the New terminal step). Not run locally: the other Integration and browser scripts, native Windows (CI).

…nd ellipsis

With a lone tab's row hidden on a compact-height phone, the lone pane drew
its own ellipsis just below the glass header, beside the header's own. It
now draws none: the header's More menu carries the pane's and the tab's
actions after a divider (the tab's panes, the pane's actions, New terminal,
New tab with agent... and Rename tab). Where the row is drawn nothing changes.
…as's actions

An item the header's More menu took from the canvas runs only as the
canvas's latest render still offers it, and a canvas that unmounts (the
setup guide in its place) clears the actions it published.
@devswha

devswha commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Per the maintainer's review of the screenshots, two more commits (no force push):

  • 88bdd58: with a lone tab's row hidden (compact-height phone), the lone pane no longer draws its own ⋯ just below the glass header, beside the header's ⋯. The header's More menu now carries the pane's and the tab's actions after a divider: a split tab's panes, then the pane's actions (Rename pane, Clear pane name, Close pane, Unzoom when zoomed), then New terminal, New tab with agent… and Rename tab. Where the row is drawn, nothing changes. Banners start below the glass header when no pane ⋯ is drawn. This also means Find in terminal no longer hides the only menu.
  • d34c34f: a header menu item taken from the pane canvas runs only if the canvas's latest render still offers it (no stale fallback), and a canvas that unmounts clears the actions it published.

Tests: phone-glass-header-demo-regression.ts now checks there is no pane ⋯ and that the header's More lists those items at 466x678 and with the keyboard up, runs New tab with agent… and Rename tab from it, and checks the More menu is unchanged at 390x844 (it fails on the previous head 20f8823 at "no second ellipsis"). PaneCanvas.appLayout.test.tsx covers the cramped item list, the missing pane head, the unchanged row-drawn case and the unmount cleanup.

Validation: bun run check fast passed at d34c34f (typecheck, build, unit 10887 pass / 0 fail); bun scripts/phone-glass-header-demo-regression.ts PASS. Reviews of 88bdd58: omo CLEAR, Codex no HIGH (its two MEDIUMs are fixed in d34c34f). Not run locally: the other Integration and browser scripts, native Windows (CI).

@devswha

devswha commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Reviews at d34c34f: omo CLEAR, Codex (Terra) no HIGH. Left as LOW, not changed here: Move to workspace… is not in the header's menu while the row is hidden (tracked in #2675; also missing below 600px on main); the Rename tab shortcut and palette entry stay off while the row is hidden (as below 600px on main); in a development StrictMode remount the canvas's published actions are cleared until its next render (development builds only); and an open More menu can list a just-removed item until App renders again, which then does nothing when tapped.

CI note: Fast checks fails at typecheck in server/herdr-core/adapter.ts, which this PR does not touch. Current main (12a7c63) fails the same typecheck on its own (#2674 on top of #2671's typed hc calls), so this PR needs a re-run once main is fixed.

… is hidden

The palette's Rename tab and its shortcut opened only the row's inline
name field, so on a compact-height phone they offered nothing (601-700px
since the cutoff moved). The palette now always offers Rename tab, and
the canvas answers the request with its Rename tab dialog while the row
is hidden.
@devswha

devswha commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Merged current main (da3853e, includes #2693's typecheck fix) and one more fix:

  • 085b0ea: the palette's Rename tab and its shortcut opened only the row's inline field, so where the row is hidden they did nothing (reproduced by review at 390x650). The palette now always offers Rename tab (not on a PC whose layout the Herdr app owns), and while the row is hidden the request opens the Rename tab dialog. CommandPalette.appLayout.test.tsx covers it (fails on the previous palette code); the glass-header regression renames from the palette at 466x678.

Reviews at 085b0ea: omo CLEAR, Codex (Terra) no HIGH. Left as notes, unreproduced: if an Android keyboard shrinks the viewport across the cutoff while the row's inline rename field is open, the row (and the field) goes away (main does the same wherever the keyboard leaves 600px or less); Escape during IME composition closes the rename dialog; the pane's right-click menu with a mouse in a window 768px or narrower and 700px or shorter omits Split and Zoom, as the row's menu does; Move to workspace and Close tab are #2675.

Validation: bun run check fast passed at 085b0ea (unit 10899 pass / 0 fail); bun scripts/phone-glass-header-demo-regression.ts PASS.

…IME's Escape in the rename dialog

A keyboard that shortened the screen past the compact-height cutoff took
the lone tab's row away, and with it a name field being typed in: the row
now stays while its field is open. The rename dialog closed on an Escape
that only ended an IME composition: it now ignores one.
@devswha

devswha commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Maintainer screenshots approved. Brought the branch up to current main and fixed the last two review findings (no force push):

  • e8bfa22: merged current main (64 commits). Of this PR's files only src/App.tsx changed on main (pane-move following, pane presence, herdr-core labels), none of it in the header menu or rename paths.
  • 89f2376, both reproduced in a browser on e8bfa22 before fixing:
    • A keyboard that shortened the screen past the 700px cutoff (390x844 -> 390x650) took the lone tab's row away, and with it the row's name field mid-edit. The row now stays while its name field is open.
    • An Escape that only ended an IME composition closed the Rename tab dialog. The dialog now ignores it (isComposing / keyCode 229), as the row's inline field already did.
    • phone-glass-header-demo-regression.ts covers both (fails on e8bfa22 at the IME step).

Validation at 89f2376: bun run check fast passed (unit 11252 pass / 0 fail); bun scripts/phone-glass-header-demo-regression.ts PASS. Codex (Terra) at e8bfa22: no HIGH; its two MEDIUMs are the ones fixed above.

@devswha

devswha commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Merge note: thanks @davidgamero! Screenshots approved (owner delegated to the lead). After merging main, the maintainer fixed two reproduced Codex MEDIUMs on this branch (tab-name field kept when the keyboard shrinks the view; Escape during IME composition no longer closes the rename dialog) with regression tests. omo CLEAR at 89f2376, gate reviewer approved, all checks green.

@devswha
devswha merged commit 2c0df05 into devswha:main Nov 4, 2026
16 checks passed
devswha added a commit that referenced this pull request Nov 5, 2026
…h no row (#2765)

Fixes #2675. **Stacked on #2622** (its branch lives in a fork, so this
PR targets `main` and carries #2622's commits; merge #2622 first, then
this diff shrinks to the last commit).

## Problem

On a compact-height phone a workspace's only tab draws no tab row. Since
#2622 the header's More menu carries the row's New terminal, New tab
with agent… and Rename tab, but not **Move to workspace…** or **Close
tab**, so a lone tab could not be moved, and a split lone tab could not
be closed as a whole.

## Change (last commit)

- `PaneCanvas`: while the lone tab's row is hidden (`loneTabHidden`),
the pane menu the header's More carries also offers
- **Move to workspace…** for a one-pane tab when another workspace
exists, not on a PC whose layout the Herdr app owns (same conditions as
the row's `canMoveOut`). It opens a second menu listing the other
workspaces (the row lists them in place in the same menu); a refusal is
shown over the pane.
- **Close tab**, behind the confirmation the row shows for a workspace's
last tab (the workspace closes with it).
- `App` passes `onMoveToWorkspace` to the canvas, as it already does for
the strip (same `actions.moveTabToWorkspace`, so the draft carry-over
and view follow apply).
- DESIGN.md entry extended; changelog fragment added.

Design reference: same as #2622, one overflow menu in the bar (iPhone
navigation bar, Claude iOS app); the workspace list as a follow-on sheet
follows iOS action sheets, which do not nest submenus.

## Validation

- `bun test src/components/PaneCanvas.appLayout.test.tsx`: 7 pass. The
two new cases (lone one-pane tab gets `move-workspace` + `close-tab`;
Herdr-app layout gets `close-tab` only) and the updated split-tab case
**fail on #2622's head db44d1f** and pass now.
- `bun scripts/phone-glass-header-demo-regression.ts`: PASS. At 466x678
the header's More offers Move to workspace… and Close tab, the move menu
lists the other workspaces, Close tab opens its confirmation; at the end
the tab is moved to another workspace from the header's menu and the
view follows it.
- `bun run check fast`: green (typecheck, build, unit 10952 pass / 0
fail).
- Not run: `check full`, native Windows, a real device.

---------

Co-authored-by: David Gamero <[email protected]>
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