Skip to content

fix(mobile): offer Move to workspace and Close tab for a lone tab with no row - #2765

Merged
devswha merged 15 commits into
mainfrom
fix/issue-2675
Nov 5, 2026
Merged

devswha merged 15 commits into
mainfrom
fix/issue-2675

Conversation

@devswha

@devswha devswha commented Nov 4, 2026

Copy link
Copy Markdown
Owner

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 fix(mobile): hide tab bar when only one tab on compact-height phones #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.

davidgamero and others added 13 commits November 2, 2026 15:27
…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.
… 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).
…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.
… 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.
Anchoring it to the canvas drew the popover off screen on a landscape phone and lost the focus on Escape. Count a hidden DAG viewer when offering the move, and leave the focus alone after a close if the user moved it.
@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 15 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 2c0df05 and cb83df6.

Files selected for processing: 6
  • DESIGN.md
  • changelog.d/compact-height-lone-tab-move-close.md
  • scripts/phone-glass-header-demo-regression.ts
  • src/App.tsx
  • src/components/PaneCanvas.appLayout.test.tsx
  • src/components/PaneCanvas.tsx
  • 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

@devswha

devswha commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

Reviews at 73f07e6: omo CLEAR, Codex (Terra, xhigh) no HIGH.

Resolved in 73f07e6 (found at f1e3a3d):

  • MEDIUM (reproduced): the workspace picker was anchored to the whole canvas, so at 641-768px wide (e.g. 667x375 landscape) its popover was drawn off screen (y=379 in a 375px viewport). It now opens at the header's More button; phone-glass-header-demo-regression.ts checks it at 667x375 (fails on f1e3a3d, passes now).
  • LOW (reproduced): Escape on the picker dropped focus to the page; it now returns to the header's More button (checked in the same script).
  • MEDIUM: a split tab whose second pane is a hidden DAG viewer was offered a move the server refuses (multi_pane_tab); the one-pane rule now counts every pane in the snapshot. TabStrip's own canMoveOut has the same pre-existing gap, not changed here.
  • MEDIUM: focus after a close is no longer moved if it has left the dialog and the canvas.

Left as notes (unreproduced, traced only):

  • MEDIUM: a close whose answer is delayed while the user switches workspace by shortcut (with the confirmation open) and focuses the new pane could still move the focus to the workspace list, since the reused canvas contains it.
  • LOW: if another tab appears in the workspace while the Close tab confirmation is open, its "last tab" wording is stale.
  • LOW: the canvas's renameRequest effect also runs on mount (from fix(mobile): hide tab bar when only one tab on compact-height phones #2622).

Validation at 73f07e6: bun run check fast green (unit 10952 pass / 0 fail); bun test src/components/PaneCanvas.appLayout.test.tsx 7 pass; bun scripts/phone-glass-header-demo-regression.ts PASS. Not run: check full, native Windows, a real device.

# Conflicts:
#	DESIGN.md
#	scripts/phone-glass-header-demo-regression.ts
#	src/App.tsx
#	src/components/PaneCanvas.appLayout.test.tsx
#	src/components/PaneCanvas.tsx
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Deploying ovis with  Cloudflare Pages  Cloudflare Pages

Latest commit: cb83df6
Status: ✅  Deploy successful!
Preview URL: https://1292a860.ovis.pages.dev
Branch Preview URL: https://fix-issue-2675.ovis.pages.dev

View logs

@devswha

devswha commented Nov 5, 2026

Copy link
Copy Markdown
Owner Author

Merge note: merged on the omo review (CLEAR at this head), Codex Terra (no HIGH; reproduced findings fixed, the rest in the PR comments or follow-up issues) and green required checks. CodeRabbit did not review this head.

@devswha
devswha merged commit 2bb7493 into main Nov 5, 2026
17 checks passed
@devswha
devswha deleted the fix/issue-2675 branch November 5, 2026 00:24
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.

Compact-height lone tab: Move to workspace and Close tab are unreachable without the tab row

2 participants