From 660e7ae609342e965e6aba305932938114bc1d79 Mon Sep 17 00:00:00 2001 From: harryisfish Date: Thu, 12 Nov 2026 02:39:38 +0800 Subject: [PATCH 01/15] docs: document app and mobile design systems --- apps/app/.impeccable/design.json | 1 + apps/app/DESIGN.md | 95 +++++++++++++++++++++++++++++ apps/mobile/.impeccable/design.json | 1 + apps/mobile/DESIGN.md | 92 ++++++++++++++++++++++++++++ 4 files changed, 189 insertions(+) create mode 100644 apps/app/.impeccable/design.json create mode 100644 apps/app/DESIGN.md create mode 100644 apps/mobile/.impeccable/design.json create mode 100644 apps/mobile/DESIGN.md diff --git a/apps/app/.impeccable/design.json b/apps/app/.impeccable/design.json new file mode 100644 index 000000000..2cf81f813 --- /dev/null +++ b/apps/app/.impeccable/design.json @@ -0,0 +1 @@ +{"name":"Vibeface Web App","tokens":{"colors":{"brand":"oklch(0.53 0.2 280)","background":"oklch(1 0 0)","foreground":"oklch(0.21 0.012 270)"},"radius":{"base":"0.625rem","xl":"0.875rem"},"typography":{"body":"15px/24px Geist Variable","meta":"13px/20px Geist Variable"}},"narrative":{"northStar":"Quiet control room"}} diff --git a/apps/app/DESIGN.md b/apps/app/DESIGN.md new file mode 100644 index 000000000..cb4a1a28f --- /dev/null +++ b/apps/app/DESIGN.md @@ -0,0 +1,95 @@ +--- +name: Vibeface Web App +description: A focused workspace for conversations, tasks, devices, and recovery. +colors: + background-light: "oklch(1 0 0)" + background-dark: "oklch(0.175 0.006 270)" + foreground-light: "oklch(0.21 0.012 270)" + foreground-dark: "oklch(0.955 0.004 270)" + brand-light: "oklch(0.53 0.2 280)" + brand-dark: "oklch(0.72 0.15 280)" + muted-light: "oklch(0.965 0.004 270)" + muted-dark: "oklch(0.245 0.008 270)" + danger-light: "oklch(0.54 0.2 27)" + danger-dark: "oklch(0.72 0.17 25)" +typography: + body: + fontFamily: "Geist Variable, -apple-system, BlinkMacSystemFont, system-ui, sans-serif" + fontSize: "15px" + lineHeight: "24px" + meta: + fontFamily: "Geist Variable, -apple-system, BlinkMacSystemFont, system-ui, sans-serif" + fontSize: "13px" + lineHeight: "20px" +rounded: + base: "0.625rem" + xl: "0.875rem" +spacing: + unit: "4px" + page: "16px" +components: + button-primary: + backgroundColor: "{colors.brand-light}" + rounded: "{rounded.base}" + card: + backgroundColor: "{colors.background-light}" + rounded: "{rounded.xl}" +--- + +# Design System: Vibeface Web App + +## Overview + +**Creative North Star: "Quiet control room"** + +The web app is an Operate surface. It keeps attention on the current conversation or task while the sidebar provides stable orientation. Geist, cool neutral surfaces, and a restrained violet brand accent make state changes legible without turning the workspace into a dashboard of competing signals. + +**Key Characteristics:** calm, task-first, state-explicit, keyboard-friendly, responsive. + +## Colors + +The shared source of truth is `packages/theme/theme.css`. Light mode uses white surfaces and cool near-black text; dark mode separates page, card, popover, and sidebar by tonal steps. Violet is reserved for focus, selection, brand identity, and primary action. Success, warning, danger, and info colors communicate state and must be paired with text or icon labels. + +## Typography + +Geist Variable is the UI voice. The 15/24 body scale supports dense task reading; 13/20 metadata recedes without becoming inaccessible. Headings use tight tracking and balanced wrapping. Geist Mono is reserved for code, IDs, logs, and measurements. + +## Layout + +The workspace uses a persistent sidebar at wide widths and a single content column capped by `--page-width` (48rem). Header, page content, and task panels share the same alignment. Mobile collapses navigation and preserves 44px touch targets. Use `gap` and the existing 4px rhythm; keep generous separation between sections and tighter spacing within a control group. + +## Elevation & Depth + +Depth is tonal first. Light mode uses subtle `elevation-xs`/`elevation-sm` on interactive cards; dark mode uses surface contrast and outlines, reserving a larger shadow for floating layers. Do not stack a border and a broad shadow on ordinary cards. + +## Shapes + +The base radius is 10px, with 14px cards and 20px sheets where the component already establishes that language. Pills are reserved for compact status controls. Focus is an inset or 2px ring derived from `--ring`. + +## Components + +- **Sidebar and navigation rows:** stable 40px desktop rows, 44px mobile rows, active state plus icon/label. +- **Interactive rows:** shared `interactive-row` utility for hover, focus, and pressed feedback. +- **Cards and list groups:** `bg-card`, border, and small elevation; list groups use dividers rather than nested cards. +- **Buttons and fields:** existing UI primitives provide variants, focus treatment, and mobile sizing. +- **EmptyState:** icon, concise heading, optional explanation, and one recovery action. +- **BotFace and status marks:** identity and state are reinforced by text or icons; color is never the only signal. + +## Do's and Don'ts + +- Do keep the primary task visible in the middle column. +- Do make recovery, waiting, and offline states explicit in words. +- Do reuse `packages/theme/theme.css` and the existing UI primitives. +- Do preserve keyboard order and 44px mobile hit areas. +- Don't add dashboard-style metric cards to task surfaces. +- Don't introduce gradients, decorative blur, or new color families without a product decision. +- Don't use color alone for status. +- Don't create one-off spacing or component variants when an existing primitive fits. + +## Current review notes + +- **Critique:** hierarchy is strongest in the workspace shell and conversation view; secondary settings and inbox rows should retain the same heading-to-metadata contrast. +- **Audit:** the source shows explicit focus, reduced-motion, safe-area, overflow, and touch-target handling. Rendered browser/device checks are still required for final acceptance. +- **Distill:** keep sidebar, header, current task/conversation, and one clear recovery action; remove decorative wrappers before adding new containers. +- **Layout:** preserve the single reading path: navigation → current context → task content → action. Use grouping and proximity before extra cards. +- **Optimize:** no source evidence justifies speculative memoization or virtualization. Measure route load, interaction latency, and long-list behavior before changing runtime code. diff --git a/apps/mobile/.impeccable/design.json b/apps/mobile/.impeccable/design.json new file mode 100644 index 000000000..1c4836a41 --- /dev/null +++ b/apps/mobile/.impeccable/design.json @@ -0,0 +1 @@ +{"name":"Vibeface Mobile App","tokens":{"colors":{"brand":"oklch(0.53 0.2 280)","background":"oklch(1 0 0)","foreground":"oklch(0.21 0.012 270)"},"radius":{"base":"0.625rem","xl":"0.875rem"},"typography":{"body":"15px/24px Geist","meta":"13px/20px Geist"}},"narrative":{"northStar":"Quiet control room"}} diff --git a/apps/mobile/DESIGN.md b/apps/mobile/DESIGN.md new file mode 100644 index 000000000..1a2bcca16 --- /dev/null +++ b/apps/mobile/DESIGN.md @@ -0,0 +1,92 @@ +--- +name: Vibeface Mobile App +description: A native workspace for conversations, tasks, devices, and recovery. +colors: + background-light: "oklch(1 0 0)" + background-dark: "oklch(0.175 0.006 270)" + foreground-light: "oklch(0.21 0.012 270)" + foreground-dark: "oklch(0.955 0.004 270)" + brand-light: "oklch(0.53 0.2 280)" + brand-dark: "oklch(0.72 0.15 280)" + muted-light: "oklch(0.965 0.004 270)" + muted-dark: "oklch(0.245 0.008 270)" +typography: + body: + fontFamily: "Geist" + fontSize: "15px" + lineHeight: "24px" + meta: + fontFamily: "Geist" + fontSize: "13px" + lineHeight: "20px" +rounded: + base: "0.625rem" + xl: "0.875rem" +spacing: + unit: "4px" + screen: "16px" +components: + button-primary: + backgroundColor: "{colors.brand-light}" + rounded: "{rounded.base}" + card: + backgroundColor: "{colors.background-light}" + rounded: "{rounded.xl}" +--- + +# Design System: Vibeface Mobile App + +## Overview + +**Creative North Star: "Quiet control room"** + +The mobile app is an Operate surface designed around one-handed progress: choose a Bot, read the current work, and act without losing context. Shared cool neutrals and violet brand accents keep the native shell calm; platform materials appear only where the OS supports them and are disabled when reduced transparency is enabled. + +**Key Characteristics:** native, calm, task-first, accessible, interruption-aware. + +## Colors + +Mobile consumes the same semantic tokens from `packages/theme/theme.css` through Uniwind. Violet marks brand and primary action. Muted surfaces group content; success, warning, danger, and info states remain text-and-icon backed. + +## Typography + +Geist is used for UI text and Geist Mono for code, IDs, and logs. The existing 15/24 body and 13/20 metadata scale favors readable mobile density. Keep headings short enough to wrap without hiding the action that follows. + +## Layout + +Screens use safe-area insets, a centered max-width on wide windows, and a single vertical reading path on phones. Chat keeps the composer attached to the bottom while messages scroll independently. Use 44px minimum controls and preserve native back, keyboard, and modal focus behavior. + +## Elevation & Depth + +Prefer tonal grouping and native sheets. `ChatMaterial` may use iOS Liquid Glass when available and falls back to a solid bordered surface; reduced transparency always wins. Avoid decorative blur or stacked shadows. + +## Shapes + +Rounded 12–14px cards and 24–26px chat materials establish the current language. Pills are for compact status or attachment tokens. Borders and active fills must remain visible in both themes. + +## Components + +- **Button/Input/Text primitives:** shared Uniwind variants with accessible labels and selected/disabled states. +- **Chat bubbles and composer:** distinct sender grouping, attachment controls, stop/send actions, and keyboard-safe layout. +- **Home list and workspace rows:** compact identity plus state, with clear press feedback. +- **Sheets and modals:** protected focus for target selection, recovery, and queue actions. +- **EmptyState and ErrorText:** a concise explanation and one retry or recovery action. + +## Do's and Don'ts + +- Do honor safe areas, dynamic type constraints, reduced motion, and reduced transparency. +- Do keep destructive or uncertain operations explicit and recoverable. +- Do use the shared semantic theme instead of literal per-screen colors. +- Do keep touch targets at least 44px even when the icon is smaller. +- Don't replace native navigation or sheets with web-style scaffolding. +- Don't use blur, gradients, or animation as decoration. +- Don't rely on color alone for connection, delivery, or recovery state. +- Don't add a second mobile design language beside the existing UI primitives. + +## Current review notes + +- **Critique:** chat and workspace flows have the clearest hierarchy; secondary device/recovery screens should preserve the same action-first structure. +- **Audit:** source includes accessibility labels, selected states, safe-area handling, reduced motion/transparency behavior, and keyboard-aware layouts. Real simulator/device rendering remains required for acceptance. +- **Distill:** retain native navigation, current conversation, composer, and one primary action; avoid nested containers that repeat the same surface treatment. +- **Layout:** preserve the vertical path: title/context → content → primary action/composer. Keep sheets bounded and scrollable for long targets or queues. +- **Optimize:** no measured bottleneck is present in source alone. Profile message lists, markdown rendering, and keyboard transitions before adding memoization or virtualization. From ea26e50d9051a23257145c23952a288e1e54cd32 Mon Sep 17 00:00:00 2001 From: harryisfish Date: Thu, 12 Nov 2026 02:42:12 +0800 Subject: [PATCH 02/15] docs: capture app product context --- apps/app/PRODUCT.md | 46 +++++++++++++++++++++++++++++++++++++++++ apps/mobile/PRODUCT.md | 47 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 apps/app/PRODUCT.md create mode 100644 apps/mobile/PRODUCT.md diff --git a/apps/app/PRODUCT.md b/apps/app/PRODUCT.md new file mode 100644 index 000000000..3a685ac6c --- /dev/null +++ b/apps/app/PRODUCT.md @@ -0,0 +1,46 @@ +# Product + + + +## Platform + +web + +## Users + +Individuals managing their own Bot conversations, tasks, devices, and recovery state. + +## Product Purpose + +Vibeface gives one person a safe workspace for directing Bot work, reviewing outcomes, and keeping connected devices under personal control. Success means the person can understand what is waiting, act on it, and recover from uncertain delivery without repeating a side effect. + +## Positioning + +The workspace separates Bot conversations from device identity and delivery state while keeping their causal context visible. + +## Operating Context + +People use the web app as a desktop or mobile browser workspace. The sidebar, inbox, task views, device views, and conversation screens are the primary operating surfaces. + +## Capabilities and Constraints + +The app supports Bot conversations, tasks, channels, inbox decisions, device joining, recovery, settings, and local/offline state. Account, device, event, attachment, route, and command data stays within the person's network. Unknown write results must be reconciled before retrying. + +## Brand Commitments + +The product name is Vibeface. Existing Bot faces and the shared cool-neutral/violet theme are retained. + +## Evidence on Hand + +Routes and components under `apps/app/src/`, shared semantic tokens in `packages/theme/theme.css`, and existing accessibility and reduced-motion handling. + +## Product Principles + +- Make the current task and its state easy to understand. +- Keep personal network and device boundaries explicit. +- Never imply a write succeeded when its result is unknown. +- Prefer one clear recovery action over decorative complexity. + +## Accessibility & Inclusion + +Keyboard focus, reduced motion, safe areas, readable metadata, visible labels, and touch-sized controls are product requirements. diff --git a/apps/mobile/PRODUCT.md b/apps/mobile/PRODUCT.md new file mode 100644 index 000000000..cdd9c85c7 --- /dev/null +++ b/apps/mobile/PRODUCT.md @@ -0,0 +1,47 @@ +# Product + + + +## Platform + +adaptive + +## Users + +Individuals managing their own Bot conversations, tasks, devices, and recovery state on iOS and Android. + +## Product Purpose + +Vibeface gives one person a safe native workspace for directing Bot work, reviewing outcomes, and keeping connected devices under personal control. Success means the person can understand what is waiting, act on it, and recover from uncertain delivery without repeating a side effect. + +## Positioning + +The native app keeps Bot conversations, device identity, and delivery state connected while honoring platform navigation, safe areas, keyboard behavior, and system accessibility settings. + +## Operating Context + +People use the mobile app one-handed and while switching between a Bot conversation, task details, device setup, and recovery. The home list, chat composer, workspace screens, sheets, and native navigation are the primary operating surfaces. + +## Capabilities and Constraints + +The app supports Bot conversations, tasks, channels, device joining, recovery, settings, attachments, and local/offline state. Account, device, event, attachment, route, and command data stays within the person's network. Unknown write results must be reconciled before retrying. iOS safe-area and reduced-transparency behavior, Android insets and system Back, and 44px/48dp touch targets must remain intact. + +## Brand Commitments + +The product name is Vibeface. Existing Bot faces and the shared cool-neutral/violet theme are retained. + +## Evidence on Hand + +Routes and components under `apps/mobile/`, shared semantic tokens in `packages/theme/theme.css`, and existing accessibility, reduced-motion, reduced-transparency, safe-area, and keyboard-aware handling. + +## Product Principles + +- Make the current task and its state easy to understand. +- Keep personal network and device boundaries explicit. +- Never imply a write succeeded when its result is unknown. +- Prefer one clear recovery action over decorative complexity. +- Honor each platform's native navigation and accessibility behavior. + +## Accessibility & Inclusion + +Dynamic text, screen-reader labels, reduced motion, reduced transparency, safe areas, readable metadata, system Back/edge-swipe, and 44px/48dp touch targets are product requirements. From ba6af9c65d3841c61ca4d13a26bb073edd3a62e2 Mon Sep 17 00:00:00 2001 From: harryisfish Date: Thu, 12 Nov 2026 02:43:09 +0800 Subject: [PATCH 03/15] docs: define workspace and chat surface briefs --- apps/app/.impeccable/surfaces/workspace.md | 38 +++++++++++++++++++ apps/mobile/.impeccable/surfaces/chat-home.md | 38 +++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 apps/app/.impeccable/surfaces/workspace.md create mode 100644 apps/mobile/.impeccable/surfaces/chat-home.md diff --git a/apps/app/.impeccable/surfaces/workspace.md b/apps/app/.impeccable/surfaces/workspace.md new file mode 100644 index 000000000..c40bc17c5 --- /dev/null +++ b/apps/app/.impeccable/surfaces/workspace.md @@ -0,0 +1,38 @@ +# Web 工作区 + +## Mode + +Operate + +## Job + +让个人快速看懂当前 Bot/任务状态,并完成下一步操作。 + +## Reading order + +1. 当前上下文(Bot、任务或频道) +2. 需要注意的等待、错误或恢复状态 +3. 对话/任务内容 +4. 一个明确的下一步动作 + +## Preserve + +- 侧栏导航、键盘顺序、消息与任务的独立上下文 +- 未知写入结果先对账的文案和状态 +- 现有主题、Bot face、焦点环和响应式断点 + +## Quieting and layout decisions + +- 让标题、上下文和动作共享同一中列对齐线。 +- 使用邻近关系和分隔线表达列表分组,避免增加嵌套卡片。 +- 保留等待、恢复、离线的颜色,但始终配合文字或图标。 +- 页面只保留一个主任务路径;辅助动作进入现有 header action slot。 +- 宽屏使用侧栏,窄屏使用返回和抽屉;不引入新的导航模式。 + +## Required states + +loading, empty, offline, waiting, recovery, failed, keyboard focus, narrow viewport, long text. + +## Acceptance evidence + +浏览器渲染检查需覆盖宽屏、窄屏、深色模式、键盘焦点、长文本和待处理状态。 diff --git a/apps/mobile/.impeccable/surfaces/chat-home.md b/apps/mobile/.impeccable/surfaces/chat-home.md new file mode 100644 index 000000000..6bdd65809 --- /dev/null +++ b/apps/mobile/.impeccable/surfaces/chat-home.md @@ -0,0 +1,38 @@ +# 移动端聊天首页 + +## Mode + +Operate + +## Job + +让个人在单手操作下选择 Bot、识别未处理事项,并进入当前对话。 + +## Reading order + +1. 连接与当前网络状态 +2. 待处理或恢复提醒 +3. 频道和 Bot 列表 +4. 最近消息与未读数 + +## Preserve + +- 原生导航、系统 Back、safe area、键盘和动态字体行为 +- Bot face 作为身份识别,不让动画成为唯一状态提示 +- 现有共享语义主题和 accessibility labels + +## Quieting and layout decisions + +- 顶部只保留连接、任务、新 Bot、设置这些已存在且可达的动作。 +- 待处理事项在列表中优先于普通 Bot,并使用单一强调面。 +- 频道标题、Bot 标题和元信息保持明确的大小/重量阶梯;减少多余容器。 +- 列表行保持 44px 以上触控高度,分隔线只用于连续列表。 +- 聊天 composer 使用现有 material fallback;不增加装饰性玻璃层。 + +## Required states + +loading, empty, offline, waiting, recovery, unread, reduced motion, reduced transparency, keyboard open, long text. + +## Acceptance evidence + +需要在 iOS 与 Android 的实际模拟器/设备上检查窄屏、宽窗口、深色模式、较大字体、系统 Back、键盘和 reduced-motion/transparency。 From 04ae25484b92b6b0d693db46ab85d5102762cedd Mon Sep 17 00:00:00 2001 From: harryisfish Date: Thu, 12 Nov 2026 02:52:14 +0800 Subject: [PATCH 04/15] docs: align extracted design records with current primitives --- apps/app/.impeccable/design.json | 302 +++++++++++++++++++++++++++- apps/app/DESIGN.md | 21 +- apps/mobile/.impeccable/design.json | 272 ++++++++++++++++++++++++- apps/mobile/DESIGN.md | 27 ++- 4 files changed, 595 insertions(+), 27 deletions(-) diff --git a/apps/app/.impeccable/design.json b/apps/app/.impeccable/design.json index 2cf81f813..790f85be6 100644 --- a/apps/app/.impeccable/design.json +++ b/apps/app/.impeccable/design.json @@ -1 +1,301 @@ -{"name":"Vibeface Web App","tokens":{"colors":{"brand":"oklch(0.53 0.2 280)","background":"oklch(1 0 0)","foreground":"oklch(0.21 0.012 270)"},"radius":{"base":"0.625rem","xl":"0.875rem"},"typography":{"body":"15px/24px Geist Variable","meta":"13px/20px Geist Variable"}},"narrative":{"northStar":"Quiet control room"}} +{ + "schemaVersion": 2, + "generatedAt": "2026-11-11T18:49:03.408397+00:00", + "title": "Design System: Vibeface Web App", + "extensions": { + "colorMeta": { + "background-light": { + "role": "neutral", + "displayName": "Background Light", + "canonical": "oklch(1 0 0)", + "tonalRamp": [ + "oklch(0.150 0.0000 0)", + "oklch(0.260 0.0000 0)", + "oklch(0.380 0.0000 0)", + "oklch(0.500 0.0000 0)", + "oklch(0.620 0.0000 0)", + "oklch(0.740 0.0000 0)", + "oklch(0.860 0.0000 0)", + "oklch(0.950 0.0000 0)" + ] + }, + "background-dark": { + "role": "neutral", + "displayName": "Background Dark", + "canonical": "oklch(0.175 0.006 270)", + "tonalRamp": [ + "oklch(0.150 0.0045 270)", + "oklch(0.260 0.0060 270)", + "oklch(0.380 0.0060 270)", + "oklch(0.500 0.0060 270)", + "oklch(0.620 0.0060 270)", + "oklch(0.740 0.0060 270)", + "oklch(0.860 0.0042 270)", + "oklch(0.950 0.0015 270)" + ] + }, + "foreground-light": { + "role": "neutral", + "displayName": "Foreground Light", + "canonical": "oklch(0.21 0.012 270)", + "tonalRamp": [ + "oklch(0.150 0.0090 270)", + "oklch(0.260 0.0120 270)", + "oklch(0.380 0.0120 270)", + "oklch(0.500 0.0120 270)", + "oklch(0.620 0.0120 270)", + "oklch(0.740 0.0120 270)", + "oklch(0.860 0.0084 270)", + "oklch(0.950 0.0030 270)" + ] + }, + "foreground-dark": { + "role": "neutral", + "displayName": "Foreground Dark", + "canonical": "oklch(0.955 0.004 270)", + "tonalRamp": [ + "oklch(0.150 0.0030 270)", + "oklch(0.260 0.0040 270)", + "oklch(0.380 0.0040 270)", + "oklch(0.500 0.0040 270)", + "oklch(0.620 0.0040 270)", + "oklch(0.740 0.0040 270)", + "oklch(0.860 0.0028 270)", + "oklch(0.950 0.0010 270)" + ] + }, + "primary-light": { + "role": "primary", + "displayName": "Primary Light", + "canonical": "oklch(0.24 0.016 270)", + "tonalRamp": [ + "oklch(0.150 0.0120 270)", + "oklch(0.260 0.0160 270)", + "oklch(0.380 0.0160 270)", + "oklch(0.500 0.0160 270)", + "oklch(0.620 0.0160 270)", + "oklch(0.740 0.0160 270)", + "oklch(0.860 0.0112 270)", + "oklch(0.950 0.0040 270)" + ] + }, + "primary-foreground-light": { + "role": "primary", + "displayName": "Primary Foreground Light", + "canonical": "oklch(0.985 0.002 270)", + "tonalRamp": [ + "oklch(0.150 0.0015 270)", + "oklch(0.260 0.0020 270)", + "oklch(0.380 0.0020 270)", + "oklch(0.500 0.0020 270)", + "oklch(0.620 0.0020 270)", + "oklch(0.740 0.0020 270)", + "oklch(0.860 0.0014 270)", + "oklch(0.950 0.0005 270)" + ] + }, + "primary-dark": { + "role": "primary", + "displayName": "Primary Dark", + "canonical": "oklch(0.94 0.005 270)", + "tonalRamp": [ + "oklch(0.150 0.0037 270)", + "oklch(0.260 0.0050 270)", + "oklch(0.380 0.0050 270)", + "oklch(0.500 0.0050 270)", + "oklch(0.620 0.0050 270)", + "oklch(0.740 0.0050 270)", + "oklch(0.860 0.0035 270)", + "oklch(0.950 0.0013 270)" + ] + }, + "brand-light": { + "role": "accent", + "displayName": "Brand Light", + "canonical": "oklch(0.53 0.2 280)", + "tonalRamp": [ + "oklch(0.150 0.1500 280)", + "oklch(0.260 0.2000 280)", + "oklch(0.380 0.2000 280)", + "oklch(0.500 0.2000 280)", + "oklch(0.620 0.2000 280)", + "oklch(0.740 0.2000 280)", + "oklch(0.860 0.1400 280)", + "oklch(0.950 0.0500 280)" + ] + }, + "brand-dark": { + "role": "accent", + "displayName": "Brand Dark", + "canonical": "oklch(0.72 0.15 280)", + "tonalRamp": [ + "oklch(0.150 0.1125 280)", + "oklch(0.260 0.1500 280)", + "oklch(0.380 0.1500 280)", + "oklch(0.500 0.1500 280)", + "oklch(0.620 0.1500 280)", + "oklch(0.740 0.1500 280)", + "oklch(0.860 0.1050 280)", + "oklch(0.950 0.0375 280)" + ] + }, + "muted-light": { + "role": "neutral", + "displayName": "Muted Light", + "canonical": "oklch(0.965 0.004 270)", + "tonalRamp": [ + "oklch(0.150 0.0030 270)", + "oklch(0.260 0.0040 270)", + "oklch(0.380 0.0040 270)", + "oklch(0.500 0.0040 270)", + "oklch(0.620 0.0040 270)", + "oklch(0.740 0.0040 270)", + "oklch(0.860 0.0028 270)", + "oklch(0.950 0.0010 270)" + ] + }, + "muted-dark": { + "role": "neutral", + "displayName": "Muted Dark", + "canonical": "oklch(0.245 0.008 270)", + "tonalRamp": [ + "oklch(0.150 0.0060 270)", + "oklch(0.260 0.0080 270)", + "oklch(0.380 0.0080 270)", + "oklch(0.500 0.0080 270)", + "oklch(0.620 0.0080 270)", + "oklch(0.740 0.0080 270)", + "oklch(0.860 0.0056 270)", + "oklch(0.950 0.0020 270)" + ] + }, + "danger-light": { + "role": "accent", + "displayName": "Danger Light", + "canonical": "oklch(0.54 0.2 27)", + "tonalRamp": [ + "oklch(0.150 0.1500 27)", + "oklch(0.260 0.2000 27)", + "oklch(0.380 0.2000 27)", + "oklch(0.500 0.2000 27)", + "oklch(0.620 0.2000 27)", + "oklch(0.740 0.2000 27)", + "oklch(0.860 0.1400 27)", + "oklch(0.950 0.0500 27)" + ] + }, + "danger-dark": { + "role": "accent", + "displayName": "Danger Dark", + "canonical": "oklch(0.72 0.17 25)", + "tonalRamp": [ + "oklch(0.150 0.1275 25)", + "oklch(0.260 0.1700 25)", + "oklch(0.380 0.1700 25)", + "oklch(0.500 0.1700 25)", + "oklch(0.620 0.1700 25)", + "oklch(0.740 0.1700 25)", + "oklch(0.860 0.1190 25)", + "oklch(0.950 0.0425 25)" + ] + } + }, + "shadows": [ + { + "name": "elevation-xs", + "value": "var(--elevation-xs)", + "purpose": "Existing small surface elevation; resolves to no shadow in dark mode." + } + ], + "motion": [ + { + "name": "ease-out", + "value": "cubic-bezier(0.23, 1, 0.32, 1)", + "purpose": "Existing shared easing." + } + ], + "breakpoints": [ + { + "name": "md", + "value": "768px" + } + ] + }, + "components": [ + { + "name": "Default button", + "kind": "button", + "refersTo": "button-primary", + "description": "Default neutral primary action.", + "html": "", + "css": ".ds-button{font-family:\"Geist Variable\",system-ui,sans-serif;font-size:15px;line-height:24px;display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:0 12px;border:1px solid transparent;border-radius:8px;background:var(--primary);color:var(--primary-foreground);font-weight:500;transition:background-color 150ms cubic-bezier(.23,1,.32,1)}.ds-button:hover{background:color-mix(in oklch,var(--primary) 88%,transparent)}.ds-button:focus-visible{outline:2px solid var(--ring);outline-offset:2px}.ds-button:active{transform:scale(.97)}.ds-button:disabled{opacity:.5}" + }, + { + "name": "Outline button", + "kind": "button", + "description": "Secondary action using existing semantic tokens.", + "html": "", + "css": ".ds-button{font-family:\"Geist Variable\",system-ui,sans-serif;font-size:15px;line-height:24px;display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:0 12px;border:1px solid transparent;border-radius:8px;background:var(--primary);color:var(--primary-foreground);font-weight:500;transition:background-color 150ms cubic-bezier(.23,1,.32,1)}.ds-button:hover{background:color-mix(in oklch,var(--primary) 88%,transparent)}.ds-button:focus-visible{outline:2px solid var(--ring);outline-offset:2px}.ds-button:active{transform:scale(.97)}.ds-button:disabled{opacity:.5}.ds-outline{background:var(--background);color:var(--foreground);border-color:var(--border)}.ds-outline:hover{background:var(--muted)}" + }, + { + "name": "Ghost button", + "kind": "button", + "description": "Secondary action using existing semantic tokens.", + "html": "", + "css": ".ds-button{font-family:\"Geist Variable\",system-ui,sans-serif;font-size:15px;line-height:24px;display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:0 12px;border:1px solid transparent;border-radius:8px;background:var(--primary);color:var(--primary-foreground);font-weight:500;transition:background-color 150ms cubic-bezier(.23,1,.32,1)}.ds-button:hover{background:color-mix(in oklch,var(--primary) 88%,transparent)}.ds-button:focus-visible{outline:2px solid var(--ring);outline-offset:2px}.ds-button:active{transform:scale(.97)}.ds-button:disabled{opacity:.5}.ds-ghost{background:transparent;color:var(--foreground);border-color:transparent}.ds-ghost:hover{background:var(--muted)}" + }, + { + "name": "Input", + "kind": "input", + "description": "Single-line field.", + "html": "", + "css": ".ds-input{font-family:\"Geist Variable\",system-ui,sans-serif;font-size:15px;line-height:24px;min-height:36px;padding:4px 12px;border:1px solid var(--input);border-radius:8px;background:transparent;color:var(--foreground)}.ds-input::placeholder{color:var(--muted-foreground)}.ds-input:focus-visible{outline:2px solid var(--ring);outline-offset:2px}.ds-input:disabled{opacity:.5}" + }, + { + "name": "Navigation row", + "kind": "nav", + "description": "Workspace navigation row.", + "html": "", + "css": ".ds-nav{font-family:\"Geist Variable\",system-ui,sans-serif;font-size:15px;line-height:24px;display:flex;align-items:center;min-height:44px;padding:0 12px;border-radius:8px;color:var(--foreground);text-decoration:none}.ds-nav[aria-current=page],.ds-nav:hover,.ds-nav:active{background:var(--muted)}.ds-nav:focus-visible{outline:2px solid var(--ring)}" + }, + { + "name": "List group", + "kind": "card", + "refersTo": "card", + "description": "Grouped settings rows; avoid nested cards.", + "html": "
设备设置
", + "css": ".ds-card{font-family:\"Geist Variable\",system-ui,sans-serif;font-size:15px;line-height:24px;border:1px solid var(--border);border-radius:14px;padding:16px;background:var(--card);color:var(--foreground)}" + }, + { + "name": "Status chip", + "kind": "chip", + "description": "Labeled status; color supplements the words.", + "html": "等待确认", + "css": ".ds-chip{display:inline-flex;padding:2px 8px;border-radius:8px;background:var(--warning-soft);color:var(--warning);font-size:13px;line-height:20px}" + } + ], + "narrative": { + "northStar": "Quiet control room", + "overview": "**Creative North Star: \"Quiet control room\"**\n\nWorking description of the incumbent implementation, pending qualitative confirmation.\n\nThe web app is an Operate surface. It keeps attention on the current conversation or task while the sidebar provides stable orientation. Geist, cool neutral surfaces, and a restrained violet brand accent make state changes legible without turning the workspace into a dashboard of competing signals.\n\n**Key Characteristics:** calm, task-first, state-explicit, keyboard-friendly, responsive.", + "keyCharacteristics": [ + "calm", + "task-first", + "state-explicit", + "keyboard-friendly", + "responsive" + ], + "rules": [], + "dos": [ + "Do keep the primary task visible in the middle column.", + "Do make recovery, waiting, and offline states explicit in words.", + "Do reuse `packages/theme/theme.css` and the existing UI primitives.", + "Do preserve keyboard order and 44px mobile hit areas." + ], + "donts": [ + "Don't add dashboard-style metric cards to task surfaces.", + "Don't introduce gradients, decorative blur, or new color families without a product decision.", + "Don't use color alone for status.", + "Don't create one-off spacing or component variants when an existing primitive fits." + ] + } +} diff --git a/apps/app/DESIGN.md b/apps/app/DESIGN.md index cb4a1a28f..e82f5f6e5 100644 --- a/apps/app/DESIGN.md +++ b/apps/app/DESIGN.md @@ -6,6 +6,9 @@ colors: background-dark: "oklch(0.175 0.006 270)" foreground-light: "oklch(0.21 0.012 270)" foreground-dark: "oklch(0.955 0.004 270)" + primary-light: "oklch(0.24 0.016 270)" + primary-foreground-light: "oklch(0.985 0.002 270)" + primary-dark: "oklch(0.94 0.005 270)" brand-light: "oklch(0.53 0.2 280)" brand-dark: "oklch(0.72 0.15 280)" muted-light: "oklch(0.965 0.004 270)" @@ -23,14 +26,16 @@ typography: lineHeight: "20px" rounded: base: "0.625rem" + control: "0.5rem" xl: "0.875rem" spacing: unit: "4px" page: "16px" components: button-primary: - backgroundColor: "{colors.brand-light}" - rounded: "{rounded.base}" + backgroundColor: "{colors.primary-light}" + textColor: "{colors.primary-foreground-light}" + rounded: "{rounded.control}" card: backgroundColor: "{colors.background-light}" rounded: "{rounded.xl}" @@ -42,13 +47,15 @@ components: **Creative North Star: "Quiet control room"** +Working description of the incumbent implementation, pending qualitative confirmation. + The web app is an Operate surface. It keeps attention on the current conversation or task while the sidebar provides stable orientation. Geist, cool neutral surfaces, and a restrained violet brand accent make state changes legible without turning the workspace into a dashboard of competing signals. **Key Characteristics:** calm, task-first, state-explicit, keyboard-friendly, responsive. ## Colors -The shared source of truth is `packages/theme/theme.css`. Light mode uses white surfaces and cool near-black text; dark mode separates page, card, popover, and sidebar by tonal steps. Violet is reserved for focus, selection, brand identity, and primary action. Success, warning, danger, and info colors communicate state and must be paired with text or icon labels. +The shared source of truth is `packages/theme/theme.css`. Light mode uses white surfaces and cool near-black text; dark mode separates page, card, popover, and sidebar by tonal steps. Default buttons use the neutral `primary`/`primary-foreground` pair. Violet marks focus, selection, and brand identity; conversation send controls may use the current Bot tint. Success, warning, danger, and info colors communicate state and must be paired with text or icon labels. ## Typography @@ -85,11 +92,3 @@ The base radius is 10px, with 14px cards and 20px sheets where the component alr - Don't introduce gradients, decorative blur, or new color families without a product decision. - Don't use color alone for status. - Don't create one-off spacing or component variants when an existing primitive fits. - -## Current review notes - -- **Critique:** hierarchy is strongest in the workspace shell and conversation view; secondary settings and inbox rows should retain the same heading-to-metadata contrast. -- **Audit:** the source shows explicit focus, reduced-motion, safe-area, overflow, and touch-target handling. Rendered browser/device checks are still required for final acceptance. -- **Distill:** keep sidebar, header, current task/conversation, and one clear recovery action; remove decorative wrappers before adding new containers. -- **Layout:** preserve the single reading path: navigation → current context → task content → action. Use grouping and proximity before extra cards. -- **Optimize:** no source evidence justifies speculative memoization or virtualization. Measure route load, interaction latency, and long-list behavior before changing runtime code. diff --git a/apps/mobile/.impeccable/design.json b/apps/mobile/.impeccable/design.json index 1c4836a41..861f2adf4 100644 --- a/apps/mobile/.impeccable/design.json +++ b/apps/mobile/.impeccable/design.json @@ -1 +1,271 @@ -{"name":"Vibeface Mobile App","tokens":{"colors":{"brand":"oklch(0.53 0.2 280)","background":"oklch(1 0 0)","foreground":"oklch(0.21 0.012 270)"},"radius":{"base":"0.625rem","xl":"0.875rem"},"typography":{"body":"15px/24px Geist","meta":"13px/20px Geist"}},"narrative":{"northStar":"Quiet control room"}} +{ + "schemaVersion": 2, + "generatedAt": "2026-11-11T18:49:03.409658+00:00", + "title": "Design System: Vibeface Mobile App", + "extensions": { + "colorMeta": { + "background-light": { + "role": "neutral", + "displayName": "Background Light", + "canonical": "oklch(1 0 0)", + "tonalRamp": [ + "oklch(0.150 0.0000 0)", + "oklch(0.260 0.0000 0)", + "oklch(0.380 0.0000 0)", + "oklch(0.500 0.0000 0)", + "oklch(0.620 0.0000 0)", + "oklch(0.740 0.0000 0)", + "oklch(0.860 0.0000 0)", + "oklch(0.950 0.0000 0)" + ] + }, + "background-dark": { + "role": "neutral", + "displayName": "Background Dark", + "canonical": "oklch(0.175 0.006 270)", + "tonalRamp": [ + "oklch(0.150 0.0045 270)", + "oklch(0.260 0.0060 270)", + "oklch(0.380 0.0060 270)", + "oklch(0.500 0.0060 270)", + "oklch(0.620 0.0060 270)", + "oklch(0.740 0.0060 270)", + "oklch(0.860 0.0042 270)", + "oklch(0.950 0.0015 270)" + ] + }, + "foreground-light": { + "role": "neutral", + "displayName": "Foreground Light", + "canonical": "oklch(0.21 0.012 270)", + "tonalRamp": [ + "oklch(0.150 0.0090 270)", + "oklch(0.260 0.0120 270)", + "oklch(0.380 0.0120 270)", + "oklch(0.500 0.0120 270)", + "oklch(0.620 0.0120 270)", + "oklch(0.740 0.0120 270)", + "oklch(0.860 0.0084 270)", + "oklch(0.950 0.0030 270)" + ] + }, + "foreground-dark": { + "role": "neutral", + "displayName": "Foreground Dark", + "canonical": "oklch(0.955 0.004 270)", + "tonalRamp": [ + "oklch(0.150 0.0030 270)", + "oklch(0.260 0.0040 270)", + "oklch(0.380 0.0040 270)", + "oklch(0.500 0.0040 270)", + "oklch(0.620 0.0040 270)", + "oklch(0.740 0.0040 270)", + "oklch(0.860 0.0028 270)", + "oklch(0.950 0.0010 270)" + ] + }, + "primary-light": { + "role": "primary", + "displayName": "Primary Light", + "canonical": "oklch(0.24 0.016 270)", + "tonalRamp": [ + "oklch(0.150 0.0120 270)", + "oklch(0.260 0.0160 270)", + "oklch(0.380 0.0160 270)", + "oklch(0.500 0.0160 270)", + "oklch(0.620 0.0160 270)", + "oklch(0.740 0.0160 270)", + "oklch(0.860 0.0112 270)", + "oklch(0.950 0.0040 270)" + ] + }, + "primary-foreground-light": { + "role": "primary", + "displayName": "Primary Foreground Light", + "canonical": "oklch(0.985 0.002 270)", + "tonalRamp": [ + "oklch(0.150 0.0015 270)", + "oklch(0.260 0.0020 270)", + "oklch(0.380 0.0020 270)", + "oklch(0.500 0.0020 270)", + "oklch(0.620 0.0020 270)", + "oklch(0.740 0.0020 270)", + "oklch(0.860 0.0014 270)", + "oklch(0.950 0.0005 270)" + ] + }, + "primary-dark": { + "role": "primary", + "displayName": "Primary Dark", + "canonical": "oklch(0.94 0.005 270)", + "tonalRamp": [ + "oklch(0.150 0.0037 270)", + "oklch(0.260 0.0050 270)", + "oklch(0.380 0.0050 270)", + "oklch(0.500 0.0050 270)", + "oklch(0.620 0.0050 270)", + "oklch(0.740 0.0050 270)", + "oklch(0.860 0.0035 270)", + "oklch(0.950 0.0013 270)" + ] + }, + "brand-light": { + "role": "accent", + "displayName": "Brand Light", + "canonical": "oklch(0.53 0.2 280)", + "tonalRamp": [ + "oklch(0.150 0.1500 280)", + "oklch(0.260 0.2000 280)", + "oklch(0.380 0.2000 280)", + "oklch(0.500 0.2000 280)", + "oklch(0.620 0.2000 280)", + "oklch(0.740 0.2000 280)", + "oklch(0.860 0.1400 280)", + "oklch(0.950 0.0500 280)" + ] + }, + "brand-dark": { + "role": "accent", + "displayName": "Brand Dark", + "canonical": "oklch(0.72 0.15 280)", + "tonalRamp": [ + "oklch(0.150 0.1125 280)", + "oklch(0.260 0.1500 280)", + "oklch(0.380 0.1500 280)", + "oklch(0.500 0.1500 280)", + "oklch(0.620 0.1500 280)", + "oklch(0.740 0.1500 280)", + "oklch(0.860 0.1050 280)", + "oklch(0.950 0.0375 280)" + ] + }, + "muted-light": { + "role": "neutral", + "displayName": "Muted Light", + "canonical": "oklch(0.965 0.004 270)", + "tonalRamp": [ + "oklch(0.150 0.0030 270)", + "oklch(0.260 0.0040 270)", + "oklch(0.380 0.0040 270)", + "oklch(0.500 0.0040 270)", + "oklch(0.620 0.0040 270)", + "oklch(0.740 0.0040 270)", + "oklch(0.860 0.0028 270)", + "oklch(0.950 0.0010 270)" + ] + }, + "muted-dark": { + "role": "neutral", + "displayName": "Muted Dark", + "canonical": "oklch(0.245 0.008 270)", + "tonalRamp": [ + "oklch(0.150 0.0060 270)", + "oklch(0.260 0.0080 270)", + "oklch(0.380 0.0080 270)", + "oklch(0.500 0.0080 270)", + "oklch(0.620 0.0080 270)", + "oklch(0.740 0.0080 270)", + "oklch(0.860 0.0056 270)", + "oklch(0.950 0.0020 270)" + ] + } + }, + "shadows": [ + { + "name": "elevation-xs", + "value": "var(--elevation-xs)", + "purpose": "Existing small surface elevation; resolves to no shadow in dark mode." + } + ], + "motion": [ + { + "name": "ease-out", + "value": "cubic-bezier(0.23, 1, 0.32, 1)", + "purpose": "Existing shared easing." + } + ], + "breakpoints": [ + { + "name": "wide", + "value": "768px" + } + ] + }, + "components": [ + { + "name": "Default button", + "kind": "button", + "refersTo": "button-primary", + "description": "Neutral primary action; CSS translation of the native primitive.", + "html": "", + "css": ".ds-button{font-family:\"Geist\",system-ui,sans-serif;font-size:16px;line-height:24px;display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 12px;border:1px solid transparent;border-radius:8px;background:var(--primary);color:var(--primary-foreground);font-weight:500;transition:background-color 150ms cubic-bezier(.23,1,.32,1)}.ds-button:hover{background:color-mix(in oklch,var(--primary) 88%,transparent)}.ds-button:focus-visible{outline:2px solid var(--ring);outline-offset:2px}.ds-button:active{transform:scale(.97)}.ds-button:disabled{opacity:.5}" + }, + { + "name": "Outline button", + "kind": "button", + "description": "Secondary action using existing semantic tokens.", + "html": "", + "css": ".ds-button{font-family:\"Geist\",system-ui,sans-serif;font-size:16px;line-height:24px;display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 12px;border:1px solid transparent;border-radius:8px;background:var(--primary);color:var(--primary-foreground);font-weight:500;transition:background-color 150ms cubic-bezier(.23,1,.32,1)}.ds-button:hover{background:color-mix(in oklch,var(--primary) 88%,transparent)}.ds-button:focus-visible{outline:2px solid var(--ring);outline-offset:2px}.ds-button:active{transform:scale(.97)}.ds-button:disabled{opacity:.5}.ds-outline{background:var(--background);color:var(--foreground);border-color:var(--border)}.ds-outline:hover{background:var(--muted)}" + }, + { + "name": "Ghost button", + "kind": "button", + "description": "Secondary action using existing semantic tokens.", + "html": "", + "css": ".ds-button{font-family:\"Geist\",system-ui,sans-serif;font-size:16px;line-height:24px;display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 12px;border:1px solid transparent;border-radius:8px;background:var(--primary);color:var(--primary-foreground);font-weight:500;transition:background-color 150ms cubic-bezier(.23,1,.32,1)}.ds-button:hover{background:color-mix(in oklch,var(--primary) 88%,transparent)}.ds-button:focus-visible{outline:2px solid var(--ring);outline-offset:2px}.ds-button:active{transform:scale(.97)}.ds-button:disabled{opacity:.5}.ds-ghost{background:transparent;color:var(--foreground);border-color:transparent}.ds-ghost:hover{background:var(--muted)}" + }, + { + "name": "Input", + "kind": "input", + "description": "Editable field; native TextInput translated for the design panel.", + "html": "", + "css": ".ds-input{font-family:\"Geist\",system-ui,sans-serif;font-size:16px;line-height:24px;min-height:44px;padding:4px 12px;border:1px solid var(--input);border-radius:8px;background:transparent;color:var(--foreground)}.ds-input::placeholder{color:var(--muted-foreground)}.ds-input:focus-visible{outline:2px solid var(--ring);outline-offset:2px}.ds-input:disabled{opacity:.5}" + }, + { + "name": "Navigation row", + "kind": "nav", + "description": "Native list-row translation.", + "html": "", + "css": ".ds-nav{font-family:\"Geist\",system-ui,sans-serif;font-size:16px;line-height:24px;display:flex;align-items:center;min-height:44px;padding:0 12px;border-radius:8px;color:var(--foreground);text-decoration:none}.ds-nav[aria-current=page],.ds-nav:hover,.ds-nav:active{background:var(--muted)}.ds-nav:focus-visible{outline:2px solid var(--ring)}" + }, + { + "name": "List group", + "kind": "card", + "refersTo": "card", + "description": "Grouped settings rows; avoid nested cards.", + "html": "
设备设置
", + "css": ".ds-card{font-family:\"Geist\",system-ui,sans-serif;font-size:16px;line-height:24px;border:1px solid var(--border);border-radius:14px;padding:16px;background:var(--card);color:var(--foreground)}" + }, + { + "name": "Status chip", + "kind": "chip", + "description": "Labeled status; color supplements the words.", + "html": "等待确认", + "css": ".ds-chip{display:inline-flex;padding:2px 8px;border-radius:8px;background:var(--warning-soft);color:var(--warning);font-size:13px;line-height:20px}" + } + ], + "narrative": { + "northStar": "Quiet control room", + "overview": "**Creative North Star: \"Quiet control room\"**\n\nWorking description of the incumbent implementation, pending qualitative confirmation.\n\nThe mobile app is an Operate surface designed around one-handed progress: choose a Bot, read the current work, and act without losing context. Shared cool neutrals and violet brand accents keep the native shell calm; platform materials appear only where the OS supports them and are disabled when reduced transparency is enabled.\n\n**Key Characteristics:** native, calm, task-first, accessible, interruption-aware.", + "keyCharacteristics": [ + "native", + "calm", + "task-first", + "accessible", + "interruption-aware" + ], + "rules": [], + "dos": [ + "Do honor safe areas, dynamic type constraints, reduced motion, and reduced transparency.", + "Do keep destructive or uncertain operations explicit and recoverable.", + "Do use the shared semantic theme instead of literal per-screen colors.", + "Do keep touch targets at least 44px even when the icon is smaller." + ], + "donts": [ + "Don't replace native navigation or sheets with web-style scaffolding.", + "Don't use blur, gradients, or animation as decoration.", + "Don't rely on color alone for connection, delivery, or recovery state.", + "Don't add a second mobile design language beside the existing UI primitives." + ] + } +} diff --git a/apps/mobile/DESIGN.md b/apps/mobile/DESIGN.md index 1a2bcca16..26fb41206 100644 --- a/apps/mobile/DESIGN.md +++ b/apps/mobile/DESIGN.md @@ -6,6 +6,9 @@ colors: background-dark: "oklch(0.175 0.006 270)" foreground-light: "oklch(0.21 0.012 270)" foreground-dark: "oklch(0.955 0.004 270)" + primary-light: "oklch(0.24 0.016 270)" + primary-foreground-light: "oklch(0.985 0.002 270)" + primary-dark: "oklch(0.94 0.005 270)" brand-light: "oklch(0.53 0.2 280)" brand-dark: "oklch(0.72 0.15 280)" muted-light: "oklch(0.965 0.004 270)" @@ -13,22 +16,24 @@ colors: typography: body: fontFamily: "Geist" - fontSize: "15px" + fontSize: "16px" lineHeight: "24px" meta: fontFamily: "Geist" fontSize: "13px" - lineHeight: "20px" + lineHeight: "18px" rounded: base: "0.625rem" + control: "0.5rem" xl: "0.875rem" spacing: unit: "4px" screen: "16px" components: button-primary: - backgroundColor: "{colors.brand-light}" - rounded: "{rounded.base}" + backgroundColor: "{colors.primary-light}" + textColor: "{colors.primary-foreground-light}" + rounded: "{rounded.control}" card: backgroundColor: "{colors.background-light}" rounded: "{rounded.xl}" @@ -40,17 +45,19 @@ components: **Creative North Star: "Quiet control room"** +Working description of the incumbent implementation, pending qualitative confirmation. + The mobile app is an Operate surface designed around one-handed progress: choose a Bot, read the current work, and act without losing context. Shared cool neutrals and violet brand accents keep the native shell calm; platform materials appear only where the OS supports them and are disabled when reduced transparency is enabled. **Key Characteristics:** native, calm, task-first, accessible, interruption-aware. ## Colors -Mobile consumes the same semantic tokens from `packages/theme/theme.css` through Uniwind. Violet marks brand and primary action. Muted surfaces group content; success, warning, danger, and info states remain text-and-icon backed. +Mobile consumes the same semantic tokens from `packages/theme/theme.css` through Uniwind. Default buttons use the neutral `primary`/`primary-foreground` pair. Violet marks brand and focus; the chat send control may use the current Bot tint. Muted surfaces group content; success, warning, danger, and info states remain text-and-icon backed. ## Typography -Geist is used for UI text and Geist Mono for code, IDs, and logs. The existing 15/24 body and 13/20 metadata scale favors readable mobile density. Keep headings short enough to wrap without hiding the action that follows. +Geist is used for UI text and Geist Mono for code, IDs, and logs. The existing 16/24 body and 13/18 metadata scale favors readable mobile density. Keep headings short enough to wrap without hiding the action that follows. ## Layout @@ -82,11 +89,3 @@ Rounded 12–14px cards and 24–26px chat materials establish the current langu - Don't use blur, gradients, or animation as decoration. - Don't rely on color alone for connection, delivery, or recovery state. - Don't add a second mobile design language beside the existing UI primitives. - -## Current review notes - -- **Critique:** chat and workspace flows have the clearest hierarchy; secondary device/recovery screens should preserve the same action-first structure. -- **Audit:** source includes accessibility labels, selected states, safe-area handling, reduced motion/transparency behavior, and keyboard-aware layouts. Real simulator/device rendering remains required for acceptance. -- **Distill:** retain native navigation, current conversation, composer, and one primary action; avoid nested containers that repeat the same surface treatment. -- **Layout:** preserve the vertical path: title/context → content → primary action/composer. Keep sheets bounded and scrollable for long targets or queues. -- **Optimize:** no measured bottleneck is present in source alone. Profile message lists, markdown rendering, and keyboard transitions before adding memoization or virtualization. From 4c94abd6f38b09efbd7fe9c44847597d29ad7ee4 Mon Sep 17 00:00:00 2001 From: harryisfish Date: Thu, 12 Nov 2026 03:11:57 +0800 Subject: [PATCH 05/15] refactor: simplify workspace controls and home hierarchy keep the existing visual system, expose sending modes, and stop hidden sidebar face animations. refresh generated router type registration. --- apps/app/.impeccable/design.json | 23 +++++++++++--- apps/app/DESIGN.md | 20 ++++++++++-- .../src/features/chat/conversation-screen.tsx | 5 +-- .../features/workspace/conversation-list.tsx | 22 +++++++------ .../features/workspace/workspace-shell.tsx | 6 ++-- apps/app/src/routeTree.gen.ts | 9 ++++++ apps/mobile/.impeccable/design.json | 31 ++++++++++++++----- apps/mobile/DESIGN.md | 1 + apps/mobile/app/b/[botId].tsx | 4 +-- apps/mobile/src/features/home/list.tsx | 6 ++-- 10 files changed, 94 insertions(+), 33 deletions(-) diff --git a/apps/app/.impeccable/design.json b/apps/app/.impeccable/design.json index 790f85be6..b9eb70d3c 100644 --- a/apps/app/.impeccable/design.json +++ b/apps/app/.impeccable/design.json @@ -1,6 +1,6 @@ { "schemaVersion": 2, - "generatedAt": "2026-11-11T18:49:03.408397+00:00", + "generatedAt": "2026-11-11T19:05:18.003160+00:00", "title": "Design System: Vibeface Web App", "extensions": { "colorMeta": { @@ -198,6 +198,21 @@ "oklch(0.860 0.1190 25)", "oklch(0.950 0.0425 25)" ] + }, + "primary-foreground-dark": { + "role": "neutral", + "displayName": "Primary Foreground Dark", + "canonical": "oklch(0.2 0.01 270)", + "tonalRamp": [ + "oklch(0.15 0.01 270)", + "oklch(0.26 0.01 270)", + "oklch(0.38 0.01 270)", + "oklch(0.5 0.01 270)", + "oklch(0.62 0.01 270)", + "oklch(0.74 0.01 270)", + "oklch(0.86 0.01 270)", + "oklch(0.95 0.01 270)" + ] } }, "shadows": [ @@ -289,11 +304,11 @@ "Do keep the primary task visible in the middle column.", "Do make recovery, waiting, and offline states explicit in words.", "Do reuse `packages/theme/theme.css` and the existing UI primitives.", - "Do preserve keyboard order and 44px mobile hit areas." + "Do preserve keyboard order and 44px mobile hit areas.", + "Do keep task metrics contextual to the task overview; the existing 28px metric masthead is not a conversation pattern.", + "Do retain the existing Bot identity halo and task overview gradient as incumbent patterns; additions require a surface-specific reason." ], "donts": [ - "Don't add dashboard-style metric cards to task surfaces.", - "Don't introduce gradients, decorative blur, or new color families without a product decision.", "Don't use color alone for status.", "Don't create one-off spacing or component variants when an existing primitive fits." ] diff --git a/apps/app/DESIGN.md b/apps/app/DESIGN.md index e82f5f6e5..c2b40a355 100644 --- a/apps/app/DESIGN.md +++ b/apps/app/DESIGN.md @@ -9,6 +9,7 @@ colors: primary-light: "oklch(0.24 0.016 270)" primary-foreground-light: "oklch(0.985 0.002 270)" primary-dark: "oklch(0.94 0.005 270)" + primary-foreground-dark: "oklch(0.2 0.01 270)" brand-light: "oklch(0.53 0.2 280)" brand-dark: "oklch(0.72 0.15 280)" muted-light: "oklch(0.965 0.004 270)" @@ -16,6 +17,17 @@ colors: danger-light: "oklch(0.54 0.2 27)" danger-dark: "oklch(0.72 0.17 25)" typography: + title: + fontSize: "20px" + fontWeight: 600 + lineHeight: "28px" + heading: + fontSize: "16px" + lineHeight: "24px" + task-metric: + fontSize: "28px" + badge: + fontSize: "11px" body: fontFamily: "Geist Variable, -apple-system, BlinkMacSystemFont, system-ui, sans-serif" fontSize: "15px" @@ -27,6 +39,7 @@ typography: rounded: base: "0.625rem" control: "0.5rem" + inline-code: "4px" xl: "0.875rem" spacing: unit: "4px" @@ -71,7 +84,7 @@ Depth is tonal first. Light mode uses subtle `elevation-xs`/`elevation-sm` on in ## Shapes -The base radius is 10px, with 14px cards and 20px sheets where the component already establishes that language. Pills are reserved for compact status controls. Focus is an inset or 2px ring derived from `--ring`. +The base radius is 10px, with 14px cards and 20px sheets where the component already establishes that language. Pills appear on compact status controls and the existing conversation starter suggestions. Focus is an inset or 2px ring derived from `--ring`. ## Components @@ -80,6 +93,7 @@ The base radius is 10px, with 14px cards and 20px sheets where the component alr - **Cards and list groups:** `bg-card`, border, and small elevation; list groups use dividers rather than nested cards. - **Buttons and fields:** existing UI primitives provide variants, focus treatment, and mobile sizing. - **EmptyState:** icon, concise heading, optional explanation, and one recovery action. +- **Task overview:** the existing masthead uses three metrics, a gradient, and soft blur. Review its populated and empty states before changing or extending it. - **BotFace and status marks:** identity and state are reinforced by text or icons; color is never the only signal. ## Do's and Don'ts @@ -88,7 +102,7 @@ The base radius is 10px, with 14px cards and 20px sheets where the component alr - Do make recovery, waiting, and offline states explicit in words. - Do reuse `packages/theme/theme.css` and the existing UI primitives. - Do preserve keyboard order and 44px mobile hit areas. -- Don't add dashboard-style metric cards to task surfaces. -- Don't introduce gradients, decorative blur, or new color families without a product decision. +- Do keep task metrics contextual to the task overview; the existing 28px metric masthead is not a conversation pattern. +- Do retain the existing Bot identity halo and task overview gradient as incumbent patterns; additions require a surface-specific reason. - Don't use color alone for status. - Don't create one-off spacing or component variants when an existing primitive fits. diff --git a/apps/app/src/features/chat/conversation-screen.tsx b/apps/app/src/features/chat/conversation-screen.tsx index dc00d8777..7ae2bc006 100644 --- a/apps/app/src/features/chat/conversation-screen.tsx +++ b/apps/app/src/features/chat/conversation-screen.tsx @@ -449,14 +449,15 @@ const intents = [ { value: 'defer', label: '稍后处理', icon: Clock }, ] as const -/** How the next message goes, folded into one icon inside the box; the icon turns to the choice while it is not a plain send. */ +/** Keep the current sending mode visible beside its menu. */ function IntentMenu({ intent, busy, onChange }: { intent: InputIntent; busy: boolean; onChange: (intent: InputIntent) => void }) { const current = intents.find((item) => item.value === intent) ?? intents[0] const label = (item: (typeof intents)[number]) => item.value === 'continue' && busy ? '补充当前工作' : item.label return - diff --git a/apps/app/src/features/workspace/conversation-list.tsx b/apps/app/src/features/workspace/conversation-list.tsx index f8c661050..f46fce0ef 100644 --- a/apps/app/src/features/workspace/conversation-list.tsx +++ b/apps/app/src/features/workspace/conversation-list.tsx @@ -1,5 +1,5 @@ import { Link } from "@tanstack/react-router" -import { Bot, MessagesSquare, Plus, WifiOff, type LucideIcon } from "lucide-react" +import { Bot, MessagesSquare, Plus, WifiOff } from "lucide-react" import type { ReactNode } from "react" import { CountBadge, EmptyState, PrimaryMark, Skeleton } from "@/components/app/kit" import { BotFace, botMood } from "@/components/app/bot-face" @@ -11,6 +11,7 @@ import { byRecent, listTime } from "@vibeface/client/workspace/home.ts" import { awaitsAnswer } from "@vibeface/client/workspace/questions.ts" import { unreadCounts } from "@vibeface/client/chat/timeline.ts" import { ConnectionCapsule, MoodTag, useCreateBot } from "./workspace-shell" +import { cn } from "@/lib/utils" /** The phone's home: channels, then every bot by its newest message; 任务 and 待处理 are tabs. */ export function ConversationList() { @@ -26,7 +27,7 @@ export function ConversationList() { const last = bot.last_message, mood = botMood(bot, workspace) const preview = notes.at(-1)?.text.trim() || (last ? `${last.role === "user" ? "你:" : ""}${last.text}` : "还没有消息") return
  • - } unread={unread[bot.conversation_id] ?? 0} time={last ? listTime(last.created_at_ms, now) : undefined} preview={preview} + } unread={unread[bot.conversation_id] ?? 0} time={last ? listTime(last.created_at_ms, now) : undefined} preview={preview} name={bot.name} mark={<>{workspace.primary === bot.conversation_id ? : null}} />
  • })} @@ -34,7 +35,10 @@ export function ConversationList() { else if (!workspace.synced) list = else list =