Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
feat(ui): establish surface system (#5248)
Jiayuan Zhang4efcfb96e368
diff --git a/apps/desktop/src/renderer/src/components/desktop-layout.tsx b/apps/desktop/src/renderer/src/components/desktop-layout.tsxindex d1b30a4d80..c3107e4b0a 100644--- a/apps/desktop/src/renderer/src/components/desktop-layout.tsx+++ b/apps/desktop/src/renderer/src/components/desktop-layout.tsx@@ -211,14 +211,14 @@ export function DesktopShell() {triggered by IndexRedirect, not a route. */}<WorkspaceSlugProvider slug={slug}><DesktopInboxBridge />- <div className="flex h-screen">- <SidebarProvider className="flex-1">+ <div className="flex h-screen bg-app-shell">+ <SidebarProvider className="flex-1 bg-app-shell">{slug && <WindowToolbar />}{slug && <AppSidebar topSlot={<SidebarTopSpacer />} searchSlot={<SearchTrigger />} />}{/* Right side: header + content container */}<motion.div layout transition={toolbarMotion} className="flex flex-1 min-w-0 flex-col"><MainTopBar />- <div className="relative flex flex-1 min-h-0 flex-col overflow-hidden mr-2 mb-2 ml-0.5 rounded-xl shadow-sm bg-background">+ <div className="relative flex flex-1 min-h-0 flex-col overflow-hidden mr-2 mb-2 ml-0.5 rounded-xl bg-page-canvas ring-1 ring-surface-border shadow-[var(--surface-shadow)]"><TabContent />{slug && <FloatingChat />}</div>diff --git a/apps/web/app/custom.css b/apps/web/app/custom.cssindex 21a2f904bb..12b6790695 100644--- a/apps/web/app/custom.css+++ b/apps/web/app/custom.css@@ -16,6 +16,17 @@color-scheme: light;}.landing-light {+ --app-shell: oklch(0.964435 0.001327 286.375);+ --page-canvas: oklch(0.988087 0 0);+ --surface: oklch(1 0 0);+ --surface-foreground: oklch(0.141 0.005 285.823);+ --surface-raised: oklch(1 0 0);+ --surface-hover: oklch(0.967 0.001 286.375);+ --surface-selected: oklch(0.95 0.002 286.375);+ --surface-selected-foreground: oklch(0.141 0.005 285.823);+ --surface-border: oklch(0.92 0.004 286.32);+ --surface-shadow: 0 1px 2px rgb(15 23 42 / 0.04), 0 1px 1px rgb(15 23 42 / 0.03);+ --floating-shadow: 0 16px 40px rgb(15 23 42 / 0.14), 0 3px 10px rgb(15 23 42 / 0.08);--background: oklch(1 0 0);--foreground: oklch(0.141 0.005 285.823);--card: oklch(1 0 0);diff --git a/docs/design.md b/docs/design.mdindex 8960632865..eea51a4a20 100644--- a/docs/design.md+++ b/docs/design.md@@ -18,14 +18,34 @@基于 OKLCh 色彩空间,通过 CSS 变量定义。所有颜色使用 shadcn token,**禁止硬编码 Tailwind 色值**(如 `text-gray-500`、`bg-blue-600`)。-### 2.1 中性色阶梯+### 2.1 Surface 层级++Surface 系统描述的是容器之间的关系,不是把每一段内容都包进卡片。基础 token 定义在 `packages/ui/styles/tokens.css`,并同时覆盖 light / dark mode。++| 层级 | Token / Class | 用途 | 不应用于 |+|------|---------------|------|----------|+| App Shell | `app-shell` / `bg-app-shell` | 窗口最外层、sidebar 与 page canvas 之间的留白 | 页面正文、表单组 |+| Page Canvas | `page-canvas` / `bg-page-canvas` | 页面主体;list、board、chat 等持续滚动的内容区 | 独立设置组、弹窗 |+| Surface / Card | `surface`、`surface-border`、`--surface-shadow` | 有独立边界的表单组、设置组、摘要卡 | 每一行列表、每一列 board、整页正文 |+| Floating Surface | `surface-raised`、`--floating-shadow` | dialog、dropdown、popover、sheet、浮动 chat | 常驻页面布局 |++规则:++- Page Canvas 是默认内容面。需要分组时先用间距和分割线,只有独立操作或独立信息块才使用 Surface。+- 浅色模式中,`app-shell` 与 sidebar 使用 `#f3f3f4`,`page-canvas` 使用 `#fbfbfb`,Card 使用 `#ffffff`;不能只靠 border 区分设置组和页面背景。三者形成接近 Linear 的克制层级,由外向内逐步变亮。+- Card 使用 `bg-surface border-surface-border shadow-[var(--surface-shadow)]`;浮层使用 `bg-surface-raised ring-surface-border shadow-[var(--floating-shadow)]`。+- `surface-hover` 只表示指针经过;`surface-selected` 表示持续选中,并保持中性灰,不额外叠加 brand 色。选中项 hover 时必须保留 `surface-selected`,不能退回 hover 状态。+- focus 一律使用 `focus-visible` ring。不要用阴影、尺寸变化或品牌大面积填充代替键盘焦点。+- 不为 light / dark mode 手写一组平行 class。基础 surface token 已按主题解析,并通过 `color-scheme` 同步原生控件。++### 2.2 中性色阶梯界面 90% 的面积由中性色构成。灰度等级即信息层级:| 角色 | Light Token | Dark Token | 用途 ||------|-------------|------------|------|-| 背景 | `background` | `background` | 页面底色 |-| 卡片/浮层 | `card` / `popover` | `card` / `popover` | 容器表面 |+| 背景 | `page-canvas` / `background` | `page-canvas` / `background` | 页面主体 |+| 卡片/浮层 | `surface` / `surface-raised` | `surface` / `surface-raised` | 有边界的内容组与临时覆盖层 || 次级表面 | `muted` / `secondary` | `muted` / `secondary` | hover 背景、标签底色 || 边框 | `border` | `border` | 分隔线、输入框边框 || 输入框边框 | `input` | `input` | 比 border 略重 |@@ -35,7 +55,7 @@**规则:** 同一屏幕内,文字颜色最多使用 3 个层级(`foreground` / `muted-foreground` / 某个语义色)。超过 3 级说明层次设计有问题。-### 2.2 语义色+### 2.3 语义色颜色只用于传递含义,不做装饰:@@ -52,7 +72,7 @@- 语义色主要用于小面积元素(badge、icon、border)。大面积着色用该色的 10%-20% 透明度变体(如 `bg-destructive/10`)。- 每屏同时出现的语义色不宜超过 2-3 种。如果一个界面同时有红黄绿蓝紫,说明信息密度过高,需要重新组织。-### 2.3 暗色模式+### 2.4 暗色模式暗色模式不是简单的反转。它是独立设计的一套配色:@@ -127,7 +147,7 @@1. **仅间距** — 增大两个区域的间距(首选)2. **单条分割线** — 一根细线 `border-border`-3. **背景色变化** — 一个区域用 `bg-muted` 或 `bg-card`+3. **背景色变化** — 一个区域用 `bg-surface-hover` 或 `bg-surface`4. **完整卡片** — border + radius + padding(最重手段)用最轻的工具完成分隔。@@ -162,7 +182,7 @@ Hover 是"我注意到你了",视觉变化应该轻微、即时:**规则:**- hover 时不改变尺寸(无 `scale`)、不加阴影(无 `shadow`)。- hover 的背景色永远比 selected/active 更淡。这样用户能区分"悬停"和"已选中"。-- 所有 hover 使用 `transition-colors` 或 `transition-all`,时长由 Tailwind 默认值(150ms)处理,不需要自定义。+- 所有 hover 使用 `transition-colors`、`transition-shadow` 或列出具体属性;不要使用 `transition-all`。时长由 Tailwind 默认值(150ms)处理,不需要自定义。### 5.3 Active / Selected 状态diff --git a/packages/ui/components/ui/alert-dialog.tsx b/packages/ui/components/ui/alert-dialog.tsxindex 6a43197bf4..2a6374fe46 100644--- a/packages/ui/components/ui/alert-dialog.tsx+++ b/packages/ui/components/ui/alert-dialog.tsx@@ -52,7 +52,7 @@ function AlertDialogContent({data-slot="alert-dialog-content"data-size={size}className={cn(- "group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",+ "group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-surface-raised p-4 text-popover-foreground shadow-[var(--floating-shadow)] ring-1 ring-surface-border duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",className)}{...props}@@ -85,7 +85,7 @@ function AlertDialogFooter({<divdata-slot="alert-dialog-footer"className={cn(- "-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",+ "-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t border-surface-border bg-surface-hover/70 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",className)}{...props}diff --git a/packages/ui/components/ui/card.tsx b/packages/ui/components/ui/card.tsxindex ee61af62a9..1e79fd763e 100644--- a/packages/ui/components/ui/card.tsx+++ b/packages/ui/components/ui/card.tsx@@ -12,7 +12,7 @@ function Card({data-slot="card"data-size={size}className={cn(- "group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",+ "group/card flex flex-col gap-4 overflow-hidden rounded-xl border border-surface-border bg-surface py-4 text-sm text-surface-foreground shadow-[var(--surface-shadow)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",className)}{...props}@@ -84,7 +84,7 @@ function CardFooter({ className, ...props }: React.ComponentProps<"div">) {<divdata-slot="card-footer"className={cn(- "flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3",+ "flex items-center rounded-b-xl border-t border-surface-border bg-surface-hover/70 p-4 group-data-[size=sm]/card:p-3",className)}{...props}diff --git a/packages/ui/components/ui/context-menu.tsx b/packages/ui/components/ui/context-menu.tsxindex 527234d92b..7093e51f9d 100644--- a/packages/ui/components/ui/context-menu.tsx+++ b/packages/ui/components/ui/context-menu.tsx@@ -52,7 +52,7 @@ function ContextMenuContent({><ContextMenuPrimitive.Popupdata-slot="context-menu-content"- className={cn("z-50 max-h-(--available-height) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className )}+ className={cn("z-50 max-h-(--available-height) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-surface-raised p-1 text-popover-foreground shadow-[var(--floating-shadow)] ring-1 ring-surface-border duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className )}{...props}/></ContextMenuPrimitive.Positioner>diff --git a/packages/ui/components/ui/dialog.tsx b/packages/ui/components/ui/dialog.tsxindex b45442e3fd..3ddd7da900 100644--- a/packages/ui/components/ui/dialog.tsx+++ b/packages/ui/components/ui/dialog.tsx@@ -53,7 +53,7 @@ function DialogContent({<DialogPrimitive.Popupdata-slot="dialog-content"className={cn(- "fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",+ "fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-surface-raised p-4 text-sm text-popover-foreground shadow-[var(--floating-shadow)] ring-1 ring-surface-border duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",className)}{...props}@@ -102,7 +102,7 @@ function DialogFooter({<divdata-slot="dialog-footer"className={cn(- "-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",+ "-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t border-surface-border bg-surface-hover/70 p-4 sm:flex-row sm:justify-end",className)}{...props}diff --git a/packages/ui/components/ui/dropdown-menu.tsx b/packages/ui/components/ui/dropdown-menu.tsxindex f2e3782de3..9788d99829 100644--- a/packages/ui/components/ui/dropdown-menu.tsx+++ b/packages/ui/components/ui/dropdown-menu.tsx@@ -51,7 +51,7 @@ function DropdownMenuContent({e.stopPropagation()onClick?.(e)}}- className={cn("z-50 max-h-(--available-height) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95", className )}+ className={cn("z-50 max-h-(--available-height) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-surface-raised p-1 text-popover-foreground shadow-[var(--floating-shadow)] ring-1 ring-surface-border duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95", className )}{...props}/></MenuPrimitive.Positioner>@@ -145,7 +145,7 @@ function DropdownMenuSubContent({return (<DropdownMenuContentdata-slot="dropdown-menu-sub-content"- className={cn("w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className )}+ className={cn("w-auto min-w-[96px] rounded-lg bg-surface-raised p-1 text-popover-foreground shadow-[var(--floating-shadow)] ring-1 ring-surface-border duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className )}align={align}alignOffset={alignOffset}side={side}diff --git a/packages/ui/components/ui/popover.tsx b/packages/ui/components/ui/popover.tsxindex 57dc8b1e0b..c69671d004 100644--- a/packages/ui/components/ui/popover.tsx+++ b/packages/ui/components/ui/popover.tsx@@ -43,7 +43,7 @@ function PopoverContent({<PopoverPrimitive.Popupdata-slot="popover-content"className={cn(- "z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",+ "z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-surface-raised p-2.5 text-sm text-popover-foreground shadow-[var(--floating-shadow)] ring-1 ring-surface-border outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",className)}{...props}diff --git a/packages/ui/components/ui/select.tsx b/packages/ui/components/ui/select.tsxindex 7f3bb7bae4..5023938c6b 100644--- a/packages/ui/components/ui/select.tsx+++ b/packages/ui/components/ui/select.tsx@@ -83,7 +83,7 @@ function SelectContent({<SelectPrimitive.Popupdata-slot="select-content"data-align-trigger={alignItemWithTrigger}- className={cn("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className )}+ className={cn("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-surface-raised text-popover-foreground shadow-[var(--floating-shadow)] ring-1 ring-surface-border duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className )}{...props}><SelectScrollUpButton />diff --git a/packages/ui/components/ui/sheet.tsx b/packages/ui/components/ui/sheet.tsxindex b10762976f..ae69a10997 100644--- a/packages/ui/components/ui/sheet.tsx+++ b/packages/ui/components/ui/sheet.tsx@@ -53,7 +53,7 @@ function SheetContent({data-slot="sheet-content"data-side={side}className={cn(- "fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",+ "fixed z-50 flex flex-col gap-4 border-surface-border bg-surface-raised bg-clip-padding text-sm text-popover-foreground shadow-[var(--floating-shadow)] transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",className)}{...props}diff --git a/packages/ui/components/ui/sidebar.tsx b/packages/ui/components/ui/sidebar.tsxindex d628a4b08a..caf523fd7e 100644--- a/packages/ui/components/ui/sidebar.tsx+++ b/packages/ui/components/ui/sidebar.tsx@@ -386,7 +386,7 @@ function SidebarInset({ className, ...props }: React.ComponentProps<"main">) {<maindata-slot="sidebar-inset"className={cn(- "relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",+ "relative flex w-full flex-1 flex-col bg-page-canvas md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:ring-1 md:peer-data-[variant=inset]:ring-surface-border md:peer-data-[variant=inset]:shadow-[var(--surface-shadow)] md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",className)}{...props}@@ -554,7 +554,7 @@ function SidebarMenuItem({ className, ...props }: React.ComponentProps<"li">) {}const sidebarMenuButtonVariants = cva(- "peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",+ "peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground data-active:hover:bg-sidebar-accent [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants: {variant: {@@ -758,7 +758,7 @@ function SidebarMenuSubButton({props: mergeProps<"a">({className: cn(- "flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",+ "flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-active:hover:bg-sidebar-accent [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",className),},diff --git a/packages/ui/styles/base.css b/packages/ui/styles/base.cssindex 0c53175b43..c9b4ec0bc1 100644--- a/packages/ui/styles/base.css+++ b/packages/ui/styles/base.css@@ -233,6 +233,12 @@}@media (prefers-reduced-motion: reduce) {+ .animate-chat-impulse,+ .animate-chat-text-shimmer,+ .animate-nav-progress-sweep {+ animation: none;+ }+[data-right-sidebar-panel] {transition: none;}diff --git a/packages/ui/styles/tokens.css b/packages/ui/styles/tokens.cssindex c78f9bfef7..6e649aff42 100644--- a/packages/ui/styles/tokens.css+++ b/packages/ui/styles/tokens.css@@ -5,6 +5,15 @@--font-sans: var(--font-sans);--font-serif: var(--font-serif);--font-mono: var(--font-mono);+ --color-app-shell: var(--app-shell);+ --color-page-canvas: var(--page-canvas);+ --color-surface: var(--surface);+ --color-surface-foreground: var(--surface-foreground);+ --color-surface-raised: var(--surface-raised);+ --color-surface-hover: var(--surface-hover);+ --color-surface-selected: var(--surface-selected);+ --color-surface-selected-foreground: var(--surface-selected-foreground);+ --color-surface-border: var(--surface-border);--color-sidebar-ring: var(--sidebar-ring);--color-sidebar-border: var(--sidebar-border);--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);@@ -51,11 +60,26 @@}:root {- --background: oklch(1 0 0);+ color-scheme: light;+ /* Surface system: the app shell is the quiet outer frame; the page canvas+ is where lists, boards, and conversations live; surfaces are reserved+ for bounded content groups; raised surfaces are ephemeral overlays. */+ --app-shell: oklch(0.964435 0.001327 286.375);+ --page-canvas: oklch(0.988087 0 0);+ --surface: oklch(1 0 0);+ --surface-foreground: oklch(0.141 0.005 285.823);+ --surface-raised: oklch(1 0 0);+ --surface-hover: oklch(0.967 0.001 286.375);+ --surface-selected: oklch(0.95 0.002 286.375);+ --surface-selected-foreground: oklch(0.141 0.005 285.823);+ --surface-border: oklch(0.92 0.004 286.32);+ --surface-shadow: 0 1px 2px rgb(15 23 42 / 0.04), 0 1px 1px rgb(15 23 42 / 0.03);+ --floating-shadow: 0 16px 40px rgb(15 23 42 / 0.14), 0 3px 10px rgb(15 23 42 / 0.08);+ --background: var(--page-canvas);--foreground: oklch(0.141 0.005 285.823);- --card: oklch(1 0 0);+ --card: var(--surface);--card-foreground: oklch(0.141 0.005 285.823);- --popover: oklch(1 0 0);+ --popover: var(--surface-raised);--popover-foreground: oklch(0.141 0.005 285.823);--primary: oklch(0.21 0.006 285.885);--primary-foreground: oklch(0.985 0 0);@@ -80,11 +104,11 @@--chart-4: oklch(0.85 0.06 255);--chart-5: oklch(0.92 0.03 255);--radius: 0.625rem;- --sidebar: oklch(0.985 0 0);+ --sidebar: oklch(0.964435 0.001327 286.375);--sidebar-foreground: oklch(0.141 0.005 285.823);--sidebar-primary: oklch(0.21 0.006 285.885);--sidebar-primary-foreground: oklch(0.985 0 0);- --sidebar-accent: oklch(0.95 0.002 286.375);+ --sidebar-accent: oklch(0.935 0.003 286.375);--sidebar-accent-foreground: oklch(0.21 0.006 285.885);--sidebar-border: oklch(0.92 0.004 286.32);--sidebar-ring: oklch(0.705 0.015 286.067);@@ -105,11 +129,23 @@}.dark {- --background: oklch(0.18 0.005 285.823);+ color-scheme: dark;+ --app-shell: oklch(0.155 0.005 285.823);+ --page-canvas: oklch(0.18 0.005 285.823);+ --surface: oklch(0.21 0.006 285.885);+ --surface-foreground: oklch(0.985 0 0);+ --surface-raised: oklch(0.235 0.007 285.885);+ --surface-hover: oklch(0.274 0.006 286.033);+ --surface-selected: oklch(0.3 0.006 286.033);+ --surface-selected-foreground: oklch(0.985 0 0);+ --surface-border: oklch(1 0 0 / 10%);+ --surface-shadow: 0 1px 2px rgb(0 0 0 / 0.2), 0 1px 1px rgb(0 0 0 / 0.16);+ --floating-shadow: 0 20px 48px rgb(0 0 0 / 0.46), 0 4px 12px rgb(0 0 0 / 0.28);+ --background: var(--page-canvas);--foreground: oklch(0.985 0 0);- --card: oklch(0.21 0.006 285.885);+ --card: var(--surface);--card-foreground: oklch(0.985 0 0);- --popover: oklch(0.21 0.006 285.885);+ --popover: var(--surface-raised);--popover-foreground: oklch(0.985 0 0);--primary: oklch(0.92 0.004 286.32);--primary-foreground: oklch(0.21 0.006 285.885);diff --git a/packages/views/chat/components/chat-fab.tsx b/packages/views/chat/components/chat-fab.tsxindex ea1a701184..5354911230 100644--- a/packages/views/chat/components/chat-fab.tsx+++ b/packages/views/chat/components/chat-fab.tsx@@ -53,8 +53,9 @@ export function ChatFab() {<Tooltip><TooltipTriggeronClick={handleClick}+ aria-label={tooltip}className={cn(- "absolute bottom-2 right-2 z-50 flex size-10 cursor-pointer items-center justify-center rounded-full ring-1 ring-foreground/10 bg-card text-muted-foreground shadow-sm transition-transform hover:scale-110 hover:text-accent-foreground active:scale-95",+ "absolute bottom-2 right-2 z-50 flex size-10 touch-manipulation items-center justify-center rounded-full bg-surface-raised text-muted-foreground shadow-[var(--floating-shadow)] ring-1 ring-surface-border transition-[background-color,color,box-shadow] hover:bg-surface-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 focus-visible:ring-offset-page-canvas active:bg-surface-hover",// Impulse the button itself while a chat task is running — no// outer ring to keep things calm.isRunning && "animate-chat-impulse",diff --git a/packages/views/chat/components/chat-input.tsx b/packages/views/chat/components/chat-input.tsxindex d3a133fc37..d94f75ef22 100644--- a/packages/views/chat/components/chat-input.tsx+++ b/packages/views/chat/components/chat-input.tsx@@ -365,7 +365,7 @@ export function ChatInput({<div{...(uploadEnabled ? dropZoneProps : {})}className={cn(- "relative mx-auto flex min-h-16 max-h-40 w-full max-w-4xl flex-col rounded-lg bg-card pb-9 border-1 border-border transition-colors focus-within:border-brand",+ "relative mx-auto flex min-h-16 max-h-40 w-full max-w-4xl flex-col rounded-lg border border-surface-border bg-surface pb-9 transition-[border-color,box-shadow] focus-within:border-brand focus-within:ring-2 focus-within:ring-ring/20",// Visual + interaction lock when there's no agent. We don't// toggle ContentEditor's editable mode (Tiptap can't switch// cleanly post-mount, and the prop has been removed); insteaddiff --git a/packages/views/chat/components/chat-window.tsx b/packages/views/chat/components/chat-window.tsxindex 468e5be1be..2f61426cc1 100644--- a/packages/views/chat/components/chat-window.tsx+++ b/packages/views/chat/components/chat-window.tsx@@ -721,7 +721,7 @@ export function ChatWindow() {const isVisible = isOpen && (isExpanded || boundsReady);- const containerClass = "absolute bottom-2 right-2 z-50 flex flex-col rounded-xl ring-1 ring-foreground/10 bg-sidebar shadow-2xl overflow-hidden";+ const containerClass = "absolute bottom-2 right-2 z-50 flex flex-col overflow-hidden rounded-xl bg-surface-raised shadow-[var(--floating-shadow)] ring-1 ring-surface-border";const containerStyle: React.CSSProperties = {transformOrigin: "bottom right",pointerEvents: isOpen ? "auto" : "none",diff --git a/packages/views/issues/components/board-card.tsx b/packages/views/issues/components/board-card.tsxindex 406ccc358c..0ba600fde2 100644--- a/packages/views/issues/components/board-card.tsx+++ b/packages/views/issues/components/board-card.tsx@@ -164,7 +164,7 @@ export const BoardCardContent = memo(function BoardCardContent({const showRightMeta = !!showStartDate || !!showDueDate || !!showChildProgress || showUpdatedHint;return (- <div className="rounded-lg border-[0.5px] border-border bg-card py-3 px-2.5 shadow-[0_3px_6px_-2px_rgba(0,0,0,0.02),0_1px_1px_0_rgba(0,0,0,0.04)] transition-colors group-hover/card:border-accent group-hover/card:bg-accent group-data-[popup-open]/card:border-accent group-data-[popup-open]/card:bg-accent">+ <div className="rounded-lg border-[0.5px] border-surface-border bg-surface py-3 px-2.5 shadow-[var(--surface-shadow)] transition-colors group-hover/card:border-foreground/15 group-hover/card:bg-surface-hover group-data-[popup-open]/card:border-foreground/15 group-data-[popup-open]/card:bg-surface-hover">{/* Row 1: priority + identifier (left), agent activity + assignee (right) */}<div className="flex items-center justify-between gap-2"><div className="flex items-center gap-1.5 min-w-0">diff --git a/packages/views/issues/components/list-row.tsx b/packages/views/issues/components/list-row.tsxindex 3b14e9dc71..3ed3b7ab81 100644--- a/packages/views/issues/components/list-row.tsx+++ b/packages/views/issues/components/list-row.tsx@@ -66,8 +66,10 @@ function ListRowContent({ref={containerRef}style={containerStyle}{...containerProps}- className={`group/row flex h-9 items-center gap-2 px-4 text-sm transition-colors hover:not-data-[popup-open]:bg-accent/60 data-[popup-open]:bg-accent ${- selected ? "bg-accent/30" : ""+ className={`group/row flex h-9 items-center gap-2 px-4 text-sm transition-colors ${+ selected+ ? "bg-surface-selected hover:not-data-[popup-open]:bg-surface-selected data-[popup-open]:bg-surface-selected"+ : "hover:not-data-[popup-open]:bg-surface-hover data-[popup-open]:bg-surface-hover"} ${isDragging ? "opacity-30" : ""}`}><divdiff --git a/packages/views/layout/dashboard-layout.tsx b/packages/views/layout/dashboard-layout.tsxindex 324759c603..1a362461b7 100644--- a/packages/views/layout/dashboard-layout.tsx+++ b/packages/views/layout/dashboard-layout.tsx@@ -33,7 +33,7 @@ export function DashboardLayout({</div>}>- <SidebarProvider className="h-svh">+ <SidebarProvider className="h-svh bg-app-shell"><WorkspacePresencePrefetch /><AppSidebar searchSlot={searchSlot} /><SidebarInset className="relative overflow-hidden">diff --git a/packages/views/settings/components/preferences-tab.tsx b/packages/views/settings/components/preferences-tab.tsxindex 882ef7d847..18e7b428ed 100644--- a/packages/views/settings/components/preferences-tab.tsx+++ b/packages/views/settings/components/preferences-tab.tsx@@ -172,14 +172,14 @@ export function PreferencesTab() {role="radio"aria-checked={active}onClick={() => setTheme(opt.value)}- className="group flex flex-col items-center gap-2"+ className="group flex flex-col items-center gap-2 rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 focus-visible:ring-offset-page-canvas"><divclassName={cn(- "aspect-[4/3] w-36 overflow-hidden rounded-lg ring-1 transition-all",+ "aspect-[4/3] w-36 overflow-hidden rounded-lg ring-1 transition-shadow",active? "ring-2 ring-brand"- : "ring-border hover:ring-2 hover:ring-border"+ : "ring-surface-border group-hover:ring-2 group-hover:ring-surface-border")}>{opt.value === "system" ? (@@ -228,10 +228,10 @@ export function PreferencesTab() {aria-checked={active}onClick={() => handleLanguageChange(opt.value)}className={cn(- "rounded-md border px-4 py-2 text-sm transition-colors",+ "rounded-md border px-4 py-2 text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 focus-visible:ring-offset-page-canvas",active- ? "border-brand bg-brand/10 font-medium text-foreground"- : "border-border text-muted-foreground hover:border-foreground/30"+ ? "border-brand/50 bg-surface-selected font-medium text-foreground"+ : "border-surface-border text-muted-foreground hover:border-foreground/30 hover:bg-surface-hover")}>{opt.label}diff --git a/packages/views/settings/components/settings-page.tsx b/packages/views/settings/components/settings-page.tsxindex 413c3eb36d..efcca0dffe 100644--- a/packages/views/settings/components/settings-page.tsx+++ b/packages/views/settings/components/settings-page.tsx@@ -15,6 +15,7 @@ import {} from "lucide-react";import { GitHubMark } from "./github-mark";import { Tabs, TabsList, TabsTrigger, TabsContent } from "@multica/ui/components/ui/tabs";+import { useIsMobile } from "@multica/ui/hooks/use-mobile";import { useCurrentWorkspace } from "@multica/core/paths";import { useNavigation } from "../../navigation";import { AccountTab } from "./account-tab";@@ -75,6 +76,9 @@ const LEGACY_WORKSPACE_TAB_REDIRECTS: Record<string, string> = {lark: "integrations",};+const SETTINGS_TAB_TRIGGER_CLASS =+ "h-8 shrink-0 px-2.5 hover:bg-surface-hover data-active:!bg-surface-selected data-active:!text-surface-selected-foreground data-active:hover:!bg-surface-selected md:!w-full md:px-2 md:after:hidden";+export interface ExtraSettingsTab {value: string;label: string;@@ -91,6 +95,7 @@ export function SettingsPage({ extraAccountTabs }: SettingsPageProps = {}) {const { t } = useT("settings");const workspaceName = useCurrentWorkspace()?.name;const navigation = useNavigation();+ const isMobile = useIsMobile();// Whitelist of valid tab values; unknown ?tab=… values silently fall back to// the default. Whitelisting also blocks junk like ?tab=<script> from@@ -124,41 +129,56 @@ export function SettingsPage({ extraAccountTabs }: SettingsPageProps = {}) {<Tabsvalue={activeTab}onValueChange={handleTabChange}- orientation="vertical"- className="flex-1 min-h-0 gap-0 flex flex-col md:flex-row md:overflow-hidden overflow-y-auto"+ orientation={isMobile ? "horizontal" : "vertical"}+ className="flex flex-1 min-h-0 flex-col gap-0 overflow-y-auto md:flex-row md:overflow-hidden">- {/* Left nav (stacks on top on mobile, sidebar on md+) */}- <div className="shrink-0 md:w-52 border-b md:border-b-0 md:border-r md:overflow-y-auto p-3 md:p-4">- <h1 className="text-sm font-semibold mb-4 px-2">{t(($) => $.page.title)}</h1>- <TabsList variant="line" className="flex-col items-stretch w-full">+ {/* Structural navigation; bounded setting groups remain in the content surface. */}+ <div className="shrink-0 overflow-x-auto border-b border-surface-border bg-app-shell/70 p-2 md:w-56 md:overflow-y-auto md:border-b-0 md:border-r md:p-4">+ <h1 className="sr-only text-sm font-semibold md:not-sr-only md:mb-4 md:px-2">{t(($) => $.page.title)}</h1>+ <TabsList+ variant="line"+ className="flex w-max min-w-full flex-row items-center gap-1 p-0 md:w-full md:flex-col md:items-stretch"+ >{/* My Account group */}- <span className="px-2 pb-1 pt-2 text-xs font-medium text-muted-foreground">+ <span className="hidden px-2 pb-1 pt-2 text-xs font-medium text-muted-foreground md:block">{t(($) => $.page.my_account)}</span>{ACCOUNT_TAB_KEYS.map((key) => {const Icon = ACCOUNT_TAB_ICONS[key];return (- <TabsTrigger key={key} value={key}>+ <TabsTrigger+ key={key}+ value={key}+ className={SETTINGS_TAB_TRIGGER_CLASS}+ ><Icon className="h-4 w-4" />{t(($) => $.page.tabs[key])}</TabsTrigger>);})}{extraAccountTabs?.map((tab) => (- <TabsTrigger key={tab.value} value={tab.value}>+ <TabsTrigger+ key={tab.value}+ value={tab.value}+ className={SETTINGS_TAB_TRIGGER_CLASS}+ ><tab.icon className="h-4 w-4" />{tab.label}</TabsTrigger>))}{/* Workspace group */}- <span className="px-2 pb-1 pt-4 text-xs font-medium text-muted-foreground truncate">+ <span className="hidden truncate px-2 pb-1 pt-4 text-xs font-medium text-muted-foreground md:block">{workspaceName ?? t(($) => $.page.workspace_fallback)}</span>{WORKSPACE_TAB_KEYS.map((key) => {const Icon = WORKSPACE_TAB_ICONS[key];return (- <TabsTrigger key={key} value={WORKSPACE_TAB_VALUES[key]}>+ <TabsTrigger+ key={key}+ value={WORKSPACE_TAB_VALUES[key]}+ className={SETTINGS_TAB_TRIGGER_CLASS}+ ><Icon className="h-4 w-4" />{t(($) => $.page.tabs[key])}</TabsTrigger>@@ -168,8 +188,8 @@ export function SettingsPage({ extraAccountTabs }: SettingsPageProps = {}) {</div>{/* Right content */}- <div className="flex-1 min-w-0 md:overflow-y-auto">- <div className="w-full max-w-3xl mx-auto p-4 md:p-6">+ <div className="min-w-0 flex-1 md:overflow-y-auto">+ <div className="mx-auto w-full max-w-3xl p-4 sm:p-6 md:p-8"><TabsContent value="profile"><AccountTab /></TabsContent><TabsContent value="preferences"><PreferencesTab /></TabsContent><TabsContent value="chat"><ChatTab /></TabsContent>