Skip to content

fix(web): panels and pop-ups keep clear of the iPhone Duo's side dock - #913

Merged
badcuban merged 2 commits into
mainfrom
fix/duo-side-dock-panels
Nov 14, 2026
Merged

badcuban merged 2 commits into
mainfrom
fix/duo-side-dock-panels

Conversation

@badcuban

Copy link
Copy Markdown
Collaborator

The problem

The iPhone Duo keeps a strip down the right edge of the screen for its status dock (clock, battery, signal), folded or open. The title row and the message box already kept out of it. The right panel, the file browser, dialogs, menus and the top of several pages did not, so their close buttons and top controls sat under the dock.

Testing fold and unfold turned up two more bugs on the folded screen:

  • The page never dimmed behind the thread list or the right panel, and a tap beside the right panel did not close it. The whole app renders inside the command palette's dialog, and Base UI leaves the backdrop out of a drawer nested in another dialog.
  • Open the thread list folded, unfold, fold again: the list came back over the chat by itself.

The fix

One rule: a surface that touches the window's side carries its fill into the strip and keeps its controls out of it, and a layer fixed to the window stays off it.

  • index.css maps the side insets into --safe-area-left/right, with page-gutters and window-gutters utilities. sideStrips.ts reports the widths in px to script through a ResizeObserver probe.
  • The right panel's sheet pads the panel out of the strip and keeps the panel's own width.
  • Dialogs, the command palette, the theme trial bar, the image viewer and toasts stay off the strip. Bottom sheets pad their content out of it.
  • Menus, popovers, selects and the other pop-ups add the strips to their edge padding.
  • Page bodies, the setup, pairing and reconnect screens, the find bars and the terminal's button row keep off the strip. The conversation stays full width.
  • The drawer's backdrop is always drawn. The right panel asks for one only in the phone layout, so a narrow desktop window keeps its floating panel as it is today.
  • The phone's thread list is put away when the layout stops being the phone's.

With no strip (every other screen) the changed surfaces measure what they did before.

Checked

  • vp fmt, vp lint, vp run typecheck
  • Web unit tests (3198) and browser tests (1057), with seven new browser tests
  • Every screen at the Duo's two sizes in Chromium with the safe-area inset faked over CDP, with and without an art theme, including fold, unfold and fold again

Not checked

  • A real iPhone Duo. The dock's size and the screen sizes are read off two screenshots.
  • Hover labels can still open under the dock.
  • A nested drawer's backdrop does not fade with a slow drag; it clears when the drag ends. Taking the app out of the command palette's dialog would fix that at the root and is left for its own change.

The iPhone Duo keeps a strip down the right edge of the screen for its
status dock (clock, battery, signal), folded or open, and reports it as
env(safe-area-inset-right) for the whole height. The title row and the
composer already kept out of it; everything else that touches that edge
did not, so the right panel's close button, the file browser's close
button and the first controls of several pages sat under the dock.

- index.css maps the side insets into --safe-area-left/right, with
  page-gutters and window-gutters utilities for surfaces that scroll or
  paint to the window's edge. sideStrips.ts reports the widths in px to
  script through a ResizeObserver probe (no resize listener, no forced
  layout).
- The right panel's sheet carries its fill into the strip and pads the
  panel out of it, keeping the panel's own width.
- Dialogs, alert dialogs, the command palette, the theme trial bar, the
  image viewer and toasts stay off the strip; a phone's bottom sheets
  pad their content out of it. Dialog centering counts the page's edges
  from the strips.
- Menus, popovers, selects, comboboxes, autocompletes, preview cards
  and anchored toasts add the strips to their collision padding.
- Page bodies (Settings, General chats, Fleet, Scheduled, Pull
  requests, Usage), setup, pairing and reconnect screens, the find bars
  and the terminal's button row keep off the strip. The conversation
  stays full width.

Two bugs found on the folded screen while testing fold and unfold:

- The whole app renders inside the command palette's dialog, and Base
  UI leaves the backdrop out of a drawer nested in another dialog. The
  page never dimmed behind the phone's thread list or the right panel's
  sheet, and a press beside the sheet did not close it. The drawer's
  backdrop is now forced; the right panel asks for one only in the
  phone layout, so a narrow desktop window keeps its floating panel.
- The phone's thread list stayed open in state while the layout was
  the desktop one, so unfolding and folding again put it back over the
  chat. It is put away when the layout stops being the phone's.
@vercel

vercel Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
threadlines Skipped Skipped Nov 14, 2026 4:37pm UTC

Request Review

The side-strip rules put the startup closure 111 B over its gzip budget
in CI. The one-off arbitrary classes become a few named utilities:
dialog, alert dialog, command palette and image viewer viewports and the
terminal's button row use window-gutters, and a phone's bottom sheet and
its footer use sheet-strips and sheet-footer-strips. Toasts keep clear
of the right strip only, the one position the app uses.
@badcuban
badcuban added this pull request to the merge queue Nov 14, 2026
Merged via the queue into main with commit 3322dd3 Nov 14, 2026
24 checks passed
@badcuban
badcuban deleted the fix/duo-side-dock-panels branch November 14, 2026 16:49

This branch was previously deployed

1 inactive deployment
Preview — d2dc2ba0 Deployed Nov 14, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant