fix(sidebar): New Project tooltip opens upward instead of rightward when sidebar is collapsed
Bug
In the collapsed (icon-only) sidebar, every rail tooltip (Settings, Expand sidebar, daemon status, project rows via SidebarMenuButton) opens to the right (side="right") since the icons sit flush against the left edge of the window. The "+ New Project" icon is the one exception: its tooltip pops upward (side="top", Radix's default) instead, which looks inconsistent with the rest of the collapsed rail and can visually clip near the top of the sidebar.
Additional UX friction: because the tooltip opens upward directly over the icon row, it partially covers/blocks the project icon sitting immediately above "+" in the collapsed rail (see "Current" screenshot below) — while the tooltip is showing, that icon is harder to see and click, forcing the user to wait for the tooltip to dismiss before targeting it. Opening the tooltip to the right (matching every other rail icon) removes this overlap entirely.
Source: internal review of frontend/src/renderer/components/Sidebar.tsx | Analyzed against: 821cda64
Confidence: High
Reproduction
- Run the desktop app and collapse the sidebar (⌘B / the collapse toggle).
- Hover the "+" (New Project) icon at the bottom of the collapsed icon rail.
- Observe the tooltip opens above the icon, while hovering Settings or the daemon status dot opens tooltips to the right.
Screenshots
Current (buggy): tooltip opens upward (side="top"), overlapping/blocking the project icon directly above the "+" — hard to access while the tooltip is visible.
Proposed (fixed): tooltip opens to the right (side="right"), matching every other collapsed-rail icon (Settings, Expand sidebar, daemon status) and no longer blocking adjacent icons.
Root Cause
There are two separate components backing "+ New Project", not one component restyled via group-data-[collapsible=icon] like other rows:
- Expanded state:
CreateProjectButton(frontend/src/renderer/components/Sidebar.tsx:711-732), mounted atSidebar.tsx:242. - Collapsed state:
CreateProjectListItem(frontend/src/renderer/components/Sidebar.tsx:734-757), mounted only when collapsed atSidebar.tsx:271({isCollapsed && <CreateProjectListItem .../>}).
Both hand-roll their own <Tooltip><TooltipTrigger asChild>...</TooltipTrigger><TooltipContent>{label}</TooltipContent></Tooltip> (Sidebar.tsx:727 and Sidebar.tsx:751) instead of using SidebarMenuButton's built-in tooltip prop (which internally sets side="right" and hidden={state !== "collapsed"}, see frontend/src/renderer/components/ui/sidebar.tsx:502-506). Neither passes a side prop, so both fall back to Radix's default side="top" — unlike the other manually-wired collapsed-rail icons (Settings Sidebar.tsx:358, Expand sidebar Sidebar.tsx:393, daemon status Sidebar.tsx:205) which explicitly set side="right".
Fix
Add side="right" to the TooltipContent in CreateProjectListItem (Sidebar.tsx:751), matching the convention used by the other collapsed-rail icons. The expanded-state CreateProjectButton tooltip (Sidebar.tsx:727) is unaffected since that button isn't in the collapsed icon rail.
Impact
- UX friction: tooltip overlap makes the icon above "+ New Project" harder to see/click while hovering, in addition to the visual inconsistency.
- Affects: Electron/React sidebar in
frontend/src/renderer/components/Sidebar.tsx, collapsed sidebar state only.
Priority: low (cosmetic + minor UX friction, no data/functional impact, no matching label exists so stating in body)