Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
docs(design): 圆角三档写死——按钮一律胶囊、4px 不入档 (#3619)
Kirozeng184a80a4eb8c
diff --git a/docs/design-rules/DESIGN.md b/docs/design-rules/DESIGN.mdindex de92c71386..8765392ada 100644--- a/docs/design-rules/DESIGN.md+++ b/docs/design-rules/DESIGN.md@@ -18,7 +18,7 @@ What makes this system distinctive is the combination of a single geometric sans- Inter as the single sans family, carrying both display headlines and body text- Tight border-radius system: 8px (inner controls) / 12px (containers) / 9999px (pill) — three values, nothing else- Zero shadows in the base language — depth comes from background color shifts and 1px borders (narrow token-gated exceptions live in §10)-- Pill-shaped geometry on all interactive elements (buttons, tabs, inputs, tags)+- Pill-shaped geometry on all interactive elements (buttons, tabs, single-line inputs, tags) — the only exemption is registered bare text buttons (§5); textareas use the 8px inner-control radius (§5)- No mascots or decorative artwork in the working UI — brand imagery appears only on sanctioned brand surfaces (see §15.7 / §16)- Extreme content restraint — each surface presents one clear idea@@ -230,7 +230,7 @@ input/textplaceholder --text-placeholder #c4c4c4 / #525252```-- **Multi-line inputs (textarea) cannot wear the pill** (tall frames deform it) — use the 8px inner-control radius instead (§5 three-tier scale).+- **Multi-line inputs (textarea) take the 8px inner-control radius — never the pill** (tall frames deform it), whether nested in a container or standing alone in a form (§5 three-tier scale; single rule, no nesting condition).- Placeholders must **read as clearly empty** — Silver (`#a3a3a3`) is too prominent against either Card surface (≈5:1 Dark / ≈2.6:1 Light) and reads as real input; forbidden. **Every input surface's placeholder (chat / ask / settings / plan-action-fb) resolves to `--text-placeholder`** (2026-06 G3, archived in `design-decision-log.md`); non-default themes express their own placeholder color by overriding `text-placeholder`.### Select & Dropdown@@ -251,7 +251,7 @@ Reference implementation: `apps/desktop/src/renderer/components/ui/confirm-dialo- **Buttons**: pill (9999px); primary = solid CTA (`--confirm-btn-primary-*`), secondary/cancel = outlined (`--confirm-btn-secondary-*`, transparent fill + Board border); footer `justify-end`.- **Focus on open**: lands on the dialog's **primary input or primary button**, never defaults to Cancel (see §14.2 + ConfirmDialog's `autoFocusConfirm` / `onOpenAutoFocus`).- **Closing affordance** (made explicit 2026-07-30, scope clarified 2026-07-31): **dismissible** dialogs (wizards, catalogs, forms — anything a user may abandon freely) close via the footer Cancel button, Esc, and a scrim click, and carry **no top-right × close icon** — a × coexisting with Cancel is a spec violation, not a convenience. Confirm-tier dialogs built on AlertDialog (ConfirmDialog) intentionally do **not** close on scrim click (a deliberate mis-tap guard) — that behavior stays. Known legacy debt: CustomProviderDialog still ships a top-right × predating this rule — migrate it the next time that dialog is touched; do not copy the pattern into new dialogs.-- **Multi-step dialogs / wizards** (registered 2026-07-30, first consumer: Add-Provider wizard): the step indicator lives in the header row (round numbered chips — current step solid `--accent-cta-bg` with `--surface-on-card` text, completed steps ✓ on `--surface-chip`, upcoming outlined `--border-default`). Footer: **back navigation ("← 上一步") is a left-aligned text button** (`--text-secondary`, 13px/500) — navigation is not a commit action and must not sit inside the right-aligned pill group; commit actions (取消 / 下一步 / 完成) remain right-aligned pills per the button rule above. Catalog/list steps put the scrollable region between **two full-width 1px `--border-default` hairlines**, with permanent entries (e.g. 自定义端点) pinned below the scroll region, always visible. Width matches the custom-provider form dialog (600px, `min(600px, 100vw-32px)`) so the two provider dialogs read as one family; height is capped at `min(640px, 85vh)` — on large displays a catalog dialog must not stretch toward full-screen height (2026-07-30 ruling).+- **Multi-step dialogs / wizards** (registered 2026-07-30, first consumer: Add-Provider wizard): the step indicator lives in the header row (round numbered chips — current step solid `--accent-cta-bg` with `--surface-on-card` text, completed steps ✓ on `--surface-chip`, upcoming outlined `--border-default`). Footer: **back navigation ("← 上一步") is a left-aligned bare text button** (`--text-secondary`, 13px/500, no background — the §5 bare-text-button exemption, no radius) — navigation is not a commit action and must not sit inside the right-aligned pill group; commit actions (取消 / 下一步 / 完成) remain right-aligned pills per the button rule above. Catalog/list steps put the scrollable region between **two full-width 1px `--border-default` hairlines**, with permanent entries (e.g. 自定义端点) pinned below the scroll region, always visible. Width matches the custom-provider form dialog (600px, `min(600px, 100vw-32px)`) so the two provider dialogs read as one family; height is capped at `min(640px, 85vh)` — on large displays a catalog dialog must not stretch toward full-screen height (2026-07-30 ruling).### Tabs@@ -267,7 +267,7 @@ Reference implementation: `apps/desktop/src/renderer/components/ui/confirm-dialo- Base unit: 8px- Scale: 4px, 6px, 8px, 10px, 12px, 14px, 16px, 20px, 24px, 32px, 40px, 48px-- Button padding: 10px 24px (consistent across all buttons)+- Button padding: 10px 24px (consistent across all buttons; bare text buttons follow their component entry, not this padding)- Container padding: dialogs 16px (`p-4`, see §4 Dialog & Modal); dropdown panels 6–8px (see §4 Select & Dropdown)### Layout Structure (App)@@ -284,13 +284,13 @@ Reference implementation: `apps/desktop/src/renderer/components/ui/confirm-dialo### Border Radius Scale-Three tiers — **these three only**:+Three tiers — **these three only** (wording hardened 2026-08-29, designer ruling — see `design-decision-log.md` 08-29). **Tier assignment is a single decision tree in this §5 section; §4 component entries, the §7 Do/Don't lists and the §9 iteration guide restate it for convenience — when wording drifts, this section wins:**-- **Inner control (8px)**: the narrow third tier, **only** for small interactive pieces that cannot wear the pill: multi-line inputs (textarea), selected/hover row highlights in dropdowns/menus, small in-block cells. Implemented as Tailwind `rounded-lg` (8px).-- **Container (12px)**: box radius — code blocks, cards, panels, dialogs. Implemented as Tailwind `rounded-xl` (12px).-- **Pill (9999px)**: every interactive element that can wear the pill — buttons, tabs, single-line inputs, tags, badges.+- **Pill (9999px)**: **every button is a pill — the only exemption is registered bare text buttons.** Anything that commits a decision or triggers an action wears the pill: buttons (permission approve/deny included), tabs, single-line inputs, tags, badges — including buttons with transparent or outlined fills (dialog secondary/cancel are pills with a transparent fill; a control's fill style never changes its tier). The exemption is exactly **bare text buttons with no background of their own** (wizard back-navigation "← 上一步", the §16.3 login text-button category): they have no shape to round — text, not a button-shaped control — so they carry no radius at all. Register any new bare-text-button usage in the component entry that introduces it.+- **Container (12px)**: the box that holds content — code blocks, cards, panels, dialogs. Implemented as Tailwind `rounded-xl` (12px).+- **Inner control (8px)**: multi-line inputs (textarea) — **always 8px, whether the textarea sits inside a visible container or is the outermost control of a form area** — plus selected/hover row highlights in dropdowns/menus and small in-block cells nested inside a container. Implemented as Tailwind `rounded-lg` (8px).-_No 4px / 6px / 10px, and no arbitrary radii. Most elements still pick between the 12px container and the pill; 8px is a narrow exception for controls that don't fit the pill. Mind nesting: an 8px row highlight inside a 12px panel must stay smaller than its container to nest cleanly (hence 8, not 12) — a pill there becomes a lozenge, 12px looks bloated._+_No 4px / 6px / 10px, and no arbitrary radii. **4px is not a tier**: existing `rounded-[4px]` usages (30 production occurrences on 2026-08-29 — `git grep -o "rounded-\[4px\]" -- apps/desktop/src/renderer | wc -l`) are registered debt to be migrated by the design-system roadmap, and **new code must not introduce it** — in ANY of its equivalent spellings: bare `rounded` (Tailwind DEFAULT 0.25rem; 58 string-literal occurrences) and `rounded-sm` (`--radius`−4px; 11 occurrences — `--radius` is runtime-injected by `theme-service` from `colors.ts` `registerColor('radius', '0.5rem')`) both resolve to 4px too, and are equally forbidden (counts and commands live in the decision log's 08-29 entry; the `--radius` math assumes the theme does not override `colors.radius` — a local-theme override shifts the derived values, see the decision log's 08-29 entry §(7)). Do not add tiers, and **"it looks small" is never a reason to move an element down a tier** — an element's tier follows what it IS (button / box / textarea — always 8px / nested non-button), not its size or nesting. Mind nesting: an 8px row highlight inside a 12px panel must stay smaller than its container to nest cleanly (hence 8, not 12) — a pill there becomes a lozenge, 12px looks bloated._> **Narrow exception — status micro-cells (2px)** (registered 2026-07-28): non-interactive status squares of 8×8px or smaller keep a 2px radius — the workflow agent status strip's cells (background-tasks panel detail + workflow chat card) and the equivalent per-category square in SystemCard. At that size any tier radius rounds the square into a dot and destroys the "block strip" read that lets a large agent fleet be scanned at a glance. Scope is exactly this: **non-interactive, ≤8px, status-only**. Do NOT generalize to buttons, tags, rows, badges or containers — those still pick a tier.@@ -309,15 +309,15 @@ _No 4px / 6px / 10px, and no arbitrary radii. Most elements still pick between t### Do- Use Surface (`#f8f8f6` Light / `#1f1f1e` Dark) as the page background — every page starts here-- Use pill-shaped (9999px) radius on all interactive elements — buttons, tabs, inputs, tags+- Use pill-shaped (9999px) radius on all interactive elements — buttons, tabs, single-line inputs, tags (registered bare text buttons are the only exemption — §5)- Use 12px radius on all non-interactive containers — code blocks, cards, panels-- Use 8px radius only for inner controls that can't be a pill — multi-line inputs, dropdown/menu rows (see §5)+- Use 8px radius for multi-line inputs (textarea, always) and non-button inner controls — dropdown/menu row highlights, in-block cells (see §5)- Keep the palette strictly grayscale — chromatic color only via the sanctioned semantic set in §2, always through tokens- Use Inter at weight 400 / 500 for display headings (per the §3 Hierarchy rows) — hierarchy comes from size + weight, not typeface switching- Maintain zero shadows — depth comes from borders and background shifts only- Keep content density low — each section should present one clear idea- Use monospace for terminal commands and code — it's primary content, not decoration-- Keep all buttons at 10px 24px padding with pill shape — consistency is absolute+- Keep all buttons at 10px 24px padding with pill shape — consistency is absolute (registered bare text buttons are the §5 exemption: no background, no radius, no pill padding)### Don't@@ -372,7 +372,7 @@ Cindy Mobile (React Native) has its own device-class rules (phone / pad portrait1. Focus on ONE component at a time2. Keep all values grayscale — "Stone (#737373)" not "use a light color"-3. Always specify radius from the three tiers — pill (9999px) / container (12px) / inner control (8px, only for textareas & dropdown rows). Nothing else.+3. Always specify radius from the three tiers — pill (9999px) / container (12px) / inner control (8px — textareas always, dropdown rows & non-button inner cells). Nothing else.4. Shadows are always zero — never add them5. Weight is 400/500 for everyday chrome, 600 for rationed emphasis — 700 never appears in new UI (registered exemption domains in §3 only)6. If something feels too decorated, remove it — less is always morediff --git a/docs/design-rules/cindy-design-system.md b/docs/design-rules/cindy-design-system.mdindex 35db8f7460..09dae46a78 100644--- a/docs/design-rules/cindy-design-system.md+++ b/docs/design-rules/cindy-design-system.md@@ -19,7 +19,8 @@## 版本记录-- **2026-08-29(设计系统治理合同)**:新建 [`design-governance.md`](./design-governance.md),启动设计系统治理(九张主线 PR 的第一张,纯文档)。定案:四种真相边界(规则 = `DESIGN.md`、数值现阶段 = `colors.ts` / 目标 = `packages/design-tokens` DTCG、台账 = 未来的 `design-inventory.md`、视觉 = 真实运行截图);Token 工具单选 Terrazzo(锁 2.7.1,推迟到生成切换才安装)、不采用 Style Dictionary;可见 PR 两级证据合同(静态守卫测试 + 真实 Cindy Light/Dark 截图);PR 三类风险不混张;旧 Token ID 不删不改名、用户主题不改写磁盘两条兼容红线;PermissionPrompt 圆角混用(8px×4 / 4px×4 / 12px×1,2026-08-29 实测)登记为待裁决项,裁决未关闭前相关文件不进迁移 diff。存量门禁与文档逐项登记处置去向(含 `DESIGN.md §10` Tier-1 表与 `§16.1` 表「生成切换后由机器摘要替代、此前维持人工维护」)。本条目仅登记治理文件;`DESIGN.md` 正文零改动。+- **2026-08-29(圆角三档写死)**:`DESIGN.md §5` Border Radius Scale 措辞加硬(拍板人 = 用户):按钮一律胶囊(含权限允许/拒绝,删除「cannot wear the pill」主观逃生口)、8px 档判据改为「盒内非按钮」、4px 不入档(30 处生产存量登记为债、新代码禁止、机器拦截随设计系统棘轮 PR 落地)、「看起来小」不是改档理由、不加档。2px status micro-cells 窄豁免不变。**同轮补充裁决(随 #3619 review 落定)**:textarea 一律 8px(不设嵌套前提,§4/§7/§9 摘要句逐一对齐,§5 为唯一裁决源);已登记的裸文字按钮(向导「← 上一步」、§16.3 登录文字按钮)是胶囊**唯一豁免**、不带圆角,新增用法须在组件条目登记——透明填充 / 仅描边控件不属豁免(fill 样式从不改变档位)。裁决全文与未决余项(允许/拒绝主次、双端几何)见 [`design-decision-log.md`](./design-decision-log.md)「08-29」两条。+- **2026-08-29(设计系统治理合同)**:新建 [`design-governance.md`](./design-governance.md),启动设计系统治理(九张主线 PR 的第一张,纯文档)。定案:四种真相边界(规则 = `DESIGN.md`、数值现阶段 = `colors.ts` / 目标 = `packages/design-tokens` DTCG、台账 = 未来的 `design-inventory.md`、视觉 = 真实运行截图);Token 工具单选 Terrazzo(锁 2.7.1,推迟到生成切换才安装)、不采用 Style Dictionary;可见 PR 两级证据合同(静态守卫测试 + 真实 Cindy Light/Dark 截图);PR 三类风险不混张;旧 Token ID 不删不改名、用户主题不改写磁盘两条兼容红线;PermissionPrompt 圆角混用(8px×4 / 4px×4 / 12px×1,2026-08-29 实测,生成命令见 [`design-decision-log.md`](./design-decision-log.md)「08-29」条计数口径块)登记为待裁决项,裁决未关闭前相关文件不进迁移 diff。存量门禁与文档逐项登记处置去向(含 `DESIGN.md §10` Tier-1 表与 `§16.1` 表「生成切换后由机器摘要替代、此前维持人工维护」)。本条目仅登记治理文件;`DESIGN.md` 正文零改动。- **2026-08-24(手柄线稿交稿)**:新增 [`gamepad-silhouette-authoring.md`](./gamepad-silhouette-authoring.md),把设置页 Xbox 手柄图的画法收成同事交稿约定(同网格、长弧、键壳分家、热区与填充)。- **2026-08-06(资源用量进程类别色)**:按用户对资源用量面板“icon 改为彩色”的走查要求,`DESIGN.md §2 / §10` 登记仅限 14px 进程类型 glyph 的六色 Light / Dark 调色板;颜色只编码任务 Agent、控制面服务、主进程、Renderer、GPU、Utility 类别,不表达健康或运行状态,行背景、文字、指标与操作继续保持中性。对应 token 加入外部主题导入保护,防类别色随导入主题漂移;该例外不得扩散到其它表格或进程 UI。- **2026-08-03(排版立法:字重四档 + 桌面字号白名单,issue #1505 PR1)**:`DESIGN.md §3` 字重梯由「仅 400/500」修订为 400/500/600/700 四档(600 = 限量强调收编存量 72 处 semibold(生产代码口径);700 仅限豁免域;800 及中间值全禁;与手机端 `fontWeight` token 对齐),§3 Principles / §7 Don'ts / §9 Iteration Guide 三处「never bold」表述同步改写;§3 新增四个小节——「字重阶梯」(含 CJK 伪粗体注记:中文层级不得依赖 600 vs 700)、「桌面 UI 字号白名单」(UI 段 {10–16} + 标题段 {18,20,24,28},禁任意值 `text-[Npx]` 与小数;语义别名只收编 `xs/sm/base/lg`,源码侧禁止 `xl` 及以上,配置侧遗留项不在本轮删除范围;**四个权威来源的镜像关系已由 PR #1553 建立,另有 tailwind-merge 字号去重消费端单独校验**)、「排版豁免登记表」(登录品牌画布 / markdown `<strong>` / hljs 移植 / 外部页注入 / 手机 WebView 生成器 / 紧凑模式派生值)、「排版 non-goals」(line-height 混轨等本轮明确不治理)。走查数据、三项拍板与后续施工计划见 [`design-decision-log.md`](./design-decision-log.md)「2026-08-03」条与 issue #1505。diff --git a/docs/design-rules/design-decision-log.md b/docs/design-rules/design-decision-log.mdindex e5fb503f75..be77a52556 100644--- a/docs/design-rules/design-decision-log.md+++ b/docs/design-rules/design-decision-log.md@@ -12,6 +12,116 @@## 2026-08+- **08-29** **圆角三档写死:按钮一律胶囊、4px 不入档(拍板人 = 用户)**——+ 背景:设计系统改造调研发现 PermissionPrompt 混用 `rounded-[8px]`×4 /+ `rounded-[4px]`×4 / `rounded-[12px]`×1,与 §5 三档冲突;全仓走查+ `rounded-[4px]` 生产存量共 30 处(2026-08-29 快照,不止权限弹窗,是普遍债;+ 仅为字面量语法局部计数,裸 `rounded` / `rounded-sm` 等价写法见下方口径块+ 与补充裁决 (6))。+ 计数口径(`design-governance.md` §9 计数纪律,均为当日快照):++ ```bash+ # PermissionPrompt 内圆角分布(2026-08-29 快照:8px×4 / 4px×4 / 12px×1)+ git grep -o 'rounded-\[8px\]' -- apps/desktop/src/renderer/components/new-chat/PermissionPrompt.tsx | wc -l+ git grep -o 'rounded-\[4px\]' -- apps/desktop/src/renderer/components/new-chat/PermissionPrompt.tsx | wc -l+ git grep -o 'rounded-\[12px\]' -- apps/desktop/src/renderer/components/new-chat/PermissionPrompt.tsx | wc -l+ # 全仓 rounded-[4px] 存量(2026-08-29 快照:30;字面量语法,全 renderer 无 tests/vendor 命中)+ git grep -o "rounded-\[4px\]" -- apps/desktop/src/renderer | wc -l+ # 解析后等价 4px 的其它写法(2026-08-29 快照;生产代码 = pathspec 排除 tests/vendor)。+ # 数值依据:tailwind.config.ts 的 borderRadius.lg/md/sm 基于 var(--radius) 派生;+ # --radius 由 theme-service 运行时注入(colors.ts registerColor('radius', 0.5rem)+ # → serializeThemeCss 写入 :root,dark 主题经 resolveThemeValue 回退 light 默认),+ # 故 rounded-sm = calc(0.5rem − 4px) = 4px、rounded-md = calc(0.5rem − 2px) = 6px,+ # 裸 rounded = Tailwind DEFAULT 0.25rem = 4px。+ # ⚠ 上述求值以「主题未覆盖 colors.radius」为前提:resolveThemeValue 优先读+ # theme.colors[id],本地主题 JSON 手写 colors.radius(如 '1rem')会整体平移+ # rounded-sm/md 的 computed 值(sm 变 12px、md 变 14px)——外部主题导入的+ # 108-token allowlist 不含 radius,但本地主题无白名单过滤。按类名的档位分类+ # 只对内置 / 未覆盖 radius 的主题成立;「radius 是否冻结为不可覆盖不变量」+ # 登记为待裁决项(见下方补充裁决 (7)),裁决前 DS-7 棘轮按类名建基线、+ # 以默认主题 computed 值为准。+ # 裸 rounded 计数限定「字符串字面量内的独立 token」(PCRE 词边界 + 前瞻排除+ # rounded-* 变体;grep -v 排除 `${rounded}` 模板插值)——旧口径曾把注释与局部+ # 变量名(如 turnUsageTooltip.ts 的 const rounded)计入 80,属假阳性,已修正为 58。+ # DS-6 迁移与 DS-7 棘轮的基线按三语法合计(30+58+11)建立;此为静态扫描近似,+ # 棘轮落地时应以 AST / 编译产物扫描为准。+ git grep -oP "[\"'\`][^\"'\`]*\brounded\b(?![-a-zA-Z\[])[^\"'\`]*[\"'\`]" -- apps/desktop/src/renderer ':!*/__tests__/*' ':!*.test.*' ':!*/vendor/*' | grep -v '\${rounded' | wc -l # 裸 rounded:58+ git grep -oP "[\"'\`][^\"'\`]*\brounded-sm\b(?![-a-zA-Z\[])[^\"'\`]*[\"'\`]" -- apps/desktop/src/renderer ':!*/__tests__/*' ':!*.test.*' ':!*/vendor/*' | wc -l # rounded-sm:11+ # 同为非档位值的 rounded-md(6px,亦不入 §5 三档;供 DS-7 棘轮一并建基线)+ git grep -oP "[\"'\`][^\"'\`]*\brounded-md\b(?![-a-zA-Z\[])[^\"'\`]*[\"'\`]" -- apps/desktop/src/renderer ':!*/__tests__/*' ':!*.test.*' ':!*/vendor/*' | grep -v '\${rounded' | wc -l # rounded-md:196+ ```++ 裁决四条:(1) **三档不变、不加档**,把 §5 的软表述写死——会提交决定 / 触发动作+ 的按钮**一律胶囊**(权限允许/拒绝按钮包含在内),原「only for small interactive+ pieces that cannot wear the pill」的主观逃生口删除;(2) 8px 档的判据改为+ 「套在盒子里、自己不是按钮」(textarea、菜单行高亮、块内小格照旧合法);+ (3) **4px 不入档**:存量登记为债、随设计系统迁移逐步偿还,新代码禁止再写+ (机器拦截随棘轮 PR 落地,此前靠 review 按 §5 执行);(4) **「看起来小」不是+ 改档的理由**——元素按「是什么」(按钮 / 盒子 / 盒内非按钮)定档,不按尺寸。+ 2026-07-28 已登记的 status micro-cells 2px 窄豁免(非交互、≤8px、仅状态)+ 维持不变,不因本裁决扩大或收回。**尚未裁决、随 Permission 迁移再关**:允许 /+ 拒绝按钮的视觉主次、危险授权样式、Desktop 与 Mobile 权限弹窗几何是否一致。+ (→ `DESIGN.md §5` Border Radius Scale;治理合同+ [`design-governance.md`](./design-governance.md) §10 待裁决登记表「PermissionPrompt+ 圆角」行已随本裁决改为已关闭;迁移执行 = 设计系统路线图 DS-6 / 棘轮 = DS-7,+ 见 `design-governance.md` §12)+- **08-29(补充裁决,随 #3619 review 落定)** **圆角判据二则收口:textarea 单一+ 归档、裸文字按钮豁免(拍板人 = 用户)**——review 指出 §4/§5/§7/§9 四处对+ textarea 的判据互相冲突(「盒内非按钮」vs「无条件 8px」vs「所有交互元素胶囊」),+ 以及 §5「every button is a pill — no exceptions」与 §4 向导「← 上一步」裸文字+ 按钮互相矛盾。两条收口:(1) **textarea 一律 8px**——不设嵌套前提,嵌在 12px+ 容器内或作为表单最外层控件都是同一档(胶囊对高框体会变形,8px 是其唯一档位);+ §5 判据句同步改写,§4/§7/§9 摘要句逐一对齐,并声明 §5 为唯一裁决源、摘要句+ 漂移时以 §5 为准。(2) **无自身背景的裸文字按钮豁免胶囊**——「← 上一步」与+ §16.3 登录文字按钮这类只有文字、没有可圆角的填充底色的按钮不带任何圆角;+ 豁免随组件条目登记(§4 向导条目已写明),新增裸文字按钮用法须在引入它的+ 组件条目登记。`AddProviderWizard.tsx` 现行实现(无圆角文字按钮)与裁决一致,+ 无需迁移。(→ `DESIGN.md §5` / §4 Inputs & Forms / §4 Multi-step dialogs / §7 / §9)+ 追加两处(第二轮 review 指出同节残留):(3) §5 判据分类句由三分类+ 「button / box / nested non-button」扩为四分类「button / box / textarea(一律+ 8px)/ nested non-button」,独立 textarea 不再落在分类缝隙里;(4) §7「Keep all+ buttons at 10px 24px padding with pill shape」与 §5 Spacing「consistent across+ all buttons」两处绝对表述收窄为「filled buttons」,裸文字按钮不受 pill padding+ 约束、按其组件条目执行;§5 Pill 档首句同步由「every button」改「every filled+ button」。(同上条落点)+ 追加修正(第三轮 review 指出 (4) 的「filled」限定误伤透明控件):(5) **撤销+ 「filled」反向排除措辞**——透明填充 / 仅描边的交互控件(对话框 secondary/cancel+ 透明填充按钮、inactive tab、composer chip 静止态 borderless)都保留胶囊,「fill+ 样式从不改变档位」。豁免改回**直接正向表述**:唯一豁免 = 已登记的裸文字按钮,+ §1 / §5 Pill 档(首句恢复「every button」,豁免句同步改为「no shape to+ round」)/ §5 Spacing / §7 Do 共五处统一为「all (buttons|interactive+ elements) + registered bare text buttons are the only exemption」;(4) 中「filled+ buttons」字样随本轮撤销作废,裸文字按钮不受 pill padding 约束的实质不变。+ (同上条落点)+ 追加修正(第五轮 review 指出 4px 计数口径漏等价写法;第六轮 review 指出注入链+ 未交代、裸 rounded 计数混入非样式文本):(6) **「4px 不入档」的禁令覆盖所有解析后+ 等价于 4px 的写法**——本仓 `tailwind.config.ts` 只覆盖 `borderRadius.lg/md/sm`+ (基于 `var(--radius)` 派生),裸 `rounded`(Tailwind DEFAULT 0.25rem)与+ `rounded-sm`(8px−4px)同样解析为 4px,与 `rounded-[4px]` 同属禁止档位的等价+ 语法;`rounded-md`(8px−2px=6px)亦不入三档。**`--radius` 的数值依据**:该变量+ 不在任何静态 CSS 文件中,由 `theme-service.ts` 运行时注入——`colors.ts`+ `registerColor('radius', { light: '0.5rem' })` 经 `serializeThemeCss` 写入+ `:root`(dark 主题经 `resolveThemeValue` 回退 light 默认,值不变),故+ `rounded-sm`/`rounded-md` 的 `calc(var(--radius) ± Npx)` 在运行时有效求值。+ 主裁决「全仓 30 处」只是 `rounded-[4px]` 字面量语法的局部计数——生产代码中+ 裸 `rounded` 另有 58 处(字符串字面量内独立 token 口径;旧口径 80 曾混入注释与+ 局部变量名假阳性,如 `turnUsageTooltip.ts` 的 `const rounded`、+ `AppearanceSection.tsx` 注释行,已修正)、`rounded-sm` 11 处(计数命令见上方+ 口径块);DS-6 迁移与 DS-7 棘轮建基线时必须按三种 4px 等价语法合计(30+58+11)+ 建立,并把 `rounded-md` 的 196 处一并纳入非档位值清理范围,不得只按 30 建基线。+ 静态计数是近似口径,棘轮落地时应以 AST / 编译产物扫描复核。§5 行内数字句同步补+ 「in ANY of its equivalent spellings」限定并指向口径块。(同上条落点)+ 追加(第七轮 review 指出主题覆盖可平移派生值):(7) **`rounded-sm`/`rounded-md`+ 的档位分类以「主题未覆盖 `colors.radius`」为前提**——`resolveThemeValue` 优先读+ `theme.colors[id]`,本地主题 JSON 手写 `colors.radius`(如 `'1rem'`)会把+ `rounded-sm` 平移到 12px、`rounded-md` 到 14px(外部主题导入的 108-token+ allowlist 不含 radius,本地主题无白名单过滤)。口径块已补 ⚠ 前提说明;DS-7+ 棘轮按类名建基线、以默认主题 computed 值为准。**待裁决(随 DS-7 棘轮设计一并关)**:+ `radius` 是否冻结为不可覆盖的主题不变量(冻结则类名分类对全部主题成立;不冻结则+ 棘轮须按 computed value 分类或豁免覆盖主题)——冻结涉及 `local-themes-normalize`+ 加白名单与既有本地主题兼容(治理合同兼容红线:用户主题不改写磁盘),属代码改动,+ 不随本纯文档 PR 落地。(同上条落点)+- **08-16** **登录:唯一 SSO 不再经过 method-choice(拍板人 = 用户)**——用户已经从登录首页选了企业 SSO(组织标识探测),或邮箱 / 组织探测结果只剩一条 SSO、没有个人邮箱验证码替补时,再出「选择登录方式」是假选择(截图上只剩diff --git a/docs/design-rules/design-governance.md b/docs/design-rules/design-governance.mdindex 3dc785224d..06326aedfd 100644--- a/docs/design-rules/design-governance.md+++ b/docs/design-rules/design-governance.md@@ -182,8 +182,9 @@ ls apps/desktop/src/renderer/themes/builtin/*.ts | wc -l| 事项 | 现状 | 裁决人 | 规则 || --- | --- | --- | --- |-| PermissionPrompt 圆角 | **裁决已做出(2026-08-29),回写未合入**:三档不变、按钮一律胶囊、8px = 盒内非按钮、4px 不入档(存量为债、新代码禁止)、「看起来小」不是改档理由。回写 `DESIGN.md §5` 与 [`design-decision-log.md`](./design-decision-log.md) 归档由 PR [#3619](https://github.com/makecindy/cindy/pull/3619) 承载;**该 PR 合入前本行不算关闭**,`DESIGN.md` 现行文本仍以主干为准 | 设计师 | #3619 合入后本行改为已关闭;在此之前 DS-6 不得按「圆角已关」推进 |-| Permission 迁移余项 | 待裁决:允许/拒绝按钮的视觉主次、危险授权样式、Desktop 与 Mobile 权限弹窗几何是否一致 | 设计师 | 余项与上行 #3619 全部关闭前,Permission 相关文件不得进入任何迁移 PR 的 diff(DS-6 前置);结论同样回写 `DESIGN.md` 并归档 |+| PermissionPrompt 圆角 | **已关闭(2026-08-29 裁决,#3619 回写)**:三档不变、按钮一律胶囊(唯一豁免 = 已登记的裸文字按钮)、8px = textarea 一律 8px + 盒内非按钮、4px 不入档(含裸 `rounded` / `rounded-sm` 等价写法,**前提 = 主题未覆盖 `colors.radius`**;存量为债、新代码禁止)、「看起来小」不是改档理由。`DESIGN.md §5` 已加硬,全文归档于 [`design-decision-log.md`](./design-decision-log.md)「08-29」条 | 设计师 | 已按 `DESIGN.md §13` 机制回写并归档(与回写同一 PR 生效) |+| `radius` 主题覆盖 | 待裁决(随 DS-7 棘轮设计一并关):本地主题 JSON 可覆盖 `colors.radius`(`resolveThemeValue` 优先 `theme.colors[id]`),届时 `rounded-sm`/`rounded-md` 的 computed 值整体平移、不再等于 4px/6px。是否冻结 `radius` 为不可覆盖不变量(涉及 `local-themes-normalize` 白名单 + 既有本地主题兼容红线);裁决前 DS-7 按类名建基线、以默认主题 computed 值为准 | 设计师 | 未关闭前 DS-7 棘轮不得把覆盖了 `radius` 的本地主题报为违规;结论回写 `DESIGN.md` §5 与 decision-log |+| Permission 迁移余项 | 待裁决:允许/拒绝按钮的视觉主次、危险授权样式、Desktop 与 Mobile 权限弹窗几何是否一致 | 设计师 | 余项未关闭前,Permission 相关文件不得进入任何迁移 PR 的 diff(DS-6 前置);结论同样回写 `DESIGN.md` 并归档 |## 11. 存量门禁与文档处置表