Skip to content

fix(members): keep the side panel's close control on screen on a phone (release/0.8.0) - #18487

Closed
rubencu wants to merge 1 commit into
kirodotdev:release/0.8.0from
rubencu:fix/0.8.0-side-panel-close-on-phone
Closed

rubencu wants to merge 1 commit into
kirodotdev:release/0.8.0from
rubencu:fix/0.8.0-side-panel-close-on-phone

Conversation

@rubencu

@rubencu rubencu commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: On a phone, the Crewmates side panel always shows its close control, so a person who opened a crewmate's Notes, Work log or Dashboard can get back to the chat.

Bug fix. On a phone the Crewmates page hands its side panel the whole window, so the panel covers the chat. Its tab strip then holds three labelled leading chips (Notes, Work log, Dashboard), the pinned view chips, the + menu and the close control, and that row is wider than the screen. The group holding the leading and pinned chips is shrink-0, so instead of shrinking it pushes the + menu and the close control past the panel root's overflow-hidden edge. The scrim that would otherwise dismiss the overlay is fully covered by the panel at that width. What the person sees: the strip ends at the pinned icon chips, and there is no control anywhere on the screen that returns to the chat. Observed on an iPhone (390px) on the 0.8.0.9 build, cut from release/0.8.0.

Why it matters

Every phone reader of a crewmate's panel on 0.8 hits this on every open: one tap into Notes or the Work log and the only way back is the browser's own reload or back, which drops the page state. The dismiss control exists and is wired; it is simply laid out off-screen. main has not had this since #14925 (2026-09-30); release/0.8.0 branched before it.

Not a goal

What changed (motivation → approach → change)

Symptom: on a phone the Crewmates side panel's strip shows Notes, Work log, Dashboard and the pinned icon chips, and nothing after them.

Root cause: in SidePanel.tsx the group wrapping the host's leading chips and the pinned chips was flex items-end gap-2 shrink-0 -mb-px. With shrink-0 the group keeps its content width whatever the strip's width, so on a 390px-wide panel the siblings after it (the + menu, the divider, the close control) are laid out at x = 387 and x = 434, past the right edge, and the panel root's overflow-hidden clips them. The dynamic tablist beside it never had this problem because it is min-w-0 overflow-x-auto.

Change, the strip hunk of #14925 applied to the release branch:

  • website/src/pages/chat/SidePanel.tsx: the fixed group takes the dynamic tablist's overflow contract (min-w-0 overflow-x-auto scrollbar-none) and drops shrink-0, so it shrinks to the width the strip controls leave and scrolls by touch. The chips inside it stay shrink-0, so they scroll rather than squeeze. The group gains data-testid="side-panel-fixed-tabs", as on main. The trailing controls are siblings of the group, so they stay at the trailing edge.

Backwards compatibility

Compatible: a class change on one strip container and a test id. No prop, store key, or endpoint changes; a wide panel, where the group never exceeded the strip, lays out as before.

Tests

  • website/src/test/sidePanelLeadingTab.test.tsx: the upstream case from feat(crewmates): a crewmate's schedules in its own side panel tab #14925, "the fixed-chip group scrolls instead of pushing its own chips and the strip controls off the edge". Renders a closable panel with the three Crewmates leading tabs and pins that the group carries overflow-x-auto and min-w-0 and not shrink-0, that the dynamic tablist keeps the same contract, that the leading chips stay shrink-0, and that the close control is rendered outside the scroller (so it cannot scroll away with the chips).
  • website/src/test/sidePanelBrowserTabs.test.tsx: the seam-hairline case located the fixed group by div.shrink-0; it now uses the group's test id, as main does, since the group no longer has that layout class.

Mutation check: with SidePanel.tsx reverted to the branch tip the new case fails (1 failed, 17 skipped); with the fix the file passes (18 tests). vitest run over every test that imports SidePanel or touches side-panel-strip, plus src/test/sidePanel*, src/pages/members/MembersPage* and src/test/ChatPane*: 62 files, 792 tests passed. tsc -p tsconfig.app.json clean; eslint clean on the three files.

Manual verification

Driven with Playwright against the repository's own gateway-free capture entry (website/capture/members-page.html, the real MembersPage on the Vite dev server with the Members API stubbed), at a 390 × 844 layout viewport, dark theme: tap the radar row, tap the header's Details toggle, measure the strip's controls.

before (branch tip) after (this PR)
close control ("Close panel") x = 434, right edge 462, off a 390px screen x = 354, right edge 382, on screen
+ menu x = 387, off screen x = 307, on screen
fixed chip group shrink-0, overflows the strip scrolls; the last pinned chip (Files) comes on screen when the group is scrolled to its end
tapping the close control not reachable the overlay detaches and the chat composer is back

