Skip to content

Open the sidebar update card in a drawer on touch and match the footer icons - #7237

Merged
ymichael merged 2 commits into
mainfrom
bb/fix-mobile-sidebar-hover-interaction-thr_fmkuebcvab
Nov 7, 2026
Merged

ymichael merged 2 commits into
mainfrom
bb/fix-mobile-sidebar-hover-interaction-thr_fmkuebcvab

Conversation

@ymichael

@ymichael ymichael commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

#7213 replaced the sidebar's update chips with one update button whose details live in a Radix HoverCard wrapped around a link to Settings › Updates. Touch devices have no hover, so on a phone the card never opened. Tapping the button navigated straight to Settings, and the tap also focused the link. Focus is one of HoverCard's open triggers, so the card could appear after the tap, away from the sidebar. #7213 also left the offline-machine warning as an outlined pill from the old chip row, and gave the update button its own 28px size with a 14px icon. Neither matched the footer's icon buttons, and neither grew for touch like the footer's other buttons.

What changed

  • Touch opens the card in a drawer. On devices without hover (useResponsiveOverlayBehavior().supportsHover is false), SidebarUpdateButton is a plain button. Tapping it opens the same card through the responsive Popover: the shared bottom drawer on phones, a floating card on tablets. Details closes the drawer and the mobile sidebar, then goes to Settings › Updates. Update all and Restart now work inside the drawer; Restart now's confirmation stacks as its own drawer. Desktop is unchanged: hovering opens the HoverCard, and a click goes to Updates. Both paths render one shared SidebarUpdateCardBody.
  • The footer controls match. The machine warning and the update button now render through SidebarMenuButton with SIDEBAR_FOOTER_ACTION_CLASS. The warning looks like the existing plugin attention glyph: a plain warning-coloured icon with a tooltip. The update button keeps its filled circle but takes the footer size and icon size: 28px with a 16px icon on fine pointers, 36px with a 20px icon on coarse pointers. Each sits in its own SidebarMenuItem, so footer spacing applies.
  • Cleanup. The SidebarUpdateButton prop defaultOpen was never passed, so it is removed. A new Ladle story, sidebar/Update button › Updates with machine offline, shows the warning next to pending updates.

There are no wire, CLI, or settings changes.

How you verified

  • New test in SidebarUpdatesBadge.test.tsx: at a compact viewport, a tap opens the card without navigating, Update all starts the CLI update, and Details navigates, calls onNavigate, and closes the drawer. SidebarNavigationRail.test.tsx used to reach Updates by tapping the button at compact width; it now goes through the drawer's Details link. The badge tests now render inside SidebarProvider, which SidebarMenuButton requires.

  • pnpm exec turbo run test --filter=@bb/app -- src/components/sidebar/: 15 files, 146 tests pass.

  • pnpm exec turbo run typecheck lint --filter=@bb/app: clean, with no new lint warnings.

  • Ladle with dev-browser and CDP touch emulation:

    • At 390px with a coarse pointer, a tap opens the drawer. Update all shows each row updating. Details lands on Settings › Updates with the drawer and the sidebar closed. Restart now with running threads shows its confirmation drawer on top.
    • At 1024px with a coarse pointer, a tap opens the floating card.
    • At 1280px with a fine pointer, hover opens the HoverCard and a click goes to Updates.
  • Measured the footer controls:

    Control Fine pointer before Fine pointer after Coarse pointer before Coarse pointer after
    Footer actions 28px, 16px icon unchanged 36px, 20px icon unchanged
    Machine warning 30×24 pill, 12px icon 28px, 16px icon 30×24 pill, 12px icon 36px, 20px icon
    Update button 28px, 14px icon 28px, 16px icon 28px, 14px icon 36px, 20px icon
  • pnpm start:worktree on this branch with real provider CLI updates and a fake offline host in the dev database: the footer shows the warning and the update button at desktop and phone widths.

AGENT GENERATED

🤖 Generated with Claude Code

ymichael and others added 2 commits November 7, 2026 09:49
Radix HoverCard can't open from a touch, and tapping the update button
navigated straight to Settings › Updates while also focusing the link, which
is HoverCard's open trigger. On devices without hover, the button now opens
the same card through the responsive Popover: a bottom drawer on phones and a
floating card on tablets. Details closes the drawer and the mobile sidebar.
Desktop keeps the hover card and click-through to Updates.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ions

The machine warning was still an outlined pill from the old chip row and the
update button was a fixed 28px circle, so neither matched the footer's icon
buttons or grew for touch. Both now render through SidebarMenuButton with the
shared footer action class: the warning looks like the plugin attention glyph,
and the update button keeps its filled circle at the footer's size and icon
size. Adds a Ladle story with an offline machine next to pending updates.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ymichael
ymichael merged commit 55135d1 into main Nov 7, 2026
30 checks passed
@ymichael
ymichael deleted the bb/fix-mobile-sidebar-hover-interaction-thr_fmkuebcvab branch November 7, 2026 18:45
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