Skip to content

Widen the compact sidebar drawer - #5033

Merged
SawyerHood merged 1 commit into
mainfrom
bb/increase-sidebar-space-on-mobile-thr_cp3878sm6d
Oct 6, 2026
Merged

SawyerHood merged 1 commit into
mainfrom
bb/increase-sidebar-space-on-mobile-thr_cp3878sm6d

Conversation

@SawyerHood

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

The compact sidebar drawer is min(76vw, 320px) wide, which is 296px on a 390px phone. A rail-style navigation plugin (the experimental_sidebarNavigation slot) draws its icon strip inside that drawer and takes 60px of it on touch devices, leaving 236px for the thread list. Thread titles truncate after about 16 characters.

What changed

  • apps/app/src/components/ui/sidebar.tsx: the compact drawer is now min(86vw, 360px). On a 390px phone that is 335px, leaving a 55px strip of the thread visible to tap for dismissal. The pixel cap moves into SIDEBAR_MOBILE_MAX_WIDTH_PX, so the CSS width and the JS width used by the swipe gestures come from the same two constants.
  • plugins/plugin-api-docs/src/wireframes.tsx: the Plugin Guide's compact navigation wireframe mirrors the new fraction.
  • apps/app/src/components/ui/sidebar.test.tsx: the expected open offset follows the new cap.

The wider drawer applies to every compact viewport, not only when a rail is present; the host cannot tell whether a navigation plugin draws one. The right panel shelf (--secondary-panel-width-mobile) keeps min(76vw, 320px).

No plugin API, CLI, configuration, or server/daemon wire change.

How you verified

  • vitest run src/components/ui/sidebar.test.tsx src/components/layout src/components/sidebar src/components/secondary-panel in apps/app: 73 files, 715 tests pass. Run directly because the @bb/app test script's PWA icon check reports the committed icons as out of date on the local machine before vitest starts.
  • pnpm exec turbo run typecheck lint --filter=@bb/app passes.
  • pnpm exec turbo run test typecheck --filter=bb-plugin-plugin-api-docs passes (13 files, 75 tests).
  • Drove an isolated source dev app in headless Chrome at 390×844 with touch emulation, seeded threads, and a rail-style navigation plugin installed. Measured the open drawer before and after: 296px → 335px wide, thread list beside the rail 236px → 275px, and the inset translate matches the drawer width in both.
  • Not verified: a physical phone, and iOS Safari.

🤖 Generated with Claude Code

AGENT GENERATED

The compact sidebar drawer was min(76vw, 320px), 296px on a 390px phone.
A rail-style navigation plugin takes 60px of that, leaving 236px for the
thread list. The drawer is now min(86vw, 360px): 335px on the same phone,
with a 55px strip of the thread left to tap for dismissal.

The Plugin Guide's compact navigation wireframe mirrors the new fraction.

Co-Authored-By: Claude Code <[email protected]>
@SawyerHood
SawyerHood merged commit e3b8caa into main Oct 6, 2026
73 of 75 checks passed
@SawyerHood
SawyerHood deleted the bb/increase-sidebar-space-on-mobile-thr_cp3878sm6d branch October 6, 2026 18:06
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