Not run on a phone device. The cause and the fix are pure layout, and the frames below were taken at the reporter's viewport width.

Screenshots / video

Frames from the harness above, 390px wide. Before, the strip ends at the pinned icon chips with nothing after them:

before: the strip ends at the pinned chips, no + menu, no close control

After, the + menu and the close control sit at the trailing edge; the chip group scrolls beneath them:

after: Notes, Work log, Dashboard, then the + menu and the close control

The same strip scrolled to its end, pinned chips reached, controls unmoved:

after, strip scrolled to the end: Work log, Dashboard, the two pinned chips, then + and close

Full-height frames (390 × 844). The first 42px row is the page's own thread header, exposed because the harness mounts no app top bar; in the app the overlay sits under the top bar and that row is covered.
before after
before, full frame after, full frame

Committed under temp-screenshots/ with git add -f, as the template prescribes for a fork PR; the maintainer may drop the directory from the tip after merge.

Related Issues

Backport of the strip hunk of #14925 to release/0.8.0.

no linked issue: #14925 is the main-branch change that already carries this fix; no issue tracks the 0.8 symptom.

Pattern harvest

Rule candidate: review-prompt
Pattern: a horizontal flex strip inside an overflow-hidden frame holds a shrink-0 group of variable content next to fixed trailing controls; at a narrow width the group's content, not the frame, decides where the controls land, and the controls fall past the clipped edge with no scrollbar to reveal them. Any group that can grow (host-supplied chips, labels in a long locale) needs min-w-0 overflow-x-auto, with shrink-0 kept on the items inside it.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

…e (release/0.8.0)

On a phone the Crewmates page hands its side panel the whole window, so
the panel covers the chat. Its strip then holds three labelled leading
chips (Notes, Work log, Dashboard), the pinned views, the + menu and the
close control, and that row is wider than the screen. The group holding
the leading and pinned chips was `shrink-0`, so instead of shrinking it
pushed the + menu and the close control past the panel root's
`overflow-hidden` edge. Nothing at that width brings them back, and the
scrim the overlay would otherwise dismiss on is fully covered by the
panel: the person is left on the Notes tab with no way back to the chat
(seen on an iPhone at 390px, dashboard 0.8.0.9).

Backport of the strip part of kirodotdev#14925, which main has carried since
2026-09-30: the fixed group takes the dynamic tablist's class set
(`min-w-0 overflow-x-auto scrollbar-none`) and drops `shrink-0`, so it
shrinks to the width the strip controls leave and scrolls by touch,
while the chips inside stay `shrink-0` and never squeeze. The trailing
controls are siblings of the group, so they stay put at the trailing
edge.

The Schedules tab, the leading-tab badge and the leave guard that
kirodotdev#14925 also brought are not carried over; the release branch has none
of the surfaces they serve. Tests: `sidePanelLeadingTab.test.tsx` gains
the upstream case pinning the group's overflow contract and that the
close control sits outside the scroller; `sidePanelBrowserTabs.test.tsx`
names the group by its testid rather than by the layout class it no
longer has, as upstream does.
@rubencu
rubencu requested a review from a team as a code owner October 9, 2026 14:19
@rubencu
rubencu requested review from iamwhatever and removed request for a team October 9, 2026 14:19
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Oct 9, 2026
@rubencu

rubencu commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

Status note for reviewers: every check on head f5de4d8 is green except PR Readiness, which stays at pending on a fork PR into release/0.8.0 because the fork review lanes key on Fast Gate and Fast Gate only runs on PRs to main. Diagnosis, evidence and fix in #18530. On 2026-09-30 the same case was handled by a maintainer re-opening the same commit from a same-repo branch (#15262 to #15290).

@iamwhatever

Copy link
Copy Markdown
Contributor

Thanks for the careful write-up and the before/after measurements! Closing this backport because there is no further 0.8 release to carry it: release/0.8.0 has had no changes since its final changelog merge (#18523, 442779c, Oct 9), and v0.9.0 is now the latest stable with 0.10.0 in rc. The fix itself is already on main since #14925 (aec8141), and it survived the SidePanel split in #22106 (8baa93d): website/src/pages/chat/SidePanel.tsx on main keeps the fixed-chip group as min-w-0 overflow-x-auto scrollbar-none with data-testid="side-panel-fixed-tabs" (plus the #17949 scroll-edge cues), and sidePanelLeadingTab.test.tsx still pins 'the fixed-chip group scrolls instead of pushing its own chips and the strip controls off the edge'. If a 0.8.x patch release is still planned, please reopen.

@github-actions github-actions Bot removed the readiness: checking Automated validation is still running label Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants