Skip to content

fix(tabs): a phone keeps the pane title, the open tab and the + in view - #392

Merged
devswha merged 3 commits into
mainfrom
fix/mobile-tab-strip
Oct 3, 2026
Merged

devswha merged 3 commits into
mainfrom
fix/mobile-tab-strip

Conversation

@devswha

@devswha devswha commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Change

The tab strip from #386 broke a phone's header and was hard to use with more tabs than fit the screen.

  • The pane's title is back in a phone's header. The desktop New tab button was meant to hide under 768px, but .btn's own display (later in the sheet, same specificity) brought it back. It took the title's room (the title was squeezed to nothing and the agent's mark sat over the button), and at 320px it pushed the page wider than the screen (379px). The rule is now scoped under .app-header.
  • The open tab is scrolled into view when the pane is opened from somewhere other than the strip (the sidebar, the palette, an alert, a reload). Only the strip scrolls, never the page.
  • The + stays at the strip's end while the tabs scroll under it, so more tabs than fit do not take New tab off a phone's screen.
  • On a touch screen a split tab's pane picker sits beside the tab's name. At touch size the 8px it was pulled over the tab took taps meant for the name.

On real WebKit

Checked in the iOS Simulator against main (972081b) and this branch, same fixtures (a workspace with five tabs, one split; a workspace with two tabs):

  • iOS 26.5 Safari (iPhone 17e, driven by safaridriver, rects read from the page): on main the title is 18px wide, .new-tab-button is display: flex, the + is at x=496 of a 390px screen, and opening the last tab's pane leaves the open tab at x=438, so the strip shows no selected tab. Here: title 127px, the button display: none, the + at x=338, the open tab at x=284.
  • iOS 27.0 Safari and the home-screen app (iPhone 17 Pro, taps and screenshots): the header has its title back with the software keyboard up and down.

"The tabs disappear in the chat lens" as the strip itself going away did not reproduce on main either: the strip stayed under the header in the chat lens with the software keyboard up, in Safari and in the home-screen app. What did go missing at the top of a phone's screen on main was the pane's title and, for a tab scrolled out of the strip, any sign of the selected tab; both are fixed here. No physical iPhone was checked.

Validation

  • New scripts/mobile-tabs-regression.ts (run by scripts/ui-regression.ts, and standalone): a 390px phone over a workspace with five tabs, one of them split. Header title and no sideways overflow, the strip directly under the header in the chat lens, with the keyboard up, and in the terminal lens, the picker beside its tab, the open tab and the + in view after opening the last tab's pane by address and after tapping back, and no overflow at 320px. It fails on main (the header's New tab is a desktop button) and passes here.
  • bun run typecheck, bun run build: pass.
  • bun run test:unit: 1083 pass, 3 skip, 0 fail.
  • bun scripts/ui-regression.ts: 58 PASS lines, exit 0.
  • bun scripts/directory-groups-regression.ts: 7 PASS lines, exit 0.

Left as it was

At 320px the header has almost no room for the title (9px) with or without this change; that predates #386.

The header's New tab button was not hidden under 768px (.btn's display won
over the media rule), so it took the pane title's room on a phone and made a
320px page overflow sideways. The strip now scrolls the open tab into view
when the selection comes from outside it, keeps its + at the end, and puts a
split tab's pane picker beside the name on touch screens.
@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Repository: devswha/herdr-web-ui/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 22bd94b7-8617-49f8-9185-f309b868bd2a
📥 Commits

Reviewing files that changed from the base of the PR and between 972081b and da6bb1e.

📒 Files selected for processing (7)
  • CHANGELOG.md
  • DESIGN.md
  • scripts/mobile-tabs-regression.ts
  • scripts/ui-regression.ts
  • src/components/TabStrip.css
  • src/components/TabStrip.tsx
  • src/styles.css
 ___________________________________________________
< Stealth mode activated. Bugs won't see me coming. >
 ---------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@devswha
devswha merged commit 3e36716 into main Oct 3, 2026
3 checks passed
@devswha
devswha deleted the fix/mobile-tab-strip branch October 3, 2026 13:28
devswha added a commit that referenced this pull request Oct 3, 2026
Keeps #392's sticky + and open-tab scroll beside the tab's x and menu:
the touch rule that makes room for the pane picker now follows the
tabs that show the chevron (a split tab, and the open one).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
devswha added a commit that referenced this pull request Oct 3, 2026
## Change

In the iPhone home screen app, a dialog with a text field went behind
the keyboard.

`.modal-scrim` is `position: fixed; inset: 0`, and at phone width its
dialog is a bottom sheet. A home screen app keeps the layout viewport at
full height while the keyboard is up, so the sheet's bottom edge was the
screen's, under the keyboard: the command palette's list ran behind it,
and a palette with few or no results was hidden whole, search field
included (only the dimmed app was left on screen).

While the keyboard is up (`data-keyboard`, `lib/viewport.ts`) the scrim
is now `--app-height` tall, the same height the shell already takes, and
a sheet drops its home-indicator padding. Nothing changes without a
keyboard, or on a desktop. Every dialog on the shared scrim gets it: the
palette, Settings, New workspace / New tab, the worktree dialogs,
confirms, the row menu's sheet, Files and the file viewer.

Found while checking #392 in the iOS Simulator; it predates the tab
strip.

## Validation

- `scripts/mobile-viewport-regression.ts` (part of
`scripts/ui-regression.ts`): with the palette open and its search
focused at a 500px visual viewport, the scrim ends at 500 and the
palette and its search field are inside 0–500, with the full list and
with a query that matches nothing. On main it fails: `the scrim ends at
the keyboard
({"scrim":{"top":0,"bottom":844},"palette":{"top":32,"bottom":844},…})`.
- iOS Simulator, iPhone 17 Pro, iOS 27.0, home screen app, software
keyboard: on main the palette with a query that matched nothing was not
on screen at all; here it sits directly above the keyboard's accessory
bar with its search field and the "no match" line, and the full list
ends at the keyboard.
- `bun run typecheck`, `bun run build`: pass.
- `bun run test:unit`: 1086 pass, 3 skip, 0 fail.
- `bun scripts/ui-regression.ts`: 59 PASS lines, exit 0.

## Not checked

- A physical iPhone, and iOS 26.5.
- In the simulator only the palette was opened with the keyboard up; the
other dialogs share the rule but were not each opened there.
- Android Chrome resizes the layout viewport itself
(`interactive-widget=resizes-content`), where the new height equals the
old one.
devswha added a commit that referenced this pull request Oct 3, 2026
Bumps package.json and herdr-plugin.toml to 0.3.47, moves the Unreleased
notes under [0.3.47] - 2026-10-03 (the two Fixed lists folded into one),
and adds the compare link. Raises the remote PC bundle to 14 (new
routes: `/api/tab/rename`, `/api/tab/close`): push the `remote-v14` tag
and let the bundle workflow publish before running release.yml.

Carries #374, #388, #389, #390, #391, #392, #394, #395.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Fable 5.1 <[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.

1 participant