diff --git a/desktop/src/components/layout/Sidebar.tsx b/desktop/src/components/layout/Sidebar.tsx index 0df16b73..60509962 100644 --- a/desktop/src/components/layout/Sidebar.tsx +++ b/desktop/src/components/layout/Sidebar.tsx @@ -677,7 +677,7 @@ export function Sidebar({ isMobile = false, onRequestClose }: SidebarProps) {
{/* The mark only stands in for the wordmark on the rail. Expanded, @@ -685,13 +685,27 @@ export function Sidebar({ isMobile = false, onRequestClose }: SidebarProps) { collapsed, the copy is width-clamped to zero and the header would otherwise be empty. `sm` is the cleanest cut of the mark — two C's and the seal bar, no cursor or sparkles to turn to mush at 24px. */} -
+ {/* Expanded, `pl-3` lands the wordmark on the same 24px line as the + nav icons, the search glyph and the settings gear below it — + the section's own `px-3` alone left it sticking out on its own. + Collapsed, the mark is centered on the rail instead. */} +
{!expanded ? : null} + {/* Two forms of one wordmark. Drag the sidebar under ~256px and + "Claude Code Haha" stops fitting; rather than clip it mid-letter + the header falls back to the short form the repo already goes + by. The swap is a container query on the title region — see + `.sidebar-wordmark-*` in globals.css. */} - Claude Code Haha + + Claude Code Haha + + + cc-haha +
diff --git a/desktop/src/theme/globals.css b/desktop/src/theme/globals.css index bb726711..1a4e1dcb 100644 --- a/desktop/src/theme/globals.css +++ b/desktop/src/theme/globals.css @@ -1768,6 +1768,30 @@ body.sidebar-resizing * { background: var(--color-outline-a92); } +/* The header carries the wordmark in two forms and swaps on available width, + so a narrow sidebar never has to clip the name mid-letter. The query runs on + the title region rather than the panel because that is the box the wordmark + actually shares with the GitHub link and the collapse button. */ +.sidebar-title-region { + container: sidebar-title / inline-size; +} + +.sidebar-wordmark-short { + display: none; +} + +/* 230px of content box is the last step where the long form still clears the + GitHub link; one drag notch narrower and it would start losing letters. */ +@container sidebar-title (max-width: 230px) { + .sidebar-wordmark-long { + display: none; + } + + .sidebar-wordmark-short { + display: inline; + } +} + .activity-summary-panel { container-type: inline-size; }