Skip to content

Commit 2121fd0

Browse files
authored
Polish Buzz theme and sidebar (#1971)
1 parent 85fc648 commit 2121fd0

18 files changed

Lines changed: 1335 additions & 430 deletions

‎desktop/scripts/check-file-sizes.mjs‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,6 @@ const overrides = new Map([
202202
// mapper. This is the existing API boundary; split remains queued.
203203
// team-instructions-first-class: createManagedAgent Tauri bridge threads the
204204
// new teamId input through to the backend (+1 line).
205-
// #1970 merge-skew: add-community deep-link wiring (+4) was based before
206-
// #1923 (+3) landed, so PR CI was green while the merged total crossed the
207-
// cap (996 -> 1003). Pre-existing red on main, not one PR's feature debt.
208-
// Queued to split with the rest of this list.
209-
["src/app/AppShell.tsx", 1003],
210205
["src/shared/api/tauri.ts", 1305],
211206
// doctor-npm-eacces-preflight: hint field added to InstallStepResult (+1 line).
212207
// codex-acp-package-swap: "adapter_outdated" variant added to AcpAvailabilityStatus (+1 line).

‎desktop/src-tauri/tauri.conf.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"dragDropEnabled": false,
2828
"trafficLightPosition": {
2929
"x": 16,
30-
"y": 24
30+
"y": 25
3131
},
3232
"backgroundThrottling": "disabled",
3333
"minWidth": 800,

‎desktop/src/app/AppShell.tsx‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Outlet, useLocation } from "@tanstack/react-router";
44

55
import { deriveShellRoute } from "@/app/AppShell.helpers";
66
import { AppShellProvider } from "@/app/AppShellContext";
7+
import * as BuzzTheme from "@/app/BuzzThemeSurfaces";
78
import { AppShellOverlays } from "@/app/AppShellOverlays";
89
import { AppTopChrome } from "@/app/AppTopChrome";
910
import { useAppNavigation } from "@/app/navigation/useAppNavigation";
@@ -761,6 +762,7 @@ export function AppShell() {
761762
isHuddleDrawerOpen && "buzz-huddle-app-surface-open",
762763
)}
763764
>
765+
<BuzzTheme.GradientLayer />
764766
{hasCommunityRail ? (
765767
<CommunityRail
766768
activeCommunityId={
@@ -921,11 +923,12 @@ export function AppShell() {
921923
ref={mainInsetRef}
922924
className="isolate min-h-0 min-w-0 overflow-hidden bg-sidebar"
923925
data-buzz-glass-inset
926+
data-buzz-shadow-viewport
924927
style={chromeCssVarDefaults as React.CSSProperties}
925928
>
926-
<div className="relative z-10 mb-2 ml-px mr-2 mt-px flex min-h-0 flex-1 flex-col overflow-hidden rounded-2xl bg-background shadow-[-1px_-1px_0_0_hsl(var(--sidebar-border)/0.45)]">
929+
<BuzzTheme.ContentSurface>
927930
<Outlet />
928-
</div>
931+
</BuzzTheme.ContentSurface>
929932
</SidebarInset>
930933
</MainInsetProvider>
931934
<RelayConnectionOverlay
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import type { ReactNode } from "react";
2+
3+
export function GradientLayer() {
4+
return (
5+
<div
6+
aria-hidden="true"
7+
className="buzz-theme-gradient-layer pointer-events-none absolute inset-0 -z-10"
8+
data-buzz-gradient-layer
9+
>
10+
<div
11+
className="buzz-theme-gradient-layer-light absolute inset-0 opacity-0"
12+
data-buzz-gradient="light"
13+
/>
14+
<div
15+
className="buzz-theme-gradient-layer-dark absolute inset-0 opacity-0"
16+
data-buzz-gradient="dark"
17+
/>
18+
</div>
19+
);
20+
}
21+
22+
export function ContentSurface({ children }: { children: ReactNode }) {
23+
return (
24+
<div
25+
className="relative z-10 mb-2 ml-px mr-2 mt-px flex min-h-0 flex-1 flex-col overflow-hidden rounded-2xl bg-background shadow-content-edge"
26+
data-buzz-content-surface
27+
>
28+
{children}
29+
</div>
30+
);
31+
}

‎desktop/src/features/settings/ui/SettingsView.tsx‎

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
resolveEnabled,
99
useFeatureSnapshot,
1010
} from "@/shared/features/useFeatureEnabled";
11+
import { topChromeBackdrop } from "@/shared/layout/chromeLayout";
1112
import { cn } from "@/shared/lib/cn";
1213
import {
1314
Sidebar,
@@ -23,6 +24,7 @@ import {
2324
SidebarMenuItem,
2425
useSidebar,
2526
} from "@/shared/ui/sidebar";
27+
import { SidebarMenuLabel } from "@/shared/ui/sidebar-menu-label";
2628
import {
2729
renderSettingsSection,
2830
settingsSections,
@@ -103,7 +105,7 @@ function SettingsSectionButton({
103105
: "text-sidebar-foreground/70",
104106
)}
105107
/>
106-
<span>{section.label}</span>
108+
<SidebarMenuLabel>{section.label}</SidebarMenuLabel>
107109
</SidebarMenuButton>
108110
</SidebarMenuItem>
109111
);
@@ -216,8 +218,13 @@ export function SettingsView({
216218
data-testid="settings-sidebar"
217219
variant="sidebar"
218220
>
221+
<div
222+
aria-hidden="true"
223+
className={cn("shrink-0", topChromeBackdrop.height)}
224+
data-tauri-drag-region
225+
/>
219226
<SidebarHeader
220-
className="cursor-default select-none pt-11"
227+
className="cursor-default select-none pb-0 pt-3"
221228
data-tauri-drag-region
222229
>
223230
<SidebarMenu>
@@ -257,7 +264,11 @@ export function SettingsView({
257264

258265
<SidebarFooter>
259266
{appVersion ? (
260-
<p className="px-2 pb-1 text-xs text-sidebar-foreground/45">
267+
<p
268+
className="px-2 pb-1 text-xs text-sidebar-foreground/45"
269+
data-buzz-sidebar-secondary
270+
data-testid="settings-version"
271+
>
261272
v{appVersion}
262273
</p>
263274
) : null}
@@ -269,15 +280,23 @@ export function SettingsView({
269280
"isolate relative min-h-0 min-w-0 overflow-hidden bg-sidebar motion-safe:transition-opacity motion-safe:duration-200",
270281
isLoaded ? "opacity-100" : "opacity-0",
271282
)}
283+
data-buzz-shadow-viewport
272284
data-testid="settings-view"
273285
>
274286
<div
275287
aria-hidden="true"
276-
className="absolute inset-x-0 top-0 z-10 h-11"
288+
className={cn("relative z-10 shrink-0", topChromeBackdrop.height)}
277289
data-tauri-drag-region
278290
/>
279-
<div className="relative z-10 ml-px mt-px flex min-h-0 flex-1 flex-col overflow-hidden rounded-tl-xl bg-background pt-11 shadow-[-1px_-1px_0_0_hsl(var(--sidebar-border)/0.45)]">
280-
<section className="min-h-0 flex-1 overflow-y-auto px-5 pb-12 pt-4 sm:px-6">
291+
<div
292+
className="relative z-10 mb-2 ml-px mr-2 mt-px flex min-h-0 flex-1 flex-col overflow-hidden rounded-2xl bg-background shadow-content-edge"
293+
data-buzz-content-surface
294+
data-testid="settings-content-surface"
295+
>
296+
<section
297+
className="min-h-0 flex-1 overflow-y-auto px-5 pb-12 pt-6 sm:px-6"
298+
data-testid="settings-content-scroll"
299+
>
281300
<div
282301
className="mx-auto flex h-full w-full max-w-4xl flex-col gap-4"
283302
data-testid={`settings-panel-${section}`}

0 commit comments

Comments
 (0)