Skip to content

fix(phone): hide the footer chips while a status pill shows - #72

Merged
HMarzban merged 6 commits into
mainfrom
fix/phone-pill-chips
Nov 15, 2026
Merged

HMarzban merged 6 commits into
mainfrom
fix/phone-pill-chips

Conversation

@HMarzban

Copy link
Copy Markdown
Contributor

What and why

At 375 px (and 320 px) the phone status pill covered the presence chip and the Discord / GitHub / Privacy chips at the bottom right: a refused "/" pick, a removed format's Undo (once the sheet closes), or an unavailable cell's reason all landed on top of them.

The footer chips now hide while a status pill shows on the docked bar, the same way they already hide while the selection bar shows. They come back when the pill closes. This is CSS only, in the lazy phone chunk (components/smart-toolbar/phone/phone.scss):

[data-mobile-bar]:not([hidden]):has([data-status-pill]) ~ [data-collab-status] { display: none; }

The pill keeps the placement design pass §5 gives it (8 px above the bar, full width). The §5 phone bullet now says the chips also hide while a pill shows on the bar.

Root cause

On a phone the pill is absolute inset-x-2 bottom-[calc(100%+8px)] inside the bar, so it spans the viewport width 8 px above the bar. The chips are fixed at bottom: calc(var(--mobile-bar-clearance) + 0.5rem), which is the same band. §5 had only covered the selection-bar case. In the default bar, the pill (z-50) sat on top of the chips (z-30) and covered part of them.

How verified

  • New e2e in tests/e2e/mobile-bar.spec.ts ("status pill and footer chips at 375px / 320px"). As a touch phone, it checks that the chips are visible, puts the selection in code in the normal bar, and taps the unavailable Bold so its reason shows on the pill. After the enter animation, expect.poll checks that no visible chip card intersects the pill's rect. It then checks that the chips come back once the pill closes.
    • Before the fix it failed at both widths.
    • After the fix it passed with --repeat-each=5 (Chromium) and --repeat-each=3 (WebKit, together with the existing selection-bar chips test).
  • Targeted Playwright on Chromium: mobile-bar, mobile-bar-followups, paint-format, continue-chip, toolbar-a11y-r3 (113 passed, 1 skipped).
  • bun run check, bun run lint, bun run typecheck and bun run test pass. bun run check reports pre-existing warnings only. One unrelated unit test failed once and passed on rerun.
  • Screenshots, before and after, at 375 px (unavailable cell, refused "/" pick) and 1440 px (refused pick, unchanged), in light and dark, with the dev badge hidden. They are kept locally for review.

Bundle budgets

  • Eager editor chunk: 0 B. Main 3bbd8e7 and this branch both measure 397,407 B gz (+19,519 B of the 23.5 KB budget). The only eager file that differs is the CSS loader, and only by a same-length hash.
  • Palette first Alt+/: 0 B. Nothing the palette imports changed. Every JS chunk that differs keeps its raw size, so PALETTE_BUDGET was not run.
  • The only real growth is the lazy phone CSS chunk: +82 B raw, +23 B gz.

Follow-ups (non-blocking)

  • tests/TESTING.md has no mobile-bar.spec.ts row, so this PR has no row to update. A row for the spec is worth adding separately.
  • The Continue chip measures the footer chips only when it shows and on resize. If it measures while the chips are hidden (the selection bar, and now a pill), it drops to the bar. This was already true in selection mode.

The phone status pill spans the docked bar's width 8px above it, in
the band where the presence and Discord/GitHub/Privacy chips float, so
a refused "/" pick, a removed format's Undo or an unavailable cell's
reason covered them. Hide the chips while the bar holds a pill, as
they already hide for the selection bar; they come back when it closes.
A "/" typed while an earlier fetch of the menu chunk was still failing
(the chunk runtime fetches a failed chunk once more, a moment later)
joined that fetch. When it failed, nothing loaded the chunk again while
the menu stayed open, so the menu never showed even once the chunk could
load. A failed load is now fetched once more straight away.
@HMarzban
HMarzban merged commit 6b2a813 into main Nov 15, 2026
2 checks passed
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