Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
test(design): 排版纪律守卫与字号归一——规范正本与权威来源检查(#1505 PR4) (#1553)
Kirozenge69b31914c11
diff --git a/apps/desktop/src/renderer/__tests__/fontSettings.test.ts b/apps/desktop/src/renderer/__tests__/fontSettings.test.tsindex b1f3875ea7..5748e64538 100644--- a/apps/desktop/src/renderer/__tests__/fontSettings.test.ts+++ b/apps/desktop/src/renderer/__tests__/fontSettings.test.ts@@ -15,6 +15,20 @@ import {useFontSettings,} from '@/hooks/useFontSettings';+const UI_TEXT_TOKEN_SIZES = [10, 11, 12, 13, 14, 15, 16, 18, 20, 24, 28] as const;+const REMOVED_UI_TEXT_TOKEN_SIZES = [9, 17, 19, 21, 22, 23, 25, 26, 27] as const;+const SCALED_TAILWIND_TOKENS = {+ xs: 12,+ sm: 14,+ base: 16,+ lg: 18,+ xl: 20,+ '2xl': 24,+ '3xl': 30,+ '4xl': 36,+ '5xl': 48,+} as const;+function resetRootStyles() {const targets = [document.documentElement, document.body];for (const target of targets) {@@ -22,12 +36,10 @@ function resetRootStyles() {target.style.removeProperty('--app-font-code');target.style.removeProperty('--app-code-font-size');target.style.removeProperty('--app-ui-font-size');- for (const tokenSize of [- 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,- ]) {+ for (const tokenSize of [...UI_TEXT_TOKEN_SIZES, ...REMOVED_UI_TEXT_TOKEN_SIZES]) {target.style.removeProperty(`--text-${tokenSize}`);}- for (const token of ['xs', 'sm', 'base', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl']) {+ for (const token of Object.keys(SCALED_TAILWIND_TOKENS)) {target.style.removeProperty(`--text-${token}`);target.style.removeProperty(`--text-${token}-line-height`);}@@ -107,11 +119,16 @@ describe('font settings', () => {const rootStyle = document.documentElement.style;expect(rootStyle.getPropertyValue('--app-ui-font-size')).toBe(`${DEFAULT_UI_FONT_SIZE}px`);- for (const tokenSize of [- 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,- ]) {+ for (const tokenSize of UI_TEXT_TOKEN_SIZES) {expect(rootStyle.getPropertyValue(`--text-${tokenSize}`)).toBe(`${tokenSize}px`);}+ for (const tokenSize of REMOVED_UI_TEXT_TOKEN_SIZES) {+ expect(rootStyle.getPropertyValue(`--text-${tokenSize}`)).toBe('');+ expect(document.body.style.getPropertyValue(`--text-${tokenSize}`)).toBe('');+ }+ for (const [token, base] of Object.entries(SCALED_TAILWIND_TOKENS)) {+ expect(rootStyle.getPropertyValue(`--text-${token}`)).toBe(`${base}px`);+ }expect(rootStyle.getPropertyValue('--text-sm-line-height')).toBe('20px');expect(document.body.style.getPropertyValue('--text-sm-line-height')).toBe('20px');});@@ -128,13 +145,19 @@ describe('font settings', () => {const rootStyle = document.documentElement.style;expect(rootStyle.getPropertyValue('--app-ui-font-size')).toBe('18px');- for (const tokenSize of [- 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,- ]) {+ for (const tokenSize of UI_TEXT_TOKEN_SIZES) {expect(rootStyle.getPropertyValue(`--text-${tokenSize}`)).toBe(`${Math.round((tokenSize * 18) / DEFAULT_UI_FONT_SIZE)}px`,);}+ for (const tokenSize of REMOVED_UI_TEXT_TOKEN_SIZES) {+ expect(rootStyle.getPropertyValue(`--text-${tokenSize}`)).toBe('');+ }+ for (const [token, base] of Object.entries(SCALED_TAILWIND_TOKENS)) {+ expect(rootStyle.getPropertyValue(`--text-${token}`)).toBe(+ `${Math.round((base * 18) / DEFAULT_UI_FONT_SIZE)}px`,+ );+ }expect(rootStyle.getPropertyValue('--text-sm-line-height')).toBe('26px');expect(document.body.style.getPropertyValue('--text-sm-line-height')).toBe('26px');});diff --git a/apps/desktop/src/renderer/__tests__/inlineReferenceChip.test.tsx b/apps/desktop/src/renderer/__tests__/inlineReferenceChip.test.tsxindex 3a641b22dc..58fa4015ee 100644--- a/apps/desktop/src/renderer/__tests__/inlineReferenceChip.test.tsx+++ b/apps/desktop/src/renderer/__tests__/inlineReferenceChip.test.tsx@@ -19,7 +19,7 @@ describe('InlineReferenceChip', () => {const chip = container.querySelector('[data-inline-reference-chip]');expect(chip?.className).toContain('rounded-full');expect(chip?.className).toContain('gap-1.5');- expect(chip?.className).toContain('text-[12px]');+ expect(chip?.className).toContain('text-12');expect(chip?.className).toContain('px-2');expect(chip?.className).toContain('text-[var(--text-primary)]');expect(screen.queryByRole('button')).toBeNull();diff --git a/apps/desktop/src/renderer/__tests__/newMakerCreateAgentVisualContract.test.ts b/apps/desktop/src/renderer/__tests__/newMakerCreateAgentVisualContract.test.tsindex 6ef794e382..7c11adc341 100644--- a/apps/desktop/src/renderer/__tests__/newMakerCreateAgentVisualContract.test.ts+++ b/apps/desktop/src/renderer/__tests__/newMakerCreateAgentVisualContract.test.ts@@ -147,7 +147,10 @@ describe('NewMakerDraftRoute CREATE AGENT visual contract', () => {"'group flex flex-col items-start justify-between gap-1 rounded-xl border",);expect(source).toContain("isDraftNarrow ? 'min-h-[84px] p-3' : 'min-h-[112px] p-4'");- expect(source).toContain('className="w-full min-w-0 text-13 font-semibold leading-[16px]"');+ // 行高从 `leading-[16px]` 改成无单位 `leading-[1.231]`(= 16 ÷ 13):`text-13` 会随+ // 「外观 → UI 字号」缩放,固定 px 行框不跟随,放大字号时标签会裁切。默认字号下+ // 渲染不变(13 × 1.231 ≈ 16.003px)。见 DESIGN.md §3 non-goals 的行高例外条款。+ expect(source).toContain('className="w-full min-w-0 text-13 font-semibold leading-[1.231]"');// 旧的窄态横排(items-center)/常态竖排(gap-3)特判已被统一竖排取代。expect(source).not.toContain("'flex min-h-[84px] items-center gap-3 p-3'");expect(source).not.toContain("'flex min-h-[112px] flex-col items-start gap-3 p-4'");diff --git a/apps/desktop/src/renderer/__tests__/sentInlineAtomBody.test.tsx b/apps/desktop/src/renderer/__tests__/sentInlineAtomBody.test.tsxindex 0b02607345..27bfc3699b 100644--- a/apps/desktop/src/renderer/__tests__/sentInlineAtomBody.test.tsx+++ b/apps/desktop/src/renderer/__tests__/sentInlineAtomBody.test.tsx@@ -74,7 +74,7 @@ describe('SentInlineAtomBody', () => {expect(bodyBlock).not.toContain('whitespace-pre-wrap');expect(bodyBlock).not.toContain('truncate');expect(pendingQueueSource).toContain(- "'relative top-px min-w-0 flex-1 truncate text-[13px] leading-[1.25]'",+ "'relative top-px min-w-0 flex-1 truncate text-13 leading-[1.25]'",);});});diff --git a/apps/desktop/src/renderer/__tests__/sessionMessageChipPresentation.test.ts b/apps/desktop/src/renderer/__tests__/sessionMessageChipPresentation.test.tsindex 900604cbfb..b97222460b 100644--- a/apps/desktop/src/renderer/__tests__/sessionMessageChipPresentation.test.ts+++ b/apps/desktop/src/renderer/__tests__/sessionMessageChipPresentation.test.ts@@ -67,7 +67,7 @@ describe('composer session-link chip presentation', () => {expect(chip.getAttribute('title')).toBeNull();expect(chip.getAttribute('aria-label')).toBe('First line\n\nsecond line');expect(chip.className).toContain('rounded-full');- expect(chip.className).toContain('text-[12px]');+ expect(chip.className).toContain('text-12');expect(chip.className).toContain('border-[var(--border-default)]');expect(chip.querySelector('path')?.getAttribute('d')).toBe('M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z',diff --git a/apps/desktop/src/renderer/__tests__/typographyDiscipline.test.ts b/apps/desktop/src/renderer/__tests__/typographyDiscipline.test.tsnew file mode 100644index 0000000000..b51e6a6dda--- /dev/null+++ b/apps/desktop/src/renderer/__tests__/typographyDiscipline.test.ts@@ -0,0 +1,1059 @@+import { readdirSync, readFileSync, statSync } from 'node:fs';+import { join, relative, sep } from 'node:path';+import { describe, expect, it } from 'vitest';++/**+ * 排版纪律守护测试(#1505 PR4,含对抗式双审三轮加固)—— 桌面端字重 / 字号+ * 白名单的 CI 红线。蓝本 = 手机端 typographyTokenDiscipline.test.ts;规范正文 =+ * DESIGN.md §3「字重阶梯」与「桌面 UI 字号白名单」(2026-08 修订)。+ *+ * ## 规则(值白名单制:值出梯即红,豁免须在下方 EXEMPTIONS 精确登记)+ * 1. Tailwind 字重类只许 font-normal / font-medium / font-semibold;+ * font-bold 及以上、以下与任意值 font-[...] 一律禁止(豁免域除外)。+ * 2. Tailwind 任意值字号 text-[N<unit>]、无类型提示的长度函数、属性形式+ * `[font-size:...]` 与 `text-[length:...]` 零容忍(`length:` 前缀一律命中,+ * 已登记值走精确豁免):+ * 数字开头的任意值(单位不枚举,含现代 viewport / font-relative /+ * container-query 单位)、大小写不敏感、含小数与 .75 形态、length: 前缀+ * 及已识别的长度函数均命中;已登记的 code-font/compact 派生值只能按+ * 具体文件 + 具体命中精确豁免。对可解析为字号的关键字同样默认拒绝,+ * 不要用开放集合的枚举代替默认拒绝;token 类+ * text-<n> 的 <n> 必须在白名单内,语义类只收编 xs/sm/base/lg。+ * 3. fontWeight / fontSize 的值片段(冒号、JSX 属性 =、style 赋值、三元两臂,+ * **允许跨行**)必须落梯:weight 任意数字字面量 ∈ {400,500,600}(550/650+ * 中间值与 <100/>1000 越界值同判),bold/bolder/lighter 关键字大小写+ * 不敏感全红;size 裸数字与 px 值 ∈ 白名单,+ * pt/ch 等非 px 绝对/视口单位一律红(em/rem/% 相对比例域放行,已登记)。+ * 4. JS 字符串内嵌 CSS 与 .css 的 font-weight 声明(允许跨行)按**完整值**+ * 白名单判定:数值(含小数,400.5 不会截成 400 放行)必须精确 ∈+ * {400,500,600};关键字大小写归一后 bold/bolder/lighter 判红,+ * normal(=400)与 inherit(继承梯内值)放行;属性名与关键字均+ * 大小写不敏感(CSS 语义);+ * font: shorthand 只放行 `font: inherit`:尺寸单位形态、system font+ * 关键字(caption 等六个)、size 关键字起头(medium serif / large Arial)、+ * style/weight/variant/stretch 关键字或三位字重起头、var(...)、+ * initial/unset/revert(-layer) 全部判红。+ * 5. CSS 扫描先做有状态块注释剥离(保行号);TS/TSX 扫描先做行级注释归零,+ * `*` 起头行仅在**非选择器形态**时按 jsdoc 跳过(`* {` / `*{` 照常受检)。+ * 6. 同一行 / 同一文件多个违规逐个计数(occurrence 级)—— 在已豁免文件里+ * 追加新违规同样会红。+ * 7. 镜像检查覆盖规范正本(DESIGN.md §3 白名单)与三处权威来源代码+ * (tailwind.config.ts fontSize / globals.css `--text-<n>` /+ * useFontSettings.ts `UI_TEXT_TOKEN_SIZES`);另单独校验消费端+ * `lib/utils.ts` tailwind-merge 字号去重组的一致性。SCALED_TAILWIND_TOKENS+ * 只负责语义类运行时缩放,与 numeric 白名单无关,不计入任何计数。+ * 配置中仍保留 xl..5xl 语义映射(源码零使用),不可简单删除:它们挂在+ * theme.extend 下,删除会静默回退到不跟随用户缩放的 Tailwind 默认值;+ * 守卫在源码侧拒绝 xl..9xl,配置清理留待后续改成显式 numeric 档位。+ * 8. 会缩放的字号 token(`text-<n>` / `text-xs|sm|base|lg`)不得与固定 px 行高+ * `leading-[Mpx]` 同处一个 class 值区域:字号跟随「外观 → UI 字号」缩放而+ * 固定行框不跟随,放大字号即裁切 / 重叠。判定按 className / cn(...) 的+ * **整块区域**(跨行)而非同一行 —— 单行比对会漏掉 `cn()` 分行写法。+ * 修法是改成无单位比例(比例 = 原 px ÷ 字号),默认字号下渲染不变。+ *+ * ## 豁免(精确绑定:文件 + 规则 + 理由 + 具体合法命中/上下文及期望次数)+ * 每条豁免按具体 match 与上下文签名计数;新增 font-black 或 800 即使总数不变也红。+ * 豁免域清单与理由正本见 DESIGN.md §3「排版豁免登记表」;下表是其中+ * 落到静态扫描命中的子集(外部页注入的字体族、手机 WebView 生成器、紧凑+ * 派生值等域由「合法值 / SKIP / 手机侧守卫」承接,天然无命中,不在此表)。+ *+ * ## 盲区清单(显式登记,不宣称全入口;新增写法先补扫描再用)+ * - 动态拼接的 class / 样式字符串(`'text-[' + n + 'px]'`)、跨文件常量组装、+ * 数值经变量间接传入(`fontWeight: W` 且 W 定义在别处);+ * - 非常规数字字面量形态:数字分隔符(6_50)、进制字面量(0x28a)、科学计数+ * (5e2)不参与判定(非现实字重写法);函数调用**子表达式**(toWeight(550),+ * 含其参数域)逐层剔除后按动态值跳过——片段剩余部分的直接字面量(括号+ * 包裹、混合三元的字面量臂)照判;shorthand 的 && / || 逻辑表达式按动态值+ * 跳过,不按内部 token 误判;多行三元只覆盖值首行;+ * - fontSize 的相对比例值(em / rem / %,如编辑器标题系数)与算式派生值+ * (`size * 0.86`、`17 / 1`,片段含 * 或 / 即跳过)—— 非静态可判;+ * - 内联字号盲区: `style={{ fontSize: <number | 'Npx'> }}` 形式的白名单档位+ * 当前允许通过,但 `applyFontSettings` 只改写 `--text-*` 变量,这些字面量不会+ * 响应设置页的 UI 字号缩放。实测共有 48 处未登记命中,其中约 39 处是真实 UI:+ * `features/skillhub/` 共 27 处(`InstallTargetPicker` 10 / `MarketCard` 8 /+ * `SkillhubMarketListView` 6 / `SkillhubMarketPreviewPanel` 3),另有+ * `MakerExperimentalView` 4、`LegacyMigrationDialog` 3、`ModelLightbox` 1、+ * `ImageLightbox` 1、`LoginControls` 2、`AttachmentTypeThumb` 1;其余命中包括+ * `codemirrorGithubTheme.ts`、`shareConversationImage.ts` 与 `xtermPool.ts`。+ * `codemirrorGithubTheme.ts` / `loginDesignTokens.ts` 各 13 处属既有豁免域;+ * SVG `fontSize="N"` 属性与 `xtermPool.ts` 的数字入参属于无法用 token 类表达的+ * 结构性合法用法。收紧方向是静态内联字号默认判红,仅为 SVG/画布/第三方 API+ * 登记精确豁免;本 PR 不处理,后续独立施工需改约 48 处调用点并先界定豁免边界,+ * 再完成设计核对与 Light/Dark 双模式验收;+ * - CSS `@apply` 排版类盲区:CSS 分支当前只扫描显式 `font-weight` / `font:`+ * 声明,不解析 `.x { @apply font-bold; }` 或字号类;Tailwind PostCSS 展开后+ * 可能产生守卫未见的字重/字号。此类形态本轮不改扫描,后续独立施工需纳入+ * CSS 类名检查或明确拒绝排版类 `@apply`,并补对应红 fixture;+ * - CSS font-weight 的动态值(var(...)、模板插值、calc())与+ * initial/unset/revert 全局关键字(计算结果不引入梯外静态值)不判红;+ * - .css 与字符串内嵌 CSS 的直接 font-size 声明值域(紧凑模式 -1px 派生、+ * FileBrowserBody 的 em 标题系数、oauthResultPage 品牌块等机制/豁免域,+ * v1 不做值校验);新增规则先扩展 CSS 值扫描并登记精确派生豁免;+ * - renderer HTML 模板只扫描 class 中的 Tailwind 字号/字重类,不解析内联+ * style 的 CSS font-size 值;CSS 值域走上条登记盲区;+ * - 注释剥离为启发式而非解析器:TS 行中块注释、含「空白+//」的字符串字面量、+ * CSS 字符串字面量内的块注释起始序列(content 属性存 "/*" 类)可造成漏报;+ * jsdoc 中「* {@link …}」形态的行会被当作选择器行扫描(可能误报,现库零实例);+ * - src/renderer/vendor/(第三方 vendored 产物)与构建产物;+ * - 原生层(macOS agent-island Swift helper 等,见 DESIGN.md §3 non-goals);+ * - 手机端(apps/mobile 有自己的 typographyTokenDiscipline 守卫,其 WebView+ * HTML 生成器盲区在彼处登记)。+ */++const ROOT = join(__dirname, '..', '..', '..');+const SCAN_DIR = join(ROOT, 'src');+const DESIGN_MD = join(ROOT, '..', '..', 'docs', 'design-rules', 'DESIGN.md');++/** DESIGN.md §3 桌面 UI 字号白名单(镜像检查覆盖规范正本与三处权威来源)。 */+const SIZE_WHITELIST = [10, 11, 12, 13, 14, 15, 16, 18, 20, 24, 28] as const;+const SIZE_SET = new Set<number>(SIZE_WHITELIST);+const SEMANTIC_TOKEN_VALUES = {+ xs: 12,+ sm: 14,+ base: 16,+ lg: 18,+ xl: 20,+ '2xl': 24,+ '3xl': 30,+ '4xl': 36,+ '5xl': 48,+} as const;+/** 字重:UI chrome 工作集(700 只许经豁免,见 DESIGN.md §3 字重阶梯)。 */+const WEIGHT_SET = new Set([400, 500, 600]);++/** 整文件不扫描:画布常量本体 / 测试 / vendored 第三方。 */+const SKIP_FILES = [+ /__tests__\//,+ /\.test\.(ts|tsx)$/,+ // 登录品牌画布常量本体(设计 px 坐标系,DESIGN.md §3 豁免表;地位对齐手机端+ // loginSkinLayout.ts):字面量只许进这里,消费组件仍被全量扫描。+ /^src\/renderer\/components\/login\/loginDesignTokens\.ts$/,+ /^src\/renderer\/vendor\//,+];++interface Exemption {+ file: string;+ rule: string;+ /** 理由(正本在 DESIGN.md §3 排版豁免登记表)。 */+ reason: string;+ /** 允许的具体命中/上下文及 occurrence 期望次数;未登记签名一律不享有豁免。 */+ signatures: ReadonlyArray<{ match: string; expected: number; context?: string }>;+}++const EXEMPTIONS: Exemption[] = [+ // 登录/Splash 品牌画布域:Tailwind font-bold ×7 + 内联 700 五处形态+ // (238 直接字面量、290 filled/error 三元、300/310 focus/blur style 赋值、748 内联 style)。+ {+ file: 'src/renderer/components/login/LoginControls.tsx',+ rule: 'tw-weight',+ reason: '登录品牌画布 Bold(§16)',+ signatures: [{ match: 'font-bold', expected: 7 }],+ },+ {+ file: 'src/renderer/components/login/LoginControls.tsx',+ rule: 'inline-weight',+ reason: '登录品牌画布 Bold(§16,含 filled/focus 态三元与 style 赋值)',+ signatures: [{ match: 'fontWeight …700', expected: 5 }],+ },+ {+ file: 'src/renderer/components/auth/LegacyMigrationDialog.tsx',+ rule: 'inline-weight',+ reason: '登录品牌画布家族(680→490 缩放),字重按 #1505 拍板豁免',+ signatures: [{ match: 'fontWeight …700', expected: 2 }],+ },+ {+ file: 'src/renderer/components/markdown/codemirrorGithubTheme.ts',+ rule: 'inline-weight',+ reason: 'markdown 内容域:编辑器 strong 语法节点(§3 豁免表「markdown 内容」行)',+ signatures: [{ match: 'fontWeight …bold', expected: 1 }],+ },+ {+ file: 'src/main/oauthResultPage.ts',+ rule: 'string-weight',+ reason: '登录品牌画布家族(自包含品牌页生成器,§3 豁免表)',+ signatures: [{ match: 'font-weight:700', expected: 2 }],+ },+ {+ file: 'src/renderer/styles/globals.css',+ rule: 'css-weight',+ reason: 'hljs 语法高亮主题移植(§3 豁免表,保真优先)',+ signatures: [+ { match: 'font-weight: bold', context: '.dark .hljs-section', expected: 1 },+ { match: 'font-weight: bold', context: '.dark .hljs-strong', expected: 1 },+ {+ match: 'font-weight: bold',+ context: "[data-theme='solarized-light'] .hljs-strong",+ expected: 1,+ },+ {+ match: 'font-weight: bold',+ context:+ "[data-theme='solarized-light'] .hljs-meta .hljs-keyword, [data-theme='solarized-light'] .hljs-meta-keyword",+ expected: 1,+ },+ ],+ },+ // 紧凑代码字号是 DESIGN.md §3 已登记的机制本体;只允许这些现有文件/具体类。+ {+ file: 'src/renderer/components/chat/AgentActionRow.tsx',+ rule: 'arb-size',+ reason: '紧凑代码字号派生值',+ signatures: [{ match: 'text-[length:calc(var(--app-code-font-size)_-_1px)]', expected: 1 }],+ },+ {+ file: 'src/renderer/components/chat/DiffView.tsx',+ rule: 'arb-size',+ reason: '紧凑代码字号派生值',+ signatures: [{ match: 'text-[length:calc(var(--app-code-font-size)_-_1px)]', expected: 1 }],+ },+ {+ file: 'src/renderer/components/chat/GhostSummonCard.tsx',+ rule: 'arb-size',+ reason: '紧凑代码字号派生值',+ signatures: [{ match: 'text-[length:calc(var(--app-code-font-size)_-_1px)]', expected: 1 }],+ },+ {+ file: 'src/renderer/components/chat/MarkdownDiffBlock.tsx',+ rule: 'arb-size',+ reason: '紧凑代码字号派生值',+ signatures: [{ match: 'text-[length:calc(var(--app-code-font-size)_-_1px)]', expected: 1 }],+ },+ {+ file: 'src/renderer/components/chat/MarkdownMermaidBlock.tsx',+ rule: 'arb-size',+ reason: '代码字号变量',+ signatures: [{ match: 'text-[length:var(--app-code-font-size)]', expected: 2 }],+ },+ {+ file: 'src/renderer/components/chat/MarkdownRenderer.tsx',+ rule: 'arb-size',+ reason: '代码字号变量',+ signatures: [{ match: 'text-[length:var(--app-code-font-size)]', expected: 2 }],+ },+ {+ file: 'src/renderer/components/chat/SystemCard.tsx',+ rule: 'arb-size',+ reason: '紧凑代码字号派生值',+ signatures: [+ { match: 'text-[length:calc(var(--app-code-font-size)_-_1.5px)]', expected: 1 },+ { match: 'text-[length:calc(var(--app-code-font-size)_-_1px)]', expected: 2 },+ ],+ },+ {+ file: 'src/renderer/components/chat/ToolCallCard.tsx',+ rule: 'arb-size',+ reason: '紧凑代码字号派生值',+ signatures: [{ match: 'text-[length:calc(var(--app-code-font-size)_-_1px)]', expected: 2 }],+ },+ {+ file: 'src/renderer/components/chat/ToolPayloadLightbox.tsx',+ rule: 'arb-size',+ reason: '紧凑代码字号派生值',+ signatures: [{ match: 'text-[length:calc(var(--app-code-font-size)_-_1px)]', expected: 3 }],+ },+ {+ file: 'src/renderer/components/chat/UserMessage.tsx',+ rule: 'arb-size',+ reason: '紧凑代码字号派生值',+ signatures: [{ match: 'text-[length:calc(var(--app-code-font-size)_-_2px)]', expected: 1 }],+ },+ {+ file: 'src/renderer/components/markdown/MermaidSourceEditor.tsx',+ rule: 'arb-size',+ reason: '紧凑代码字号派生值',+ signatures: [{ match: 'text-[length:calc(var(--app-code-font-size)_-_1px)]', expected: 1 }],+ },+ {+ file: 'src/renderer/components/new-chat/PermissionPrompt.tsx',+ rule: 'arb-size',+ reason: '紧凑代码字号派生值',+ signatures: [{ match: 'text-[length:calc(var(--app-code-font-size)_-_1px)]', expected: 1 }],+ },+ {+ file: 'src/renderer/features/skillhub/PublishDialog.tsx',+ rule: 'arb-size',+ reason: '紧凑代码字号派生值',+ signatures: [{ match: 'text-[length:calc(var(--app-code-font-size)_-_3px)]', expected: 1 }],+ },+ {+ file: 'src/renderer/features/skillhub/SkillhubDetailView.tsx',+ rule: 'arb-size',+ reason: '代码字号变量',+ signatures: [{ match: 'text-[length:var(--app-code-font-size)]', expected: 1 }],+ },+];++// ── 预处理 ──────────────────────────────────────────────────────────++/** TS/TSX 行预处理:整行注释归 null(// 与 jsdoc 续行 *),剥「空白+//」尾注释。+ * `*` 起头但形如 CSS 选择器(`* {` / `*{` / `*,`)的行**不是**注释——模板字符串+ * 内嵌 CSS 的通配选择器必须照常受检(红队三轮 P1)。 */+export function prepareTsLine(line: string): string | null {+ const t = line.trim();+ if (t.startsWith('//') || t.startsWith('/*')) return null;+ if (t.startsWith('*') && !/^\*\s*[{,]/.test(t)) return null;+ return line.replace(/\s\/\/.*$/, '');+}++/** TS/TSX 全文预处理:逐行套 prepareTsLine,注释行置空但**保行数**。 */+export function prepareTsContent(raw: string): string {+ return raw+ .split('\n')+ .map((line) => prepareTsLine(line) ?? '')+ .join('\n');+}++/** CSS 全文预处理:有状态剥离块注释,注释区域以空格填充保住行号与列语境。 */+export function stripCssComments(css: string): string {+ return css.replace(/\/\*[\s\S]*?\*\//g, (m) => m.replace(/[^\n]/g, ' '));+}++interface Hit {+ match: string;+ index: number;+ /** CSS selector/context for declarations whose exemption must be location-bound. */+ context?: string;+}++// ── 检查器(输入为**预处理后的全文**,返回全部命中及偏移;红绿 fixture 直测) ──++/** 规则 1:Tailwind 禁用字重类与任意值字重。 */+export function findTwWeightViolations(text: string): Hit[] {+ return [+ ...[...text.matchAll(/\bfont-(?:thin|extralight|light|bold|extrabold|black)\b/g)],+ ...[...text.matchAll(/\bfont-\[[^\]\n]*\]/g)],+ ].map((m) => ({ match: m[0], index: m.index ?? 0 }));+}++/** 规则 2a:任意值字号类零容忍 —— 全长度单位、大小写不敏感、含 .75 形态。 */+export function findArbitrarySizes(text: string): Hit[] {+ return [+ ...text.matchAll(+ /\btext-\[(?:(?:\d+(?:\.\d+)?|\.\d+)[^\]\n]*|length:[^\]\n]+|(?:calc|clamp|min|max)\([^\]\n]+\)|[a-z-]+)\]/gi,+ ),+ ...text.matchAll(/\[(?:font-size):[^\]\n]+\]/gi),+ ].map((m) => ({ match: m[0], index: m.index ?? 0 }));+}++/** 规则 2b:token 字号类必须在白名单档内。 */+export function findOffLadderTokenSizes(text: string): Hit[] {+ const hits: Hit[] = [];+ for (const m of text.matchAll(/\btext-(\d+)\b/g)) {+ if (!SIZE_SET.has(Number(m[1]))) hits.push({ match: m[0], index: m.index ?? 0 });+ }+ // DESIGN.md 只收编 xs/sm/base/lg; Tailwind 默认仍提供 xl..9xl,+ // 所以必须显式拦截这些可用但白名单外的语义类。+ for (const m of text.matchAll(/\btext-(xl|[2-9]xl)\b/g)) {+ hits.push({ match: m[0], index: m.index ?? 0 });+ }+ return hits;+}++/** 取关键字之后的值片段。分隔符([:=])后按值形态截断:引号值取引号内、+ * JSX 表达式属性(={…})取花括号内、裸值截到 [,;}\n] —— 分隔符前后允许换行,+ * 因此 `fontWeight:\n 800` 这类跨行声明照常落网;多行三元只覆盖首行+ * (prettier 惯例下值不拆行,残余形态记入盲区)。 */+function segmentsAfter(text: string, keyword: string): Hit[] {+ const segments: Hit[] = [];+ for (const m of text.matchAll(new RegExp(`\\b${keyword}\\b\\s*[:=]?\\s*`, 'g'))) {+ const rest = text.slice((m.index ?? 0) + m[0].length);+ const first = rest[0];+ let segment: string;+ if (first === '"' || first === "'" || first === '`') {+ const end = rest.indexOf(first, 1);+ segment = end === -1 ? rest.slice(1) : rest.slice(1, end);+ } else if (first === '{') {+ const end = rest.indexOf('}', 1);+ segment = end === -1 ? rest.slice(1) : rest.slice(1, end);+ } else {+ segment = rest.split(/[,;}\n]/, 1)[0] ?? '';+ }+ segments.push({ match: segment, index: m.index ?? 0 });+ }+ return segments;+}++/** 规则 3a:fontWeight 值片段全数落梯。口径 = **十进制裸/引号数字字面量**+ * (含中间值 550/650 与越界值);数字分隔符(6_50)、进制字面量(0x28a)、+ * 科学计数(5e2)与函数调用表达式(toWeight(550))为登记盲区——前三者非+ * 现实字重写法,后者为动态值不按内部参数误判(红队四轮)。 */+export function findInlineWeightViolations(text: string): Hit[] {+ const hits: Hit[] = [];+ for (const seg of segmentsAfter(text, 'fontWeight')) {+ // 只剔除**函数调用子表达式**本体(内层起逐层剥,参数域按动态值登记盲区),+ // 剩余部分的直接字面量照判——`(700)` 括号包裹与「一臂函数、一臂字面量」的+ // 混合三元不再整段跳过(gate-audit 五轮)。+ let scannable = seg.match;+ let prev: string;+ do {+ prev = scannable;+ scannable = scannable.replace(/[A-Za-z_$][\w$]*\s*\([^()]*\)/g, ' ');+ } while (scannable !== prev);+ // 关键字大小写不敏感(值最终进 CSS,'BOLD' 与 'bold' 等效):bold/bolder/+ // lighter 全红;normal(=400)放行。+ for (const m of scannable.matchAll(/\b(\d+(?:\.\d+)?)\b|\b(?:bold(?:er)?|lighter)\b/gi)) {+ if (m[1] && WEIGHT_SET.has(Number(m[1]))) continue;+ hits.push({ match: `fontWeight …${m[0]}`, index: seg.index });+ }+ }+ return hits;+}++/** 规则 3b:fontSize 值片段——裸数字与 px 值必须在白名单,pt/ch/vw 等非 px+ * 绝对/视口单位一律红;em/rem/% 相对比例与算式派生(含 * 或 /)放行(登记盲区)。 */+export function findInlineSizeViolations(text: string): Hit[] {+ const hits: Hit[] = [];+ for (const seg of segmentsAfter(text, 'fontSize')) {+ if (/[*/]/.test(seg.match)) continue;+ for (const m of seg.match.matchAll(+ /(?<![\w.])(\d+(?:\.\d+)?|\.\d+)(px|r?em|%|pt|pc|ch|ex|q|cm|mm|in|vw|vh|vmin|vmax)?\b/gi,+ )) {+ const unit = m[2]?.toLowerCase();+ if (unit === 'em' || unit === 'rem' || unit === '%') continue;+ if (unit && unit !== 'px') {+ hits.push({ match: `fontSize …${m[0]}(非 px 单位)`, index: seg.index });+ continue;+ }+ if (!SIZE_SET.has(Number(m[1]))) hits.push({ match: `fontSize …${m[1]}`, index: seg.index });+ }+ }+ return hits;+}++/** 规则 4a/5:CSS 声明(字符串内嵌或 .css,允许跨行)的 font-weight 按完整值+ * 白名单判定(gate-audit 四轮):值截到 [;}\n],剥 !important 后——数值+ * (含小数)必须精确 ∈ WEIGHT_SET(400.5 不再截成 400 放行);关键字统一+ * lower-case 后 bold/bolder/lighter 判红,normal/inherit 放行;var(...)、+ * 模板插值等动态值与 initial/unset/revert 为登记盲区。属性名 /i。 */+function cssSelectorContextAt(text: string, index: number): string | undefined {+ const before = text.slice(0, index);+ const blockStart = before.lastIndexOf('{');+ const blockEnd = before.lastIndexOf('}');+ if (blockStart <= blockEnd) return undefined;+ const selector = before+ .slice(blockEnd + 1, blockStart)+ .trim()+ .replace(/\s+/g, ' ');+ return selector || undefined;+}++export function findStringWeightViolations(+ text: string,+ options: { includeSelectorContext?: boolean } = {},+): Hit[] {+ const hits: Hit[] = [];+ for (const m of text.matchAll(/font-weight\s*:\s*([^;}\n]+)/gi)) {+ const value = m[1]+ .replace(/\s*!important\s*$/i, '')+ .trim()+ .toLowerCase();+ if (!value) continue;+ if (/^[+-]?(?:\d+(?:\.\d+)?|\.\d+)$/.test(value)) {+ if (WEIGHT_SET.has(Number(value))) continue;+ } else if (!/^(?:bold(?:er)?|lighter)$/.test(value)) {+ continue;+ }+ const index = m.index ?? 0;+ hits.push({+ match: m[0].replace(/\s+/g, ' ').slice(0, 60),+ index,+ ...(options.includeSelectorContext ? { context: cssSelectorContextAt(text, index) } : {}),+ });+ }+ return hits;+}++/** 规则 4b:font: shorthand 只放行 `font: inherit`。六类形态全判(双审三轮):+ * a) 值含尺寸单位;b) CSS system font 关键字;c) size 关键字起头且后随+ * 更多 token(medium serif / large Arial);d) style/weight/variant/stretch+ * 关键字或三位字重起头且后随更多 token;e) var(...);f) initial/unset/+ * revert(-layer) 等 inherit 以外的 global keyword。+ * 非 CSS 语境对象键(`font: 20,`、`font: someVar`)与带引号值不满足任一形态,+ * 天然放行。 */+export function findFontShorthands(text: string): Hit[] {+ const hits: Hit[] = [];+ // 裸值与引号值双通道:style 对象里的 font: 'bold 12px system-ui' 属引号值+ // 形态(红队四轮),同样按六形态判;含 && / || 的 TS 逻辑表达式跳过+ // (bold && medium 这类标识符运算不是 CSS 声明,防误报)。+ // 属性名同样 /i(CSS property 大小写不敏感,`FONT:` 不得绕过)。+ const candidates: Hit[] = [];+ for (const m of text.matchAll(/\bfont\s*:\s*(['"`])([^'"`\n]*)\1/gi)) {+ candidates.push({ match: m[2], index: m.index ?? 0 });+ }+ for (const m of text.matchAll(/\bfont\s*:\s*([^;,}'"]*)/gi)) {+ candidates.push({ match: m[1], index: m.index ?? 0 });+ }+ for (const c of candidates) {+ const value = c.match.replace(/\s+/g, ' ').trim();+ if (!value || value === 'inherit' || /&&|\|\|/.test(value)) continue;+ const unitForm =+ /(?:\d+(?:\.\d+)?|\.\d+)(?:px|r?em|pt|pc|ch|ex|q|cm|mm|in|vw|vh|vmin|vmax)\b/i.test(value);+ const systemKeyword = /^(?:caption|icon|menu|message-box|small-caption|status-bar)\b/i.test(+ value,+ );+ const sizeKeywordShorthand =+ /^(?:xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large|smaller|larger)\b\s+\S/i.test(+ value,+ );+ // numeric weight 起头按完整数值文法判(两位/四位/小数/带符号同样是+ // shorthand 形态,50 / 1000 / 700.5 / +700 不得绕过——gate-audit 五轮)。+ const styleKeywordShorthand =+ /^(?:normal|italic|oblique|bold|bolder|lighter|small-caps|(?:ultra-|extra-|semi-)?(?:condensed|expanded)|[+-]?(?:\d+(?:\.\d+)?|\.\d+))\s+\S/i.test(+ value,+ );+ const varForm = /^var\(/i.test(value);+ const globalKeyword = /^(?:initial|unset|revert(?:-layer)?)\b/i.test(value);+ if (+ unitForm ||+ systemKeyword ||+ sizeKeywordShorthand ||+ styleKeywordShorthand ||+ varForm ||+ globalKeyword+ ) {+ hits.push({ match: `font: ${value}`.slice(0, 60), index: c.index });+ }+ }+ return hits;+}++/**+ * 固定 px 行高 + 会缩放的字号 token = 功能缺陷(不是行高风格漂移)。+ *+ * `text-<n>` / `text-xs|sm|base|lg` 经 `--text-*` 响应「外观 → UI 字号」设置,+ * `leading-[Mpx]` 的行框不跟随;用户把字号调大时文字在固定行框里裁切 / 重叠。+ * 一律改成无单位比例(比例 = 原 px ÷ 字号),默认字号下渲染不变。+ * 规范见 DESIGN.md §3 non-goals 的行高例外条款。+ *+ * 判定按「同一个 class 值区域」而不是同一行:`cn(...)` 会把字号与行高分散到+ * 不同行,只比对单行会漏 —— #1553 就是这样漏掉过 PlanActionCard 一处,+ * 因此这里做括号 / 引号配对取整块区域再比对。+ */+const SIZE_TOKEN_IN_CLASS = /\btext-(?:\d+|xs|sm|base|lg)\b/;++function matchBalanced(text: string, openIndex: number, open: string, close: string): number {+ let depth = 0;+ for (let i = openIndex; i < text.length; i += 1) {+ if (text[i] === open) depth += 1;+ else if (text[i] === close) {+ depth -= 1;+ if (depth === 0) return i + 1;+ }+ }+ return text.length;+}++/** className={...} / className="..." 与独立的 cn/clsx/twMerge(...) 区域。 */+function classValueRegions(text: string): Array<{ start: number; end: number }> {+ const regions: Array<{ start: number; end: number }> = [];+ for (const m of text.matchAll(/className\s*=\s*/g)) {+ const at = (m.index ?? 0) + m[0].length;+ const ch = text[at];+ if (ch === '{') {+ regions.push({ start: at, end: matchBalanced(text, at, '{', '}') });+ } else if (ch === '"' || ch === "'" || ch === '`') {+ const end = text.indexOf(ch, at + 1);+ regions.push({ start: at, end: end === -1 ? text.length : end + 1 });+ }+ }+ // class 常量未必直接挂在 className 上(变量、helper 返回值)。+ for (const m of text.matchAll(/\b(?:cn|clsx|twMerge)\s*\(/g)) {+ const open = (m.index ?? 0) + m[0].length - 1;+ regions.push({ start: open, end: matchBalanced(text, open, '(', ')') });+ }+ return regions;+}++function findFixedLeadingWithScalingToken(text: string): Hit[] {+ const byIndex = new Map<number, Hit>();+ for (const region of classValueRegions(text)) {+ const slice = text.slice(region.start, region.end);+ const token = SIZE_TOKEN_IN_CLASS.exec(slice);+ if (!token) continue;+ for (const m of slice.matchAll(/leading-\[(\d+(?:\.\d+)?)px\]/g)) {+ // className 区域与其内层 cn(...) 区域会重叠,按绝对下标去重免得重复计数。+ const index = region.start + (m.index ?? 0);+ if (!byIndex.has(index)) byIndex.set(index, { match: m[0], index, context: token[0] });+ }+ }+ return [...byIndex.values()].sort((a, b) => a.index - b.index);+}++// ── 文件遍历 ────────────────────────────────────────────────────────++function collectFiles(exts: RegExp): string[] {+ const files: string[] = [];+ const walk = (dir: string) => {+ for (const name of readdirSync(dir)) {+ const p = join(dir, name);+ if (statSync(p).isDirectory()) {+ walk(p);+ continue;+ }+ if (!exts.test(name)) continue;+ const rel = relative(ROOT, p).split(sep).join('/');+ if (!SKIP_FILES.some((re) => re.test(rel))) files.push(rel);+ }+ };+ walk(SCAN_DIR);+ return files;+}++interface Violation {+ file: string;+ line: number;+ rule: string;+ match: string;+ context?: string;+}++function lineOf(text: string, index: number): number {+ let line = 1;+ for (let i = 0; i < index && i < text.length; i += 1) {+ if (text.charCodeAt(i) === 10) line += 1;+ }+ return line;+}++function scan(): Violation[] {+ const violations: Violation[] = [];+ const push = (file: string, text: string, rule: string, hits: Hit[]) => {+ for (const h of hits)+ violations.push({+ file,+ line: lineOf(text, h.index),+ rule,+ match: h.match,+ ...(h.context ? { context: h.context } : {}),+ });+ };++ for (const rel of collectFiles(/\.(ts|tsx|html)$/)) {+ const text = prepareTsContent(readFileSync(join(ROOT, rel), 'utf8'));+ push(rel, text, 'tw-weight', findTwWeightViolations(text));+ push(rel, text, 'arb-size', findArbitrarySizes(text));+ push(rel, text, 'token-size', findOffLadderTokenSizes(text));+ push(rel, text, 'inline-weight', findInlineWeightViolations(text));+ push(rel, text, 'inline-size', findInlineSizeViolations(text));+ push(rel, text, 'string-weight', findStringWeightViolations(text));+ push(rel, text, 'font-shorthand', findFontShorthands(text));+ push(rel, text, 'fixed-leading', findFixedLeadingWithScalingToken(text));+ }+ for (const rel of collectFiles(/\.css$/)) {+ const text = stripCssComments(readFileSync(join(ROOT, rel), 'utf8'));+ push(+ rel,+ text,+ 'css-weight',+ findStringWeightViolations(text, { includeSelectorContext: true }),+ );+ push(rel, text, 'font-shorthand', findFontShorthands(text));+ }+ return violations;+}++/** 镜像解析器保持 key 与实际映射值成对返回,不能只看变量名档位。 */+export function parseNumericConfigMappings(config: string): Array<readonly [number, number]> {+ const fontSizeBlock = /fontSize:\s*\{([\s\S]*?)^\s*\},\s*borderRadius:/m.exec(config)?.[1] ?? '';+ return [...fontSizeBlock.matchAll(/^\s*(\d+):\s*['"]var\(--text-(\d+)\)['"]/gm)]+ .map((m) => [Number(m[1]), Number(m[2])] as const)+ .sort(([a], [b]) => a - b);+}++export function parseNumericCssMappings(css: string): Array<readonly [number, number]> {+ return [...css.matchAll(/--text-(\d+):\s*(\d+)px;/g)]+ .map((m) => [Number(m[1]), Number(m[2])] as const)+ .sort(([a], [b]) => a - b);+}++// ── 主守卫 ──────────────────────────────────────────────────────────++describe('typography discipline (DESIGN.md §3, #1505)', () => {+ it('keeps weights and sizes on the ladder; exemption hit counts stay exact', () => {+ const violations = scan();++ const keyOf = (file: string, rule: string) => `${file} ${rule}`;+ const exemptionByKey = new Map(EXEMPTIONS.map((e) => [keyOf(e.file, e.rule), e]));++ const signatureKey = (match: string, context?: string) => `${match} @ ${context ?? '<any>'}`;+ const counts = new Map<string, Map<string, number>>();+ const unexempted: string[] = [];+ for (const v of violations) {+ const key = keyOf(v.file, v.rule);+ const exemption = exemptionByKey.get(key);+ if (exemption) {+ const signature = exemption.signatures.find(+ (s) => s.match === v.match && (!s.context || s.context === v.context),+ );+ if (!signature) {+ unexempted.push(`${v.file}:${v.line} [${v.rule}] ${v.match}(未登记的豁免命中)`);+ continue;+ }+ const bucket = counts.get(key) ?? new Map<string, number>();+ bucket.set(+ signatureKey(v.match, signature.context),+ (bucket.get(signatureKey(v.match, signature.context)) ?? 0) + 1,+ );+ counts.set(key, bucket);+ } else {+ unexempted.push(`${v.file}:${v.line} [${v.rule}] ${v.match}`);+ }+ }++ const exemptionDrift: string[] = [];+ for (const e of EXEMPTIONS) {+ const actual = counts.get(keyOf(e.file, e.rule)) ?? new Map<string, number>();+ for (const signature of e.signatures) {+ const hits = actual.get(signatureKey(signature.match, signature.context)) ?? 0;+ if (hits !== signature.expected) {+ exemptionDrift.push(+ `${e.file} [${e.rule}] ${signature.match} 登记 ${signature.expected} 次,实测 ${hits} 次 —— ` ++ (hits > signature.expected+ ? '有人蹭豁免,新增处必须自证或归梯'+ : '豁免已过期,请同步删登记'),+ );+ }+ }+ }++ expect(unexempted).toEqual([]);+ expect(exemptionDrift).toEqual([]);+ });++ it('mirrors the size ladder across DESIGN.md and the three authoritative code sources', () => {+ const expected = [...SIZE_WHITELIST].sort((a, b) => a - b);+ const expectedSemantic = { xs: 12, sm: 14, base: 16, lg: 18 };++ const config = readFileSync(join(ROOT, 'tailwind.config.ts'), 'utf8');+ const fontSizeBlock =+ /fontSize:\s*\{([\s\S]*?)^\s*\},\s*borderRadius:/m.exec(config)?.[1] ?? '';+ const configNumeric = parseNumericConfigMappings(config);+ expect(configNumeric).toEqual(expected.map((n) => [n, n]));+ const configSemantic = Object.fromEntries(+ [...fontSizeBlock.matchAll(/^\s*(xs|sm|base|lg):\s*\[['"]var\(--text-\1\)['"]/gm)].map(+ (m) => [m[1], expectedSemantic[m[1] as keyof typeof expectedSemantic]],+ ),+ );+ expect(configSemantic).toEqual(expectedSemantic);+ const preservedConfigSemantic = Object.fromEntries(+ [+ ...fontSizeBlock.matchAll(+ /^\s*['"]?(xl|2xl|3xl|4xl|5xl)['"]?:\s*\[['"]var\(--text-\1\)['"]/gm,+ ),+ ].map((m) => [m[1], SEMANTIC_TOKEN_VALUES[m[1] as keyof typeof SEMANTIC_TOKEN_VALUES]]),+ );+ expect(preservedConfigSemantic).toEqual({ xl: 20, '2xl': 24, '3xl': 30, '4xl': 36, '5xl': 48 });++ const css = readFileSync(join(ROOT, 'src/renderer/styles/globals.css'), 'utf8');+ const cssNumeric = parseNumericCssMappings(css);+ expect(cssNumeric).toEqual(expected.map((n) => [n, n]));+ const cssSemantic = Object.fromEntries(+ [...css.matchAll(/--text-(xs|sm|base|lg):\s*(\d+)px;/g)].map((m) => [m[1], Number(m[2])]),+ );+ expect(cssSemantic).toEqual(expectedSemantic);+ const preservedCssSemantic = Object.fromEntries(+ [...css.matchAll(/--text-(xl|2xl|3xl|4xl|5xl):\s*(\d+)px;/g)].map((m) => [+ m[1],+ Number(m[2]),+ ]),+ );+ expect(preservedCssSemantic).toEqual({ xl: 20, '2xl': 24, '3xl': 30, '4xl': 36, '5xl': 48 });++ const hook = readFileSync(join(ROOT, 'src/renderer/hooks/useFontSettings.ts'), 'utf8');+ const runtimeBlock = /UI_TEXT_TOKEN_SIZES\s*=\s*\[([^\]]+)\]/s.exec(hook)?.[1] ?? '';+ const runtimeNumeric = [...runtimeBlock.matchAll(/\b\d+\b/g)]+ .map((m) => Number(m[0]))+ .sort((a, b) => a - b);+ expect(runtimeNumeric).toEqual(expected);+ expect(hook).toMatch(+ /for \(const tokenSize of UI_TEXT_TOKEN_SIZES\)[\s\S]*?set\(`--text-\$\{tokenSize\}`, `\$\{Math\.round\(tokenSize \* scale\)\}px`\)/,+ );+ const semanticBlock = /SCALED_TAILWIND_TOKENS\s*=\s*\{([^}]+)\}/s.exec(hook)?.[1] ?? '';+ const runtimeSemantic = Object.fromEntries(+ [...semanticBlock.matchAll(/^\s*(xs|sm|base|lg):\s*(\d+),/gm)].map((m) => [+ m[1],+ Number(m[2]),+ ]),+ );+ expect(runtimeSemantic).toEqual(expectedSemantic);+ const preservedRuntimeSemantic = Object.fromEntries(+ [...semanticBlock.matchAll(/^\s*['"]?(xl|2xl|3xl|4xl|5xl)['"]?:\s*(\d+),/gm)].map((m) => [+ m[1],+ Number(m[2]),+ ]),+ );+ expect(preservedRuntimeSemantic).toEqual({+ xl: 20,+ '2xl': 24,+ '3xl': 30,+ '4xl': 36,+ '5xl': 48,+ });++ // DESIGN.md §3「桌面 UI 字号白名单」小节的两个 {…} 集合。+ const design = readFileSync(DESIGN_MD, 'utf8');+ const section = design.split('### 桌面 UI 字号白名单')[1]?.split('###')[0] ?? '';+ const sets = [...section.matchAll(/\{([\d\s,、]+)\}/g)];+ const docTiers = sets+ .flatMap((m) =>+ m[1]+ .split(/[,、\s]+/)+ .filter(Boolean)+ .map(Number),+ )+ .sort((a, b) => a - b);+ expect(docTiers).toEqual(expected);+ });++ it('keeps the tailwind-merge font-size consumer in sync', () => {+ const expected = [...SIZE_WHITELIST].sort((a, b) => a - b);+ const mergeUtils = readFileSync(join(ROOT, 'src/renderer/lib/utils.ts'), 'utf8');+ const mergeBlock = /font-size'[\s\S]*?text:\s*\[([^\]]+)\]/.exec(mergeUtils)?.[1] ?? '';+ const mergeNumeric = [...mergeBlock.matchAll(/['"](\d+)['"]/g)]+ .map((m) => Number(m[1]))+ .sort((a, b) => a - b);+ expect(mergeNumeric).toEqual(expected);+ });++ // ── 红绿 fixture:检查器本身的行为锚定(防误报/漏报同时回归) ──+ describe('checker fixtures', () => {+ const matches = (hits: Hit[]) => hits.map((h) => h.match);++ it('flags red samples', () => {+ expect(matches(findTwWeightViolations('className="text-12 font-bold"'))).toEqual([+ 'font-bold',+ ]);+ expect(matches(findTwWeightViolations('font-[550]'))).toEqual(['font-[550]']);+ // 同行双违规逐个计数(评审轮:第一个命中不再吞掉第二个)+ expect(findTwWeightViolations('cn("font-bold font-black")')).toHaveLength(2);+ expect(matches(findArbitrarySizes('className="text-[12.5px]"'))).toEqual(['text-[12.5px]']);+ // 固定 px 行高 + 会缩放的字号:同行、语义档位都要红。+ expect(matches(findFixedLeadingWithScalingToken('className="text-14 leading-[18px]"'))).toEqual(+ ['leading-[18px]'],+ );+ expect(+ findFixedLeadingWithScalingToken('className="text-sm leading-[18px]"'),+ ).toHaveLength(1);+ // 关键回归:cn(...) 把字号与行高分散到不同行时不得漏(#1553 实测漏过一处)。+ expect(+ findFixedLeadingWithScalingToken(+ ['className={cn(', " 'text-14 flex-1',", " 'leading-[22px]',", ')}'].join('\n'),+ ),+ ).toHaveLength(1);+ // className 区域与内层 cn(...) 区域重叠,同一处只能计一次。+ expect(+ findFixedLeadingWithScalingToken('className={cn("text-13", "leading-[16px]")}'),+ ).toHaveLength(1);+ expect(findArbitrarySizes('text-[9px] text-[8px]')).toHaveLength(2);+ // 全单位 / 大小写 / 无整数部分小数(三轮加固)+ expect(findArbitrarySizes('text-[0.75rem]')).toHaveLength(1);+ expect(findArbitrarySizes('text-[.75rem]')).toHaveLength(1);+ // 函数形式不能因 `[` 后不是数字而绕过守卫(P1)+ expect(findArbitrarySizes('text-[length:calc(9px+1vw)]')).toHaveLength(1);+ // `length:` 默认拒绝开放的 CSS 函数集合,不能退化为已知函数枚举。+ expect(findArbitrarySizes('text-[length:env(safe-area-inset-top,_9px)]')).toHaveLength(1);+ // 数字开头的现代单位不得依赖单位枚举:动态 viewport、font-relative、container-query。+ expect(findArbitrarySizes('text-[9dvh] text-[1lh] text-[1cqw]')).toHaveLength(3);+ // Tailwind 可推断为 length 的函数无需显式 `length:` 也必须拦截。+ expect(findArbitrarySizes('text-[calc(9px+1vw)] text-[clamp(9px,1vw,12px)]')).toHaveLength(2);+ expect(findArbitrarySizes('text-[length:var(--app-code-font-size)]')).toHaveLength(1);+ // Tailwind 任意属性形式同样会生成字号样式,不能绕过 text- 类守卫。+ expect(findArbitrarySizes('[font-size:9px] [font-size:17px]')).toHaveLength(2);+ // 百分比与 CSS 字号关键字也是可生成 font-size 的任意值;未知关键字同样默认拒绝。+ expect(findArbitrarySizes('text-[50%] text-[xx-small] text-[future-size-keyword]')).toHaveLength(3);+ // 省略前导零的小数必须按完整 0.12px 识别(P2)+ expect(findArbitrarySizes('text-[.12px]')).toHaveLength(1);+ expect(findArbitrarySizes('text-[12PX]')).toHaveLength(1);+ expect(findArbitrarySizes('text-[17pt]')).toHaveLength(1);+ expect(findArbitrarySizes('text-[length:.75rem]')).toHaveLength(1);+ expect(matches(findOffLadderTokenSizes('className="text-17 font-medium"'))).toEqual([+ 'text-17',+ ]);+ expect(matches(findOffLadderTokenSizes('text-xl text-2xl text-3xl text-9xl'))).toEqual([+ 'text-xl',+ 'text-2xl',+ 'text-3xl',+ 'text-9xl',+ ]);+ expect(findInlineWeightViolations('fontWeight: 700,')).toHaveLength(1);+ expect(findInlineWeightViolations("fontWeight: 'bold' }")).toHaveLength(1);+ // 中间值与越界值(不只认整百)+ expect(findInlineWeightViolations('fontWeight: 550,')).toHaveLength(1);+ expect(findInlineWeightViolations("fontWeight: '650' }")).toHaveLength(1);+ expect(findInlineWeightViolations('fontWeight: 999,')).toHaveLength(1);+ expect(findInlineWeightViolations('fontWeight: 1000,')).toHaveLength(1);+ expect(findInlineWeightViolations('fontWeight: 50,')).toHaveLength(1);+ // 三元 / style 赋值 / JSX 属性形态+ expect(findInlineWeightViolations('fontWeight: filled ? 700 : 400,')).toHaveLength(1);+ expect(findInlineWeightViolations("el.style.fontWeight = '700';")).toHaveLength(1);+ expect(findInlineWeightViolations('<Text fontWeight="800">')).toHaveLength(1);+ // 跨行声明(红队三轮 P1:值换行不再漏报)+ expect(findInlineWeightViolations('const s = {\n fontWeight:\n 800,\n};')).toHaveLength(+ 1,+ );+ expect(findInlineSizeViolations('const s = {\n fontSize:\n 17,\n};')).toHaveLength(1);+ expect(findStringWeightViolations('.x {\n font-weight:\n 900;\n}')).toHaveLength(1);+ expect(findFontShorthands('font:\n normal 700 12px/22px sans-serif;')).toHaveLength(1);+ expect(findInlineSizeViolations('fontSize: 17,')).toHaveLength(1);+ expect(findInlineSizeViolations("fontSize: '.12px',")).toHaveLength(1);+ expect(findInlineSizeViolations("fontSize: '12.5px' }")).toHaveLength(1);+ expect(findInlineSizeViolations('fontSize={17}')).toHaveLength(1);+ // 非 px 绝对/视口单位与大小写(三轮加固)+ expect(findInlineSizeViolations("fontSize: '17pt',")).toHaveLength(1);+ expect(findInlineSizeViolations("fontSize: '17ch',")).toHaveLength(1);+ expect(findInlineSizeViolations("fontSize: '17PX',")).toHaveLength(1);+ expect(findInlineSizeViolations("fontSize: '13pt',")).toHaveLength(1);+ expect(matches(findStringWeightViolations('font-weight:700;color:red'))).toEqual([+ 'font-weight:700',+ ]);+ expect(findStringWeightViolations('h1{font-weight:700} h2{font-weight:900}')).toHaveLength(2);+ expect(findStringWeightViolations('font-weight: bold;')).toHaveLength(1);+ const selectorBound = findStringWeightViolations(+ '.hljs-strong { font-weight: bold; } .ordinary-ui { font-weight: bold; }',+ { includeSelectorContext: true },+ );+ expect(selectorBound.map((hit) => hit.context)).toEqual(['.hljs-strong', '.ordinary-ui']);+ // CSS 通配选择器不是注释(css 路径经 stripCssComments,ts 路径经 prepareTsContent)+ expect(findStringWeightViolations(stripCssComments('* { font-weight: 900; }'))).toHaveLength(+ 1,+ );+ expect(+ findStringWeightViolations(prepareTsContent('const css = `\n* { font-weight: 900; }\n`;')),+ ).toHaveLength(1);+ expect(+ findStringWeightViolations(+ prepareTsContent('const css = `\n*{box-sizing:border-box}\n.a{font-weight:900}\n`;'),+ ),+ ).toHaveLength(1);+ // shorthand 合法变体全覆盖(三轮:size 关键字 / system 关键字 / var / global)+ expect(findFontShorthands('font: 600 12px/22px sans-serif;')).toHaveLength(1);+ expect(findFontShorthands('font: normal 700 12px/22px sans-serif;')).toHaveLength(1);+ expect(findFontShorthands('font : 900 12px sans-serif;')).toHaveLength(1);+ expect(findFontShorthands('font: bold 1.2em serif;')).toHaveLength(1);+ expect(findFontShorthands('font: caption;')).toHaveLength(1);+ expect(findFontShorthands('font: bold medium system-ui;')).toHaveLength(1);+ expect(findFontShorthands('font: medium serif;')).toHaveLength(1);+ expect(findFontShorthands('font: large Arial;')).toHaveLength(1);+ expect(findFontShorthands('font: var(--marker-font);')).toHaveLength(1);+ expect(findFontShorthands('font: initial;')).toHaveLength(1);+ expect(findFontShorthands('font: unset;')).toHaveLength(1);+ expect(findFontShorthands('font: revert;')).toHaveLength(1);+ // 引号值与大小写(红队四轮:style 对象里的字符串 shorthand / CSS 大小写不敏感)+ expect(findFontShorthands("style={{ font: 'bold 12px system-ui' }}")).toHaveLength(1);+ expect(findFontShorthands('style={{ font: "caption" }}')).toHaveLength(1);+ expect(findFontShorthands('font: CAPTION;')).toHaveLength(1);+ // 属性名大小写与完整值判定(gate-audit 四轮)+ expect(findFontShorthands('FONT: medium serif;')).toHaveLength(1);+ expect(findStringWeightViolations('FONT-WEIGHT: 900;')).toHaveLength(1);+ expect(findStringWeightViolations('font-weight: BOLD;')).toHaveLength(1);+ expect(findStringWeightViolations('font-weight: lighter;')).toHaveLength(1);+ // 小数中间值:完整值判定,不再截成 400/500/600 静默放行+ expect(findStringWeightViolations('font-weight: 400.5;')).toHaveLength(1);+ expect(findStringWeightViolations('font-weight: 500.5;')).toHaveLength(1);+ expect(findStringWeightViolations('font-weight: 600.5;')).toHaveLength(1);+ expect(findStringWeightViolations('font-weight: 900 !important;')).toHaveLength(1);+ expect(findInlineWeightViolations("fontWeight: 'lighter' }")).toHaveLength(1);+ expect(findInlineWeightViolations("fontWeight: 'BOLD' }")).toHaveLength(1);+ expect(findInlineWeightViolations("fontWeight: 'Bolder' }")).toHaveLength(1);+ // 括号包裹与混合三元:直接字面量臂不因片段含括号而整段漏判(gate-audit 五轮)+ expect(findInlineWeightViolations('fontWeight: (700),')).toHaveLength(1);+ expect(findInlineWeightViolations('fontWeight: active ? 700 : toWeight(500),')).toHaveLength(+ 1,+ );+ expect(findInlineWeightViolations('fontWeight: active ? toWeight(500) : 800,')).toHaveLength(+ 1,+ );+ // shorthand numeric weight 完整文法:两位/四位/小数/带符号不得绕过+ expect(findFontShorthands('font: 50 medium serif;')).toHaveLength(1);+ expect(findFontShorthands('font: 1000 medium serif;')).toHaveLength(1);+ expect(findFontShorthands('font: 700.5 medium serif;')).toHaveLength(1);+ expect(findFontShorthands('font: +700 medium serif;')).toHaveLength(1);+ expect(findStringWeightViolations('font-weight: +700;')).toHaveLength(1);+ expect(findStringWeightViolations('font-weight: .5;')).toHaveLength(1);+ // 错误映射 fixture:只改右侧映射值也必须被镜像解析抓住(P1)+ expect(+ parseNumericConfigMappings(`fontSize: {\n 12: 'var(--text-9)',\n},\nborderRadius: {}`),+ ).not.toEqual([[12, 12]]);+ expect(parseNumericCssMappings(':root { --text-12: 9px; }')).not.toEqual([[12, 12]]);+ // 删除档位后仍残留静态变量也必须被镜像检查抓住,而不是被白名单过滤吞掉。+ expect(parseNumericCssMappings(':root { --text-12: 12px; --text-17: 17px; }')).not.toEqual([+ [12, 12],+ ]);+ });++ it('passes green samples', () => {+ expect(findTwWeightViolations('className="font-medium font-semibold font-normal"')).toEqual(+ [],+ );+ expect(findArbitrarySizes('text-[var(--md-h1-fg)]')).toEqual([]);+ // 无单位比例本身就是修法,不能反过来判红。+ expect(findFixedLeadingWithScalingToken('className="text-14 leading-[1.571]"')).toEqual([]);+ // 没有会缩放的字号 token 时,固定行高不属于本规则(行高档位统一是 non-goal)。+ expect(findFixedLeadingWithScalingToken('className="leading-[22px] text-[var(--x)]"')).toEqual(+ [],+ );+ // 语义 leading 档位与行高变量同样放行。+ expect(findFixedLeadingWithScalingToken('className="text-14 leading-snug"')).toEqual([]);+ expect(findArbitrarySizes('text-[var(--app-code-font-size)]')).toEqual([]);+ expect(+ findOffLadderTokenSizes('className="text-xs text-sm text-base text-lg text-12 text-28"'),+ ).toEqual([]);+ expect(findInlineWeightViolations('fontWeight: 500,')).toEqual([]);+ expect(findInlineWeightViolations('fontWeight: active ? 600 : 500,')).toEqual([]);+ // 片段截断:同对象里的后续属性数字不误报为字重+ expect(findInlineWeightViolations('fontWeight: 500, width: 300 }')).toEqual([]);+ expect(findInlineSizeViolations('fontSize: 13,')).toEqual([]);+ expect(findInlineSizeViolations("fontSize: '13px' }")).toEqual([]);+ expect(findInlineSizeViolations('fontSize: CONTROL.fontSize,')).toEqual([]);+ // 相对比例(em/rem/%)与算式派生值属登记盲区,不误报+ expect(findInlineSizeViolations("fontSize: '2.15em',")).toEqual([]);+ expect(findInlineSizeViolations('fontSize: size * 0.86,')).toEqual([]);+ // SVG/JSX 多行属性:相邻属性的数值不串进本属性片段+ expect(+ findInlineSizeViolations(+ '<text\n fontSize="10"\n fontWeight="500"\n letterSpacing="0.3"\n/>',+ ),+ ).toEqual([]);+ expect(+ findInlineWeightViolations(+ '<text\n fontSize="10"\n fontWeight="500"\n letterSpacing="0.3"\n/>',+ ),+ ).toEqual([]);+ expect(findStringWeightViolations('font-weight: 600;')).toEqual([]);+ // normal(=400)/inherit 落梯放行;动态值与 initial/unset/revert 为登记盲区+ expect(findStringWeightViolations('font-weight: normal;')).toEqual([]);+ expect(findStringWeightViolations('font-weight: NORMAL;')).toEqual([]);+ expect(findStringWeightViolations('font-weight: inherit;')).toEqual([]);+ expect(findStringWeightViolations('font-weight: var(--w);')).toEqual([]);+ expect(findStringWeightViolations('font-weight: 500 !important;')).toEqual([]);+ expect(findFontShorthands("font: 'inherit'")).toEqual([]);+ expect(findFontShorthands('font: inherit;')).toEqual([]);+ expect(findFontShorthands('font: 20,')).toEqual([]);+ expect(findFontShorthands('font: markerFont,')).toEqual([]);+ // TS 逻辑表达式不是 CSS 声明(红队四轮误报面),跳过+ expect(findFontShorthands('const x = { font: bold && medium };')).toEqual([]);+ expect(findFontShorthands('font: caption || fallback,')).toEqual([]);+ // 函数调用子表达式按动态值剔除(参数域为登记盲区),不按内部参数误判;+ // 嵌套调用逐层剥净+ expect(findInlineWeightViolations('fontWeight: toWeight(550),')).toEqual([]);+ expect(findInlineWeightViolations('fontWeight: getWeight(active ? 700 : 500),')).toEqual([]);+ expect(findInlineWeightViolations('fontWeight: f(g(550)),')).toEqual([]);+ // 带符号合法值:+400 = 400,落梯放行+ expect(findStringWeightViolations('font-weight: +400;')).toEqual([]);+ // 非常规数字字面量形态为登记盲区(现行为 = 不判,锚定防悄改)+ expect(findInlineWeightViolations('fontWeight: 5e2,')).toEqual([]);+ expect(findInlineWeightViolations('fontWeight: 6_50,')).toEqual([]);+ // 尾注释剥离:注释里的数字不进入 fontSize 片段+ expect(+ findInlineSizeViolations(prepareTsContent('fontSize: 13, // 对齐 xterm 2024 默认')),+ ).toEqual([]);+ expect(prepareTsLine(' // font-weight: 700 in prose')).toBeNull();+ expect(prepareTsLine(' * jsdoc 续行 font-weight: 700 也是注释')).toBeNull();+ // CSS 块注释剥离保行号:注释内的违规不报、注释外的照报且行号正确+ const stripped = stripCssComments('/* font-weight: 900 */\na { font-weight: 900; }');+ const hits = findStringWeightViolations(stripped);+ expect(hits).toHaveLength(1);+ expect(stripped.slice(0, hits[0].index).split('\n')).toHaveLength(2);+ });+ });+});diff --git a/apps/desktop/src/renderer/cindy-brain/CindyCapabilityPrefs.tsx b/apps/desktop/src/renderer/cindy-brain/CindyCapabilityPrefs.tsxindex 37f294c27a..3f153192cf 100644--- a/apps/desktop/src/renderer/cindy-brain/CindyCapabilityPrefs.tsx+++ b/apps/desktop/src/renderer/cindy-brain/CindyCapabilityPrefs.tsx@@ -71,7 +71,7 @@ export function CindyCapabilityPrefs({<pclassName={cn('font-medium text-[var(--text-primary)]',- appearance === 'plugin' ? 'text-14 leading-[22px]' : 'text-13',+ appearance === 'plugin' ? 'text-14 leading-[1.571]' : 'text-13',)}>{t('settings.ghosts.detail.cindyPrefs.title')}diff --git a/apps/desktop/src/renderer/cindy-brain/GhostErrandPrefs.tsx b/apps/desktop/src/renderer/cindy-brain/GhostErrandPrefs.tsxindex f3ee36129a..1928ab62e4 100644--- a/apps/desktop/src/renderer/cindy-brain/GhostErrandPrefs.tsx+++ b/apps/desktop/src/renderer/cindy-brain/GhostErrandPrefs.tsx@@ -132,7 +132,7 @@ export function GhostErrandPrefs({<pclassName={cn('font-medium text-[var(--text-primary)]',- appearance === 'plugin' ? 'text-14 leading-[22px]' : 'text-13',+ appearance === 'plugin' ? 'text-14 leading-[1.571]' : 'text-13',)}>{t('settings.ghosts.detail.errandPrefs.title')}diff --git a/apps/desktop/src/renderer/cindy-brain/GhostPanelBubbleLayer.tsx b/apps/desktop/src/renderer/cindy-brain/GhostPanelBubbleLayer.tsxindex 77c1e84930..5b550e73de 100644--- a/apps/desktop/src/renderer/cindy-brain/GhostPanelBubbleLayer.tsx+++ b/apps/desktop/src/renderer/cindy-brain/GhostPanelBubbleLayer.tsx@@ -354,7 +354,7 @@ function StackBubble({{/* 数量角标:语义 token 灰阶,不引新强调色(与图钉同纪律)。 */}<spanaria-hidden- className="absolute -right-0.5 -top-0.5 flex h-4 min-w-4 items-center justify-center rounded-full border border-[var(--text-tertiary)] bg-[var(--surface-chip)] px-1 text-[10px] font-medium leading-none text-[var(--text-secondary)]"+ className="absolute -right-0.5 -top-0.5 flex h-4 min-w-4 items-center justify-center rounded-full border border-[var(--text-tertiary)] bg-[var(--surface-chip)] px-1 text-10 font-medium leading-none text-[var(--text-secondary)]">{count}</span>diff --git a/apps/desktop/src/renderer/cindy-brain/GhostSettingsWebview.tsx b/apps/desktop/src/renderer/cindy-brain/GhostSettingsWebview.tsxindex 0a3c26b942..e1bd5877e9 100644--- a/apps/desktop/src/renderer/cindy-brain/GhostSettingsWebview.tsx+++ b/apps/desktop/src/renderer/cindy-brain/GhostSettingsWebview.tsx@@ -471,7 +471,7 @@ export function GhostSettingsWebview({<pclassName={cn('font-medium text-[var(--text-primary)]',- appearance === 'plugin' ? 'text-14 leading-[22px]' : 'text-13',+ appearance === 'plugin' ? 'text-14 leading-[1.571]' : 'text-13',)}>{title ?? t('settings.ghosts.detail.customSlotTitle')}diff --git a/apps/desktop/src/renderer/cindy-brain/OneshotModelPinPicker.tsx b/apps/desktop/src/renderer/cindy-brain/OneshotModelPinPicker.tsxindex 92fe7721a5..c3eb5d81ad 100644--- a/apps/desktop/src/renderer/cindy-brain/OneshotModelPinPicker.tsx+++ b/apps/desktop/src/renderer/cindy-brain/OneshotModelPinPicker.tsx@@ -214,7 +214,7 @@ export function OneshotModelPinPicker({</span><span className="ml-auto flex shrink-0 items-center gap-1.5">{o.subscription && (- <span className="inline-flex shrink-0 items-center rounded-full bg-[var(--surface-chip)] px-2 py-[1px] text-[11px] font-medium text-[var(--text-secondary)]">+ <span className="inline-flex shrink-0 items-center rounded-full bg-[var(--surface-chip)] px-2 py-[1px] text-11 font-medium text-[var(--text-secondary)]">{t('settings.providers.models.subscription')}</span>)}diff --git a/apps/desktop/src/renderer/cindy-brain/ghostPanelBody.tsx b/apps/desktop/src/renderer/cindy-brain/ghostPanelBody.tsxindex 5109e9271a..8009280e41 100644--- a/apps/desktop/src/renderer/cindy-brain/ghostPanelBody.tsx+++ b/apps/desktop/src/renderer/cindy-brain/ghostPanelBody.tsx@@ -48,14 +48,14 @@ export function GhostPanelError({return (<div className="flex min-h-0 flex-1 flex-col items-center justify-center gap-3 p-4"><CircleAlert size={22} className="text-[var(--error-fg)]" />- <p className="text-center text-[12px] leading-relaxed text-[var(--text-secondary)]">+ <p className="text-center text-12 leading-relaxed text-[var(--text-secondary)]">{t(state === 'fused' ? 'settings.ghosts.panelError.fused' : 'settings.ghosts.panelError.crashed')}</p><div className="flex items-center gap-2"><buttontype="button"onClick={reload}- className="rounded-full border border-[var(--border-default)] px-3.5 py-1.5 text-[12px] font-medium text-[var(--text-primary)] transition-colors hover:bg-[var(--surface-chip)]"+ className="rounded-full border border-[var(--border-default)] px-3.5 py-1.5 text-12 font-medium text-[var(--text-primary)] transition-colors hover:bg-[var(--surface-chip)]">{t('settings.ghosts.panelError.reload')}</button>@@ -63,7 +63,7 @@ export function GhostPanelError({<buttontype="button"onClick={() => void window.electronAPI.ghosts.setEnabled(manifest.id, false).catch(() => {})}- className="rounded-full border border-[var(--border-default)] px-3.5 py-1.5 text-[12px] font-medium text-[var(--text-primary)] transition-colors hover:bg-[var(--surface-chip)]"+ className="rounded-full border border-[var(--border-default)] px-3.5 py-1.5 text-12 font-medium text-[var(--text-primary)] transition-colors hover:bg-[var(--surface-chip)]">{t('settings.ghosts.panelError.close')}</button>diff --git a/apps/desktop/src/renderer/components/auth/LegacyMigrationDialog.tsx b/apps/desktop/src/renderer/components/auth/LegacyMigrationDialog.tsxindex 1c1afb47d6..6ab97c9aff 100644--- a/apps/desktop/src/renderer/components/auth/LegacyMigrationDialog.tsx+++ b/apps/desktop/src/renderer/components/auth/LegacyMigrationDialog.tsx@@ -129,7 +129,7 @@ export function LegacyMigrationDialog() {id="legacy-migration-title"style={{margin: 0,- fontSize: 23,+ fontSize: 24,lineHeight: 1.25,fontWeight: 700,color: 'var(--login-callback-title)',@@ -142,7 +142,7 @@ export function LegacyMigrationDialog() {id="legacy-migration-desc"style={{margin: '22px 0 0',- fontSize: 19,+ fontSize: 18,lineHeight: '29px',color: 'var(--login-callback-body)',}}@@ -170,7 +170,7 @@ export function LegacyMigrationDialog() {background: 'var(--login-callback-cta-bg)',border: '1px solid var(--login-callback-cta-border)',color: 'var(--login-callback-cta-text)',- fontSize: 17,+ fontSize: 16,fontWeight: 700,padding: '0 46px',cursor: running ? 'default' : 'pointer',diff --git a/apps/desktop/src/renderer/components/chat/AgentActionRow.tsx b/apps/desktop/src/renderer/components/chat/AgentActionRow.tsxindex 7c6e18b330..32f1204b74 100644--- a/apps/desktop/src/renderer/components/chat/AgentActionRow.tsx+++ b/apps/desktop/src/renderer/components/chat/AgentActionRow.tsx@@ -812,14 +812,14 @@ export function AgentActionRow({// 身份视觉(头像/印记)由结果位的意识卡片头部承担(2026-07-12 Lizi 定案)。if (ghostInfo) {return (- <span className="truncate text-[14px] font-medium text-[var(--msg-tool-card-chevron)]">+ <span className="truncate text-14 font-medium text-[var(--msg-tool-card-chevron)]">「{ghostInfo.name}」· {ghostInfo.tool}</span>);}if (fileChangeCountText) {return (- <span className="min-w-0 truncate text-[14px] font-medium text-[var(--msg-tool-card-chevron)]">+ <span className="min-w-0 truncate text-14 font-medium text-[var(--msg-tool-card-chevron)]">{fileChangeCountText}</span>);@@ -836,7 +836,7 @@ export function AgentActionRow({'bg-[var(--chat-input-chip-bg)]','border-[var(--chat-input-chip-border)]','text-[var(--chat-input-chip-text)]',- 'font-mono text-[13px] leading-[18px] whitespace-nowrap',+ 'font-mono text-13 leading-[1.385] whitespace-nowrap','cursor-pointer transition-colors','group-hover:bg-[var(--cmd-palette-item-hover)]','min-w-0 max-w-full',@@ -849,7 +849,7 @@ export function AgentActionRow({}return (<span- className="text-[14px] font-medium text-[var(--msg-tool-card-chevron)] truncate min-w-0 cursor-pointer"+ className="text-14 font-medium text-[var(--msg-tool-card-chevron)] truncate min-w-0 cursor-pointer"title={displayParam.fullTitle}>{displayParam.text}@@ -920,14 +920,14 @@ export function AgentActionRow({)}</span>{!hideVerb && (- <span className="text-[14px] text-[var(--msg-tool-card-chevron)] shrink-0">+ <span className="text-14 text-[var(--msg-tool-card-chevron)] shrink-0">{rowVerbLabel}</span>)}{displayCell}<span className="flex-1" />{stats && (- <span className="font-mono text-[13px] font-medium shrink-0 flex gap-1">+ <span className="font-mono text-13 font-medium shrink-0 flex gap-1"><span className="text-[var(--diff-add-fg)]">+{stats.add}</span><span className="text-[var(--diff-del-fg)]">-{stats.del}</span></span>@@ -953,7 +953,7 @@ export function AgentActionRow({<divdata-agent-action-raw-command="true"title={rawCommand}- className="min-w-0 truncate px-2 pb-[3px] pl-[30px] font-mono text-[12px] leading-[18px] text-[var(--msg-tool-card-chevron)]"+ className="min-w-0 truncate px-2 pb-[3px] pl-[30px] font-mono text-12 leading-[1.5] text-[var(--msg-tool-card-chevron)]">{rawCommand}</div>diff --git a/apps/desktop/src/renderer/components/chat/AssistantMessage.tsx b/apps/desktop/src/renderer/components/chat/AssistantMessage.tsxindex e249d71871..9a33e86de6 100644--- a/apps/desktop/src/renderer/components/chat/AssistantMessage.tsx+++ b/apps/desktop/src/renderer/components/chat/AssistantMessage.tsx@@ -343,7 +343,7 @@ export const AssistantMessage = memo(function AssistantMessage({<buttontype="button"onClick={() => setShowOriginal((v) => !v)}- className="mt-1 text-[11px] underline decoration-dotted underline-offset-2"+ className="mt-1 text-11 underline decoration-dotted underline-offset-2"style={{ color: 'var(--text-tertiary)' }}>{showOriginal ? t('chat.ghostHook.viewGhostCard') : t('chat.ghostHook.viewOriginal')}@@ -352,7 +352,7 @@ export const AssistantMessage = memo(function AssistantMessage({{/* 出口钩子后台处理中:回复已显示、意识还在跑那段的轻指示(规则 7:spinner 挂 wrapper 的 compositor-only transform,仅 pending 时挂载)。 */}{ghostReplyPending && !ghostRenderCard && (- <div className="mt-1 flex items-center gap-1.5 text-[11px]" style={{ color: 'var(--text-tertiary)' }}>+ <div className="mt-1 flex items-center gap-1.5 text-11" style={{ color: 'var(--text-tertiary)' }}><span className="inline-flex animate-spin motion-reduce:animate-none"><Loader2 size={11} /></span>@@ -364,7 +364,7 @@ export const AssistantMessage = memo(function AssistantMessage({下知道这轮不是自己选的模型回答的;icon 用 warning 语义色(token 豁免簇),文字保持 tertiary 灰阶,不喧宾夺主。 */}{modelMismatch && (- <div className="mt-1 flex items-center gap-1.5 text-[11px]" style={{ color: 'var(--text-tertiary)' }}>+ <div className="mt-1 flex items-center gap-1.5 text-11" style={{ color: 'var(--text-tertiary)' }}><TriangleAlert size={11} style={{ color: 'var(--warning-fg)' }} aria-hidden />{t('chat.modelMismatch.notice', {actual: formatModelShortLabel(modelMismatch.actual) || modelMismatch.actual,diff --git a/apps/desktop/src/renderer/components/chat/AutomationOriginBadge.tsx b/apps/desktop/src/renderer/components/chat/AutomationOriginBadge.tsxindex 530a8f2f9e..839a63f94d 100644--- a/apps/desktop/src/renderer/components/chat/AutomationOriginBadge.tsx+++ b/apps/desktop/src/renderer/components/chat/AutomationOriginBadge.tsx@@ -31,7 +31,7 @@ export function AutomationOriginBadge({if (navigationMode === 'sidebar-embedded') {return (- <span className="inline-flex max-w-full items-center gap-1 text-[11px] text-[var(--cmd-palette-item-meta)]">+ <span className="inline-flex max-w-full items-center gap-1 text-11 text-[var(--cmd-palette-item-meta)]">{content}</span>);@@ -45,7 +45,7 @@ export function AutomationOriginBadge({onClick={() => navigate(scheduleFocusPath(automationOrigin.scheduleId))}className={cn('inline-flex max-w-full items-center gap-1 cursor-pointer',- 'text-[11px] text-[var(--cmd-palette-item-meta)]',+ 'text-11 text-[var(--cmd-palette-item-meta)]','hover:text-foreground transition-colors focus:outline-none',)}>diff --git a/apps/desktop/src/renderer/components/chat/GeneratedFilesCard.tsx b/apps/desktop/src/renderer/components/chat/GeneratedFilesCard.tsxindex c7b6a75c52..7e39e55449 100644--- a/apps/desktop/src/renderer/components/chat/GeneratedFilesCard.tsx+++ b/apps/desktop/src/renderer/components/chat/GeneratedFilesCard.tsx@@ -113,7 +113,7 @@ function GeneratedFileChip({ file }: { file: GeneratedFileRef }) {'h-7 px-2.5 py-1.5 max-w-[280px]','rounded-[9999px]','bg-[var(--msg-md-inline-code-bg)]',- 'text-[13px] font-medium text-[var(--msg-assistant-text)]',+ 'text-13 font-medium text-[var(--msg-assistant-text)]','hover:bg-[var(--cmd-palette-item-hover)]','transition-colors cursor-pointer',)}@@ -259,7 +259,7 @@ export function GeneratedFilesCard({onClick={() => setExpanded(true)}className={cn('inline-flex items-center gap-1 h-7 px-2.5 py-1.5 rounded-[9999px]',- 'text-[13px] text-[var(--text-secondary)]',+ 'text-13 text-[var(--text-secondary)]','hover:bg-[var(--cmd-palette-item-hover)] transition-colors cursor-pointer',)}>@@ -273,7 +273,7 @@ export function GeneratedFilesCard({onClick={() => setExpanded(false)}className={cn('inline-flex items-center gap-1 h-7 px-2.5 py-1.5 rounded-[9999px]',- 'text-[13px] text-[var(--text-secondary)]',+ 'text-13 text-[var(--text-secondary)]','hover:bg-[var(--cmd-palette-item-hover)] transition-colors cursor-pointer',)}>diff --git a/apps/desktop/src/renderer/components/chat/GhostSummonCard.tsx b/apps/desktop/src/renderer/components/chat/GhostSummonCard.tsxindex 138e771047..25a38b08e3 100644--- a/apps/desktop/src/renderer/components/chat/GhostSummonCard.tsx+++ b/apps/desktop/src/renderer/components/chat/GhostSummonCard.tsx@@ -285,7 +285,7 @@ export function GhostSummonCard({onClick={() => setExpanded((v) => !v)}className={cn('inline-flex max-w-full cursor-pointer items-center gap-1.5',- 'rounded-full border px-2.5 py-1 text-[11px]',+ 'rounded-full border px-2.5 py-1 text-11','transition-colors hover:text-foreground focus-visible:outline-none','focus-visible:ring-2 focus-visible:ring-[var(--focus-ring-soft)]',)}@@ -426,7 +426,7 @@ export function GhostSummonCard({<div className="mb-2 flex items-center gap-2">{badgeCommand && (<span- className="shrink-0 rounded-full px-2 py-[2px] font-mono text-[11px] leading-none"+ className="shrink-0 rounded-full px-2 py-[2px] font-mono text-11 leading-none"style={{ backgroundColor: 'var(--surface-chip)', color: 'var(--text-secondary)' }}>${badgeCommand}@@ -434,7 +434,7 @@ export function GhostSummonCard({)}{versionLabel && (<span- className="shrink-0 font-mono text-[11px] leading-none"+ className="shrink-0 font-mono text-11 leading-none"style={{ color: 'var(--text-tertiary)' }}>{versionLabel}diff --git a/apps/desktop/src/renderer/components/chat/GhostToolCard.tsx b/apps/desktop/src/renderer/components/chat/GhostToolCard.tsxindex a8807a819d..ce820c72e9 100644--- a/apps/desktop/src/renderer/components/chat/GhostToolCard.tsx+++ b/apps/desktop/src/renderer/components/chat/GhostToolCard.tsx@@ -754,7 +754,7 @@ function GhostCardCanvas({boxShadow: 'var(--shadow-menu)',}}>- <div className="text-[13px] font-semibold" style={{ color: 'var(--text-primary)' }}>+ <div className="text-13 font-semibold" style={{ color: 'var(--text-primary)' }}>{t('chat.ghostCall.linkConfirmTitle')}</div><div className="mt-1.5 text-xs" style={{ color: 'var(--text-secondary)' }}>@@ -762,14 +762,14 @@ function GhostCardCanvas({</div>{linkAskHost ? (<div- className="mt-1.5 break-all text-[13px] font-semibold"+ className="mt-1.5 break-all text-13 font-semibold"style={{ color: 'var(--text-primary)' }}>{linkAskHost}</div>) : null}<div- className="mt-1 max-h-24 overflow-y-auto break-all font-mono text-[11px] leading-relaxed"+ className="mt-1 max-h-24 overflow-y-auto break-all font-mono text-11 leading-relaxed"style={{ color: 'var(--text-tertiary)' }}>{linkAsk}@@ -974,7 +974,7 @@ export function GhostToolCard({<Ghost size={11} style={{ color: 'var(--text-secondary)' }} />)}</span>- <span className="min-w-0 truncate text-[11px] font-medium" style={{ color: 'var(--text-secondary)' }}>+ <span className="min-w-0 truncate text-11 font-medium" style={{ color: 'var(--text-secondary)' }}>{name}</span><span className="flex h-3.5 w-3.5 items-center justify-center">@@ -1008,20 +1008,20 @@ export function GhostToolCard({>{toolName ? (<div- className="mb-1 inline-block rounded px-1.5 py-px font-mono text-[10px]"+ className="mb-1 inline-block rounded px-1.5 py-px font-mono text-10"style={{ backgroundColor: 'var(--surface-chip)', color: 'var(--text-secondary)' }}>{toolName}</div>) : null}<div- className="mb-1 text-[10px] font-medium tracking-[0.5px]"+ className="mb-1 text-10 font-medium tracking-[0.5px]"style={{ color: 'var(--text-tertiary)' }}>{t('chat.ghostCall.cardParams')}</div><pre- className="max-h-48 overflow-auto whitespace-pre-wrap break-all font-mono text-[11px] leading-relaxed"+ className="max-h-48 overflow-auto whitespace-pre-wrap break-all font-mono text-11 leading-relaxed"style={{ color: 'var(--text-secondary)' }}>{paramsJson}@@ -1060,7 +1060,7 @@ export function GhostToolCard({<Ghost size={11} style={{ color: 'var(--text-secondary)' }} />)}</span>- <span className="min-w-0 truncate text-[11px] font-medium" style={{ color: 'var(--text-secondary)' }}>+ <span className="min-w-0 truncate text-11 font-medium" style={{ color: 'var(--text-secondary)' }}>{name}</span><span className="flex h-3.5 w-3.5 items-center justify-center">diff --git a/apps/desktop/src/renderer/components/chat/HookTaskCard.tsx b/apps/desktop/src/renderer/components/chat/HookTaskCard.tsxindex 5725d23ae2..8d0f300932 100644--- a/apps/desktop/src/renderer/components/chat/HookTaskCard.tsx+++ b/apps/desktop/src/renderer/components/chat/HookTaskCard.tsx@@ -74,14 +74,14 @@ export default function HookTaskCard({ im, userText, threadContext }: HookTaskCa{/* Header: IM 图标 + Cindy 署名 */}<div className="flex items-center gap-2 px-[14px] pt-[10px] pb-[6px]"><ImIcon im={im} />- <span className="text-[13px] font-semibold text-[var(--text-primary)]">+ <span className="text-13 font-semibold text-[var(--text-primary)]">{t('chat.threadContext.cindyFrom', { platform: imLabel(im) })}</span></div>{/* Body: 用户实际提问 */}<div className="px-[14px] pb-[12px] flex flex-col gap-2">- <div className="text-[14px] leading-[1.6] text-[var(--text-primary)] whitespace-pre-wrap break-words">+ <div className="text-14 leading-[1.6] text-[var(--text-primary)] whitespace-pre-wrap break-words">{userText}</div>@@ -94,7 +94,7 @@ export default function HookTaskCard({ im, userText, threadContext }: HookTaskCaonClick={() => setExpanded((v) => !v)}className={cn('flex items-center gap-1.5 w-fit cursor-pointer',- 'text-[12px] font-medium text-[var(--text-tertiary)]',+ 'text-12 font-medium text-[var(--text-tertiary)]','hover:text-[var(--text-secondary)] transition-colors focus:outline-none',)}>@@ -114,7 +114,7 @@ export default function HookTaskCard({ im, userText, threadContext }: HookTaskCa<div className="flex flex-col gap-0.5 pl-[18px]">{entries.map((entry, i) => (// biome-ignore lint/suspicious/noArrayIndexKey: 消息内容不可变,index 稳定。- <div key={i} className="text-[12px] leading-[1.5] text-[var(--text-tertiary)] break-words">+ <div key={i} className="text-12 leading-[1.5] text-[var(--text-tertiary)] break-words"><span className="font-semibold">[{entry.author}]</span> {entry.text}</div>))}diff --git a/apps/desktop/src/renderer/components/chat/InlineReferenceChip.tsx b/apps/desktop/src/renderer/components/chat/InlineReferenceChip.tsxindex cbf7a4ce37..bd229915a5 100644--- a/apps/desktop/src/renderer/components/chat/InlineReferenceChip.tsx+++ b/apps/desktop/src/renderer/components/chat/InlineReferenceChip.tsx@@ -64,7 +64,7 @@ export function InlineReferenceChip({const sharedClassName = cn('inline-flex min-w-0 max-w-full items-center',!textSelectable && 'select-none',- 'gap-1.5 rounded-full border px-2 py-0.5 text-[12px] font-normal leading-5',+ 'gap-1.5 rounded-full border px-2 py-0.5 text-12 font-normal leading-5','bg-[var(--surface-chip)] text-[var(--text-primary)]',// 下划线跟着 `interactive` 一起给:DESIGN.md §14.5 要求「下划线 ⇔ 可点」双向成立,// 而本组件同时服务可点的会话 / 项目深链 chip 与不可点的静态 chip(sidebar-embeddeddiff --git a/apps/desktop/src/renderer/components/chat/JumpToBottomChip.tsx b/apps/desktop/src/renderer/components/chat/JumpToBottomChip.tsxindex 18db7f9810..715526eee4 100644--- a/apps/desktop/src/renderer/components/chat/JumpToBottomChip.tsx+++ b/apps/desktop/src/renderer/components/chat/JumpToBottomChip.tsx@@ -13,7 +13,7 @@* 视觉:与 NewMessageIndicator 完全同款规格(同一坐标位置 + 互斥共存,* 外观必须一致才不会有"切换抖一下尺寸"的视觉跳变):* - h-8 / px-3 py-1.5 / rounded-full- * - text-[12px] font-medium+ * - text-12 font-medium* - icon size=14,**放在文字前**(与 NewMessageIndicator 一致)* - shadow-md / 同色 token (--content-area / --msg-tool-card-border / --msg-tool-text)*@@ -64,7 +64,7 @@ export function JumpToBottomChip({'flex h-8 items-center gap-1.5 rounded-full px-3 py-1.5','border border-[var(--msg-tool-card-border)]','bg-[hsl(var(--content-area))] shadow-md',- 'text-[12px] font-medium leading-none text-[var(--msg-tool-text)]',+ 'text-12 font-medium leading-none text-[var(--msg-tool-text)]','transition-colors duration-150 ease-out',// hover:用项目通用 list-item hover token(与 SlashCommandPalette /// ModelSelector 等同源)。不用 content-area + alpha,alpha 会让下方diff --git a/apps/desktop/src/renderer/components/chat/MermaidLightbox.tsx b/apps/desktop/src/renderer/components/chat/MermaidLightbox.tsxindex 1602857522..6ecd116d5d 100644--- a/apps/desktop/src/renderer/components/chat/MermaidLightbox.tsx+++ b/apps/desktop/src/renderer/components/chat/MermaidLightbox.tsx@@ -310,7 +310,7 @@ export function MermaidLightbox({ svg, source, onAnnotate, onClose }: MermaidLig><Minus className="h-4 w-4" /></ToolbarButton>- <span className="px-2 text-[12px] tabular-nums text-[var(--lightbox-toolbar-fg)] select-none">+ <span className="px-2 text-12 tabular-nums text-[var(--lightbox-toolbar-fg)] select-none">{Math.round(scale * 100)}%</span><ToolbarButtondiff --git a/apps/desktop/src/renderer/components/chat/MessageActionBar.tsx b/apps/desktop/src/renderer/components/chat/MessageActionBar.tsxindex f87ea095bf..20071b1d38 100644--- a/apps/desktop/src/renderer/components/chat/MessageActionBar.tsx+++ b/apps/desktop/src/renderer/components/chat/MessageActionBar.tsx@@ -360,7 +360,7 @@ export function MessageActionBar({<timedateTime={createdAt}className={cn(- 'inline-flex h-[24px] items-center text-[12px] font-normal whitespace-nowrap',+ 'inline-flex h-[24px] items-center text-12 font-normal whitespace-nowrap',// Optical adjustment: nudge time text down 0.5px so its visual// mid-line aligns with the lucide Copy icon glyph center.'relative top-[0.5px]',@@ -425,7 +425,7 @@ export function MessageActionBar({// bar 的 gap-0.5(2px)对两段相邻文本太挤,额外 6px 左距(共 8px)让「时间 | 用量」// 读成两个独立信息组。金额与 token 回退共用同一套 —— 换的是内容,不是位置。const metaTextClassName = cn(- 'inline-flex h-[24px] items-center text-[12px] font-normal whitespace-nowrap',+ 'inline-flex h-[24px] items-center text-12 font-normal whitespace-nowrap','relative top-[0.5px]','ml-1.5','text-[var(--settings-section-desc)] cursor-default',diff --git a/apps/desktop/src/renderer/components/chat/MessageNavRail.tsx b/apps/desktop/src/renderer/components/chat/MessageNavRail.tsxindex 1bf7416f77..9abf9dff71 100644--- a/apps/desktop/src/renderer/components/chat/MessageNavRail.tsx+++ b/apps/desktop/src/renderer/components/chat/MessageNavRail.tsx@@ -413,7 +413,7 @@ export function MessageNavRail({><spanaria-hidden="true"- className="text-[9px] leading-none text-[var(--text-tertiary)]"+ className="text-10 leading-none text-[var(--text-tertiary)]">⋯</span>diff --git a/apps/desktop/src/renderer/components/chat/MessageStream.tsx b/apps/desktop/src/renderer/components/chat/MessageStream.tsxindex 3724dd7e49..cc2048e767 100644--- a/apps/desktop/src/renderer/components/chat/MessageStream.tsx+++ b/apps/desktop/src/renderer/components/chat/MessageStream.tsx@@ -434,7 +434,7 @@ function ForkOriginMarker({ onClick }: { onClick?: () => void }) {type="button"onClick={onClick}disabled={!onClick}- className="group inline-flex shrink-0 items-center gap-2 bg-transparent p-0 text-[13px] font-medium leading-5 text-[var(--text-secondary)] transition-colors hover:text-[var(--text-primary)] hover:underline hover:underline-offset-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--focus-ring)] disabled:cursor-default disabled:text-[var(--text-tertiary)] disabled:hover:no-underline"+ className="group inline-flex shrink-0 items-center gap-2 bg-transparent p-0 text-13 font-medium leading-5 text-[var(--text-secondary)] transition-colors hover:text-[var(--text-primary)] hover:underline hover:underline-offset-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--focus-ring)] disabled:cursor-default disabled:text-[var(--text-tertiary)] disabled:hover:no-underline"><GitFork size={15} strokeWidth={2} className="shrink-0" aria-hidden="true" /><span>{t('chat.forkOrigin.label')}</span>diff --git a/apps/desktop/src/renderer/components/chat/NewMessageIndicator.tsx b/apps/desktop/src/renderer/components/chat/NewMessageIndicator.tsxindex 01678eccbc..d9d8f139aa 100644--- a/apps/desktop/src/renderer/components/chat/NewMessageIndicator.tsx+++ b/apps/desktop/src/renderer/components/chat/NewMessageIndicator.tsx@@ -74,7 +74,7 @@ export function NewMessageIndicator({'border border-[var(--msg-tool-card-border)]','bg-[hsl(var(--content-area))] shadow-md',// 文字:12px / 500 / 使用 msg-tool-text- 'text-[12px] font-medium leading-none text-[var(--msg-tool-text)]',+ 'text-12 font-medium leading-none text-[var(--msg-tool-text)]',// hover / active:用项目通用的 list-item hover token,与// SlashCommandPalette / ModelSelector / FolderPicker 等保持一致。// 不用 content-area + alpha — alpha 会让下方文字透过来。diff --git a/apps/desktop/src/renderer/components/chat/QuoteChip.tsx b/apps/desktop/src/renderer/components/chat/QuoteChip.tsxindex 46196b631a..247e38da90 100644--- a/apps/desktop/src/renderer/components/chat/QuoteChip.tsx+++ b/apps/desktop/src/renderer/components/chat/QuoteChip.tsx@@ -24,12 +24,12 @@ export function QuoteChip({const tooltip = (<span className="flex flex-col gap-1">- <span className="whitespace-pre-wrap text-[12px] leading-[1.5] [overflow-wrap:anywhere]">+ <span className="whitespace-pre-wrap text-12 leading-[1.5] [overflow-wrap:anywhere]">“{quote.text}”</span>{sourceLabel ? (<span- className="inline-flex min-w-0 items-center gap-1 text-[11px]"+ className="inline-flex min-w-0 items-center gap-1 text-11"style={{ color: 'var(--text-tertiary)' }}><FileText className="h-3 w-3 shrink-0" aria-hidden />diff --git a/apps/desktop/src/renderer/components/chat/SelectionQuoteButton.tsx b/apps/desktop/src/renderer/components/chat/SelectionQuoteButton.tsxindex 4b685a5707..2f2ceb12fe 100644--- a/apps/desktop/src/renderer/components/chat/SelectionQuoteButton.tsx+++ b/apps/desktop/src/renderer/components/chat/SelectionQuoteButton.tsx@@ -270,7 +270,7 @@ export function SelectionQuoteButton({// mousedown 先于 click 触发浏览器清选区;preventDefault 保住选区与按钮。onMouseDown={(e) => e.preventDefault()}onClick={handleAdd}- className="fixed z-[60] flex w-max items-center gap-2.5 whitespace-nowrap rounded-full px-3 py-1.5 text-[12px] shadow-[var(--shadow-menu)]"+ className="fixed z-[60] flex w-max items-center gap-2.5 whitespace-nowrap rounded-full px-3 py-1.5 text-12 shadow-[var(--shadow-menu)]"style={{left: clamp(anchor.x, BUTTON_MIN_X_PX, window.innerWidth - BUTTON_RIGHT_MARGIN_PX),top:diff --git a/apps/desktop/src/renderer/components/chat/SessionHandoffCard.tsx b/apps/desktop/src/renderer/components/chat/SessionHandoffCard.tsxindex 7a26f5fcc3..61b4c5b30f 100644--- a/apps/desktop/src/renderer/components/chat/SessionHandoffCard.tsx+++ b/apps/desktop/src/renderer/components/chat/SessionHandoffCard.tsx@@ -127,7 +127,7 @@ export function SessionHandoffCard({</span><spanclassName={cn(- 'shrink-0 rounded-full px-2 py-[2px] text-[10px] font-medium uppercase leading-4 tracking-[0.4px]',+ 'shrink-0 rounded-full px-2 py-[2px] text-10 font-medium uppercase leading-4 tracking-[0.4px]',solidBadge? 'bg-[var(--send-btn-bg)] text-[var(--send-btn-icon)]': 'border border-[var(--send-btn-bg)] bg-[var(--cmd-palette-bg)] text-[var(--send-btn-bg)]',@@ -155,7 +155,7 @@ export function SessionHandoffCard({</span>)}<span className="shrink-0 text-12 leading-4 text-[var(--cmd-palette-item-meta)]">·</span>- <span className="shrink-0 font-mono text-[11px] leading-4 text-[var(--cmd-palette-item-meta)]">+ <span className="shrink-0 font-mono text-11 leading-4 text-[var(--cmd-palette-item-meta)]">{shortSessionId(sessionId)}</span></span>diff --git a/apps/desktop/src/renderer/components/chat/SessionLinkChip.tsx b/apps/desktop/src/renderer/components/chat/SessionLinkChip.tsxindex 919d05887f..dca0f02617 100644--- a/apps/desktop/src/renderer/components/chat/SessionLinkChip.tsx+++ b/apps/desktop/src/renderer/components/chat/SessionLinkChip.tsx@@ -186,7 +186,7 @@ export function SessionLinkChip({ href, label, referenceMetadata }: SessionLinkCreferenceDetails.length > 0 ? (<spandata-session-reference-summary=""- className="ml-1 min-w-0 truncate text-[11px] text-[var(--text-tertiary)]"+ className="ml-1 min-w-0 truncate text-11 text-[var(--text-tertiary)]">{referenceDetails.join(' · ')}</span>diff --git a/apps/desktop/src/renderer/components/chat/ShareSelectionBar.tsx b/apps/desktop/src/renderer/components/chat/ShareSelectionBar.tsxindex add36dd152..54bfb7480b 100644--- a/apps/desktop/src/renderer/components/chat/ShareSelectionBar.tsx+++ b/apps/desktop/src/renderer/components/chat/ShareSelectionBar.tsx@@ -191,7 +191,7 @@ export function ShareSelectionBar({ sessionId, contentWidth, barWidth }: ShareSeonClick={toggleAll}disabled={busy !== null || shareableMessageIds.length === 0}className={cn(- 'inline-flex h-8 shrink-0 items-center gap-2 rounded-full border px-3 text-[13px] font-medium transition-colors',+ 'inline-flex h-8 shrink-0 items-center gap-2 rounded-full border px-3 text-13 font-medium transition-colors','outline-none focus-visible:ring-2 focus-visible:ring-[var(--focus-ring)]','border-[var(--border-default)] bg-[var(--surface-chip)] text-[var(--text-primary)]','hover:bg-[var(--surface-hover)] disabled:cursor-default disabled:opacity-50',@@ -211,10 +211,10 @@ export function ShareSelectionBar({ sessionId, contentWidth, barWidth }: ShareSe</button><div className="min-w-0 flex-1">- <div className="text-[14px] font-medium leading-tight text-[var(--text-primary)]">+ <div className="text-14 font-medium leading-tight text-[var(--text-primary)]">{t('chat.shareImage.title')}</div>- <div className="mt-0.5 truncate text-[12px] leading-tight text-[var(--text-secondary)]">+ <div className="mt-0.5 truncate text-12 leading-tight text-[var(--text-secondary)]">{t('chat.shareImage.subtitle', { count })}</div></div>@@ -230,7 +230,7 @@ export function ShareSelectionBar({ sessionId, contentWidth, barWidth }: ShareSeonClick={() => shareSelectionStore.exit()}disabled={busy !== null}className={cn(- 'rounded-full px-6 py-2.5 text-[13px] font-medium transition-colors',+ 'rounded-full px-6 py-2.5 text-13 font-medium transition-colors','bg-[var(--surface-chip)] text-[var(--text-primary)]','hover:bg-[var(--surface-hover)]','outline-none focus-visible:ring-2 focus-visible:ring-[var(--focus-ring)]',@@ -244,7 +244,7 @@ export function ShareSelectionBar({ sessionId, contentWidth, barWidth }: ShareSeonClick={() => void run('download')}disabled={disabled}className={cn(- 'inline-flex items-center gap-1.5 rounded-full px-6 py-2.5 text-[13px] font-medium transition-colors',+ 'inline-flex items-center gap-1.5 rounded-full px-6 py-2.5 text-13 font-medium transition-colors','bg-[var(--surface-chip)] text-[var(--text-primary)]','hover:bg-[var(--surface-hover)]','outline-none focus-visible:ring-2 focus-visible:ring-[var(--focus-ring)]',@@ -265,7 +265,7 @@ export function ShareSelectionBar({ sessionId, contentWidth, barWidth }: ShareSeonClick={() => void run('copy')}disabled={disabled}className={cn(- 'inline-flex items-center gap-1.5 rounded-full px-6 py-2.5 text-[13px] font-medium transition-opacity',+ 'inline-flex items-center gap-1.5 rounded-full px-6 py-2.5 text-13 font-medium transition-opacity','bg-[var(--accent-cta-bg-pure)] text-[var(--accent-pure-cta-fg)]','outline-none focus-visible:ring-2 focus-visible:ring-[var(--focus-ring)]',disabled ? 'cursor-default opacity-50' : 'hover:opacity-90',diff --git a/apps/desktop/src/renderer/components/chat/SystemCard.tsx b/apps/desktop/src/renderer/components/chat/SystemCard.tsxindex b30becd39a..fbf62d0a4e 100644--- a/apps/desktop/src/renderer/components/chat/SystemCard.tsx+++ b/apps/desktop/src/renderer/components/chat/SystemCard.tsx@@ -44,7 +44,7 @@ const valueClass = 'font-medium';const rowClass = 'flex items-baseline justify-between gap-3 py-[2px]';const descClass = cn(labelClass, 'text-right flex-1');const codeClass = cn(- 'inline shrink-0 px-[5px] py-[1px] rounded-[4px] font-mono text-[13px]',+ 'inline shrink-0 px-[5px] py-[1px] rounded-[4px] font-mono text-13','bg-[var(--status-bar-accent)]/15','text-[var(--status-bar-accent)]',);@@ -263,7 +263,7 @@ function ContextCard({ data }: { data?: Record<string, unknown> }) {<divclassName={cn('w-full rounded-[12px] border border-[var(--msg-user-border)] bg-[var(--msg-user-bg)]',- 'px-3 py-3 text-[13px] leading-none text-[var(--msg-user-text)] select-text',+ 'px-3 py-3 text-13 leading-none text-[var(--msg-user-text)] select-text',)}><button@@ -276,10 +276,10 @@ function ContextCard({ data }: { data?: Record<string, unknown> }) {: t('chat.systemCard.context.expand')}><Layers size={14} strokeWidth={1.8} className="shrink-0 text-[var(--msg-user-text)]" />- <span className="min-w-0 flex-1 truncate text-[15px] font-medium">+ <span className="min-w-0 flex-1 truncate text-15 font-medium">{t('chat.systemCard.context.title')}</span>- <span className="shrink-0 text-[12px] font-medium tabular-nums text-[var(--msg-tool-text)]">+ <span className="shrink-0 text-12 font-medium tabular-nums text-[var(--msg-tool-text)]">{t('chat.systemCard.context.tokensSummary', {used: fmtContextTokens(totalTokens),total: fmtContextTokens(rawMaxTokens),@@ -316,7 +316,7 @@ function ContextCard({ data }: { data?: Record<string, unknown> }) {<Collapse open={expanded}><div className="mt-2">{usage.model && (- <div className="mb-2 truncate text-[12px] leading-[1.3] text-[var(--msg-tool-text)]">+ <div className="mb-2 truncate text-12 leading-[1.3] text-[var(--msg-tool-text)]">{t('chat.systemCard.context.model', { model: usage.model })}</div>)}@@ -333,19 +333,19 @@ function ContextCard({ data }: { data?: Record<string, unknown> }) {}}aria-hidden="true"/>- <span className="min-w-0 truncate text-[12px] leading-none text-[var(--msg-user-text)]">+ <span className="min-w-0 truncate text-12 leading-none text-[var(--msg-user-text)]">{localizeContextCategory(t, cat.name)}{cat.isDeferred && (- <span className="ml-1 text-[12px] text-[var(--msg-tool-text)]">+ <span className="ml-1 text-12 text-[var(--msg-tool-text)]">{t('chat.systemCard.context.deferred')}</span>)}</span></div>- <span className="shrink-0 text-[12px] tabular-nums text-[var(--msg-tool-text)]">+ <span className="shrink-0 text-12 tabular-nums text-[var(--msg-tool-text)]">{fmtContextTokens(cat.tokens)}</span>- <span className="w-[42px] shrink-0 text-right text-[12px] tabular-nums text-[var(--msg-user-text)]">+ <span className="w-[42px] shrink-0 text-right text-12 tabular-nums text-[var(--msg-user-text)]">{fmtPercent(finiteNumber(cat.tokens), rawMaxTokens)}</span></div>@@ -362,7 +362,7 @@ function ContextCard({ data }: { data?: Record<string, unknown> }) {type="button"className={cn('grid w-full grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-3',- 'text-left text-[12px] text-[var(--msg-tool-text)] select-none',+ 'text-left text-12 text-[var(--msg-tool-text)] select-none',)}onClick={() => toggleDetail(row.key)}aria-expanded={isDetailExpanded}@@ -486,11 +486,11 @@ function ContextDetailSection({return (<div>{title && (- <div className="mb-1 text-[12px] font-medium text-[var(--msg-user-text)]">{title}</div>+ <div className="mb-1 text-12 font-medium text-[var(--msg-user-text)]">{title}</div>)}<div className="flex flex-col gap-[2px]">{visibleRows.map(([label, tokens]) => (- <div key={label} className="flex items-baseline justify-between gap-3 text-[12px]">+ <div key={label} className="flex items-baseline justify-between gap-3 text-12"><span className="min-w-0 flex-1 truncate text-[var(--msg-tool-text)]">{label}</span><span className="shrink-0 font-medium tabular-nums text-[var(--msg-tool-text)]">{fmtContextTokens(tokens)}@@ -588,7 +588,7 @@ function PwdCard({ data }: { data?: Record<string, unknown> }) {return (<div className={cardClass}><div className={titleClass}>Working Directory</div>- <span className={cn(codeClass, 'text-[14px]')}>{workingDir}</span>+ <span className={cn(codeClass, 'text-14')}>{workingDir}</span></div>);}@@ -661,7 +661,7 @@ function CompactBoundaryCard({ data }: { data?: Record<string, unknown> }) {aria-label={t('chat.systemCard.compact.aria')}><div className="h-px flex-1 bg-[var(--msg-tool-card-border)]" />- <div className="flex shrink-0 items-center gap-1.5 rounded-full border border-[var(--msg-tool-card-border)] bg-background/50 px-2.5 py-1 text-[11px] text-muted-foreground tabular-nums">+ <div className="flex shrink-0 items-center gap-1.5 rounded-full border border-[var(--msg-tool-card-border)] bg-background/50 px-2.5 py-1 text-11 text-muted-foreground tabular-nums"><Layers size={12} className="shrink-0" /><span>{triggerLabel}</span>{stats.length > 0 && (@@ -704,7 +704,7 @@ function GoalCompleteCard({ data }: { data?: Record<string, unknown> }) {title={reason || undefined}><div className="h-px flex-1 bg-[var(--msg-tool-card-border)]" />- <div className="flex shrink-0 items-center gap-1.5 rounded-full border border-[var(--msg-tool-card-border)] bg-background/50 px-2.5 py-1 text-[11px] text-muted-foreground tabular-nums">+ <div className="flex shrink-0 items-center gap-1.5 rounded-full border border-[var(--msg-tool-card-border)] bg-background/50 px-2.5 py-1 text-11 text-muted-foreground tabular-nums"><Target size={12} className="shrink-0" /><span>{label}</span></div>@@ -732,7 +732,7 @@ function GoalResumedCard({ data }: { data?: { kind?: string } }) {return (<div className="flex w-full items-center gap-3 py-2 select-none" role="separator" aria-label={label}><div className="h-px flex-1 bg-[var(--msg-tool-card-border)]" />- <div className="flex shrink-0 items-center gap-1.5 rounded-full border border-[var(--msg-tool-card-border)] bg-background/50 px-2.5 py-1 text-[11px] text-muted-foreground tabular-nums">+ <div className="flex shrink-0 items-center gap-1.5 rounded-full border border-[var(--msg-tool-card-border)] bg-background/50 px-2.5 py-1 text-11 text-muted-foreground tabular-nums"><Target size={12} className="shrink-0" /><span>{label}</span></div>@@ -823,7 +823,7 @@ function AutoResumeSeparator() {return (<div className="flex w-full items-center gap-3 py-2 select-none" role="separator" aria-label={label}><div className="h-px flex-1 bg-[var(--msg-tool-card-border)]" />- <div className="flex shrink-0 items-center gap-1.5 rounded-full border border-[var(--msg-tool-card-border)] bg-background/50 px-2.5 py-1 text-[11px] text-muted-foreground tabular-nums">+ <div className="flex shrink-0 items-center gap-1.5 rounded-full border border-[var(--msg-tool-card-border)] bg-background/50 px-2.5 py-1 text-11 text-muted-foreground tabular-nums"><RefreshCw size={12} className="shrink-0" /><span>{label}</span></div>@@ -930,13 +930,13 @@ function AutoResumeActionRow({<RefreshCw size={13} />)}</span>- <span className="text-[14px] text-[var(--msg-tool-card-chevron)] shrink-0">{label}</span>+ <span className="text-14 text-[var(--msg-tool-card-chevron)] shrink-0">{label}</span>{/* param 位:中断原因摘要。与动词同色同字号(工具行的命令同款处理),不加色 —— 设计规范禁止在正文里引入 chromatic 色。 */}{summary && (<spantitle={summary}- className="min-w-0 truncate text-[14px] text-[var(--msg-tool-card-chevron)]"+ className="min-w-0 truncate text-14 text-[var(--msg-tool-card-chevron)]">{summary}</span>@@ -967,7 +967,7 @@ function AutoResumeActionRow({>{info.error && (<>- <div className="text-[12px] opacity-70">+ <div className="text-12 opacity-70">{t('chat.systemCard.autoResume.detail.reason')}</div><pre className="m-0 mt-[2px] whitespace-pre-wrap break-words font-mono text-[length:calc(var(--app-code-font-size)_-_1px)] leading-[calc(var(--app-code-font-size)_+_4px)]">@@ -976,7 +976,7 @@ function AutoResumeActionRow({</>)}{(hasProgress || info.sessionTotal !== undefined) && (- <div className={cn('flex flex-wrap gap-x-4 gap-y-[2px] text-[12px]', info.error && 'mt-2')}>+ <div className={cn('flex flex-wrap gap-x-4 gap-y-[2px] text-12', info.error && 'mt-2')}>{hasProgress && (<span>{t('chat.systemCard.autoResume.detail.attempt', {@@ -1045,7 +1045,7 @@ function AgentSwitchCard({ data }: { data?: Record<string, unknown> }) {// min-w-0(而非 shrink-0):自定义供应商的模型 id 可以很长,胶囊必须// 能收缩、由内部模型名 truncate 让位,不许把整行顶出卡片宽度。'flex min-w-0 items-center gap-1.5 rounded-full border border-[var(--msg-tool-card-border)]',- 'bg-background/50 px-2.5 py-1 text-[11px] text-muted-foreground',+ 'bg-background/50 px-2.5 py-1 text-11 text-muted-foreground',handoff && 'cursor-pointer hover:bg-[var(--msg-tool-card-bg)]',)}aria-expanded={expanded}@@ -1082,14 +1082,14 @@ function AgentSwitchCard({ data }: { data?: Record<string, unknown> }) {'bg-[var(--msg-tool-card-bg)] px-4 py-3 select-text',)}>- <div className="mb-1.5 text-[11px] font-medium text-muted-foreground">+ <div className="mb-1.5 text-11 font-medium text-muted-foreground">{t(isEnglishSourceHandoff(handoff)? 'chat.systemCard.agentSwitch.handoffTitleEnglishSource': 'chat.systemCard.agentSwitch.handoffTitle',)}</div>- <pre className="max-h-64 overflow-y-auto whitespace-pre-wrap break-words font-mono text-[12px] leading-[1.55] text-[var(--msg-tool-text)]">+ <pre className="max-h-64 overflow-y-auto whitespace-pre-wrap break-words font-mono text-12 leading-[1.55] text-[var(--msg-tool-text)]">{handoff}</pre></div>@@ -1164,7 +1164,7 @@ function CmdCard({ data }: { data?: Record<string, unknown> }) {const statusChip = (<spanclassName={cn(- 'shrink-0 px-[8px] py-[1px] rounded-full font-mono text-[11px]',+ 'shrink-0 px-[8px] py-[1px] rounded-full font-mono text-11','bg-[var(--msg-tool-card-bg)] text-[var(--msg-tool-text)]','border border-[var(--msg-tool-card-border)]',)}@@ -1189,20 +1189,20 @@ function CmdCard({ data }: { data?: Record<string, unknown> }) {'bg-[var(--msg-code-block-bg)] text-[var(--msg-user-text)]','border border-[var(--msg-code-block-border)]',);- const sectionLabelClass = cn(labelClass, 'mt-3 text-[12px]');+ const sectionLabelClass = cn(labelClass, 'mt-3 text-12');return (<div className={cardClass}><div className="flex items-center gap-2"><span className={cn(titleClass, 'mb-0')}>$ Shell</span>{statusChip}- <span className={cn(labelClass, 'text-[12px] ml-auto')}>{elapsedMs}ms</span>+ <span className={cn(labelClass, 'text-12 ml-auto')}>{elapsedMs}ms</span></div><pre className={cmdLineClass}>{cmdLine || '<empty>'}</pre>{cwd && (- <div className={cn(labelClass, 'mt-1 text-[12px] truncate')} title={cwd}>+ <div className={cn(labelClass, 'mt-1 text-12 truncate')} title={cwd}>cwd: {cwd}</div>)}@@ -1226,7 +1226,7 @@ function CmdCard({ data }: { data?: Record<string, unknown> }) {</>)}{!stdout && !stderr && !spawnError && (- <div className={cn(labelClass, 'mt-2 text-[12px] italic')}>(no output)</div>+ <div className={cn(labelClass, 'mt-2 text-12 italic')}>(no output)</div>)}</div>);diff --git a/apps/desktop/src/renderer/components/chat/TextLightbox.tsx b/apps/desktop/src/renderer/components/chat/TextLightbox.tsxindex 6a2c71dac7..ab4ed5aafc 100644--- a/apps/desktop/src/renderer/components/chat/TextLightbox.tsx+++ b/apps/desktop/src/renderer/components/chat/TextLightbox.tsx@@ -443,7 +443,7 @@ export function TextLightbox({ filePath, fileName, initialLine, triggerRef, onCl<FileText size={16} className="shrink-0 text-[var(--msg-tool-card-chevron)]" /><spanclassName={cn(- 'font-semibold text-[14px]',+ 'font-semibold text-14','text-[var(--msg-tool-card-text)]','truncate',)}diff --git a/apps/desktop/src/renderer/components/chat/ToolPayloadLightbox.tsx b/apps/desktop/src/renderer/components/chat/ToolPayloadLightbox.tsxindex 338583f8d0..c825a2204b 100644--- a/apps/desktop/src/renderer/components/chat/ToolPayloadLightbox.tsx+++ b/apps/desktop/src/renderer/components/chat/ToolPayloadLightbox.tsx@@ -327,7 +327,7 @@ export function ToolPayloadLightbox({<FileText size={16} className="shrink-0 text-[var(--msg-tool-card-chevron)]" /><spanclassName={cn(- 'font-semibold text-[14px]',+ 'font-semibold text-14','text-[var(--msg-tool-card-text)]','truncate',)}@@ -416,13 +416,13 @@ export function ToolPayloadLightbox({{payload.files.length > 1 && (<divtitle={file.filePath}- className="truncate text-[14px] font-medium text-[var(--msg-tool-card-text)]"+ className="truncate text-14 font-medium text-[var(--msg-tool-card-text)]">{basename(file.filePath)}</div>)}{file.diffs.length === 0 ? (- <span className="text-[13px] text-[var(--msg-tool-card-chevron)]">+ <span className="text-13 text-[var(--msg-tool-card-chevron)]">{t('chat.agentActionRow.noContent')}</span>) : (@@ -515,7 +515,7 @@ export function ToolPayloadLightbox({type="button"onClick={handleClose}className={cn(- 'h-8 rounded-full border px-4 text-[12px] font-medium',+ 'h-8 rounded-full border px-4 text-12 font-medium','border-[var(--border-default)] bg-[var(--surface-elevated)]','text-[var(--text-secondary)] hover:bg-[var(--surface-hover)] transition-colors','focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--focus-ring-soft)]',@@ -527,7 +527,7 @@ export function ToolPayloadLightbox({type="button"onClick={handleSaveText}className={cn(- 'h-8 rounded-full px-4 text-[12px] font-medium',+ 'h-8 rounded-full px-4 text-12 font-medium','bg-[var(--accent-cta-bg)] text-[var(--accent-pure-cta-fg)]','hover:opacity-90 transition-opacity','focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--focus-ring-soft)]',diff --git a/apps/desktop/src/renderer/components/chat/TurnChangesCard.tsx b/apps/desktop/src/renderer/components/chat/TurnChangesCard.tsxindex 1035d3f070..c5ad9e920b 100644--- a/apps/desktop/src/renderer/components/chat/TurnChangesCard.tsx+++ b/apps/desktop/src/renderer/components/chat/TurnChangesCard.tsx@@ -66,10 +66,10 @@ function TurnChangeFileRow({className="flex h-9 w-full items-center gap-2 rounded-lg px-2 text-left transition-colors hover:bg-[var(--surface-hover)]"><FileText size={15} className="shrink-0 text-[var(--text-secondary)]" />- <span className="min-w-0 flex-1 truncate text-[13px] text-[var(--text-primary)]">+ <span className="min-w-0 flex-1 truncate text-13 text-[var(--text-primary)]">{file.path}</span>- <span className="shrink-0 whitespace-nowrap font-mono text-[12px] tabular-nums">+ <span className="shrink-0 whitespace-nowrap font-mono text-12 tabular-nums">{file.additions > 0 && (<span className="text-[var(--diff-add-fg)]">+{file.additions}</span>)}{' '}@@ -182,7 +182,7 @@ export function TurnChangesCard({<FileDiff size={18} /></div><div className="min-w-0 flex-1">- <div className="truncate text-[14px] font-medium text-[var(--text-primary)]">+ <div className="truncate text-14 font-medium text-[var(--text-primary)]">{files.length > 0? t('chat.turnChanges.title', { count: changeSet.fileCount }): t('chat.turnChanges.partialTitle')}@@ -190,13 +190,13 @@ export function TurnChangesCard({{files.length > 0 && (// 零文件卡的语义是「发生了变更但没录下内容」,+0 −0 会被误读成// 「没有变化」,所以增删统计只在录到文件时显示。- <div className="mt-0.5 font-mono text-[12px] tabular-nums">+ <div className="mt-0.5 font-mono text-12 tabular-nums"><span className="text-[var(--diff-add-fg)]">+{changeSet.additions}</span>{' '}<span className="text-[var(--diff-del-fg)]">-{changeSet.deletions}</span></div>)}{changeSet.state === 'partial' && (- <div className="mt-1 flex items-center gap-1 text-[11px] text-[var(--warning-fg)]">+ <div className="mt-1 flex items-center gap-1 text-11 text-[var(--warning-fg)]"><AlertTriangle size={12} /><span>{t(files.length === 0@@ -227,7 +227,7 @@ export function TurnChangesCard({)}onClick={() => void applyTurnChange()}className={cn(- 'flex h-8 items-center gap-1.5 rounded-lg px-2 text-[13px] font-medium',+ 'flex h-8 items-center gap-1.5 rounded-lg px-2 text-13 font-medium','text-[var(--text-primary)] transition-colors hover:bg-[var(--surface-hover)]','disabled:cursor-not-allowed disabled:opacity-50',)}@@ -250,7 +250,7 @@ export function TurnChangesCard({<buttontype="button"onClick={() => openReview()}- className="h-8 rounded-lg border border-[var(--border-default)] px-3 text-[13px] font-medium text-[var(--text-primary)] transition-colors hover:bg-[var(--surface-hover)]"+ className="h-8 rounded-lg border border-[var(--border-default)] px-3 text-13 font-medium text-[var(--text-primary)] transition-colors hover:bg-[var(--surface-hover)]">{t('chat.turnChanges.review')}</button>@@ -274,7 +274,7 @@ export function TurnChangesCard({type="button"onClick={() => setExpanded(true)}className={cn(- 'flex h-8 items-center gap-1 rounded-lg px-2 text-[13px] text-[var(--text-secondary)]',+ 'flex h-8 items-center gap-1 rounded-lg px-2 text-13 text-[var(--text-secondary)]','transition-colors hover:bg-[var(--surface-hover)] hover:text-[var(--text-primary)]',)}>@@ -287,7 +287,7 @@ export function TurnChangesCard({type="button"onClick={() => openReview()}className={cn(- 'flex h-8 items-center gap-1 rounded-lg px-2 text-[13px] text-[var(--text-secondary)]',+ 'flex h-8 items-center gap-1 rounded-lg px-2 text-13 text-[var(--text-secondary)]','transition-colors hover:bg-[var(--surface-hover)] hover:text-[var(--text-primary)]',)}>@@ -299,7 +299,7 @@ export function TurnChangesCard({type="button"onClick={() => setExpanded(false)}className={cn(- 'flex h-8 items-center gap-1 rounded-lg px-2 text-[13px] text-[var(--text-secondary)]',+ 'flex h-8 items-center gap-1 rounded-lg px-2 text-13 text-[var(--text-secondary)]','transition-colors hover:bg-[var(--surface-hover)] hover:text-[var(--text-primary)]',)}>diff --git a/apps/desktop/src/renderer/components/chat/UserMessage.tsx b/apps/desktop/src/renderer/components/chat/UserMessage.tsxindex af6c4d1735..76dad242ad 100644--- a/apps/desktop/src/renderer/components/chat/UserMessage.tsx+++ b/apps/desktop/src/renderer/components/chat/UserMessage.tsx@@ -342,7 +342,7 @@ function UserAttachmentChip({'rounded-[9999px]','bg-[var(--msg-user-bg)]','border border-[var(--msg-user-border)]',- 'text-[13px] font-medium',+ 'text-13 font-medium','text-[var(--msg-user-text)]','hover:bg-[var(--cmd-palette-item-hover)]','transition-colors cursor-pointer',@@ -1379,7 +1379,7 @@ export function UserMessage({type="button"className={cn('flex w-full items-center gap-2 px-3 py-2 text-left',- 'text-[13px] font-medium leading-none',+ 'text-13 font-medium leading-none','hover:bg-[var(--cmd-palette-item-hover)] transition-colors',)}aria-expanded={orcaExpanded}@@ -1422,7 +1422,7 @@ export function UserMessage({{/* /goal 目标设定/更新:气泡上方右对齐渲一个徽标(不进气泡、不入 copyText)。 */}{goalBadge && (<span- className="inline-flex max-w-full items-center gap-1 rounded-full px-2 py-0.5 text-[11px] font-medium"+ className="inline-flex max-w-full items-center gap-1 rounded-full px-2 py-0.5 text-11 font-medium"style={{ backgroundColor: 'var(--surface-chip)', color: 'var(--text-secondary)' }}><Target size={11} strokeWidth={2} aria-hidden className="shrink-0" />@@ -1670,7 +1670,7 @@ export function UserMessage({onClick={() => setLongMessageExpanded((expanded) => !expanded)}className={cn('mt-2 inline-flex items-center gap-1 rounded-full px-1 py-0.5',- 'text-[12px] font-medium leading-5',+ 'text-12 font-medium leading-5','text-[var(--msg-user-text)] opacity-65 transition-opacity','hover:opacity-100','focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--focus-ring-soft)]',diff --git a/apps/desktop/src/renderer/components/chat/UserMessageEditBox.tsx b/apps/desktop/src/renderer/components/chat/UserMessageEditBox.tsxindex 82dfc11bb6..4c8147209f 100644--- a/apps/desktop/src/renderer/components/chat/UserMessageEditBox.tsx+++ b/apps/desktop/src/renderer/components/chat/UserMessageEditBox.tsx@@ -320,7 +320,7 @@ export function UserMessageEditBox({/><div className="mt-2 flex items-center justify-end gap-2">{rollbackFileCount !== null && rollbackFileCount > 0 && (- <span className="min-w-0 flex-1 truncate text-left text-[11px] text-[var(--text-tertiary)]">+ <span className="min-w-0 flex-1 truncate text-left text-11 text-[var(--text-tertiary)]">{t('chat.userMessage.editRollbackHint', { count: rollbackFileCount })}</span>)}@@ -329,7 +329,7 @@ export function UserMessageEditBox({onClick={onCancel}disabled={submitting}className={cn(- 'h-7 shrink-0 rounded-full px-3 text-[12px] font-medium',+ 'h-7 shrink-0 rounded-full px-3 text-12 font-medium','border border-[var(--msg-user-border)] bg-transparent','text-[var(--text-secondary)]','hover:bg-[var(--cmd-palette-item-hover)] transition-colors',@@ -344,7 +344,7 @@ export function UserMessageEditBox({disabled={!canSend}className={cn('inline-flex h-7 shrink-0 items-center gap-1.5 rounded-full px-3',- 'text-[12px] font-medium',+ 'text-12 font-medium','bg-[var(--accent-cta-bg)] text-[var(--accent-pure-cta-fg)]','hover:opacity-90 transition-opacity','disabled:opacity-40 disabled:pointer-events-none',diff --git a/apps/desktop/src/renderer/components/chat/WorkGroupBlock.tsx b/apps/desktop/src/renderer/components/chat/WorkGroupBlock.tsxindex 761b5ec5cc..f034c712f7 100644--- a/apps/desktop/src/renderer/components/chat/WorkGroupBlock.tsx+++ b/apps/desktop/src/renderer/components/chat/WorkGroupBlock.tsx@@ -176,7 +176,7 @@ function ThinkingActivityRow({<spanref={textRef}className={cn(- 'min-w-0 flex-1 text-[14px] italic text-[var(--thinking-body-text)]',+ 'min-w-0 flex-1 text-14 italic text-[var(--thinking-body-text)]',expanded ? 'whitespace-pre-wrap break-words' : 'truncate',)}title={expanded ? undefined : activity.content}@@ -265,7 +265,7 @@ function ExpandedThinkingRow({ message }: { message: ChatMessage }) {<spanref={textRef}className={cn(- 'min-w-0 flex-1 text-[14px] italic text-[var(--thinking-body-text)]',+ 'min-w-0 flex-1 text-14 italic text-[var(--thinking-body-text)]',expanded ? 'whitespace-pre-wrap break-words' : 'truncate',)}title={expanded ? undefined : activity.content}diff --git a/apps/desktop/src/renderer/components/diff-panel/FileChangeGroup.tsx b/apps/desktop/src/renderer/components/diff-panel/FileChangeGroup.tsxindex f97f5571b6..80f974bc6d 100644--- a/apps/desktop/src/renderer/components/diff-panel/FileChangeGroup.tsx+++ b/apps/desktop/src/renderer/components/diff-panel/FileChangeGroup.tsx@@ -93,7 +93,7 @@ export function FileChangeGroup({</span><span className="flex shrink-0 items-center gap-2 text-xs tabular-nums">{change.isBinary ? (- <span className="rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground">+ <span className="rounded bg-muted px-1.5 py-0.5 text-10 text-muted-foreground">{t('skillhub.diffPanel.binaryBadge')}</span>) : stats ? (diff --git a/apps/desktop/src/renderer/components/error/AppCrashScreen.tsx b/apps/desktop/src/renderer/components/error/AppCrashScreen.tsxindex 741156e492..e2d39e2307 100644--- a/apps/desktop/src/renderer/components/error/AppCrashScreen.tsx+++ b/apps/desktop/src/renderer/components/error/AppCrashScreen.tsx@@ -58,10 +58,10 @@ export function AppCrashScreen({<TriangleAlert size={20} /></span><div className="flex flex-col items-center gap-1.5 text-center">- <h2 className="text-[15px] font-medium text-[var(--text-primary)]">+ <h2 className="text-15 font-medium text-[var(--text-primary)]">{t('appError.title')}</h2>- <p className="text-[13px] leading-relaxed text-[var(--text-secondary)]">+ <p className="text-13 leading-relaxed text-[var(--text-secondary)]">{t('appError.description')}</p></div>@@ -69,7 +69,7 @@ export function AppCrashScreen({<buttontype="button"onClick={handleReload}- className="inline-flex h-8 items-center gap-1.5 rounded-full px-4 text-[13px] font-medium transition-opacity hover:opacity-90"+ className="inline-flex h-8 items-center gap-1.5 rounded-full px-4 text-13 font-medium transition-opacity hover:opacity-90"style={{backgroundColor: 'var(--accent-cta-bg)',color: 'var(--accent-pure-cta-fg)',@@ -81,7 +81,7 @@ export function AppCrashScreen({<buttontype="button"onClick={handleBackHome}- className="inline-flex h-8 items-center gap-1.5 rounded-full border border-[var(--border-default)] px-4 text-[13px] font-medium text-[var(--text-primary)] transition-colors hover:bg-[var(--surface-hover)]"+ className="inline-flex h-8 items-center gap-1.5 rounded-full border border-[var(--border-default)] px-4 text-13 font-medium text-[var(--text-primary)] transition-colors hover:bg-[var(--surface-hover)]"><House size={13} />{t('appError.backHome')}@@ -89,10 +89,10 @@ export function AppCrashScreen({</div>{(stack ?? message) && (<details className="w-full">- <summary className="cursor-pointer text-[12px] text-[var(--text-tertiary)] transition-colors hover:text-[var(--text-secondary)]">+ <summary className="cursor-pointer text-12 text-[var(--text-tertiary)] transition-colors hover:text-[var(--text-secondary)]">{t('appError.details')}</summary>- <pre className="mt-2 max-h-48 overflow-auto rounded-lg bg-[var(--surface-chip)] p-3 font-mono text-[11px] leading-relaxed whitespace-pre-wrap break-all text-[var(--text-secondary)]">+ <pre className="mt-2 max-h-48 overflow-auto rounded-lg bg-[var(--surface-chip)] p-3 font-mono text-11 leading-relaxed whitespace-pre-wrap break-all text-[var(--text-secondary)]">{stack ?? message}</pre></details>diff --git a/apps/desktop/src/renderer/components/error/LocalDbFatalScreen.tsx b/apps/desktop/src/renderer/components/error/LocalDbFatalScreen.tsxindex 4ed807ab03..3c9cc7a7b9 100644--- a/apps/desktop/src/renderer/components/error/LocalDbFatalScreen.tsx+++ b/apps/desktop/src/renderer/components/error/LocalDbFatalScreen.tsx@@ -84,10 +84,10 @@ export function LocalDbFatalScreen({)}{(message || code) && (<details className="mt-1 w-full">- <summary className="cursor-pointer text-[12px] text-[var(--text-tertiary)] transition-colors hover:text-[var(--text-secondary)]">+ <summary className="cursor-pointer text-12 text-[var(--text-tertiary)] transition-colors hover:text-[var(--text-secondary)]">{t('localDbFatal.details')}</summary>- <pre className="mt-2 max-h-40 overflow-auto rounded-lg bg-[var(--surface-chip)] p-3 font-mono text-[11px] leading-relaxed whitespace-pre-wrap break-all text-[var(--text-secondary)]">+ <pre className="mt-2 max-h-40 overflow-auto rounded-lg bg-[var(--surface-chip)] p-3 font-mono text-11 leading-relaxed whitespace-pre-wrap break-all text-[var(--text-secondary)]">{[code, message].filter(Boolean).join('\n')}</pre></details>diff --git a/apps/desktop/src/renderer/components/layout/GhostPanelWindowLayout.tsx b/apps/desktop/src/renderer/components/layout/GhostPanelWindowLayout.tsxindex 2e96bec6b6..121245b826 100644--- a/apps/desktop/src/renderer/components/layout/GhostPanelWindowLayout.tsx+++ b/apps/desktop/src/renderer/components/layout/GhostPanelWindowLayout.tsx@@ -77,7 +77,7 @@ export function GhostPanelWindowLayout() {<div className={isMac ? 'w-20 shrink-0' : 'w-3 shrink-0'} /><div className="flex min-w-0 flex-1 items-center gap-2"><Puzzle size={14} className="shrink-0 text-[var(--text-tertiary)]" />- <span className="truncate text-[13px] text-[var(--text-secondary)]">{title}</span>+ <span className="truncate text-13 text-[var(--text-secondary)]">{title}</span></div><divclassName="flex shrink-0 items-center gap-1 pr-2"@@ -89,7 +89,7 @@ export function GhostPanelWindowLayout() {onClick={mergeBack}title={t('ghostPanelWindow.mergeBack')}aria-label={t('ghostPanelWindow.mergeBack')}- className="inline-flex h-7 items-center gap-1.5 rounded-full px-2.5 text-[12px] text-[var(--titlebar-icon)] transition-colors hover:bg-[var(--surface-hover)] hover:text-[var(--text-primary)]"+ className="inline-flex h-7 items-center gap-1.5 rounded-full px-2.5 text-12 text-[var(--titlebar-icon)] transition-colors hover:bg-[var(--surface-hover)] hover:text-[var(--text-primary)]"><PictureInPicture2 size={14} /><span>{t('ghostPanelWindow.mergeBack')}</span>@@ -111,7 +111,7 @@ export function GhostPanelWindowLayout() {<PanelBody manifest={manifest} />) : (<div className="flex flex-1 items-center justify-center">- <span className="text-[13px] text-[var(--text-tertiary)]">+ <span className="text-13 text-[var(--text-tertiary)]">{t('ghostPanelWindow.unavailable')}</span></div>diff --git a/apps/desktop/src/renderer/components/layout/GlobalDropImportListener.tsx b/apps/desktop/src/renderer/components/layout/GlobalDropImportListener.tsxindex 751be6e7b0..1c88899b31 100644--- a/apps/desktop/src/renderer/components/layout/GlobalDropImportListener.tsx+++ b/apps/desktop/src/renderer/components/layout/GlobalDropImportListener.tsx@@ -225,7 +225,7 @@ export function GlobalDropImportListener({}}><div- className="rounded-full border px-4 py-2 text-[13px]"+ className="rounded-full border px-4 py-2 text-13"style={{backgroundColor: 'var(--surface-elevated)',borderColor: 'var(--border-default)',diff --git a/apps/desktop/src/renderer/components/layout/SidebarWindowLayout.tsx b/apps/desktop/src/renderer/components/layout/SidebarWindowLayout.tsxindex 5992e48a53..bd2bc44ad0 100644--- a/apps/desktop/src/renderer/components/layout/SidebarWindowLayout.tsx+++ b/apps/desktop/src/renderer/components/layout/SidebarWindowLayout.tsx@@ -152,7 +152,7 @@ export function SidebarWindowLayout() {<div className={isMac ? 'w-20 shrink-0' : 'w-3 shrink-0'} /><div className="flex min-w-0 flex-1 items-center gap-2"><PanelRight size={14} className="shrink-0 text-[var(--text-tertiary)]" />- <span className="truncate text-[13px] text-[var(--text-secondary)]">+ <span className="truncate text-13 text-[var(--text-secondary)]">{t('rightSidebar.window.title')}</span></div>@@ -170,7 +170,7 @@ export function SidebarWindowLayout() {}}title={t('rightSidebar.window.mergeBack')}aria-label={t('rightSidebar.window.mergeBack')}- className="inline-flex h-7 items-center gap-1.5 rounded-full px-2.5 text-[12px] text-[var(--titlebar-icon)] transition-colors hover:bg-[var(--surface-hover)] hover:text-[var(--text-primary)]"+ className="inline-flex h-7 items-center gap-1.5 rounded-full px-2.5 text-12 text-[var(--titlebar-icon)] transition-colors hover:bg-[var(--surface-hover)] hover:text-[var(--text-primary)]"><PanelRight size={14} /><span>{t('rightSidebar.window.mergeBack')}</span>@@ -199,7 +199,7 @@ export function SidebarWindowLayout() {/>{!sessionId && (<div className="pointer-events-none absolute inset-0 flex items-center justify-center">- <span className="text-[13px] text-[var(--text-tertiary)]">+ <span className="text-13 text-[var(--text-tertiary)]">{t('rightSidebar.window.followPlaceholder')}</span></div>diff --git a/apps/desktop/src/renderer/components/new-chat/AgentSelect.tsx b/apps/desktop/src/renderer/components/new-chat/AgentSelect.tsxindex 78e30b53c1..eaf106976b 100644--- a/apps/desktop/src/renderer/components/new-chat/AgentSelect.tsx+++ b/apps/desktop/src/renderer/components/new-chat/AgentSelect.tsx@@ -283,7 +283,7 @@ export function AgentSelect({'min-w-0 truncate text-left font-medium leading-none',// 字段形态跟随设置页字号(13px, 同 ModelSelector field trigger);// flex-1 把 chevron 顶到右缘 —— 字段是定宽控件, 不是 hug。- isField ? 'flex-1 text-[13px]' : 'text-[12px]',+ isField ? 'flex-1 text-13' : 'text-12',)}style={maxLabelWidth ? { maxWidth: maxLabelWidth } : undefined}>@@ -337,7 +337,7 @@ export function AgentSelect({)}><opt.Mark size={14} className="shrink-0 text-[var(--text-secondary)]" />- <span className="min-w-0 flex-1 truncate text-[13px] font-medium text-[var(--model-item-text)]">+ <span className="min-w-0 flex-1 truncate text-13 font-medium text-[var(--model-item-text)]">{opt.label}</span>{selected && (diff --git a/apps/desktop/src/renderer/components/new-chat/AskUserQuestionPrompt.tsx b/apps/desktop/src/renderer/components/new-chat/AskUserQuestionPrompt.tsxindex d91a9db07b..44ee76039c 100644--- a/apps/desktop/src/renderer/components/new-chat/AskUserQuestionPrompt.tsx+++ b/apps/desktop/src/renderer/components/new-chat/AskUserQuestionPrompt.tsx@@ -516,7 +516,7 @@ export function AskUserQuestionPrompt({minimizeDisabled={isAnimating}headerLeading={currentQ?.header ? (- <span className="inline-block rounded-[6px] bg-[var(--ask-header-chip-bg)] px-[8px] py-[2px] text-[12px] font-medium text-[var(--ask-badge-text)]">+ <span className="inline-block rounded-[6px] bg-[var(--ask-header-chip-bg)] px-[8px] py-[2px] text-12 font-medium text-[var(--ask-badge-text)]">{currentQ.header}</span>) : null@@ -602,7 +602,7 @@ export function AskUserQuestionPrompt({)}</div></div>- <div className="ml-3 flex h-[28px] w-[28px] shrink-0 items-center justify-center rounded-[8px] bg-[var(--ask-badge-bg)] text-[13px] font-medium text-[var(--ask-badge-text)]">+ <div className="ml-3 flex h-[28px] w-[28px] shrink-0 items-center justify-center rounded-[8px] bg-[var(--ask-badge-bg)] text-13 font-medium text-[var(--ask-badge-text)]">{idx + 1}</div></button>@@ -656,7 +656,7 @@ export function AskUserQuestionPrompt({}}placeholder="Type your answer..."className={cn(- 'min-h-[22px] min-w-0 flex-1 bg-transparent text-14 font-normal leading-[22px] outline-none',+ 'min-h-[22px] min-w-0 flex-1 bg-transparent text-14 font-normal leading-[1.571] outline-none','text-[var(--ask-input-text)] placeholder:text-[var(--ask-input-placeholder)]','select-text',)}@@ -695,7 +695,7 @@ export function AskUserQuestionPrompt({Type something else...</span></div>- <div className="ml-3 flex h-[28px] w-[28px] shrink-0 items-center justify-center rounded-[8px] bg-[var(--ask-badge-bg)] text-[13px] font-medium text-[var(--ask-badge-text)]">+ <div className="ml-3 flex h-[28px] w-[28px] shrink-0 items-center justify-center rounded-[8px] bg-[var(--ask-badge-bg)] text-13 font-medium text-[var(--ask-badge-text)]">{options.length + 1}</div></button>@@ -723,7 +723,7 @@ export function AskUserQuestionPrompt({placeholder="Type your answer..."autoFocusclassName={cn(- 'min-h-10 min-w-0 flex-1 rounded-[8px] border px-3 py-[8px] text-14 leading-[22px] outline-none',+ 'min-h-10 min-w-0 flex-1 rounded-[8px] border px-3 py-[8px] text-14 leading-[1.571] outline-none','border-[var(--ask-input-border)] bg-[var(--ask-input-bg)] text-[var(--ask-input-text)]','placeholder:text-[var(--ask-input-placeholder)]',)}diff --git a/apps/desktop/src/renderer/components/new-chat/AtMentionPanel.tsx b/apps/desktop/src/renderer/components/new-chat/AtMentionPanel.tsxindex deda153e8d..9234e6521c 100644--- a/apps/desktop/src/renderer/components/new-chat/AtMentionPanel.tsx+++ b/apps/desktop/src/renderer/components/new-chat/AtMentionPanel.tsx@@ -237,7 +237,7 @@ export function AtMentionPanel({<divclassName={cn('flex h-[24px] items-center px-[10px]',- 'text-[12px] font-medium text-[var(--cmd-palette-item-meta)]',+ 'text-12 font-medium text-[var(--cmd-palette-item-meta)]',)}>{label}@@ -292,7 +292,7 @@ export function AtMentionPanel({/><spanclassName={cn(- 'min-w-0 flex-1 truncate text-[13px]',+ 'min-w-0 flex-1 truncate text-13',emphasized ? 'text-[var(--warning-accent)]' : 'text-[var(--model-item-text)]',)}>@@ -399,7 +399,7 @@ export function AtMentionPanel({)}<spanclassName={cn(- 'min-w-0 truncate text-[14px] font-medium',+ 'min-w-0 truncate text-14 font-medium','text-[var(--cmd-palette-item-text)]',)}>@@ -408,7 +408,7 @@ export function AtMentionPanel({{disabled && entry.disabledReason ? (<spanclassName={cn(- 'shrink-0 text-[12px] truncate max-w-[240px]',+ 'shrink-0 text-12 truncate max-w-[240px]','text-[var(--cmd-palette-item-meta)]','ml-auto',)}@@ -419,7 +419,7 @@ export function AtMentionPanel({<Tip text={meta} mono><spanclassName={cn(- 'shrink-0 text-[12px] truncate max-w-[240px]',+ 'shrink-0 text-12 truncate max-w-[240px]','text-[var(--cmd-palette-item-meta)]','ml-auto',)}@@ -475,10 +475,10 @@ export function AtMentionPanel({)}{showErrorState && (<div className="flex flex-col items-center justify-center py-[16px] gap-[10px]">- <div className="text-[13px] text-[var(--destructive)]">+ <div className="text-13 text-[var(--destructive)]">{t('newChat.atMention.scanFailed')}</div>- <div className="text-[12px] text-[var(--cmd-palette-item-meta)] px-[12px] text-center">+ <div className="text-12 text-[var(--cmd-palette-item-meta)] px-[12px] text-center">{state.kind === 'error' ? state.message : ''}</div><button@@ -490,7 +490,7 @@ export function AtMentionPanel({onRetry();}}className={cn(- 'h-[28px] px-[12px] rounded-full text-[12px] font-medium',+ 'h-[28px] px-[12px] rounded-full text-12 font-medium','bg-[var(--cmd-palette-item-hover)] text-[var(--cmd-palette-item-text)]',)}>@@ -502,7 +502,7 @@ export function AtMentionPanel({<divclassName={cn('flex items-center justify-center',- 'select-none h-[40px] text-[13px]',+ 'select-none h-[40px] text-13','text-[var(--cmd-palette-empty)]',)}>@@ -539,7 +539,7 @@ export function AtMentionPanel({className="shrink-0 text-[var(--cmd-palette-item-icon)] opacity-60"/><Tip text={p} mono side="top">- <span className="min-w-0 flex-1 truncate text-left text-[14px] text-[var(--cmd-palette-item-text)]">+ <span className="min-w-0 flex-1 truncate text-left text-14 text-[var(--cmd-palette-item-text)]">{extraDirBasename(p)}</span></Tip>@@ -563,7 +563,7 @@ export function AtMentionPanel({</div>)}{referenceDirs && referenceDirs.dirs.length === 0 && (- <div className="px-[10px] py-[8px] text-[12px] text-[var(--cmd-palette-item-meta)]">+ <div className="px-[10px] py-[8px] text-12 text-[var(--cmd-palette-item-meta)]">{t('extraDirs.empty')}</div>)}@@ -577,7 +577,7 @@ export function AtMentionPanel({{isEmptyRootQuery && (<divclassName={cn(- 'select-none px-[10px] py-[8px] text-[12px]',+ 'select-none px-[10px] py-[8px] text-12','text-[var(--cmd-palette-item-meta)]',)}>@@ -587,7 +587,7 @@ export function AtMentionPanel({{!isEmptyRootQuery && state.kind === 'ready' && state.truncated && (<divclassName={cn(- 'select-none px-[10px] py-[8px] text-[12px]',+ 'select-none px-[10px] py-[8px] text-12','text-[var(--cmd-palette-item-meta)]',)}>@@ -605,7 +605,7 @@ export function AtMentionPanel({}}className={cn('flex w-full items-center gap-2 px-[10px] py-[8px] rounded-[6px] text-left',- 'text-[12px] text-[var(--destructive)]',+ 'text-12 text-[var(--destructive)]','transition-colors hover:bg-[var(--cmd-palette-item-hover)]',)}>@@ -633,10 +633,10 @@ export function AtMentionPanel({maxHeight: tooltipPos.maxHeight,}}>- <div className="text-[14px] font-medium text-[var(--cmd-palette-item-text)]">+ <div className="text-14 font-medium text-[var(--cmd-palette-item-text)]">{focusedItem.name}</div>- <div className="mt-[8px] text-[13px] leading-[1.5] text-[var(--cmd-palette-tooltip-body)]">+ <div className="mt-[8px] text-13 leading-[1.5] text-[var(--cmd-palette-tooltip-body)]">{focusedItem.description}</div></div>diff --git a/apps/desktop/src/renderer/components/new-chat/ChatInput.tsx b/apps/desktop/src/renderer/components/new-chat/ChatInput.tsxindex 946eb861ef..eb3b6f5a00 100644--- a/apps/desktop/src/renderer/components/new-chat/ChatInput.tsx+++ b/apps/desktop/src/renderer/components/new-chat/ChatInput.tsx@@ -1731,7 +1731,7 @@ export function ChatInput({// 多行列表 "1. / 2. / 3." 的点和正文会逐行漂移;等宽数字让前缀宽度// 一致、列表自然对齐。ComposerListIndentDecoration 会额外为整条列表// 行保留换行后的视觉缩进。- 'text-[15px] leading-[22px] font-normal tabular-nums',+ 'text-15 leading-[1.467] font-normal tabular-nums','text-[var(--chat-input-text)]','focus:outline-none',// Tailwind can't target ProseMirror placeholder pseudo — handled@@ -6420,7 +6420,7 @@ export function ChatInput({<div className="pb-1.5"><div className="group/bcomment relative inline-flex"><div- className="inline-flex items-center gap-1.5 rounded-full border py-1 pl-2.5 pr-2.5 text-[12px] group-hover/bcomment:pr-7"+ className="inline-flex items-center gap-1.5 rounded-full border py-1 pl-2.5 pr-2.5 text-12 group-hover/bcomment:pr-7"style={{borderColor: 'var(--border-default)',color: 'var(--text-secondary)',@@ -6465,7 +6465,7 @@ export function ChatInput({<div className="flex min-w-0 flex-1 flex-col gap-0.5"><span className="flex items-center gap-1.5"><span- className="inline-flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-[10px] font-semibold"+ className="inline-flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-10 font-semibold"style={{backgroundColor: 'var(--focus-ring)',color: '#fff',@@ -6474,7 +6474,7 @@ export function ChatInput({{item.markerNumber}</span><span- className="inline-flex items-center rounded px-1 py-px font-mono text-[10px]"+ className="inline-flex items-center rounded px-1 py-px font-mono text-10"style={{backgroundColor: 'var(--surface-chip)',color: 'var(--text-tertiary)',@@ -6484,7 +6484,7 @@ export function ChatInput({</span></span><span- className="line-clamp-2 whitespace-pre-wrap text-[12px] leading-[1.5]"+ className="line-clamp-2 whitespace-pre-wrap text-12 leading-[1.5]"style={{ color: 'var(--text-secondary)' }}>{item.comment || t('chat.browserComment.noText')}@@ -6926,7 +6926,7 @@ export function ChatInput({aria-label={t('newChat.folderPicker.selectFolder')}><Folder size={18} className="shrink-0 text-[var(--folder-btn-icon)]" />- <span className="text-[15px] font-normal text-[var(--folder-btn-text)]">+ <span className="text-15 font-normal text-[var(--folder-btn-text)]">{folderBasename ?? t('newChat.folderPicker.selectFolder')}</span></button>@@ -7209,7 +7209,7 @@ function VoiceInputButton({<spanref={pillLabelRef}className={cn(- 'whitespace-nowrap pr-3 text-[12.5px] tabular-nums',+ 'whitespace-nowrap pr-3 text-12 tabular-nums','-translate-x-1 opacity-0 transition-[opacity,transform] duration-[180ms] ease-out',expanded && 'translate-x-0 opacity-100','motion-reduce:transition-none',@@ -7247,7 +7247,7 @@ function AttachmentRejectionStrip({className={cn('pointer-events-auto inline-flex max-w-[640px] items-center gap-2','rounded-full border border-[var(--cmd-palette-border)] bg-[var(--cmd-palette-bg)]',- 'px-4 py-[10px] text-[13px] font-medium leading-snug text-[var(--cmd-palette-item-text)]',+ 'px-4 py-[10px] text-13 font-medium leading-snug text-[var(--cmd-palette-item-text)]','shadow-[var(--shadow-menu)]',)}>@@ -7454,7 +7454,7 @@ function ThumbnailItem({{file.name}</span>{metaLine ? (- <span className="truncate text-[11px]" style={{ color: 'var(--text-secondary)' }}>+ <span className="truncate text-11" style={{ color: 'var(--text-secondary)' }}>{metaLine}</span>) : null}@@ -7467,7 +7467,7 @@ function ThumbnailItem({<buttontype="button"className={cn(- 'absolute -right-1.5 -top-1.5 flex h-4 w-4 items-center justify-center rounded-full text-[10px] text-white',+ 'absolute -right-1.5 -top-1.5 flex h-4 w-4 items-center justify-center rounded-full text-10 text-white','opacity-0 transition-opacity group-hover:opacity-100',)}style={{ backgroundColor: 'var(--file-remove-bg)' }}diff --git a/apps/desktop/src/renderer/components/new-chat/DeviceSwitcherPill.tsx b/apps/desktop/src/renderer/components/new-chat/DeviceSwitcherPill.tsxindex 2f1ed56352..87ba893cf9 100644--- a/apps/desktop/src/renderer/components/new-chat/DeviceSwitcherPill.tsx+++ b/apps/desktop/src/renderer/components/new-chat/DeviceSwitcherPill.tsx@@ -98,7 +98,7 @@ export function DeviceSwitcherPill({className={cn('inline-flex h-[30px] items-center justify-center gap-1.5 rounded-full','border border-[var(--create-agent-control-border)] bg-[var(--create-agent-control-bg)]',- 'text-[12px] font-medium leading-[14px] text-[var(--create-agent-control-text)]',+ 'text-12 font-medium leading-[1.167] text-[var(--create-agent-control-text)]','transition-colors hover:bg-[var(--create-agent-control-bg-hover)]','active:bg-[var(--create-agent-control-bg-pressed)]','focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--create-agent-focus-ring)]',diff --git a/apps/desktop/src/renderer/components/new-chat/ExtraDirsButton.tsx b/apps/desktop/src/renderer/components/new-chat/ExtraDirsButton.tsxindex 6c8f43c73e..abe1efd1e4 100644--- a/apps/desktop/src/renderer/components/new-chat/ExtraDirsButton.tsx+++ b/apps/desktop/src/renderer/components/new-chat/ExtraDirsButton.tsx@@ -95,7 +95,7 @@ export function ExtraDirsButton({<spanclassName={cn('font-normal tabular-nums',- dense ? 'text-[12.5px]' : 'text-[13px]',+ dense ? 'text-12' : 'text-13',)}>×{count}diff --git a/apps/desktop/src/renderer/components/new-chat/FastModeToggle.tsx b/apps/desktop/src/renderer/components/new-chat/FastModeToggle.tsxindex 85756a3a45..21ce1054c0 100644--- a/apps/desktop/src/renderer/components/new-chat/FastModeToggle.tsx+++ b/apps/desktop/src/renderer/components/new-chat/FastModeToggle.tsx@@ -56,7 +56,7 @@ export function FastModeToggle({)}<spanclassName={cn(- 'text-[13px] font-normal leading-none',+ 'text-13 font-normal leading-none',!enabled && 'text-[var(--fast-toggle-off)]',)}style={enabled ? { color } : undefined}diff --git a/apps/desktop/src/renderer/components/new-chat/GoalAdvancedLimits.tsx b/apps/desktop/src/renderer/components/new-chat/GoalAdvancedLimits.tsxindex 8f77ab1f90..63db923517 100644--- a/apps/desktop/src/renderer/components/new-chat/GoalAdvancedLimits.tsx+++ b/apps/desktop/src/renderer/components/new-chat/GoalAdvancedLimits.tsx@@ -42,7 +42,7 @@ function LimitItem({ value, label }: { value: string; label: string }): React.Rereturn (<Select.Itemvalue={value}- className="flex cursor-pointer items-center justify-between gap-3 rounded-[8px] px-2.5 py-1.5 text-[12px] outline-none data-[highlighted]:bg-[var(--model-item-hover)]"+ className="flex cursor-pointer items-center justify-between gap-3 rounded-[8px] px-2.5 py-1.5 text-12 outline-none data-[highlighted]:bg-[var(--model-item-hover)]"style={{ color: 'var(--model-item-text)' }}><Select.ItemText>{label}</Select.ItemText>@@ -72,7 +72,7 @@ function LimitSelect({return (<Select.Root value={current} onValueChange={(s) => onChange(s === UNLIMITED ? null : Number(s))}><Select.Trigger- className="flex h-8 w-[140px] items-center justify-between gap-1 rounded-full border px-3 text-[12px] outline-none"+ className="flex h-8 w-[140px] items-center justify-between gap-1 rounded-full border px-3 text-12 outline-none"style={{backgroundColor: 'var(--settings-input-bg)',borderColor: 'var(--settings-input-border)',@@ -111,7 +111,7 @@ function LimitSelect({function Row({ label, children }: { label: string; children: React.ReactNode }): React.ReactElement {return (<div className="flex items-center justify-between gap-2">- <span className="text-[12px] font-medium" style={{ color: 'var(--text-primary)' }}>+ <span className="text-12 font-medium" style={{ color: 'var(--text-primary)' }}>{label}</span>{children}@@ -136,7 +136,7 @@ export function GoalAdvancedLimits({<div className="flex flex-col gap-3"><buttontype="button"- className="flex items-center gap-1 text-left text-[12px] text-[var(--text-secondary)] transition-colors hover:text-[var(--text-primary)]"+ className="flex items-center gap-1 text-left text-12 text-[var(--text-secondary)] transition-colors hover:text-[var(--text-primary)]"onClick={() => setOpen((v) => !v)}>{open ? <ChevronDown size={14} /> : <ChevronRight size={14} />}@@ -144,7 +144,7 @@ export function GoalAdvancedLimits({</button>{open && (<div className="flex flex-col gap-3">- <div className="text-[11px]" style={{ color: 'var(--text-tertiary)' }}>+ <div className="text-11" style={{ color: 'var(--text-tertiary)' }}>{t('goal.editGoal.advancedHint')}</div><Row label={t('goal.editGoal.maxTurns')}>diff --git a/apps/desktop/src/renderer/components/new-chat/GoalIndicator.tsx b/apps/desktop/src/renderer/components/new-chat/GoalIndicator.tsxindex e6d09d4927..3d19fd7311 100644--- a/apps/desktop/src/renderer/components/new-chat/GoalIndicator.tsx+++ b/apps/desktop/src/renderer/components/new-chat/GoalIndicator.tsx@@ -137,13 +137,13 @@ function GoalEditor({textareaRef.current?.focus();}}>- <AlertDialog.Title className="text-[15px] font-medium" style={{ color: 'var(--text-primary)' }}>+ <AlertDialog.Title className="text-15 font-medium" style={{ color: 'var(--text-primary)' }}>{t('goal.editGoal.title')}</AlertDialog.Title><div className="flex flex-col gap-1.5"><labelhtmlFor="goal-objective"- className="text-[12px] font-medium"+ className="text-12 font-medium"style={{ color: 'var(--text-primary)' }}>{t('goal.editGoal.objectiveLabel')}@@ -161,7 +161,7 @@ function GoalEditor({void save();}}}- className="min-h-[112px] w-full resize-none rounded-lg border p-2.5 text-[13px] leading-5 outline-none placeholder:text-[var(--text-placeholder)]"+ className="min-h-[112px] w-full resize-none rounded-lg border p-2.5 text-13 leading-5 outline-none placeholder:text-[var(--text-placeholder)]"style={{backgroundColor: 'var(--settings-input-bg)',borderColor: 'var(--settings-input-border)',@@ -171,7 +171,7 @@ function GoalEditor({</div><GoalAdvancedLimits value={limits} onChange={setLimits} />{error && (- <div className="text-[12px]" style={{ color: 'var(--error-fg)' }}>+ <div className="text-12" style={{ color: 'var(--error-fg)' }}>{error}</div>)}@@ -179,7 +179,7 @@ function GoalEditor({<AlertDialog.Cancel asChild><buttontype="button"- className="h-8 rounded-full border px-3 text-[12px] transition-colors hover:bg-[var(--surface-elevated)]"+ className="h-8 rounded-full border px-3 text-12 transition-colors hover:bg-[var(--surface-elevated)]"style={{backgroundColor: 'var(--surface-elevated)',borderColor: 'var(--border-default)',@@ -192,7 +192,7 @@ function GoalEditor({</AlertDialog.Cancel><buttontype="button"- className="h-8 rounded-full px-4 text-[12px] font-medium transition-opacity hover:opacity-85 disabled:opacity-45"+ className="h-8 rounded-full px-4 text-12 font-medium transition-opacity hover:opacity-85 disabled:opacity-45"style={{ backgroundColor: 'var(--accent-cta-bg-pure)', color: 'var(--accent-pure-cta-fg)' }}disabled={saving || !isValid}onClick={() => {@@ -237,7 +237,7 @@ export function GoalIndicator({ sessionId }: GoalIndicatorProps): React.ReactElereturn (<div- className="mx-auto mb-1.5 flex max-w-full select-none items-center gap-2 rounded-lg px-2.5 py-1.5 text-[12px]"+ className="mx-auto mb-1.5 flex max-w-full select-none items-center gap-2 rounded-lg px-2.5 py-1.5 text-12"style={{backgroundColor: 'var(--surface-chip)',border: `1px solid ${attention ? 'var(--error-border)' : 'var(--border-default)'}`,diff --git a/apps/desktop/src/renderer/components/new-chat/HomeUsageDashboard.tsx b/apps/desktop/src/renderer/components/new-chat/HomeUsageDashboard.tsxindex f5795b6195..43c1545b3d 100644--- a/apps/desktop/src/renderer/components/new-chat/HomeUsageDashboard.tsx+++ b/apps/desktop/src/renderer/components/new-chat/HomeUsageDashboard.tsx@@ -148,13 +148,13 @@ function StatCell({<div className="flex min-w-0 flex-1 flex-col gap-0.5 rounded-lg bg-[var(--surface-chip)] px-3 py-2"><spanclassName={cn(- 'truncate text-[14px] font-semibold leading-[20px] tabular-nums',+ 'truncate text-14 font-semibold leading-[1.429] tabular-nums',warning ? 'text-[var(--warning-accent)]' : 'text-[var(--text-primary)]',)}>{value}</span>- <span className="truncate text-[11px] leading-[14px] text-[var(--text-tertiary)]">+ <span className="truncate text-11 leading-[1.273] text-[var(--text-tertiary)]">{label}</span></div>@@ -228,7 +228,7 @@ export function HomeUsageDashboard(): React.JSX.Element {const tokenDistributionTip = tokenDistributionRows.length > 0? (<div className="min-w-[220px] space-y-1">- <div className="text-[12px] font-medium text-[var(--tooltip-text)]">+ <div className="text-12 font-medium text-[var(--tooltip-text)]">{t('usageDashboard.tokenDistributionTitle', {total: formatCompactTokens(layoutHistory.totals.last30DaysTokens),})}@@ -236,10 +236,10 @@ export function HomeUsageDashboard(): React.JSX.Element {<div className="space-y-0.5">{tokenDistributionRows.map((row) => (<div key={row.model} className="flex items-center justify-between gap-4">- <span className="min-w-0 truncate text-[12px] text-[var(--tooltip-text)]">+ <span className="min-w-0 truncate text-12 text-[var(--tooltip-text)]">{row.model}</span>- <span className="shrink-0 text-[12px] tabular-nums text-[var(--text-tertiary)]">+ <span className="shrink-0 text-12 tabular-nums text-[var(--text-tertiary)]">{t('usageDashboard.tokenDistributionRow', {tokens: formatCompactTokens(row.tokens),pct: Math.round((row.tokens / layoutHistory.totals.last30DaysTokens) * 100),@@ -270,7 +270,7 @@ export function HomeUsageDashboard(): React.JSX.Element {// 折叠态的一行摘要: 今日 $ (异常标橙) · Token · 连续天数 · 近 30 天 $const collapsedSummary = (- <span className="min-w-0 flex-1 truncate text-right text-[11px] leading-[18px] tabular-nums text-[var(--text-tertiary)]">+ <span className="min-w-0 flex-1 truncate text-right text-11 leading-[1.636] tabular-nums text-[var(--text-tertiary)]"><span className={cn(showLocalSpendAnomaly && 'font-medium text-[var(--warning-accent)]')}>{t('usageDashboard.collapsedToday', {v: hasSpendValue ? formatMoney(displayTodaySpend) : UNKNOWN_VALUE,@@ -303,10 +303,10 @@ export function HomeUsageDashboard(): React.JSX.Element {>{/* 头部: 标题 + (折叠态) 一行摘要 + 折叠 chevron */}<div className={cn('flex items-center justify-between gap-3', !collapsed && 'mb-2.5')}>- <span className="flex shrink-0 items-center gap-2 text-[12px] font-medium text-[var(--text-secondary)]">+ <span className="flex shrink-0 items-center gap-2 text-12 font-medium text-[var(--text-secondary)]"><span>{t('usageDashboard.title')}</span>{usageRefreshing && (- <span className="inline-flex items-center gap-1 text-[10px] font-normal leading-none text-[var(--text-tertiary)]">+ <span className="inline-flex items-center gap-1 text-10 font-normal leading-none text-[var(--text-tertiary)]"><Spinner icon={RefreshCw} size={10} className="opacity-70" />{t('usageDashboard.updating')}</span>@@ -382,7 +382,7 @@ export function HomeUsageDashboard(): React.JSX.Element {{/* 右栏: 每日堆叠柱状图 (高=日总额, 分段=模型构成)。不放图例 — 每日模型明细全在柱子 hover tooltip 里 (省空间, 用户确认的取舍)。拆分数据未积累出来前柱子整根中性色 + 一行积累提示。 */}- <div className="mb-1.5 text-[11px] text-[var(--text-tertiary)]">+ <div className="mb-1.5 text-11 text-[var(--text-tertiary)]">{t('usageDashboard.dailyTotalsTitle')}</div><UsageDailyBars@@ -394,7 +394,7 @@ export function HomeUsageDashboard(): React.JSX.Element {todayKey={layoutHistory.todayKey}/>{layoutHistory.models.length === 0 && (- <div className="mt-1.5 text-[10px] text-[var(--text-tertiary)] opacity-70">+ <div className="mt-1.5 text-10 text-[var(--text-tertiary)] opacity-70">{t('usageDashboard.emptyModels')}</div>)}diff --git a/apps/desktop/src/renderer/components/new-chat/MentionChipNode.tsx b/apps/desktop/src/renderer/components/new-chat/MentionChipNode.tsxindex b11d40f1fe..74efd2d09b 100644--- a/apps/desktop/src/renderer/components/new-chat/MentionChipNode.tsx+++ b/apps/desktop/src/renderer/components/new-chat/MentionChipNode.tsx@@ -134,7 +134,7 @@ function MentionChipNodeView({ node, selected }: NodeViewProps) {const FALLBACK_CHIP_CLASS ='inline-flex min-w-0 max-w-[min(240px,55vw)] select-none items-center align-middle ' +'gap-1.5 rounded-full border border-[var(--border-default)] px-2 py-0.5 ' +- 'bg-[var(--surface-chip)] text-[var(--text-primary)] text-[12px] font-normal leading-5';+ 'bg-[var(--surface-chip)] text-[var(--text-primary)] text-12 font-normal leading-5';export const MentionChipNode = Node.create<Record<string, never>, Record<string, never>>({name: 'mentionChip',diff --git a/apps/desktop/src/renderer/components/new-chat/ModelSelector.tsx b/apps/desktop/src/renderer/components/new-chat/ModelSelector.tsxindex 5aa3f1e7ec..70f9c3790c 100644--- a/apps/desktop/src/renderer/components/new-chat/ModelSelector.tsx+++ b/apps/desktop/src/renderer/components/new-chat/ModelSelector.tsx@@ -337,7 +337,7 @@ export function ProviderMark({className={cn(withMargin && 'mr-1.5','flex shrink-0 items-center justify-center rounded-[4px] border border-current font-semibold leading-none',- dense ? 'h-[14.2px] w-[14.2px] text-[8.4px]' : 'h-[15px] w-[15px] text-[9px]',+ dense ? 'h-[14.2px] w-[14.2px] text-10' : 'h-[15px] w-[15px] text-10',colorClass,)}aria-hidden@@ -1723,7 +1723,7 @@ function ModelSelectorContentView({><spanclassName={cn(- 'truncate text-[13.5px] text-[var(--model-item-text)]',+ 'truncate text-14 text-[var(--model-item-text)]',selected ? 'font-medium' : 'font-normal',)}>@@ -2001,7 +2001,7 @@ function ModelSelectorContentView({</span>)}{showSubscriptionTag && (- <span className="inline-flex shrink-0 items-center rounded-full bg-[var(--surface-chip)] px-2 py-[1px] text-[11px] font-medium text-[var(--text-secondary)]">+ <span className="inline-flex shrink-0 items-center rounded-full bg-[var(--surface-chip)] px-2 py-[1px] text-11 font-medium text-[var(--text-secondary)]">{t('settings.providers.models.subscription')}</span>)}@@ -2637,7 +2637,7 @@ export function ModelSelector({<spanclassName={cn('shrink-0 font-normal text-[var(--model-trigger-meta)]',- isCreateAgentVariant ? 'text-[12px]' : dense ? 'text-[12.5px]' : 'text-[13px]',+ isCreateAgentVariant ? 'text-12' : dense ? 'text-12' : 'text-13',)}>{agentIdentityLabel}@@ -2645,7 +2645,7 @@ export function ModelSelector({<spanclassName={cn('shrink-0 font-normal text-[var(--model-trigger-meta)]',- isCreateAgentVariant ? 'text-[12px]' : dense ? 'text-[12.5px]' : 'text-[13px]',+ isCreateAgentVariant ? 'text-12' : dense ? 'text-12' : 'text-13',)}aria-hidden="true">@@ -2725,7 +2725,7 @@ export function ModelSelector({: isCreateAgentVariant? 'truncate': cn('truncate', isFieldTrigger ? 'max-w-[260px]' : ''),- isCreateAgentVariant ? 'text-[12px]' : dense ? 'text-[12.5px]' : 'text-[13px]',+ isCreateAgentVariant ? 'text-12' : dense ? 'text-12' : 'text-13',)}>{t('newChat.modelSelector.source.connect')}@@ -2757,7 +2757,7 @@ export function ModelSelector({: isFieldTrigger? 'max-w-[260px] truncate': 'truncate',- isCreateAgentVariant ? 'text-[12px]' : dense ? 'text-[12.5px]' : 'text-[13px]',+ isCreateAgentVariant ? 'text-12' : dense ? 'text-12' : 'text-13',)}>{/* 断开来源可能是该模型的唯一提供方 → visibleModels 查不到,回落显示原始 id,@@ -2773,7 +2773,7 @@ export function ModelSelector({<spanclassName={cn('shrink-0 font-medium text-[var(--error-fg)]',- dense ? 'text-[11.5px]' : 'text-[12px]',+ dense ? 'text-11' : 'text-12',)}>{t('newChat.modelSelector.source.disconnected')}@@ -2821,7 +2821,7 @@ export function ModelSelector({(isCreateAgentVariant? 'text-[var(--create-agent-control-text)]': 'text-[var(--text-primary)]'),- isCreateAgentVariant ? 'text-[12px]' : dense ? 'text-[12.5px]' : 'text-[13px]',+ isCreateAgentVariant ? 'text-12' : dense ? 'text-12' : 'text-13',)}style={budgetGradientStyle}>@@ -2836,10 +2836,10 @@ export function ModelSelector({? 'text-[var(--create-agent-control-text)]': 'text-[var(--model-trigger-meta)]',isCreateAgentVariant- ? 'shrink-0 text-[12px]'+ ? 'shrink-0 text-12': dense- ? 'shrink-0 text-[12.5px]'- : 'shrink-0 text-[13px]',+ ? 'shrink-0 text-12'+ : 'shrink-0 text-13',)}aria-hidden="true">@@ -2856,7 +2856,7 @@ export function ModelSelector({: isFieldTrigger? 'max-w-[120px] truncate': 'shrink-0 whitespace-nowrap',- isCreateAgentVariant ? 'text-[12px]' : dense ? 'text-[12.5px]' : 'text-[13px]',+ isCreateAgentVariant ? 'text-12' : dense ? 'text-12' : 'text-13',)}>{effortLabel}diff --git a/apps/desktop/src/renderer/components/new-chat/NewGoalDialog.tsx b/apps/desktop/src/renderer/components/new-chat/NewGoalDialog.tsxindex 0ee10d7c35..75b855ddd6 100644--- a/apps/desktop/src/renderer/components/new-chat/NewGoalDialog.tsx+++ b/apps/desktop/src/renderer/components/new-chat/NewGoalDialog.tsx@@ -98,10 +98,10 @@ export function NewGoalDialog({ sessionId, open, onOpenChange, onCreate, initialif (saving) event.preventDefault();}}>- <AlertDialog.Title className="text-[15px] font-medium" style={{ color: 'var(--text-primary)' }}>+ <AlertDialog.Title className="text-15 font-medium" style={{ color: 'var(--text-primary)' }}>{t('goal.newGoalDialog.title')}</AlertDialog.Title>- <AlertDialog.Description className="text-[12px] leading-5" style={{ color: 'var(--confirm-desc)' }}>+ <AlertDialog.Description className="text-12 leading-5" style={{ color: 'var(--confirm-desc)' }}>{t('goal.newGoalDialog.description')}</AlertDialog.Description><ListComposerTextarea@@ -116,7 +116,7 @@ export function NewGoalDialog({ sessionId, open, onOpenChange, onCreate, initialvoid save();}}}- className="min-h-[112px] w-full resize-none rounded-lg border p-2.5 text-[13px] leading-5 outline-none placeholder:text-[var(--text-placeholder)]"+ className="min-h-[112px] w-full resize-none rounded-lg border p-2.5 text-13 leading-5 outline-none placeholder:text-[var(--text-placeholder)]"style={{backgroundColor: 'var(--settings-input-bg)',borderColor: 'var(--settings-input-border)',@@ -125,7 +125,7 @@ export function NewGoalDialog({ sessionId, open, onOpenChange, onCreate, initial/><GoalAdvancedLimits value={limits} onChange={setLimits} />{error && (- <div className="text-[12px]" style={{ color: 'var(--error-fg)' }}>+ <div className="text-12" style={{ color: 'var(--error-fg)' }}>{error}</div>)}@@ -133,7 +133,7 @@ export function NewGoalDialog({ sessionId, open, onOpenChange, onCreate, initial<AlertDialog.Cancel asChild><buttontype="button"- className="h-8 rounded-full border px-3 text-[12px] transition-colors hover:bg-[var(--surface-elevated)]"+ className="h-8 rounded-full border px-3 text-12 transition-colors hover:bg-[var(--surface-elevated)]"style={{backgroundColor: 'var(--surface-elevated)',borderColor: 'var(--border-default)',@@ -146,7 +146,7 @@ export function NewGoalDialog({ sessionId, open, onOpenChange, onCreate, initial</AlertDialog.Cancel><buttontype="button"- className="h-8 rounded-full px-4 text-[12px] font-medium transition-opacity hover:opacity-85 disabled:opacity-45"+ className="h-8 rounded-full px-4 text-12 font-medium transition-opacity hover:opacity-85 disabled:opacity-45"style={{ backgroundColor: 'var(--accent-cta-bg-pure)', color: 'var(--accent-pure-cta-fg)' }}disabled={saving || !trimmed}onClick={() => {diff --git a/apps/desktop/src/renderer/components/new-chat/PastedTextChipNode.tsx b/apps/desktop/src/renderer/components/new-chat/PastedTextChipNode.tsxindex 4b25ac4516..440b267af6 100644--- a/apps/desktop/src/renderer/components/new-chat/PastedTextChipNode.tsx+++ b/apps/desktop/src/renderer/components/new-chat/PastedTextChipNode.tsx@@ -144,7 +144,7 @@ export const PastedTextChipNode = Node.create<Record<string, never>, Record<striclass:'inline-flex min-w-0 max-w-[min(240px,55vw)] select-none items-center align-middle ' +'gap-1.5 rounded-full border border-[var(--border-default)] px-2 py-0.5 ' +- 'bg-[var(--surface-chip)] text-[var(--text-primary)] text-[12px] font-normal leading-5',+ 'bg-[var(--surface-chip)] text-[var(--text-primary)] text-12 font-normal leading-5',style: 'color: var(--text-primary); user-select: none; -webkit-user-select: none; -webkit-user-drag: element;',draggable: 'true',contenteditable: 'false',diff --git a/apps/desktop/src/renderer/components/new-chat/PendingQueuePanel.tsx b/apps/desktop/src/renderer/components/new-chat/PendingQueuePanel.tsxindex 7f9c0ab11b..f8de515f21 100644--- a/apps/desktop/src/renderer/components/new-chat/PendingQueuePanel.tsx+++ b/apps/desktop/src/renderer/components/new-chat/PendingQueuePanel.tsx@@ -366,7 +366,7 @@ export function PendingQueuePanel({: hasStructuredAtoms ? (<SentInlineAtomBodyagentReferences={agentReferences}- className="relative top-px inline-flex min-w-0 max-w-full items-center gap-1 text-[13px] leading-[1.25]"+ className="relative top-px inline-flex min-w-0 max-w-full items-center gap-1 text-13 leading-[1.25]"content={chatMessageContent}pastedTextRanges={entry.chatMessage.pastedTextRanges}quotesEncoded={entry.chatMessage.quotesEncoded}@@ -502,7 +502,7 @@ export function PendingQueuePanel({rows={1}aria-label={t('newChat.pendingQueue.editAria', { index: originalIdx + 1 })}className={cn(- 'min-h-[18px] min-w-0 flex-1 resize-none rounded-[6px] bg-transparent text-[13px] leading-[1.25]',+ 'min-h-[18px] min-w-0 flex-1 resize-none rounded-[6px] bg-transparent text-13 leading-[1.25]','max-h-[120px] overflow-y-auto text-[var(--msg-assistant-text)] outline-none','[field-sizing:content]',)}@@ -532,12 +532,12 @@ export function PendingQueuePanel({className="shrink-0 text-[var(--msg-assistant-text)]"/>)}- <span className="min-w-0 max-w-[120px] shrink truncate text-[13px] font-semibold leading-[1.25] text-[var(--msg-assistant-text)]">+ <span className="min-w-0 max-w-[120px] shrink truncate text-13 font-semibold leading-[1.25] text-[var(--msg-assistant-text)]">{rowPresentation.senderLabel}</span><spanclassName={cn(- 'min-w-0 flex-1 truncate text-[13px] leading-[1.25]',+ 'min-w-0 flex-1 truncate text-13 leading-[1.25]',isRowActive? 'text-[var(--msg-assistant-text)]': 'text-[var(--settings-section-desc)]',@@ -556,7 +556,7 @@ export function PendingQueuePanel({<pclassName={cn(// top-px: 在居中基础上把文字再压低 1px, 抵消字体 metrics, 与 drag handle 光学对齐- 'relative top-px min-w-0 flex-1 truncate text-[13px] leading-[1.25]',+ 'relative top-px min-w-0 flex-1 truncate text-13 leading-[1.25]',isRowActive? 'text-[var(--msg-assistant-text)]': 'text-[var(--settings-section-desc)]',@@ -664,7 +664,7 @@ export function PendingQueuePanel({{showFooter && (<divclassName={cn(- 'grid w-full select-none grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-2 border-t px-2 py-1.5 text-[12px] leading-none',+ 'grid w-full select-none grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-2 border-t px-2 py-1.5 text-12 leading-none','border-[var(--chat-input-border)]',)}>@@ -704,7 +704,7 @@ export function PendingQueuePanel({className={cn('flex h-5 min-w-[64px] items-center justify-center rounded-full border px-2','border-[var(--chat-input-border)] bg-[var(--chat-input-bg)]',- 'text-[12px] leading-none text-[var(--msg-assistant-text)]',+ 'text-12 leading-none text-[var(--msg-assistant-text)]','hover:bg-[var(--chat-input-chip-bg)]',)}>diff --git a/apps/desktop/src/renderer/components/new-chat/PermissionSelector.tsx b/apps/desktop/src/renderer/components/new-chat/PermissionSelector.tsxindex 96c44e849e..dd31095e75 100644--- a/apps/desktop/src/renderer/components/new-chat/PermissionSelector.tsx+++ b/apps/desktop/src/renderer/components/new-chat/PermissionSelector.tsx@@ -182,7 +182,7 @@ export function PermissionSelector({// min-w-0 让 span 能在 flex 容器里跌破内容宽度,truncate 才能在窄宽下出现 "完..."'min-w-0 font-normal text-current','truncate',- isCreateAgentVariant ? 'text-[12px]' : dense ? 'text-[12.5px]' : 'text-[13px]',+ isCreateAgentVariant ? 'text-12' : dense ? 'text-12' : 'text-13',)}>{triggerLabel}@@ -348,7 +348,7 @@ export function PermissionSelector({/><spanclassName={cn(- 'min-w-0 flex-1 truncate text-left text-[14px] font-medium',+ 'min-w-0 flex-1 truncate text-left text-14 font-medium',selectedTone ? 'text-current' : 'text-[var(--model-item-text)]',)}>diff --git a/apps/desktop/src/renderer/components/new-chat/PlanActionCard.tsx b/apps/desktop/src/renderer/components/new-chat/PlanActionCard.tsxindex 5977e49d25..1c453bec74 100644--- a/apps/desktop/src/renderer/components/new-chat/PlanActionCard.tsx+++ b/apps/desktop/src/renderer/components/new-chat/PlanActionCard.tsx@@ -83,7 +83,13 @@ export function PlanActionCard({ requestId, onRespond, onCancel }: PlanActionCarconst handleFeedbackInput = useCallback((e: React.FormEvent<HTMLTextAreaElement>) => {const el = e.currentTarget;el.style.height = 'auto';- const maxHeight = 6 * 22; // ~6 rows at line-height ~22px+ // 行高改成无单位比例后会随「外观 → UI 字号」缩放,6 行上限必须按实际计算值算:+ // 写死 6×22 会让放大字号时仍按 132px 截断,可见行数反而变少。取不到计算值+ // (如 jsdom 返回 'normal')时回落到默认字号下的 22px。+ const computedLineHeight = Number.parseFloat(window.getComputedStyle(el).lineHeight);+ const rowHeight =+ Number.isFinite(computedLineHeight) && computedLineHeight > 0 ? computedLineHeight : 22;+ const maxHeight = 6 * rowHeight;el.style.height = `${Math.min(el.scrollHeight, maxHeight)}px`;}, []);@@ -217,7 +223,8 @@ export function PlanActionCard({ requestId, onRespond, onCancel }: PlanActionCar'flex-1 resize-none bg-transparent text-14 outline-none','text-[var(--plan-action-fb-text)]','placeholder:text-[var(--plan-action-fb-placeholder)]',- 'leading-[22px]', // lock line-height so auto-grow math stays accurate+ // 22 ÷ 14:与 text-14 等比,随 UI 字号缩放(auto-grow 上限按计算值取)+ 'leading-[1.571]',submitted && 'cursor-not-allowed opacity-60',)}/>diff --git a/apps/desktop/src/renderer/components/new-chat/PlanModeIndicator.tsx b/apps/desktop/src/renderer/components/new-chat/PlanModeIndicator.tsxindex b0dd5bce34..087cc9531b 100644--- a/apps/desktop/src/renderer/components/new-chat/PlanModeIndicator.tsx+++ b/apps/desktop/src/renderer/components/new-chat/PlanModeIndicator.tsx@@ -23,7 +23,7 @@ export function PlanModeIndicator({ onExit, disabled }: PlanModeIndicatorProps):const { t } = useTranslation();return (<div- className="mx-auto flex max-w-full select-none items-center gap-2 rounded-lg px-2.5 py-1.5 text-[12px]"+ className="mx-auto flex max-w-full select-none items-center gap-2 rounded-lg px-2.5 py-1.5 text-12"style={{backgroundColor: 'var(--surface-chip)',border: '1px solid var(--border-default)',diff --git a/apps/desktop/src/renderer/components/new-chat/PlanViewerCard.tsx b/apps/desktop/src/renderer/components/new-chat/PlanViewerCard.tsxindex 2e1c336aed..bab6c4750a 100644--- a/apps/desktop/src/renderer/components/new-chat/PlanViewerCard.tsx+++ b/apps/desktop/src/renderer/components/new-chat/PlanViewerCard.tsx@@ -155,7 +155,7 @@ export function PlanViewerCard({'flex h-[44px] items-center justify-between pl-[20px] pr-[10px]',)}>- <span className="text-[14px] font-semibold text-[var(--plan-min-title)]">+ <span className="text-14 font-semibold text-[var(--plan-min-title)]">{t('newChat.planReview.title')}</span><div className="flex items-center gap-[4px]">@@ -227,10 +227,10 @@ export function PlanViewerCard({)}><div className="flex items-center gap-[12px]">- <span className="text-[14px] font-semibold text-[var(--plan-header-title)]">+ <span className="text-14 font-semibold text-[var(--plan-header-title)]">{t('newChat.planReview.title')}</span>- <span className="text-[12px] font-normal text-[var(--plan-header-hint)]">+ <span className="text-12 font-normal text-[var(--plan-header-hint)]">{hint}</span></div>@@ -301,7 +301,7 @@ export function PlanViewerCard({className={cn('flex-1 resize-none overflow-y-auto px-[28px] py-[20px]','whitespace-pre-wrap break-words bg-transparent outline-none',- 'font-mono text-[13px] leading-[1.7]',+ 'font-mono text-13 leading-[1.7]','text-[var(--plan-edit-body)] caret-[var(--plan-edit-body)]',)}aria-label={t('newChat.planReview.toolbar.edit')}@@ -309,7 +309,7 @@ export function PlanViewerCard({{saveError && (<divclassName={cn(- 'shrink-0 border-t px-[28px] py-[8px] text-[12px]',+ 'shrink-0 border-t px-[28px] py-[8px] text-12','border-[var(--plan-header-divider)]','bg-[var(--plan-content-bg)] text-red-500',)}@@ -329,12 +329,12 @@ export function PlanViewerCard({)}><div className="pb-[4px]">- <span className="text-[12px] font-semibold text-[var(--plan-outline-label)]">+ <span className="text-12 font-semibold text-[var(--plan-outline-label)]">{t('newChat.planReview.outlineLabel')}</span></div>{outline.length === 0 ? (- <span className="px-[8px] py-[6px] text-[12px] text-[var(--plan-outline-item-text)]">+ <span className="px-[8px] py-[6px] text-12 text-[var(--plan-outline-item-text)]">{t('newChat.planReview.outlineEmpty')}</span>) : (@@ -347,7 +347,7 @@ export function PlanViewerCard({onClick={() => handleScrollToAnchor(entry.id)}className={cn('flex items-center rounded-[6px] px-[8px] py-[6px] text-left',- 'text-[12px]',+ 'text-12','transition-colors hover:bg-[var(--plan-outline-active-bg)]',// v1: no scroll-spy. Items are neutral by default and// become active only after the user clicks them.diff --git a/apps/desktop/src/renderer/components/new-chat/SlashCommandPalette.tsx b/apps/desktop/src/renderer/components/new-chat/SlashCommandPalette.tsxindex 86dd7fa599..0911dac67f 100644--- a/apps/desktop/src/renderer/components/new-chat/SlashCommandPalette.tsx+++ b/apps/desktop/src/renderer/components/new-chat/SlashCommandPalette.tsx@@ -218,7 +218,7 @@ export function SlashCommandPalette({<divclassName={cn('flex items-center justify-center',- 'h-[40px] text-[13px]',+ 'h-[40px] text-13','text-[var(--cmd-palette-empty)]',)}>@@ -242,7 +242,7 @@ export function SlashCommandPalette({className={cn('flex w-full items-center justify-between','h-[36px] px-[10px] rounded-[6px]',- 'text-left text-[14px] font-medium',+ 'text-left text-14 font-medium','text-[var(--cmd-palette-item-text)]','outline-none transition-colors',focused && 'bg-[var(--cmd-palette-item-hover)]',@@ -250,7 +250,7 @@ export function SlashCommandPalette({><span className="truncate">{cmd.name}</span>{metaLabel(cmd) && (- <span className="shrink-0 text-[12px] font-normal text-[var(--cmd-palette-item-meta)]">+ <span className="shrink-0 text-12 font-normal text-[var(--cmd-palette-item-meta)]">{metaLabel(cmd)}</span>)}@@ -281,10 +281,10 @@ export function SlashCommandPalette({maxHeight: tooltipPos.maxHeight,}}>- <div className="text-[14px] font-medium text-[var(--cmd-palette-item-text)]">+ <div className="text-14 font-medium text-[var(--cmd-palette-item-text)]">{focusedCmd.name}</div>- <div className="mt-[8px] text-[13px] leading-[1.5] text-[var(--cmd-palette-tooltip-body)]">+ <div className="mt-[8px] text-13 leading-[1.5] text-[var(--cmd-palette-tooltip-body)]">{focusedCmd.description}</div></div>,diff --git a/apps/desktop/src/renderer/components/new-chat/TakeoverMask.tsx b/apps/desktop/src/renderer/components/new-chat/TakeoverMask.tsxindex 0282adfbc2..6aed25602e 100644--- a/apps/desktop/src/renderer/components/new-chat/TakeoverMask.tsx+++ b/apps/desktop/src/renderer/components/new-chat/TakeoverMask.tsx@@ -77,10 +77,10 @@ export function TakeoverMask({ sessionId, channel, userId, displayName }: Takeov<RadioTower size={16} className="text-[var(--workingdir-icon)]" /></div><div className="flex flex-col gap-[2px]">- <div className="text-[14px] font-medium leading-tight text-[var(--msg-assistant-text)]">+ <div className="text-14 font-medium leading-tight text-[var(--msg-assistant-text)]">{t('newChat.takeoverMask.heading', { user: userLabel, channel: channelLabel })}</div>- <div className="text-[12px] font-normal leading-tight text-[var(--workingdir-text)]">+ <div className="text-12 font-normal leading-tight text-[var(--workingdir-text)]">{t('newChat.takeoverMask.subtitle')}</div></div>@@ -92,7 +92,7 @@ export function TakeoverMask({ sessionId, channel, userId, displayName }: TakeovclassName={cn('flex h-8 shrink-0 items-center gap-1.5 rounded-full px-4','bg-[hsl(var(--sidebar-item-hover))]',- 'text-[13px] font-medium text-[var(--msg-assistant-text)]',+ 'text-13 font-medium text-[var(--msg-assistant-text)]','transition-colors hover:opacity-85',revoking && 'cursor-not-allowed opacity-60',)}diff --git a/apps/desktop/src/renderer/components/new-chat/UsageDailyBars.tsx b/apps/desktop/src/renderer/components/new-chat/UsageDailyBars.tsxindex c3fbb10a6d..5d4a05f01a 100644--- a/apps/desktop/src/renderer/components/new-chat/UsageDailyBars.tsx+++ b/apps/desktop/src/renderer/components/new-chat/UsageDailyBars.tsx@@ -191,7 +191,7 @@ export function UsageDailyBars({{ticks.map((v) => (<spankey={v}- className="absolute right-0 translate-y-1/2 text-[9px] leading-none tabular-nums text-[var(--text-tertiary)]"+ className="absolute right-0 translate-y-1/2 text-10 leading-none tabular-nums text-[var(--text-tertiary)]"style={{ bottom: (v / bars.max) * CHART_HEIGHT_PX }}>{tickLabel(v, currency)}diff --git a/apps/desktop/src/renderer/components/new-chat/UsageHeatmap.tsx b/apps/desktop/src/renderer/components/new-chat/UsageHeatmap.tsxindex 679ca7c64c..957d27512e 100644--- a/apps/desktop/src/renderer/components/new-chat/UsageHeatmap.tsx+++ b/apps/desktop/src/renderer/components/new-chat/UsageHeatmap.tsx@@ -138,7 +138,7 @@ export function UsageHeatmap({{monthLabels.map((m) => (<spankey={`${m.col}-${m.text}`}- className="absolute top-0 text-[10px] leading-[14px] text-[var(--text-tertiary)]"+ className="absolute top-0 text-10 leading-[1.4] text-[var(--text-tertiary)]"style={{ left: m.col * colPitch }}>{m.text}diff --git a/apps/desktop/src/renderer/components/new-chat/VendorSegmentedSwitcher.tsx b/apps/desktop/src/renderer/components/new-chat/VendorSegmentedSwitcher.tsxindex d978048c74..81ecaf3ce7 100644--- a/apps/desktop/src/renderer/components/new-chat/VendorSegmentedSwitcher.tsx+++ b/apps/desktop/src/renderer/components/new-chat/VendorSegmentedSwitcher.tsx@@ -131,7 +131,7 @@ export function VendorSegmentedSwitcher({className={cn('flex h-full flex-1 items-center justify-center rounded-full',!iconOnly && 'gap-1.5',- dense ? 'text-[12px] leading-none transition-colors' : 'text-[14px] leading-none transition-colors',+ dense ? 'text-12 leading-none transition-colors' : 'text-14 leading-none transition-colors',isActive? cn('font-medium',diff --git a/apps/desktop/src/renderer/components/new-chat/WorktreeChipsRow.tsx b/apps/desktop/src/renderer/components/new-chat/WorktreeChipsRow.tsxindex 2eea19beeb..b7922671ba 100644--- a/apps/desktop/src/renderer/components/new-chat/WorktreeChipsRow.tsx+++ b/apps/desktop/src/renderer/components/new-chat/WorktreeChipsRow.tsx@@ -343,7 +343,7 @@ function FolderChipBig({className={cn('inline-flex h-[42px] items-center gap-2.5 rounded-full','border border-border bg-[var(--chat-input-bg)] px-[18px]',- 'text-[14px] font-medium text-foreground',+ 'text-14 font-medium text-foreground','transition-colors hover:bg-sidebar-item-hover','disabled:cursor-not-allowed disabled:opacity-50',)}@@ -423,8 +423,8 @@ function BranchWorktreeChip({// 只读态不弹菜单但也不该像 disabled 一样淡出 —— 分支信息本身是有效展示。!branchInteractive && 'cursor-default',compact- ? 'max-w-[180px] gap-1.5 pl-3 pr-2 text-[12px] font-medium leading-[14px]'- : 'max-w-[220px] gap-2.5 pl-[18px] pr-2.5 text-[14px] font-medium',+ ? 'max-w-[180px] gap-1.5 pl-3 pr-2 text-12 font-medium leading-[1.167]'+ : 'max-w-[220px] gap-2.5 pl-[18px] pr-2.5 text-14 font-medium',branchInteractive &&(compact? 'hover:bg-[var(--create-agent-control-bg-hover)] active:bg-[var(--create-agent-control-bg-pressed)]'@@ -471,7 +471,7 @@ function BranchWorktreeChip({className="max-h-[280px] min-w-[200px] overflow-y-auto rounded-xl border border-border bg-popover p-1 shadow-lg">{branchesLoading ? (- <div className="px-3 py-1.5 text-[13px] text-muted-foreground">+ <div className="px-3 py-1.5 text-13 text-muted-foreground">{t('newChat.branchChip.loading')}</div>) : branchesFailed || branches.length === 0 ? (@@ -482,7 +482,7 @@ function BranchWorktreeChip({e.preventDefault();onRetryBranches();}}- className="cursor-pointer rounded-[8px] px-3 py-1.5 text-[13px] text-muted-foreground focus:bg-accent focus:text-accent-foreground"+ className="cursor-pointer rounded-[8px] px-3 py-1.5 text-13 text-muted-foreground focus:bg-accent focus:text-accent-foreground">{t('newChat.branchChip.loadFailed')}</DropdownMenuItem>@@ -492,7 +492,7 @@ function BranchWorktreeChip({key={b}onSelect={() => onPick(b)}className={cn(- 'cursor-pointer rounded-[8px] px-3 py-1.5 text-[13px] text-foreground',+ 'cursor-pointer rounded-[8px] px-3 py-1.5 text-13 text-foreground','focus:bg-accent focus:text-accent-foreground',b === branchLabel && 'bg-accent/60',)}@@ -519,8 +519,8 @@ function BranchWorktreeChip({'inline-flex h-full items-center transition-colors','disabled:cursor-not-allowed disabled:opacity-50',compact- ? 'gap-1.5 pl-2 pr-3 text-[12px] font-medium leading-[14px]'- : 'gap-2.5 pl-2.5 pr-[18px] text-[14px] font-medium',+ ? 'gap-1.5 pl-2 pr-3 text-12 font-medium leading-[1.167]'+ : 'gap-2.5 pl-2.5 pr-[18px] text-14 font-medium',!checkboxDisabled &&(compact? 'hover:bg-[var(--create-agent-control-bg-hover)] active:bg-[var(--create-agent-control-bg-pressed)]'diff --git a/apps/desktop/src/renderer/components/new-chat/WorktreeCreatingOverlay.tsx b/apps/desktop/src/renderer/components/new-chat/WorktreeCreatingOverlay.tsxindex 2988d639f9..c40a700edb 100644--- a/apps/desktop/src/renderer/components/new-chat/WorktreeCreatingOverlay.tsx+++ b/apps/desktop/src/renderer/components/new-chat/WorktreeCreatingOverlay.tsx@@ -50,10 +50,10 @@ export function WorktreeCreatingOverlay({ branchName }: WorktreeCreatingOverlayP<Spinner size={16} className="text-[var(--workingdir-icon)]" /></div><div className="flex flex-col gap-[2px]">- <div className="text-[14px] font-medium leading-tight text-[var(--msg-assistant-text)]">+ <div className="text-14 font-medium leading-tight text-[var(--msg-assistant-text)]">{t('newChat.worktreeCreatingOverlay.heading')}</div>- <div className="text-[12px] font-normal leading-tight text-[var(--workingdir-text)]">+ <div className="text-12 font-normal leading-tight text-[var(--workingdir-text)]">{t('newChat.worktreeCreatingOverlay.subtitle', { branch: branchName })}</div></div>diff --git a/apps/desktop/src/renderer/components/onboarding/ConnectProviderCard.tsx b/apps/desktop/src/renderer/components/onboarding/ConnectProviderCard.tsxindex 999cb1cdfd..364d5521f3 100644--- a/apps/desktop/src/renderer/components/onboarding/ConnectProviderCard.tsx+++ b/apps/desktop/src/renderer/components/onboarding/ConnectProviderCard.tsx@@ -32,7 +32,7 @@ function rowIcon(id: string, name: string, routing?: ProviderLogoRouting): Reactif (hasProviderLogo(id, routing)) {return <ProviderLogoMark providerId={id} routing={routing} size={16} />;}- return <span className="text-[13px] font-semibold leading-none">{providerMonogram(name)}</span>;+ return <span className="text-13 font-semibold leading-none">{providerMonogram(name)}</span>;}export function ConnectProviderCard({ className }: { className?: string }) {@@ -79,10 +79,10 @@ export function ConnectProviderCard({ className }: { className?: string }) {)}><div className="flex flex-col gap-1">- <h2 className="text-[18px] font-medium leading-snug text-[var(--text-primary)]">+ <h2 className="text-18 font-medium leading-snug text-[var(--text-primary)]">{t('onboarding.connectProvider.title')}</h2>- <p className="text-[13px] leading-relaxed text-[var(--text-secondary)]">+ <p className="text-13 leading-relaxed text-[var(--text-secondary)]">{t('onboarding.connectProvider.desc')}</p></div>@@ -130,7 +130,7 @@ export function ConnectProviderCard({ className }: { className?: string }) {aria-controls="connect-provider-more"className="group flex w-full items-center gap-3.5 border-b border-[var(--border-default)] px-1 py-3 text-left transition-colors hover:bg-[var(--surface-hover)]">- <span className="flex flex-1 text-[13px] font-medium text-[var(--text-secondary)]">+ <span className="flex flex-1 text-13 font-medium text-[var(--text-secondary)]">{t('onboarding.connectProvider.othersToggle', { count: moreRows.length })}</span><ChevronDown@@ -152,14 +152,14 @@ export function ConnectProviderCard({ className }: { className?: string }) {<buttontype="button"onClick={onboarding.dismiss}- className="rounded-full px-3 py-1.5 text-[13px] text-[var(--text-tertiary)] transition-colors hover:bg-[var(--surface-hover)] hover:text-[var(--text-secondary)]"+ className="rounded-full px-3 py-1.5 text-13 text-[var(--text-tertiary)] transition-colors hover:bg-[var(--surface-hover)] hover:text-[var(--text-secondary)]">{t('onboarding.connectProvider.dismiss')}</button><buttontype="button"onClick={() => navigate('/settings?tab=providers&wizard=1')}- className="flex items-center gap-1.5 rounded-full px-3 py-1.5 text-[13px] font-medium text-[var(--text-secondary)] transition-colors hover:bg-[var(--surface-hover)] hover:text-[var(--text-primary)]"+ className="flex items-center gap-1.5 rounded-full px-3 py-1.5 text-13 font-medium text-[var(--text-secondary)] transition-colors hover:bg-[var(--surface-hover)] hover:text-[var(--text-primary)]"><KeyRound size={13} />{t('onboarding.connectProvider.haveApiKey')}@@ -193,16 +193,16 @@ function ProviderRow({</span><span className="flex min-w-0 flex-1 flex-col gap-0.5"><span className="flex items-center gap-2">- <span className="truncate text-[14px] font-medium text-[var(--text-primary)]">+ <span className="truncate text-14 font-medium text-[var(--text-primary)]">{label}</span>{badge && (- <span className="shrink-0 rounded-full border border-[var(--border-default)] px-2 py-px text-[10px] font-medium uppercase tracking-[0.06em] text-[var(--text-tertiary)]">+ <span className="shrink-0 rounded-full border border-[var(--border-default)] px-2 py-px text-10 font-medium uppercase tracking-[0.06em] text-[var(--text-tertiary)]">{badge}</span>)}</span>- <span className="truncate text-[11px] text-[var(--text-tertiary)]">{sub}</span>+ <span className="truncate text-11 text-[var(--text-tertiary)]">{sub}</span></span><ChevronRightsize={14}diff --git a/apps/desktop/src/renderer/components/onboarding/InheritedSubscriptionNotice.tsx b/apps/desktop/src/renderer/components/onboarding/InheritedSubscriptionNotice.tsxindex 95e44c87d5..50feae6de2 100644--- a/apps/desktop/src/renderer/components/onboarding/InheritedSubscriptionNotice.tsx+++ b/apps/desktop/src/renderer/components/onboarding/InheritedSubscriptionNotice.tsx@@ -54,10 +54,10 @@ export function InheritedSubscriptionNotice({<PlugZap size={15} className="text-[var(--text-secondary)]" /></div><div className="flex min-w-0 flex-1 flex-col gap-1">- <span className="text-[14px] font-medium leading-snug text-[var(--text-primary)]">+ <span className="text-14 font-medium leading-snug text-[var(--text-primary)]">{t('onboarding.inheritedSubscription.title', { products })}</span>- <span className="text-[13px] leading-relaxed text-[var(--text-secondary)]">+ <span className="text-13 leading-relaxed text-[var(--text-secondary)]">{t('onboarding.inheritedSubscription.desc')}</span><div className="mt-1.5 flex items-center gap-2">@@ -69,7 +69,7 @@ export function InheritedSubscriptionNotice({}}className={cn('flex items-center gap-0.5 rounded-[8px] px-2 py-1 -ml-2',- 'text-[13px] font-medium text-[var(--text-primary)]',+ 'text-13 font-medium text-[var(--text-primary)]','transition-colors hover:bg-[var(--model-item-hover)] active:scale-[0.98]',)}>@@ -80,7 +80,7 @@ export function InheritedSubscriptionNotice({type="button"onClick={notice.acknowledge}className={cn(- 'rounded-[8px] px-2 py-1 text-[13px] font-normal text-[var(--text-secondary)]',+ 'rounded-[8px] px-2 py-1 text-13 font-normal text-[var(--text-secondary)]','transition-colors hover:bg-[var(--model-item-hover)] active:scale-[0.98]',)}>diff --git a/apps/desktop/src/renderer/components/onboarding/PromotionalGrantNotice.tsx b/apps/desktop/src/renderer/components/onboarding/PromotionalGrantNotice.tsxindex 4f2107e2e7..df15cd0ec1 100644--- a/apps/desktop/src/renderer/components/onboarding/PromotionalGrantNotice.tsx+++ b/apps/desktop/src/renderer/components/onboarding/PromotionalGrantNotice.tsx@@ -69,10 +69,10 @@ export function PromotionalGrantNotice({<Gift size={15} className="text-[var(--text-secondary)]" /></div><div className="flex min-w-0 flex-1 flex-col gap-1">- <span className="text-[14px] font-medium leading-snug text-[var(--text-primary)]">+ <span className="text-14 font-medium leading-snug text-[var(--text-primary)]">{t('onboarding.promotionalGrant.title')}</span>- <span className="text-[13px] leading-relaxed text-[var(--text-secondary)]">+ <span className="text-13 leading-relaxed text-[var(--text-secondary)]">{t('onboarding.promotionalGrant.desc', {amount: formatBillingAmount(notice.grant.originalAmount,@@ -91,7 +91,7 @@ export function PromotionalGrantNotice({}}className={cn('flex items-center gap-0.5 rounded-[8px] px-2 py-1 -ml-2',- 'text-[13px] font-medium text-[var(--text-primary)]',+ 'text-13 font-medium text-[var(--text-primary)]','transition-colors hover:bg-[var(--model-item-hover)] active:scale-[0.98]',)}>@@ -102,7 +102,7 @@ export function PromotionalGrantNotice({type="button"onClick={notice.acknowledge}className={cn(- 'rounded-[8px] px-2 py-1 text-[13px] font-normal text-[var(--text-secondary)]',+ 'rounded-[8px] px-2 py-1 text-13 font-normal text-[var(--text-secondary)]','transition-colors hover:bg-[var(--model-item-hover)] active:scale-[0.98]',)}>diff --git a/apps/desktop/src/renderer/components/settings/AppearanceSection.tsx b/apps/desktop/src/renderer/components/settings/AppearanceSection.tsxindex 71f5408723..cb0577e1d3 100644--- a/apps/desktop/src/renderer/components/settings/AppearanceSection.tsx+++ b/apps/desktop/src/renderer/components/settings/AppearanceSection.tsx@@ -695,7 +695,7 @@ export function AppearanceSection() {}}}className={cn(- 'h-9 w-[72px] rounded-xl border px-3 text-right text-[13px] outline-none',+ 'h-9 w-[72px] rounded-xl border px-3 text-right text-13 outline-none','border-[var(--settings-input-border)] bg-[var(--settings-input-bg)]','font-mono text-[var(--settings-input-text)]','focus:border-[var(--settings-input-border-focus)]',@@ -779,7 +779,7 @@ export function AppearanceSection() {}}}className={cn(- 'h-9 w-[72px] rounded-xl border px-3 text-right text-[13px] outline-none',+ 'h-9 w-[72px] rounded-xl border px-3 text-right text-13 outline-none','border-[var(--settings-input-border)] bg-[var(--settings-input-bg)]','font-mono text-[var(--settings-input-text)]','focus:border-[var(--settings-input-border-focus)]',diff --git a/apps/desktop/src/renderer/components/settings/GitSafetySection.tsx b/apps/desktop/src/renderer/components/settings/GitSafetySection.tsxindex 1098b01467..0e5e38dd9e 100644--- a/apps/desktop/src/renderer/components/settings/GitSafetySection.tsx+++ b/apps/desktop/src/renderer/components/settings/GitSafetySection.tsx@@ -39,10 +39,10 @@ export function GitSafetySection() {><div className="flex items-center justify-between gap-3"><div className="flex min-w-0 flex-col gap-1">- <p className="text-[13px] font-medium text-[var(--settings-section-sublabel)]">+ <p className="text-13 font-medium text-[var(--settings-section-sublabel)]">{t('settings.gitSafety.autoSnapshotTitle')}</p>- <p className="text-[12px] leading-[1.4] text-[var(--settings-section-sublabel)] opacity-70">+ <p className="text-12 leading-[1.4] text-[var(--settings-section-sublabel)] opacity-70">{t('settings.gitSafety.description')}</p></div>diff --git a/apps/desktop/src/renderer/components/settings/ImBotSection.tsx b/apps/desktop/src/renderer/components/settings/ImBotSection.tsxindex b896f72805..bc2bbba452 100644--- a/apps/desktop/src/renderer/components/settings/ImBotSection.tsx+++ b/apps/desktop/src/renderer/components/settings/ImBotSection.tsx@@ -58,7 +58,7 @@ function GroupTip({ message }: { message: string }) {return (<div className="flex items-start gap-2 rounded-xl bg-[var(--surface-chip)] px-3.5 py-2.5"><Lightbulb size={14} className="mt-[2px] shrink-0 text-[var(--text-tertiary)]" />- <p className="text-[12.5px] leading-[1.6] text-[var(--text-secondary)]">{message}</p>+ <p className="text-12 leading-[1.6] text-[var(--text-secondary)]">{message}</p></div>);}diff --git a/apps/desktop/src/renderer/components/settings/ImChannelSettingsCard.tsx b/apps/desktop/src/renderer/components/settings/ImChannelSettingsCard.tsxindex 27e0f8aeef..f84f11317c 100644--- a/apps/desktop/src/renderer/components/settings/ImChannelSettingsCard.tsx+++ b/apps/desktop/src/renderer/components/settings/ImChannelSettingsCard.tsx@@ -93,16 +93,16 @@ export function ImChannelSettingsCard({)}><span className="min-w-0 flex-1">- <span className="block text-[14px] font-medium leading-[1.3] text-[var(--settings-section-title)]">+ <span className="block text-14 font-medium leading-[1.3] text-[var(--settings-section-title)]">{title}</span>- <span className="mt-1 block text-[12px] leading-[1.45] text-[var(--settings-section-desc)]">+ <span className="mt-1 block text-12 leading-[1.45] text-[var(--settings-section-desc)]">{description}</span></span><span className="flex min-w-0 shrink-0 items-center gap-3">- <span className="hidden w-[220px] truncate text-right text-[12px] text-[var(--text-secondary)] md:block">+ <span className="hidden w-[220px] truncate text-right text-12 text-[var(--text-secondary)] md:block">{routeSummary}</span>{status}diff --git a/apps/desktop/src/renderer/components/settings/ImDefaultSettingsSection.tsx b/apps/desktop/src/renderer/components/settings/ImDefaultSettingsSection.tsxindex 1c1feeb6ea..9936076745 100644--- a/apps/desktop/src/renderer/components/settings/ImDefaultSettingsSection.tsx+++ b/apps/desktop/src/renderer/components/settings/ImDefaultSettingsSection.tsx@@ -204,7 +204,7 @@ export function ImDefaultSettingsSection({return (<divclassName={cn(- 'text-[13px] text-[var(--text-tertiary)]',+ 'text-13 text-[var(--text-tertiary)]',embedded? 'py-2': 'rounded-xl border border-[var(--settings-theme-card-border)] bg-[var(--settings-theme-card-bg)] px-4 py-5',@@ -316,10 +316,10 @@ export function ImDefaultSettingsSection({<MessageSquare size={18} className="text-[var(--settings-section-title)]" /></div><div className="min-w-0">- <h3 className="text-[14px] font-medium leading-none text-[var(--settings-section-title)]">+ <h3 className="text-14 font-medium leading-none text-[var(--settings-section-title)]">{t('settings.imBot.defaults.title')}</h3>- <p className="mt-2 text-[12px] leading-[1.45] text-[var(--settings-section-desc)]">+ <p className="mt-2 text-12 leading-[1.45] text-[var(--settings-section-desc)]">{t(`settings.imBot.defaults.channelDescriptions.${descriptionChannel}`)}</p></div>@@ -333,7 +333,7 @@ export function ImDefaultSettingsSection({<div className="grid gap-4 md:grid-cols-[minmax(0,0.95fr)_minmax(0,1.05fr)]"><div className="flex flex-col gap-2">- <span className="text-[12px] font-medium text-[var(--text-secondary)]">+ <span className="text-12 font-medium text-[var(--text-secondary)]">{t('settings.imBot.defaults.agentLabel')}</span>{/* 与新建对话工具条同一个引擎下拉(AgentSelect, #1350): 手写三选一分段在@@ -351,7 +351,7 @@ export function ImDefaultSettingsSection({</div><div className="flex flex-col gap-2">- <span className="text-[12px] font-medium text-[var(--text-secondary)]">+ <span className="text-12 font-medium text-[var(--text-secondary)]">{t('settings.imBot.defaults.modelLabel')}</span><ModelSelectordiff --git a/apps/desktop/src/renderer/components/settings/ProvidersSection.tsx b/apps/desktop/src/renderer/components/settings/ProvidersSection.tsxindex 26c0b3eec6..465fc5c9b0 100644--- a/apps/desktop/src/renderer/components/settings/ProvidersSection.tsx+++ b/apps/desktop/src/renderer/components/settings/ProvidersSection.tsx@@ -1516,7 +1516,7 @@ function CindySigninRow({ selected, onSelect }: { selected: boolean; onSelect: (</span>{/* 徽标不大写不加字距:224px 窄栏里 en「RECOMMENDED」会把行名挤成「Cin…」。 */}<span- className="shrink-0 rounded-full border px-1.5 py-px text-[10px] font-medium"+ className="shrink-0 rounded-full border px-1.5 py-px text-10 font-medium"style={{ borderColor: 'var(--border-default)', color: 'var(--text-tertiary)' }}>{t('settings.providers.xdSignin.badge')}diff --git a/apps/desktop/src/renderer/components/settings/SshKeySetupDialog.tsx b/apps/desktop/src/renderer/components/settings/SshKeySetupDialog.tsxindex ddd5bd7a5d..5701faab68 100644--- a/apps/desktop/src/renderer/components/settings/SshKeySetupDialog.tsx+++ b/apps/desktop/src/renderer/components/settings/SshKeySetupDialog.tsx@@ -948,7 +948,7 @@ function CodeBlock({</button></div><pre- className="max-h-32 overflow-auto rounded-md border p-2.5 text-[11.5px] leading-relaxed whitespace-pre-wrap break-all"+ className="max-h-32 overflow-auto rounded-md border p-2.5 text-11 leading-relaxed whitespace-pre-wrap break-all"style={{backgroundColor: 'var(--settings-input-bg, #faf9f5)',borderColor: 'var(--settings-input-border, #d7d7d4)',diff --git a/apps/desktop/src/renderer/components/settings/VoiceInputSection.tsx b/apps/desktop/src/renderer/components/settings/VoiceInputSection.tsxindex 6f5aa78c16..4ef8873817 100644--- a/apps/desktop/src/renderer/components/settings/VoiceInputSection.tsx+++ b/apps/desktop/src/renderer/components/settings/VoiceInputSection.tsx@@ -2664,7 +2664,7 @@ export function VoiceInputSection() {<dt className="text-12 leading-[1.3] text-[var(--settings-section-sublabel)] opacity-70">{t('settings.voiceInput.usage.duration')}</dt>- <dd className="mt-1 truncate text-17 font-medium leading-[1.2] text-[var(--settings-section-title)]">+ <dd className="mt-1 truncate text-16 font-medium leading-[1.2] text-[var(--settings-section-title)]">{formatAudioDuration(stats.totalAudioMs)}</dd></div>@@ -2672,7 +2672,7 @@ export function VoiceInputSection() {<dt className="text-12 leading-[1.3] text-[var(--settings-section-sublabel)] opacity-70">{t('settings.voiceInput.usage.estimatedCost')}</dt>- <dd className="mt-1 truncate text-17 font-medium leading-[1.2] text-[var(--settings-section-title)]">+ <dd className="mt-1 truncate text-16 font-medium leading-[1.2] text-[var(--settings-section-title)]">{formatUsd(cost.totalUsd)}</dd><dd className="mt-1 truncate text-11 leading-[1.3] text-[var(--settings-section-sublabel)] opacity-70">@@ -2686,7 +2686,7 @@ export function VoiceInputSection() {<dt className="text-12 leading-[1.3] text-[var(--settings-section-sublabel)] opacity-70">{t('settings.voiceInput.usage.sessions')}</dt>- <dd className="mt-1 truncate text-17 font-medium leading-[1.2] text-[var(--settings-section-title)]">+ <dd className="mt-1 truncate text-16 font-medium leading-[1.2] text-[var(--settings-section-title)]">{stats.sessionCount}</dd><dd className="mt-1 text-11 leading-[1.3] text-[var(--settings-section-sublabel)] opacity-70">diff --git a/apps/desktop/src/renderer/components/settings/WechatBotSection.tsx b/apps/desktop/src/renderer/components/settings/WechatBotSection.tsxindex 3412ac91bf..6514bfec04 100644--- a/apps/desktop/src/renderer/components/settings/WechatBotSection.tsx+++ b/apps/desktop/src/renderer/components/settings/WechatBotSection.tsx@@ -64,7 +64,7 @@ export function WechatBotSection({const [routeSummary, setRouteSummary] = useImChannelSettingsSummary('wechat');const authorizationSteps = (- <ol className="mt-1 grid gap-2 rounded-xl border border-[var(--border-default)] bg-[var(--surface-chip)] px-4 py-3 text-[12px] leading-[1.55] text-[var(--text-secondary)]">+ <ol className="mt-1 grid gap-2 rounded-xl border border-[var(--border-default)] bg-[var(--surface-chip)] px-4 py-3 text-12 leading-[1.55] text-[var(--text-secondary)]">{[1, 2, 3, 4].map((step) => (<li key={step} className="flex gap-2"><span className="shrink-0 text-[var(--text-tertiary)]">{step}.</span>diff --git a/apps/desktop/src/renderer/components/settings/contacts/ContactsListPane.tsx b/apps/desktop/src/renderer/components/settings/contacts/ContactsListPane.tsxindex 6990e51752..854af99f1c 100644--- a/apps/desktop/src/renderer/components/settings/contacts/ContactsListPane.tsx+++ b/apps/desktop/src/renderer/components/settings/contacts/ContactsListPane.tsx@@ -147,7 +147,7 @@ export function ContactsListPane(props: Props) {>{f.label}{f.id === 'pending' && (f.badge ?? 0) > 0 && (- <span className="rounded-full bg-[var(--status-bar-accent)] px-1.5 text-11 leading-[16px] text-[var(--status-badge-fg)]">+ <span className="rounded-full bg-[var(--status-bar-accent)] px-1.5 text-11 leading-[1.455] text-[var(--status-badge-fg)]">{f.badge}</span>)}diff --git a/apps/desktop/src/renderer/components/settings/contacts/ContactsSection.tsx b/apps/desktop/src/renderer/components/settings/contacts/ContactsSection.tsxindex 4e9333388d..01086aff2f 100644--- a/apps/desktop/src/renderer/components/settings/contacts/ContactsSection.tsx+++ b/apps/desktop/src/renderer/components/settings/contacts/ContactsSection.tsx@@ -249,7 +249,7 @@ export function ContactsSection() {>{t('settings.contacts.manage')}{pendingCount > 0 && (- <span className="rounded-full bg-[var(--status-bar-accent)] px-1.5 text-11 leading-[16px] text-[var(--accent-pure-cta-fg)]">+ <span className="rounded-full bg-[var(--status-bar-accent)] px-1.5 text-11 leading-[1.455] text-[var(--accent-pure-cta-fg)]">{pendingCount}</span>)}diff --git a/apps/desktop/src/renderer/components/sidebar/MobileDownloadDialog.tsx b/apps/desktop/src/renderer/components/sidebar/MobileDownloadDialog.tsxindex c18bc43876..d059087db1 100644--- a/apps/desktop/src/renderer/components/sidebar/MobileDownloadDialog.tsx+++ b/apps/desktop/src/renderer/components/sidebar/MobileDownloadDialog.tsx@@ -462,7 +462,7 @@ export function MobileDownloadDialog({) : qrError ? (<span className="flex max-w-[160px] flex-col items-center gap-2 text-center text-[var(--error-fg-strong)]"><QrCode className="h-6 w-6" aria-hidden="true" />- <span className="text-12 leading-[18px]">+ <span className="text-12 leading-[1.5]">{t('sidebar.mobileDownload.error')}</span></span>@@ -491,7 +491,7 @@ export function MobileDownloadDialog({)}</p>{hasLinkedMobile ? (- <p className="mt-1 text-12 leading-[18px] text-[var(--confirm-desc)]">+ <p className="mt-1 text-12 leading-[1.5] text-[var(--confirm-desc)]">{t('sidebar.mobileDownload.scanAnotherHint')}</p>) : null}@@ -583,12 +583,12 @@ export function MobileDownloadDialog({<Settings2 className="h-4 w-4" strokeWidth={1.8} aria-hidden="true" /></span><span className="flex min-w-0 flex-1 flex-col">- <span className="text-13 font-medium leading-[18px] text-[var(--confirm-title)]">+ <span className="text-13 font-medium leading-[1.385] text-[var(--confirm-title)]">{t('sidebar.mobileDownload.allowControl')}</span>{remotePresentation?.selfDeviceId ? (<span- className="mt-0.5 truncate font-mono text-10 leading-[14px] text-[var(--confirm-desc)]"+ className="mt-0.5 truncate font-mono text-10 leading-[1.4] text-[var(--confirm-desc)]"title={remotePresentation.selfDeviceId}>{t('sidebar.mobileDownload.deviceId', {diff --git a/apps/desktop/src/renderer/components/sidebar/UpdateBanner.tsx b/apps/desktop/src/renderer/components/sidebar/UpdateBanner.tsxindex 76d6784427..bbf3022d9f 100644--- a/apps/desktop/src/renderer/components/sidebar/UpdateBanner.tsx+++ b/apps/desktop/src/renderer/components/sidebar/UpdateBanner.tsx@@ -468,7 +468,7 @@ export function UpdateBanner({ isCollapsed, onOpenVersionNotice }: UpdateBannerParia-label={t('update.banner.preparingAria')}className={cn('flex w-full items-center justify-center gap-2 rounded-full border py-2',- 'text-[13px] font-medium',+ 'text-13 font-medium','bg-[var(--update-btn-bg)] border-[var(--update-btn-border)] text-[var(--update-btn-text)]','cursor-default opacity-70',)}@@ -483,7 +483,7 @@ export function UpdateBanner({ isCollapsed, onOpenVersionNotice }: UpdateBannerParia-label={t('update.banner.confirmAria')}className={cn('flex w-full items-center justify-center gap-2 rounded-full border py-2',- 'text-[13px] font-medium transition-colors',+ 'text-13 font-medium transition-colors','bg-[var(--update-btn-bg)] border-[var(--update-btn-border)] text-[var(--update-btn-text)]','hover:bg-[var(--update-btn-hover)]',)}@@ -496,7 +496,7 @@ export function UpdateBanner({ isCollapsed, onOpenVersionNotice }: UpdateBannerParia-label={t('update.banner.cancelAria')}className={cn('flex w-full items-center justify-center rounded-full py-1.5',- 'text-[13px] font-medium text-sidebar-muted transition-colors',+ 'text-13 font-medium text-sidebar-muted transition-colors','hover:bg-sidebar-item-hover',)}>@@ -510,7 +510,7 @@ export function UpdateBanner({ isCollapsed, onOpenVersionNotice }: UpdateBannerParia-label={t('update.banner.ariaExpanded', { version: version ?? '' })}className={cn('flex w-full items-center justify-center gap-2 rounded-full border py-2',- 'text-[13px] font-medium transition-colors',+ 'text-13 font-medium transition-colors','bg-[var(--update-btn-bg)] border-[var(--update-btn-border)] text-[var(--update-btn-text)]','hover:bg-[var(--update-btn-hover)]',)}diff --git a/apps/desktop/src/renderer/components/sidebar/UserInfoSection.tsx b/apps/desktop/src/renderer/components/sidebar/UserInfoSection.tsxindex b0f4c76d2f..1e07e012aa 100644--- a/apps/desktop/src/renderer/components/sidebar/UserInfoSection.tsx+++ b/apps/desktop/src/renderer/components/sidebar/UserInfoSection.tsx@@ -203,7 +203,7 @@ export function UserInfoSection({ isCollapsed, onOpenUpdateNotice }: UserInfoSec<divclassName={cn('flex h-[27px] w-[27px] items-center justify-center rounded-full',- 'border border-[var(--sidebar-user-card-border)] bg-[var(--sidebar-user-card-bg)] text-[14px] font-medium text-[var(--sidebar-user-card-text)]',+ 'border border-[var(--sidebar-user-card-border)] bg-[var(--sidebar-user-card-bg)] text-14 font-medium text-[var(--sidebar-user-card-text)]',)}>{showNotSignedInGlyph ? (@@ -238,12 +238,12 @@ export function UserInfoSection({ isCollapsed, onOpenUpdateNotice }: UserInfoSec'opacity-100',)}>- <p className="truncate text-[14px] font-semibold leading-[18px] text-[var(--sidebar-user-card-text)]">+ <p className="truncate text-14 font-semibold leading-[1.286] text-[var(--sidebar-user-card-text)]">{displayName}</p>{/* 2px gap 与同栏 userNameContainer 保持一致。 */}<p- className="truncate text-[10.5px] leading-[13px] text-[var(--sidebar-user-card-text)] opacity-80"+ className="truncate text-10 leading-[1.3] text-[var(--sidebar-user-card-text)] opacity-80"title={appVersionLabelDetail}>{appVersionLabel}diff --git a/apps/desktop/src/renderer/components/sidebar/VendorReadinessBadge.tsx b/apps/desktop/src/renderer/components/sidebar/VendorReadinessBadge.tsxindex 50f19c696b..371f443d88 100644--- a/apps/desktop/src/renderer/components/sidebar/VendorReadinessBadge.tsx+++ b/apps/desktop/src/renderer/components/sidebar/VendorReadinessBadge.tsx@@ -16,7 +16,7 @@ interface VendorReadinessBadgeProps {export function VendorReadinessBadge({ readiness }: VendorReadinessBadgeProps) {if (readiness === 'loading') {- return <span className="text-[10px] text-muted-foreground" aria-label="loading">●</span>;+ return <span className="text-10 text-muted-foreground" aria-label="loading">●</span>;}return <span aria-label={readiness}>{BADGE_MAP[readiness]}</span>;}diff --git a/apps/desktop/src/renderer/components/status/QuotaHoverCard.tsx b/apps/desktop/src/renderer/components/status/QuotaHoverCard.tsxindex 23a5bf4f0b..55ae9b174d 100644--- a/apps/desktop/src/renderer/components/status/QuotaHoverCard.tsx+++ b/apps/desktop/src/renderer/components/status/QuotaHoverCard.tsx@@ -450,7 +450,7 @@ export function QuotaHoverCard({return (<divdata-testid="quota-hover-card"- className="flex max-h-[calc(100vh-16px)] w-[340px] select-none flex-col overflow-hidden rounded-xl border border-[var(--border-default)] bg-[var(--surface-elevated)] pb-2 text-[13px] leading-5 text-[var(--text-primary)]"+ className="flex max-h-[calc(100vh-16px)] w-[340px] select-none flex-col overflow-hidden rounded-xl border border-[var(--border-default)] bg-[var(--surface-elevated)] pb-2 text-13 leading-5 text-[var(--text-primary)]"style={{ boxShadow: 'var(--shadow-menu)' }}><div@@ -467,7 +467,7 @@ export function QuotaHoverCard({{planLabel ? (<spandata-testid="quota-plan-badge"- className="ml-auto rounded-full border border-[var(--border-default)] px-[7px] py-px text-[11px] font-medium"+ className="ml-auto rounded-full border border-[var(--border-default)] px-[7px] py-px text-11 font-medium">{planLabel}</span>diff --git a/apps/desktop/src/renderer/components/status/TodaySpendChip.tsx b/apps/desktop/src/renderer/components/status/TodaySpendChip.tsxindex 960a227964..460c6bc47a 100644--- a/apps/desktop/src/renderer/components/status/TodaySpendChip.tsx+++ b/apps/desktop/src/renderer/components/status/TodaySpendChip.tsx@@ -1612,7 +1612,7 @@ export function TodaySpendChip({// tabular-nums 让 "$306 / $1.2k" 这类数字段的字符宽度等宽, 段间数字落点对齐。const buttonClass = cn('inline-flex h-5 shrink-0 items-center',- 'text-[12px] font-medium leading-none tabular-nums',+ 'text-12 font-medium leading-none tabular-nums',claudeSubscriptionAlerting? 'text-[var(--error-fg)] hover:text-[var(--error-fg-strong)]'// 不可点(网关账号)时不加 hover 变色,避免暗示可交互。diff --git a/apps/desktop/src/renderer/features/cc-agent/CCAgentSessionView.tsx b/apps/desktop/src/renderer/features/cc-agent/CCAgentSessionView.tsxindex 94c3a6e102..04814c8cc3 100644--- a/apps/desktop/src/renderer/features/cc-agent/CCAgentSessionView.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/CCAgentSessionView.tsx@@ -3207,7 +3207,7 @@ export function CCAgentSessionView({"xdt-maker (feat-button-ui)" —— 单段 basename 只显示 worktree名字,看不出是哪个 repo 的 worktree;两段式让用户一眼定位到 repo,括号里再补 worktree 标识。完整 worktree 绝对路径仍在 hover tip 里。 */}- <span className="block min-w-0 truncate text-[12px] font-medium leading-none text-[var(--workingdir-text)]">+ <span className="block min-w-0 truncate text-12 font-medium leading-none text-[var(--workingdir-text)]">{workingDirLabel}</span></>@@ -3384,7 +3384,7 @@ export function CCAgentSessionView({}}>{showOrcaLeadIdentityBar && (- <div className="flex h-8 shrink-0 select-none items-center border-b border-border/40 px-3 text-[11px] font-medium leading-none text-muted-foreground">+ <div className="flex h-8 shrink-0 select-none items-center border-b border-border/40 px-3 text-11 font-medium leading-none text-muted-foreground"><span className="min-w-0 flex flex-1 items-center gap-1.5 truncate"><VendorIconvendor={leadVendor}@@ -3975,9 +3975,9 @@ export function CCAgentSessionView({{worktreeCreation?.status === 'creating' ? (<div className="flex min-w-0 items-center gap-1.5"><Spinner size={12} className="text-[var(--workingdir-icon)]" />- <span className="block min-w-0 truncate text-[12px] font-medium leading-none text-[var(--workingdir-text)]">+ <span className="block min-w-0 truncate text-12 font-medium leading-none text-[var(--workingdir-text)]">{t('ccAgent.layout.worktreeCreating', '正在创建 worktree')}{' '}- <code className="font-mono text-[11px] opacity-80">+ <code className="font-mono text-11 opacity-80">{worktreeCreation.name}</code>…@@ -3987,7 +3987,7 @@ export function CCAgentSessionView({<Tip text={worktreeCreation.error} mono side="top"><div className="flex min-w-0 items-center gap-1.5"><AlertCircle size={12} className="shrink-0 text-red-500 dark:text-red-400" />- <span className="block min-w-0 truncate text-[12px] font-medium leading-none text-red-500 dark:text-red-400">+ <span className="block min-w-0 truncate text-12 font-medium leading-none text-red-500 dark:text-red-400">{t('ccAgent.layout.worktreeFailed', 'Worktree 创建失败')}{' — '}{worktreeCreation.error}@@ -4207,7 +4207,7 @@ function HandoffSourcePill({<divclassName={cn('flex h-10 w-full items-center rounded-[12px] border border-[var(--cmd-palette-border)] bg-[hsl(var(--content-area))]',- 'text-[13px] leading-none text-[#595959]',+ 'text-13 leading-none text-[#595959]',)}><button@@ -4438,7 +4438,7 @@ function RunningStatusBar({// restores optical alignment with the text baseline.<Sparkles size={14} className="shrink-0 -translate-y-px" />)}- <span className="truncate text-[13px] font-medium">{displayStatus}</span>+ <span className="truncate text-13 font-medium">{displayStatus}</span></div>{/* 右侧先放不随运行态淡出的被控呼吸灯,再放 elapsed / · / arrow-down / tokens。side-task (mivo 等) 运行时只显示 elapsed, 不带 token 行 —— 这类任务不@@ -4460,7 +4460,7 @@ function RunningStatusBar({onClick={onStopBackgroundTasks}disabled={backgroundStopping || !onStopBackgroundTasks}className={cn(- 'flex shrink-0 items-center gap-1 text-[13px] font-medium',+ 'flex shrink-0 items-center gap-1 text-13 font-medium','text-[var(--text-primary)] hover:opacity-70 transition-opacity','disabled:opacity-50 disabled:cursor-not-allowed',)}@@ -4477,16 +4477,16 @@ function RunningStatusBar({</button>) : (<>- <span className="text-[13px] font-medium text-[var(--status-bar-meta)]">+ <span className="text-13 font-medium text-[var(--status-bar-meta)]">{elapsedText}</span>{!sideTaskRunning && (<>- <span className="text-[13px] font-medium text-[var(--status-bar-meta)]">+ <span className="text-13 font-medium text-[var(--status-bar-meta)]">·</span><ArrowDown size={13} className="shrink-0 text-[var(--status-bar-meta)]" />- <span className="text-[13px] font-medium text-[var(--status-bar-meta)]">+ <span className="text-13 font-medium text-[var(--status-bar-meta)]">{tokenText}</span></>@@ -4607,7 +4607,7 @@ function ContextCapacityRing({transform={`rotate(-90 ${size / 2} ${size / 2})`}/></svg>- <span className="text-[12px] font-medium leading-none" style={{ color: fillColor }}>+ <span className="text-12 font-medium leading-none" style={{ color: fillColor }}>{pct}%</span></>diff --git a/apps/desktop/src/renderer/features/cc-agent/CCAgentSidebarUpper.tsx b/apps/desktop/src/renderer/features/cc-agent/CCAgentSidebarUpper.tsxindex 4b7ae46a12..bdde18e639 100644--- a/apps/desktop/src/renderer/features/cc-agent/CCAgentSidebarUpper.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/CCAgentSidebarUpper.tsx@@ -3783,10 +3783,10 @@ function RailPanels({const panelHead = (title: string, count: number, action?: ReactNode) => (<div className="flex items-baseline gap-1.5 px-2.5 pb-1 pt-1.5">- <span className="min-w-0 flex-1 truncate text-[12.5px] font-semibold text-foreground">+ <span className="min-w-0 flex-1 truncate text-12 font-semibold text-foreground">{title}</span>- <span className="shrink-0 text-[10px] text-[var(--text-tertiary)]">+ <span className="shrink-0 text-10 text-[var(--text-tertiary)]">{t('ccAgent.sidebar.railNavCount', { count })}</span>{action}@@ -3938,7 +3938,7 @@ function RailPanels({{agg.dotTone && (<AttentionDot size={5} tone={agg.dotTone} className="shrink-0" />)}- <span className="shrink-0 text-[10px] tabular-nums text-[var(--text-tertiary)]">+ <span className="shrink-0 text-10 tabular-nums text-[var(--text-tertiary)]">{p.sessions.length}</span><ChevronRightdiff --git a/apps/desktop/src/renderer/features/cc-agent/CreateWorkerPopover.tsx b/apps/desktop/src/renderer/features/cc-agent/CreateWorkerPopover.tsxindex 5b0edd5f75..0c66316dac 100644--- a/apps/desktop/src/renderer/features/cc-agent/CreateWorkerPopover.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/CreateWorkerPopover.tsx@@ -650,7 +650,7 @@ export function CreateWorkerPopover({style={{ boxShadow: 'var(--shadow-menu)' }}><div className="mb-5 flex items-center justify-between">- <span className="text-17 font-medium text-[var(--text-primary)]">{resolvedTitle}</span>+ <span className="text-16 font-medium text-[var(--text-primary)]">{resolvedTitle}</span><buttontype="button"aria-label={t('orca.createWorker.closeAria')}diff --git a/apps/desktop/src/renderer/features/cc-agent/GhostGrantConfirmCard.tsx b/apps/desktop/src/renderer/features/cc-agent/GhostGrantConfirmCard.tsxindex ea6b71b9f8..adffa5f6ca 100644--- a/apps/desktop/src/renderer/features/cc-agent/GhostGrantConfirmCard.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/GhostGrantConfirmCard.tsx@@ -88,7 +88,7 @@ export function GhostGrantConfirmCard({ pending, onRespond }: GhostGrantConfirmC{t(descriptionKey)}</p></div>- <span className="shrink-0 rounded-[6px] border border-[var(--chat-input-border)] px-2 py-1 text-[12px] font-medium text-[var(--status-bar-meta)]">+ <span className="shrink-0 rounded-[6px] border border-[var(--chat-input-border)] px-2 py-1 text-12 font-medium text-[var(--status-bar-meta)]">{t('ghostGrant.confirm.count', { count: pending.items.length })}</span></div>@@ -171,7 +171,7 @@ export function GhostGrantConfirmCard({ pending, onRespond }: GhostGrantConfirmC><Check className="size-4" /><span>{t('ghostGrant.confirm.allow')}</span>- <kbd className="rounded-[4px] border border-[var(--perm-allow-kbd-border)] bg-[var(--perm-allow-kbd-bg)] px-1.5 py-[1px] text-[11px] font-normal text-[var(--perm-allow-btn-text)] opacity-70">+ <kbd className="rounded-[4px] border border-[var(--perm-allow-kbd-border)] bg-[var(--perm-allow-kbd-bg)] px-1.5 py-[1px] text-11 font-normal text-[var(--perm-allow-btn-text)] opacity-70">{window.electronAPI?.platform === 'darwin' ? '⌘↵' : 'Ctrl+Enter'}</kbd></button>diff --git a/apps/desktop/src/renderer/features/cc-agent/GitContextBadge.tsx b/apps/desktop/src/renderer/features/cc-agent/GitContextBadge.tsxindex 0fa52766f7..c52fef79d2 100644--- a/apps/desktop/src/renderer/features/cc-agent/GitContextBadge.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/GitContextBadge.tsx@@ -122,7 +122,7 @@ function PrChip({ prRef, status }: { prRef: SessionPrRef; status: PrStatusResult<span>#{prRef.prNumber}</span>{unresolved > 0 && (<span- className="inline-flex items-center gap-0.5 text-[10px] font-medium leading-none"+ className="inline-flex items-center gap-0.5 text-10 font-medium leading-none"style={{ color: 'var(--status-bar-accent)' }}aria-label={t('ccAgent.gitContext.pr.unresolved', { count: unresolved })}>diff --git a/apps/desktop/src/renderer/features/cc-agent/IssueConfirmCard.tsx b/apps/desktop/src/renderer/features/cc-agent/IssueConfirmCard.tsxindex 74852f4523..cacc836b94 100644--- a/apps/desktop/src/renderer/features/cc-agent/IssueConfirmCard.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/IssueConfirmCard.tsx@@ -309,7 +309,7 @@ export function IssueConfirmCard({ sessionId, pending, onRespond }: IssueConfirm)}><span>{t('issueAgent.confirm.cancel')}</span>- <kbd className="rounded-[4px] border border-[var(--chat-input-border)] bg-[var(--perm-code-bg)] px-1.5 py-[1px] text-[11px] font-normal text-[var(--status-bar-meta)]">+ <kbd className="rounded-[4px] border border-[var(--chat-input-border)] bg-[var(--perm-code-bg)] px-1.5 py-[1px] text-11 font-normal text-[var(--status-bar-meta)]">Esc</kbd></button>@@ -326,7 +326,7 @@ export function IssueConfirmCard({ sessionId, pending, onRespond }: IssueConfirm)}><span>{t('issueAgent.confirm.submit')}</span>- <kbd className="rounded-[4px] border border-[var(--perm-allow-kbd-border)] bg-[var(--perm-allow-kbd-bg)] px-1.5 py-[1px] text-[11px] font-normal text-[var(--perm-allow-btn-text)] opacity-70">+ <kbd className="rounded-[4px] border border-[var(--perm-allow-kbd-border)] bg-[var(--perm-allow-kbd-bg)] px-1.5 py-[1px] text-11 font-normal text-[var(--perm-allow-btn-text)] opacity-70">{window.electronAPI?.platform === 'darwin' ? '⌘↵' : 'Ctrl+Enter'}</kbd></button>diff --git a/apps/desktop/src/renderer/features/cc-agent/NewMakerDraftRoute.tsx b/apps/desktop/src/renderer/features/cc-agent/NewMakerDraftRoute.tsxindex 32b0e0de55..6c657a8528 100644--- a/apps/desktop/src/renderer/features/cc-agent/NewMakerDraftRoute.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/NewMakerDraftRoute.tsx@@ -4458,7 +4458,7 @@ export function NewMakerDraftRoute() {type="button"data-testid="create-agent-mode-pill"disabled={wtCreating || sendInFlight}- className="inline-flex h-[30px] min-w-20 max-w-[220px] items-center justify-center gap-1.5 rounded-full border border-[var(--create-agent-control-border)] bg-[var(--create-agent-control-bg)] px-3 text-[12px] font-medium leading-[14px] text-[var(--create-agent-control-text)] transition-colors hover:bg-[var(--create-agent-control-bg-hover)] active:bg-[var(--create-agent-control-bg-pressed)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--create-agent-focus-ring)] disabled:cursor-not-allowed disabled:opacity-60"+ className="inline-flex h-[30px] min-w-20 max-w-[220px] items-center justify-center gap-1.5 rounded-full border border-[var(--create-agent-control-border)] bg-[var(--create-agent-control-bg)] px-3 text-12 font-medium leading-[1.167] text-[var(--create-agent-control-text)] transition-colors hover:bg-[var(--create-agent-control-bg-hover)] active:bg-[var(--create-agent-control-bg-pressed)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--create-agent-focus-ring)] disabled:cursor-not-allowed disabled:opacity-60"aria-label={t('newChat.collaboration.modeLabel')}><MessageSquare@@ -4630,7 +4630,7 @@ export function NewMakerDraftRoute() {被控设备上、属于那台机器的项目,而不是本机。放输入框正下方并与其水平居中(父列 items-start,靠 self-center 相对 w-full 的输入框居中)。 */}{isDeviceLinkDraft && (- <div className="mt-3 flex max-w-full items-center gap-2 self-center rounded-full border border-[var(--border-default)] bg-[var(--surface-chip)] px-3 py-1 text-[12px] text-[var(--text-secondary)]">+ <div className="mt-3 flex max-w-full items-center gap-2 self-center rounded-full border border-[var(--border-default)] bg-[var(--surface-chip)] px-3 py-1 text-12 text-[var(--text-secondary)]"><MonitorSmartphonesize={14}strokeWidth={2}@@ -4686,7 +4686,7 @@ export function NewMakerDraftRoute() {{/* 标题字号 12→14px(DESIGN §3 Caption),与卡片间距 16→10px 收近(DESIGN §5 间距档)——用户改稿 2026-07-22。 */}<div className="mb-2.5 px-0.5">- <div className="text-[14px] font-medium leading-[18px] text-[var(--text-secondary)]">+ <div className="text-14 font-medium leading-[1.286] text-[var(--text-secondary)]">{t('newChat.createAgent.quickStart')}</div></div>@@ -4725,7 +4725,7 @@ export function NewMakerDraftRoute() {</span>{/* 字号 13px 与左侧会话列表(text-13)一致——用户改稿 2026-07-22。竖排下占满卡片宽度、左对齐 icon,靠父列 justify-between 贴底。 */}- <span className="w-full min-w-0 text-13 font-semibold leading-[16px]">+ <span className="w-full min-w-0 text-13 font-semibold leading-[1.231]">{t(labelKey)}</span></button>diff --git a/apps/desktop/src/renderer/features/cc-agent/OrcaWorkerPanel.tsx b/apps/desktop/src/renderer/features/cc-agent/OrcaWorkerPanel.tsxindex 1ea5057b0e..a652a5fc1c 100644--- a/apps/desktop/src/renderer/features/cc-agent/OrcaWorkerPanel.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/OrcaWorkerPanel.tsx@@ -155,7 +155,7 @@ export function OrcaWorkerPanel({return (<div className="flex h-full min-h-0 w-full flex-col bg-content-area">- <div className="flex h-8 shrink-0 items-center border-b border-border/40 px-3 text-[11px] font-medium leading-none text-muted-foreground">+ <div className="flex h-8 shrink-0 items-center border-b border-border/40 px-3 text-11 font-medium leading-none text-muted-foreground"><WorkerListToolbarworker={selectedWorkerRecord ?? focusedWorker}workers={workers}diff --git a/apps/desktop/src/renderer/features/cc-agent/RemoteSessionBanner.tsx b/apps/desktop/src/renderer/features/cc-agent/RemoteSessionBanner.tsxindex cbac082188..8b1007669e 100644--- a/apps/desktop/src/renderer/features/cc-agent/RemoteSessionBanner.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/RemoteSessionBanner.tsx@@ -63,12 +63,12 @@ export function RemoteSessionBanner({ status, issue, onResync, onFinalize }: Prostyle={{ backgroundColor: dotColor }}aria-hidden/>- <span className="flex-1 truncate text-[12px] text-[var(--text-secondary)]">{label}</span>+ <span className="flex-1 truncate text-12 text-[var(--text-secondary)]">{label}</span>{status === 'suspect-stall' && onFinalize && (<buttontype="button"onClick={onFinalize}- className="flex shrink-0 items-center gap-1 rounded-full px-2 py-0.5 text-[12px] text-[var(--text-secondary)] transition-colors hover:text-[var(--text-primary)]"+ className="flex shrink-0 items-center gap-1 rounded-full px-2 py-0.5 text-12 text-[var(--text-secondary)] transition-colors hover:text-[var(--text-primary)]"><Square size={12} />{t('ccAgent.remoteSession.finalizeStuck')}@@ -78,7 +78,7 @@ export function RemoteSessionBanner({ status, issue, onResync, onFinalize }: Pro<buttontype="button"onClick={onResync}- className="flex shrink-0 items-center gap-1 rounded-full px-2 py-0.5 text-[12px] text-[var(--text-secondary)] transition-colors hover:text-[var(--text-primary)]"+ className="flex shrink-0 items-center gap-1 rounded-full px-2 py-0.5 text-12 text-[var(--text-secondary)] transition-colors hover:text-[var(--text-primary)]"><RotateCw size={12} />{t('ccAgent.remoteSession.resync')}diff --git a/apps/desktop/src/renderer/features/cc-agent/RenameSessionsConfirmCard.tsx b/apps/desktop/src/renderer/features/cc-agent/RenameSessionsConfirmCard.tsxindex fc0c8000bb..e0d55834f4 100644--- a/apps/desktop/src/renderer/features/cc-agent/RenameSessionsConfirmCard.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/RenameSessionsConfirmCard.tsx@@ -61,7 +61,7 @@ export function RenameSessionsConfirmCard({{t('renameSessions.confirm.description', { count: pending.changes.length })}</p></div>- <span className="shrink-0 rounded-[6px] border border-[var(--chat-input-border)] px-2 py-1 text-[12px] font-medium text-[var(--status-bar-meta)]">+ <span className="shrink-0 rounded-[6px] border border-[var(--chat-input-border)] px-2 py-1 text-12 font-medium text-[var(--status-bar-meta)]">{t('renameSessions.confirm.count', { count: pending.changes.length })}</span></div>@@ -126,7 +126,7 @@ export function RenameSessionsConfirmCard({><Check className="size-4" /><span>{t('renameSessions.confirm.apply')}</span>- <kbd className="rounded-[4px] border border-[var(--perm-allow-kbd-border)] bg-[var(--perm-allow-kbd-bg)] px-1.5 py-[1px] text-[11px] font-normal text-[var(--perm-allow-btn-text)] opacity-70">+ <kbd className="rounded-[4px] border border-[var(--perm-allow-kbd-border)] bg-[var(--perm-allow-kbd-bg)] px-1.5 py-[1px] text-11 font-normal text-[var(--perm-allow-btn-text)] opacity-70">{window.electronAPI?.platform === 'darwin' ? '⌘↵' : 'Ctrl+Enter'}</kbd></button>diff --git a/apps/desktop/src/renderer/features/cc-agent/RolePillDropdown.tsx b/apps/desktop/src/renderer/features/cc-agent/RolePillDropdown.tsxindex 77d52616e6..4aad2d4b59 100644--- a/apps/desktop/src/renderer/features/cc-agent/RolePillDropdown.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/RolePillDropdown.tsx@@ -128,7 +128,7 @@ function WorkerErrorBadge({ className }: { className?: string }) {<spanaria-label={t('orca.rolePill.errorBadgeAria')}className={cn(- 'pointer-events-none inline-flex items-center rounded-full bg-[var(--error-fg)] px-1.5 text-[9px] font-semibold uppercase leading-[1.5] tracking-[0.3px] text-[var(--error-bg)]',+ 'pointer-events-none inline-flex items-center rounded-full bg-[var(--error-fg)] px-1.5 text-10 font-semibold uppercase leading-[1.5] tracking-[0.3px] text-[var(--error-bg)]',className,)}>@@ -244,7 +244,7 @@ function WorkerSummary({<divclassName={cn('flex items-center gap-2 leading-snug',- compact ? 'text-[11px]' : 'text-[13px]',+ compact ? 'text-11' : 'text-13',)}><WorkerAvatar@@ -285,7 +285,7 @@ function WorkerSummary({)}</div>{!compact && (- <div className="mt-0.5 ml-[26px] flex items-center gap-1.5 text-[11px] leading-snug text-[var(--text-tertiary)]">+ <div className="mt-0.5 ml-[26px] flex items-center gap-1.5 text-11 leading-snug text-[var(--text-tertiary)]"><span>{simplifyModelName(worker.model)}</span><EffortBars effort={worker.effort} /></div>@@ -370,7 +370,7 @@ function WorkerLayoutMenu({className="absolute right-0 top-full z-50 mt-1 w-[190px] rounded-xl border border-[var(--border-default)] bg-[var(--surface-elevated)] p-1"style={{ boxShadow: 'var(--shadow-menu)' }}>- <div className="select-none px-2.5 py-1.5 text-[10px] font-medium leading-snug text-[var(--text-tertiary)]">+ <div className="select-none px-2.5 py-1.5 text-10 font-medium leading-snug text-[var(--text-tertiary)]">{t('orca.rolePill.layoutMenuLabel')}</div>{rows.map((row) => {@@ -379,7 +379,7 @@ function WorkerLayoutMenu({<buttonkey={row.value}type="button"- className="flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left text-[12px] leading-snug text-[var(--text-primary)] transition-colors hover:bg-[var(--surface-hover)]"+ className="flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left text-12 leading-snug text-[var(--text-primary)] transition-colors hover:bg-[var(--surface-hover)]"onClick={() => {onLayoutChange(row.value);setOpen(false);@@ -542,7 +542,7 @@ function WorkerTabsList({type="button"ref={selected ? focusedTabRef : undefined}className={cn(- 'inline-flex h-6 shrink-0 items-center gap-1.5 rounded-full border py-0 pl-2 pr-6 text-[11px] leading-none transition-colors',+ 'inline-flex h-6 shrink-0 items-center gap-1.5 rounded-full border py-0 pl-2 pr-6 text-11 leading-none transition-colors',selected? isError? 'border-[var(--error-fg)] bg-[var(--accent-cta-bg)] text-[var(--accent-pure-cta-fg)]'@@ -634,7 +634,7 @@ export function WorkerListToolbar({if (!worker) {return (<div className={cn('flex min-w-0 flex-1 items-center gap-1', className)}>- <span className="min-w-0 flex-1 select-none truncate text-[11px] font-medium text-muted-foreground">+ <span className="min-w-0 flex-1 select-none truncate text-11 font-medium text-muted-foreground">{t('orca.rolePill.worker')}</span><CreateWorkerTabButton@@ -788,7 +788,7 @@ export function RolePillDropdown({if (!worker) {return (- <span className={cn('text-[11px] font-medium text-muted-foreground', className)}>+ <span className={cn('text-11 font-medium text-muted-foreground', className)}>{t('orca.rolePill.worker')}</span>);@@ -816,7 +816,7 @@ export function RolePillDropdown({type="button"className={cn('inline-flex items-center gap-1.5 rounded-full border py-[3px] px-2.5',- 'text-[11px] leading-none',+ 'text-11 leading-none',// focused worker 出错时 trigger 也描红(dropdown 布局下它是常驻可见的当前 worker)worker.status === 'error'? 'border-[var(--error-border)] bg-[var(--error-bg)] hover:bg-[var(--error-bg)]'@@ -857,10 +857,10 @@ export function RolePillDropdown({>{/* Header: WORKERS + count */}<div className="flex select-none items-center justify-between px-4 pt-3 pb-2">- <span className="text-[10px] font-medium uppercase tracking-[0.5px] text-[var(--text-tertiary)]">+ <span className="text-10 font-medium uppercase tracking-[0.5px] text-[var(--text-tertiary)]">{t('orca.rolePill.workersHeader')}</span>- <span className="text-[10px] font-medium text-[var(--text-tertiary)]">+ <span className="text-10 font-medium text-[var(--text-tertiary)]">{t('orca.rolePill.workerCountSummary', {// count 驱动 i18next 复数选择 (en: _one/_other; zh/ja/ko: _other),// totalCount/activeCount 仍用于插值。@@ -895,7 +895,7 @@ export function RolePillDropdown({}}>{/* 主行: avatar (含 status icon + 可选 attention dot) + role + optional internal label. */}- <div className="flex items-center gap-2 text-[13px] leading-snug">+ <div className="flex items-center gap-2 text-13 leading-snug"><WorkerAvataragent={w.agent}status={w.status}@@ -911,7 +911,7 @@ export function RolePillDropdown({</div>{/* 副行: 简化 model 名 (去 provider 前缀) + effort bars.Claude / Codex 都显 (两种 agent 都有 reasoning effort 概念). */}- <div className="mt-0.5 ml-[26px] flex items-center gap-1.5 text-[11px] leading-snug text-[var(--text-tertiary)]">+ <div className="mt-0.5 ml-[26px] flex items-center gap-1.5 text-11 leading-snug text-[var(--text-tertiary)]"><span>{simplifyModelName(w.model)}</span><EffortBars effort={w.effort} /></div>@@ -951,17 +951,17 @@ export function RolePillDropdown({<span className="inline-flex h-[22px] w-[22px] shrink-0 items-center justify-center rounded-md bg-[var(--surface-elevated)]"><Plus size={13} /></span>- <span className="text-[13px] leading-snug text-[var(--text-primary)]">+ <span className="text-13 leading-snug text-[var(--text-primary)]">{t('orca.rolePill.createWorker')}</span></div>- <div className="mt-1 text-[11px] leading-snug text-[var(--text-tertiary)]">+ <div className="mt-1 text-11 leading-snug text-[var(--text-tertiary)]">{t('orca.rolePill.hardLimitHint', { count: hardLimit })}</div>{settingsEnabled && (<buttontype="button"- className="mt-1.5 inline-flex items-center gap-1 text-[11px] leading-snug text-[var(--text-primary)] underline hover:opacity-80"+ className="mt-1.5 inline-flex items-center gap-1 text-11 leading-snug text-[var(--text-primary)] underline hover:opacity-80"onClick={() => onOpenSettings()}>{t('orca.rolePill.settingsCollaboration')}@@ -983,25 +983,25 @@ export function RolePillDropdown({<span className="inline-flex h-[22px] w-[22px] shrink-0 items-center justify-center rounded-md bg-[var(--surface-chip)]"><Plus size={13} className="text-[var(--status-bar-accent)]" /></span>- <span className="text-[13px] leading-snug text-[var(--status-bar-accent)]">+ <span className="text-13 leading-snug text-[var(--status-bar-accent)]">{t('orca.rolePill.createWorker')}</span>{/* 不用 font-mono: 代码字体缺 ⌘ 等修饰键字形, 见 KeyboardShortcutsSection。用户删除绑定时 shortcutKey 为空串, 不渲染空占位。 */}{shortcutKey && (- <kbd className="ml-auto text-[10px] text-[var(--status-bar-accent)]">+ <kbd className="ml-auto text-10 text-[var(--status-bar-accent)]">{shortcutKey}</kbd>)}</button>- <div className="mt-1 px-[30px] text-[11px] leading-snug text-[var(--text-tertiary)]">+ <div className="mt-1 px-[30px] text-11 leading-snug text-[var(--text-tertiary)]">{t('orca.rolePill.softLimitHint', { count: softLimit })}</div>{settingsEnabled && (<div className="px-[30px]"><buttontype="button"- className="mt-1 inline-flex items-center gap-1 text-[11px] leading-snug text-[var(--status-bar-accent)] underline hover:opacity-80"+ className="mt-1 inline-flex items-center gap-1 text-11 leading-snug text-[var(--status-bar-accent)] underline hover:opacity-80"onClick={() => onOpenSettings()}>{t('orca.rolePill.settingsCollaboration')}@@ -1014,7 +1014,7 @@ export function RolePillDropdown({/* normal */<buttontype="button"- className="flex w-full items-center gap-2 px-4 py-2.5 text-left text-[13px] leading-snug text-[var(--text-secondary)] hover:bg-[var(--surface-chip)] rounded-b-xl transition-colors"+ className="flex w-full items-center gap-2 px-4 py-2.5 text-left text-13 leading-snug text-[var(--text-secondary)] hover:bg-[var(--surface-chip)] rounded-b-xl transition-colors"onClick={() => {onOpenCreate();closeDropdown();@@ -1025,7 +1025,7 @@ export function RolePillDropdown({</span>{t('orca.rolePill.createWorker')}{shortcutKey && (- <kbd className="ml-auto text-[10px] text-[var(--text-tertiary)]">+ <kbd className="ml-auto text-10 text-[var(--text-tertiary)]">{shortcutKey}</kbd>)}diff --git a/apps/desktop/src/renderer/features/cc-agent/SessionBranchTreeDialog.tsx b/apps/desktop/src/renderer/features/cc-agent/SessionBranchTreeDialog.tsxindex c72a663bb7..de4de8aa43 100644--- a/apps/desktop/src/renderer/features/cc-agent/SessionBranchTreeDialog.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/SessionBranchTreeDialog.tsx@@ -171,12 +171,12 @@ export function SessionBranchTreeDialog({{switchingId === node.id ? <Spinner size={12} /> : roleIcon(node)}</span><span className="min-w-0 flex-1">- <span className="flex items-center gap-1 text-[11px] text-[var(--text-tertiary)]">+ <span className="flex items-center gap-1 text-11 text-[var(--text-tertiary)]">{node.label || t(`ccAgent.sidebar.sessionBranches.role.${node.role ?? 'system'}`)}{branching && <GitBranch size={11} />}{leaf && <span>{t('ccAgent.sidebar.sessionBranches.current')}</span>}</span>- <span className="line-clamp-2 text-[12px] leading-4 text-[var(--text-primary)]">+ <span className="line-clamp-2 text-12 leading-4 text-[var(--text-primary)]">{node.preview || t('ccAgent.sidebar.sessionBranches.emptyEntry')}</span></span>@@ -200,10 +200,10 @@ export function SessionBranchTreeDialog({style={{ paddingLeft: `${10 + depth * 18}px` }}>{item.agentKind === 'pi' ? <Pi size={15} /> : <GitBranch size={15} />}- <span className="min-w-0 flex-1 truncate text-[13px] text-[var(--text-primary)]">+ <span className="min-w-0 flex-1 truncate text-13 text-[var(--text-primary)]">{item.title?.trim() || t('ccAgent.sessionHeader.untitled')}</span>- {current && <span className="text-[11px] text-[var(--text-tertiary)]">{t('ccAgent.sidebar.sessionBranches.current')}</span>}+ {current && <span className="text-11 text-[var(--text-tertiary)]">{t('ccAgent.sidebar.sessionBranches.current')}</span>}{!current && <ChevronRight size={13} className="text-[var(--text-tertiary)]" />}</button>{current && session.agentKind === 'pi' && (@@ -213,7 +213,7 @@ export function SessionBranchTreeDialog({) : tree && tree.roots.length > 0 ? (tree.roots.map((root) => renderPiNode(root, depth + 1))) : (- <div className="px-3 py-3 text-[12px] text-[var(--text-tertiary)]">+ <div className="px-3 py-3 text-12 text-[var(--text-tertiary)]">{t('ccAgent.sidebar.sessionBranches.empty')}</div>)}@@ -234,10 +234,10 @@ export function SessionBranchTreeDialog({><div className="flex items-start gap-3 border-b px-4 py-3" style={{ borderColor: 'var(--border-default)' }}><div className="min-w-0 flex-1">- <Dialog.Title className="text-[15px] font-medium text-[var(--text-primary)]">+ <Dialog.Title className="text-15 font-medium text-[var(--text-primary)]">{t('ccAgent.sidebar.sessionBranches.title')}</Dialog.Title>- <Dialog.Description className="mt-1 text-[12px] leading-5 text-[var(--text-tertiary)]">+ <Dialog.Description className="mt-1 text-12 leading-5 text-[var(--text-tertiary)]">{t('ccAgent.sidebar.sessionBranches.description')}</Dialog.Description></div>@@ -254,7 +254,7 @@ export function SessionBranchTreeDialog({{session.agentKind === 'pi' && (<div className="border-t px-4 py-3" style={{ borderColor: 'var(--border-default)', backgroundColor: 'var(--surface-subtle)' }}>- <label className="flex items-center gap-2 text-[12px] text-[var(--text-primary)]">+ <label className="flex items-center gap-2 text-12 text-[var(--text-primary)]"><inputtype="checkbox"checked={summarize}@@ -269,11 +269,11 @@ export function SessionBranchTreeDialog({value={summaryFocus}onChange={(event) => setSummaryFocus(event.target.value.slice(0, 4000))}placeholder={t('ccAgent.sidebar.sessionBranches.summaryFocus')}- className="mt-2 h-8 w-full rounded-lg border bg-[var(--settings-input-bg)] px-2 text-[12px] text-[var(--settings-input-text)] outline-none"+ className="mt-2 h-8 w-full rounded-lg border bg-[var(--settings-input-bg)] px-2 text-12 text-[var(--settings-input-text)] outline-none"style={{ borderColor: 'var(--settings-input-border)' }}/>)}- <p className="mt-2 text-[11px] leading-4 text-[var(--text-tertiary)]">+ <p className="mt-2 text-11 leading-4 text-[var(--text-tertiary)]">{running? t('ccAgent.sidebar.sessionBranches.runningBlocked'): writeBlockeddiff --git a/apps/desktop/src/renderer/features/cc-agent/sidebar/ConversationSearchBox.tsx b/apps/desktop/src/renderer/features/cc-agent/sidebar/ConversationSearchBox.tsxindex 0a5bf39a19..dabbc7bdf6 100644--- a/apps/desktop/src/renderer/features/cc-agent/sidebar/ConversationSearchBox.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/sidebar/ConversationSearchBox.tsx@@ -456,14 +456,14 @@ export function SearchResultsBody({const { t } = useTranslation();if (!trimmed) {return (- <div className="px-3 py-6 text-center text-[12px] text-[var(--cmd-palette-empty)]">+ <div className="px-3 py-6 text-center text-12 text-[var(--cmd-palette-empty)]">{t('ccAgent.search.empty')}</div>);}if (status === 'searching') {return (- <div className="flex items-center justify-center gap-2 px-3 py-6 text-[12px] text-[var(--cmd-palette-item-meta)]">+ <div className="flex items-center justify-center gap-2 px-3 py-6 text-12 text-[var(--cmd-palette-item-meta)]"><Spinner size={14} />{t('ccAgent.search.searching')}</div>@@ -471,14 +471,14 @@ export function SearchResultsBody({}if (status === 'error') {return (- <div className="px-3 py-6 text-center text-[12px] text-[var(--error-fg)]">+ <div className="px-3 py-6 text-center text-12 text-[var(--error-fg)]">{t('ccAgent.search.failed')}</div>);}if (results.length === 0) {return (- <div className="px-3 py-6 text-center text-[12px] text-[var(--cmd-palette-empty)]">+ <div className="px-3 py-6 text-center text-12 text-[var(--cmd-palette-empty)]">{t('ccAgent.search.noResults')}</div>);@@ -639,7 +639,7 @@ export function ConversationSearchBox({onChange={(event) => search.setQuery(event.target.value)}placeholder={t('ccAgent.search.placeholder')}aria-label={t('ccAgent.search.placeholder')}- className="min-w-0 flex-1 bg-transparent text-[13px] text-[var(--text-primary)] outline-none placeholder:text-[var(--text-tertiary)]"+ className="min-w-0 flex-1 bg-transparent text-13 text-[var(--text-primary)] outline-none placeholder:text-[var(--text-tertiary)]"/>{search.query && (<Tip text={t('ccAgent.search.clear')} side="bottom">@@ -1034,7 +1034,7 @@ function SearchResultRow({<div className="space-y-2"><div className="font-medium leading-snug">{displayTitle}</div>{primaryHit?.preview && (- <div className="border-t border-[var(--cmd-palette-border)] pt-2 text-[12px] leading-snug text-[var(--tooltip-text)]">+ <div className="border-t border-[var(--cmd-palette-border)] pt-2 text-12 leading-snug text-[var(--tooltip-text)]">{renderSnippet(primaryHit.snippet, query) ?? renderKeywordHighlights(primaryHit.preview, query)}</div>)}@@ -1058,22 +1058,22 @@ function SearchResultRow({</div><div className="min-w-0 flex-1"><div className="flex min-w-0 items-center gap-2">- <span className="min-w-0 flex-1 truncate text-[13px] font-medium text-[var(--text-primary)]">+ <span className="min-w-0 flex-1 truncate text-13 font-medium text-[var(--text-primary)]">{highlightSegments(displayTitle, item.titleMatchIndices)}</span><Tip text={sourceText} side="top" delay={150}>- <span className="shrink-0 rounded-full bg-[var(--surface-chip)] px-1.5 py-0.5 text-[10px] leading-none text-[var(--text-tertiary)]">+ <span className="shrink-0 rounded-full bg-[var(--surface-chip)] px-1.5 py-0.5 text-10 leading-none text-[var(--text-tertiary)]">{t(`ccAgent.search.kind.${item.matchKind}`)}</span></Tip></div>{meta && (- <div className="mt-1 truncate text-[11px] leading-none text-[var(--text-tertiary)]">+ <div className="mt-1 truncate text-11 leading-none text-[var(--text-tertiary)]">{meta}</div>)}{visibleHits.length === 0 && subtitle && (- <div className="mt-1.5 line-clamp-4 text-[12px] leading-snug text-[var(--text-secondary)]">+ <div className="mt-1.5 line-clamp-4 text-12 leading-snug text-[var(--text-secondary)]">{subtitle}</div>)}@@ -1099,7 +1099,7 @@ function SearchResultRow({}}className={cn('flex w-full items-center rounded-md border border-transparent px-2 py-1.5 text-left',- 'text-[10px] leading-none text-[var(--text-tertiary)]',+ 'text-10 leading-none text-[var(--text-tertiary)]','transition-colors hover:border-[var(--border-default)] hover:bg-[var(--surface-elevated)] hover:text-[var(--text-primary)]',)}>@@ -1139,10 +1139,10 @@ function SearchHitRow({)}><span className="min-w-0 flex-1">- <span className="block line-clamp-2 text-[12px] leading-snug text-[var(--text-secondary)]">+ <span className="block line-clamp-2 text-12 leading-snug text-[var(--text-secondary)]">{content}</span>- <span className="mt-0.5 block truncate text-[10px] leading-none text-[var(--text-tertiary)]">+ <span className="mt-0.5 block truncate text-10 leading-none text-[var(--text-tertiary)]">{hitTime} · {sourceText}</span></span>@@ -1244,7 +1244,7 @@ const SEARCH_MARK_CLASS =const SEARCH_TOOL_BUTTON_CLASS = cn('flex h-7 min-w-0 items-center gap-1.5 rounded-full border border-[var(--border-default)]',- 'bg-[var(--surface-elevated)] px-2.5 text-[12px] text-[var(--text-secondary)]',+ 'bg-[var(--surface-elevated)] px-2.5 text-12 text-[var(--text-secondary)]','transition-colors hover:bg-[var(--cmd-palette-item-hover)] hover:text-[var(--text-primary)]',);diff --git a/apps/desktop/src/renderer/features/cc-agent/sidebar/RailNav.tsx b/apps/desktop/src/renderer/features/cc-agent/sidebar/RailNav.tsxindex 93eaec507e..bc6b6f1843 100644--- a/apps/desktop/src/renderer/features/cc-agent/sidebar/RailNav.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/sidebar/RailNav.tsx@@ -371,7 +371,7 @@ export function RailNav({</span><spanclassName={cn(- 'max-w-[56px] truncate text-[10px] font-medium leading-[1.2]',+ 'max-w-[56px] truncate text-10 font-medium leading-[1.2]',// 标签在 rail 底色上(胶囊之外),active 用正文色加粗,// 不用 active-foreground(那是胶囊底上的前景,底色外会失配)。isActivediff --git a/apps/desktop/src/renderer/features/cc-agent/sidebar/SessionCard.tsx b/apps/desktop/src/renderer/features/cc-agent/sidebar/SessionCard.tsxindex 19e106af9d..04104d3252 100644--- a/apps/desktop/src/renderer/features/cc-agent/sidebar/SessionCard.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/sidebar/SessionCard.tsx@@ -880,7 +880,7 @@ export function SessionCard({><divclassName={cn(- 'min-w-0 text-[12.5px] font-semibold leading-[1.22] tracking-[-0.005em]',+ 'min-w-0 text-12 font-semibold leading-[1.22] tracking-[-0.005em]','[display:-webkit-box] [-webkit-box-orient:vertical] [-webkit-line-clamp:2] overflow-hidden',isActive ? 'text-sidebar-item-active-foreground' : 'text-foreground',isEditing && 'invisible',@@ -911,7 +911,7 @@ export function SessionCard({setIsEditing(false);}}containerClassName="absolute inset-x-0 top-1/2 -translate-y-1/2"- inputClassName="h-6 text-[12.5px] font-semibold text-foreground"+ inputClassName="h-6 text-12 font-semibold text-foreground"activeForeground={isActive}/>)}@@ -1184,7 +1184,7 @@ function TimeActionsSlot({dateTime={activityIso}title={formatSidebarTimeAbsolute(activityIso)}className={cn(- 'text-[10.5px] font-medium leading-none tabular-nums',+ 'text-10 font-medium leading-none tabular-nums',isActive ? 'text-sidebar-item-active-foreground' : 'text-[var(--text-tertiary)]',)}>diff --git a/apps/desktop/src/renderer/features/cc-agent/sidebar/sections/ProjectNode.tsx b/apps/desktop/src/renderer/features/cc-agent/sidebar/sections/ProjectNode.tsxindex 5d017d75c5..ea742fbe0b 100644--- a/apps/desktop/src/renderer/features/cc-agent/sidebar/sections/ProjectNode.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/sidebar/sections/ProjectNode.tsx@@ -343,7 +343,7 @@ export function ProjectNode({{!isEditingName && remoteIdentity ? (<spantitle={remoteIdentity.displayLabel}- className="max-w-[45%] shrink truncate text-[11px] text-[var(--cmd-palette-item-meta)]"+ className="max-w-[45%] shrink truncate text-11 text-[var(--cmd-palette-item-meta)]">{remoteIdentity.displayLabel}</span>diff --git a/apps/desktop/src/renderer/features/cc-agent/sidebar/sessionOrdinalBadges.tsx b/apps/desktop/src/renderer/features/cc-agent/sidebar/sessionOrdinalBadges.tsxindex 0eaa9cbc40..222cb35f9d 100644--- a/apps/desktop/src/renderer/features/cc-agent/sidebar/sessionOrdinalBadges.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/sidebar/sessionOrdinalBadges.tsx@@ -54,7 +54,7 @@ export function SessionOrdinalBadgeKbd({ label }: { label: string }) {>{macParts ? (<>- <span className="text-[13px] leading-none">{macParts[1]}</span>+ <span className="text-13 leading-none">{macParts[1]}</span><span>{macParts[2]}</span></>) : (diff --git a/apps/desktop/src/renderer/features/cc-agent/workdir-browse/FileBodyView.tsx b/apps/desktop/src/renderer/features/cc-agent/workdir-browse/FileBodyView.tsxindex 5e850d1393..e8dc2ff99c 100644--- a/apps/desktop/src/renderer/features/cc-agent/workdir-browse/FileBodyView.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/workdir-browse/FileBodyView.tsx@@ -1373,7 +1373,7 @@ function CachedFileBody({</div></div>)}- <pre className="whitespace-pre-wrap break-words px-6 py-4 font-mono text-[12.5px] leading-relaxed text-foreground">+ <pre className="whitespace-pre-wrap break-words px-6 py-4 font-mono text-12 leading-relaxed text-foreground">{text}</pre></div>diff --git a/apps/desktop/src/renderer/features/cc-agent/workdir-browse/FileFilterInput.tsx b/apps/desktop/src/renderer/features/cc-agent/workdir-browse/FileFilterInput.tsxindex 9d2d6aeb4d..9f27acbf17 100644--- a/apps/desktop/src/renderer/features/cc-agent/workdir-browse/FileFilterInput.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/workdir-browse/FileFilterInput.tsx@@ -42,7 +42,7 @@ export function FileFilterInput({ value, onChange }: FileFilterInputProps) {placeholder={t('rightSidebar.fileBrowser.filterPlaceholder')}className={cn('h-7 w-full rounded-md border border-[var(--border-default)] bg-[var(--surface-elevated)]',- 'pl-7 pr-7 text-[12px] text-[var(--text-primary)] placeholder:text-[var(--text-tertiary)]',+ 'pl-7 pr-7 text-12 text-[var(--text-primary)] placeholder:text-[var(--text-tertiary)]','outline-none transition-colors','focus:border-[var(--focus-ring)] focus:ring-1 focus:ring-[var(--focus-ring-soft)]',)}diff --git a/apps/desktop/src/renderer/features/cc-agent/workdir-browse/FileTabsBar.tsx b/apps/desktop/src/renderer/features/cc-agent/workdir-browse/FileTabsBar.tsxindex 8bf31b0a45..773750a1f9 100644--- a/apps/desktop/src/renderer/features/cc-agent/workdir-browse/FileTabsBar.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/workdir-browse/FileTabsBar.tsx@@ -470,7 +470,7 @@ export function FileTabsBar({// select-none —— 配合 handleTabMouseDown 里的 preventDefault,// 确保拖动 tab 时不会顺手选中文件名文本(双保险:CSS 兜住 +// JS 拦截默认行为)。- 'cursor-pointer text-[12px] transition-colors select-none',+ 'cursor-pointer text-12 transition-colors select-none',isActive? // active = hover 的底色 + 字重稍重;不加顶部 accent 线'bg-[var(--chat-input-chip-bg)] text-foreground font-medium'@@ -585,7 +585,7 @@ export function FileTabsBar({const hasRight = currentIdx < tabs.length - 1;const hasOthers = tabs.length > 1;const itemCls =- 'flex h-7 w-full items-center rounded-md px-2.5 text-left text-[13px] leading-none text-[var(--msg-assistant-text)] hover:bg-[var(--cmd-palette-item-hover)] focus:bg-[var(--cmd-palette-item-hover)] focus:outline-none disabled:pointer-events-none disabled:opacity-45';+ 'flex h-7 w-full items-center rounded-md px-2.5 text-left text-13 leading-none text-[var(--msg-assistant-text)] hover:bg-[var(--cmd-palette-item-hover)] focus:bg-[var(--cmd-palette-item-hover)] focus:outline-none disabled:pointer-events-none disabled:opacity-45';// 菜单项的 onClick 在 onPointerDown 关闭菜单 之后 触发? 不是 ——// 我们在菜单容器上 stopPropagation pointerdown,避免外层 window// 监听把菜单收掉;但菜单内的 button 自身 click 仍可正常触发。@@ -689,7 +689,7 @@ export function FileTabsBar({'bg-[var(--chat-input-chip-bg)] text-foreground font-medium','border border-[var(--cmd-palette-border)]','shadow-[var(--shadow-menu)]',- 'text-[12px] opacity-90',+ 'text-12 opacity-90',)}style={{ left: dragGhost.x + 12, top: dragGhost.y + 12 }}>diff --git a/apps/desktop/src/renderer/features/cc-agent/workdir-browse/FileTreeView.tsx b/apps/desktop/src/renderer/features/cc-agent/workdir-browse/FileTreeView.tsxindex d7bfabb242..57837c4b6a 100644--- a/apps/desktop/src/renderer/features/cc-agent/workdir-browse/FileTreeView.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/workdir-browse/FileTreeView.tsx@@ -289,7 +289,7 @@ export const FileTreeView = forwardRef<FileTreeViewHandle, FileTreeViewProps>(fu{showInitialSpinner && (<><Spinner size={16} className="text-[var(--cmd-palette-item-meta)]" />- <span className="text-[12px] text-[var(--cmd-palette-item-meta)]">+ <span className="text-12 text-[var(--cmd-palette-item-meta)]">{t('ccAgent.workdirBrowse.treeLoading')}</span></>@@ -300,7 +300,7 @@ export const FileTreeView = forwardRef<FileTreeViewHandle, FileTreeViewProps>(fuif (rows.length === 0) {return (- <div className="flex h-full w-full items-center justify-center px-4 text-[12px] text-[var(--cmd-palette-item-meta)]">+ <div className="flex h-full w-full items-center justify-center px-4 text-12 text-[var(--cmd-palette-item-meta)]">{t('ccAgent.workdirBrowse.treeEmpty')}</div>);@@ -399,7 +399,7 @@ export const FileTreeView = forwardRef<FileTreeViewHandle, FileTreeViewProps>(fuclose();onNewFile(parent);}}- className="h-7 px-2.5 rounded-md text-[13px] leading-none text-[var(--msg-assistant-text)] focus:bg-[var(--cmd-palette-item-hover)]"+ className="h-7 px-2.5 rounded-md text-13 leading-none text-[var(--msg-assistant-text)] focus:bg-[var(--cmd-palette-item-hover)]"><FilePlus className="mr-2 h-3.5 w-3.5 shrink-0" /><span className="relative top-px">{t('ccAgent.workdirBrowse.treeMenu.newFile')}</span>@@ -412,7 +412,7 @@ export const FileTreeView = forwardRef<FileTreeViewHandle, FileTreeViewProps>(fuclose();onNewFolder(parent);}}- className="h-7 px-2.5 rounded-md text-[13px] leading-none text-[var(--msg-assistant-text)] focus:bg-[var(--cmd-palette-item-hover)]"+ className="h-7 px-2.5 rounded-md text-13 leading-none text-[var(--msg-assistant-text)] focus:bg-[var(--cmd-palette-item-hover)]"><FolderPlus className="mr-2 h-3.5 w-3.5 shrink-0" /><span className="relative top-px">{t('ccAgent.workdirBrowse.treeMenu.newFolder')}</span>@@ -425,7 +425,7 @@ export const FileTreeView = forwardRef<FileTreeViewHandle, FileTreeViewProps>(fuclose();onRename(entry);}}- className="h-7 px-2.5 rounded-md text-[13px] leading-none text-[var(--msg-assistant-text)] focus:bg-[var(--cmd-palette-item-hover)]"+ className="h-7 px-2.5 rounded-md text-13 leading-none text-[var(--msg-assistant-text)] focus:bg-[var(--cmd-palette-item-hover)]"><Pencil className="mr-2 h-3.5 w-3.5 shrink-0" /><span className="relative top-px">{t('ccAgent.workdirBrowse.treeMenu.rename')}</span>@@ -440,7 +440,7 @@ export const FileTreeView = forwardRef<FileTreeViewHandle, FileTreeViewProps>(fuclose();onRevealInFolder(entry);}}- className="h-7 px-2.5 rounded-md text-[13px] leading-none text-[var(--msg-assistant-text)] focus:bg-[var(--cmd-palette-item-hover)]"+ className="h-7 px-2.5 rounded-md text-13 leading-none text-[var(--msg-assistant-text)] focus:bg-[var(--cmd-palette-item-hover)]"><FolderOpen className="mr-2 h-3.5 w-3.5 shrink-0" /><span className="relative top-px">{t('ccAgent.workdirBrowse.treeMenu.showInFolder')}</span>@@ -456,7 +456,7 @@ export const FileTreeView = forwardRef<FileTreeViewHandle, FileTreeViewProps>(fuclose();onOpenInFileBrowser(entry);}}- className="h-7 px-2.5 rounded-md text-[13px] leading-none text-[var(--msg-assistant-text)] focus:bg-[var(--cmd-palette-item-hover)]"+ className="h-7 px-2.5 rounded-md text-13 leading-none text-[var(--msg-assistant-text)] focus:bg-[var(--cmd-palette-item-hover)]"><FolderTree className="mr-2 h-3.5 w-3.5 shrink-0" /><span className="relative top-px">{t('ccAgent.workdirBrowse.treeMenu.openInFileBrowser')}</span>@@ -469,7 +469,7 @@ export const FileTreeView = forwardRef<FileTreeViewHandle, FileTreeViewProps>(fuclose();onOpenInSidebarBrowser?.(entry);}}- className="h-7 px-2.5 rounded-md text-[13px] leading-none text-[var(--msg-assistant-text)] focus:bg-[var(--cmd-palette-item-hover)]"+ className="h-7 px-2.5 rounded-md text-13 leading-none text-[var(--msg-assistant-text)] focus:bg-[var(--cmd-palette-item-hover)]"><PanelRight className="mr-2 h-3.5 w-3.5 shrink-0" /><span className="relative top-px">{t('chat.markdownRenderer.openInSidebarBrowser')}</span>@@ -482,7 +482,7 @@ export const FileTreeView = forwardRef<FileTreeViewHandle, FileTreeViewProps>(fuclose();onCopyFilePath(entry);}}- className="h-7 px-2.5 rounded-md text-[13px] leading-none text-[var(--msg-assistant-text)] focus:bg-[var(--cmd-palette-item-hover)]"+ className="h-7 px-2.5 rounded-md text-13 leading-none text-[var(--msg-assistant-text)] focus:bg-[var(--cmd-palette-item-hover)]"><Clipboard className="mr-2 h-3.5 w-3.5 shrink-0" /><span className="relative top-px">{t('ccAgent.workdirBrowse.treeMenu.copyFilePath')}</span>@@ -495,7 +495,7 @@ export const FileTreeView = forwardRef<FileTreeViewHandle, FileTreeViewProps>(fuclose();onRename(entry);}}- className="h-7 px-2.5 rounded-md text-[13px] leading-none text-[var(--msg-assistant-text)] focus:bg-[var(--cmd-palette-item-hover)]"+ className="h-7 px-2.5 rounded-md text-13 leading-none text-[var(--msg-assistant-text)] focus:bg-[var(--cmd-palette-item-hover)]"><Pencil className="mr-2 h-3.5 w-3.5 shrink-0" /><span className="relative top-px">{t('ccAgent.workdirBrowse.treeMenu.rename')}</span>@@ -510,7 +510,7 @@ export const FileTreeView = forwardRef<FileTreeViewHandle, FileTreeViewProps>(fuclose();onRevealInFolder(entry);}}- className="h-7 px-2.5 rounded-md text-[13px] leading-none text-[var(--msg-assistant-text)] focus:bg-[var(--cmd-palette-item-hover)]"+ className="h-7 px-2.5 rounded-md text-13 leading-none text-[var(--msg-assistant-text)] focus:bg-[var(--cmd-palette-item-hover)]"><FolderOpen className="mr-2 h-3.5 w-3.5 shrink-0" /><span className="relative top-px">{t('ccAgent.workdirBrowse.treeMenu.showInFolder')}</span>@@ -523,7 +523,7 @@ export const FileTreeView = forwardRef<FileTreeViewHandle, FileTreeViewProps>(fuclose();onOpenInBrowser?.(entry);}}- className="h-7 px-2.5 rounded-md text-[13px] leading-none text-[var(--msg-assistant-text)] focus:bg-[var(--cmd-palette-item-hover)]"+ className="h-7 px-2.5 rounded-md text-13 leading-none text-[var(--msg-assistant-text)] focus:bg-[var(--cmd-palette-item-hover)]"><Globe className="mr-2 h-3.5 w-3.5 shrink-0" /><span className="relative top-px">{t('chat.markdownRenderer.openInBrowser')}</span>@@ -536,7 +536,7 @@ export const FileTreeView = forwardRef<FileTreeViewHandle, FileTreeViewProps>(fuclose();onDeleteFile(entry);}}- className="h-7 px-2.5 rounded-md text-[13px] leading-none text-red-500 dark:text-red-400 focus:bg-red-50 dark:focus:bg-red-500/10"+ className="h-7 px-2.5 rounded-md text-13 leading-none text-red-500 dark:text-red-400 focus:bg-red-50 dark:focus:bg-red-500/10"><Trash2 className="mr-2 h-3.5 w-3.5 shrink-0" /><span className="relative top-px">{t('ccAgent.workdirBrowse.treeMenu.deleteFile')}</span>@@ -624,7 +624,7 @@ function FileTreeRow({data-relpath={entry.relPath}className={cn('group/file-row flex h-7 w-full shrink-0 items-center rounded-md pr-2',- 'cursor-pointer text-[13px] transition-colors',+ 'cursor-pointer text-13 transition-colors',selected? 'bg-sidebar-item-active font-medium text-sidebar-item-active-foreground': 'text-foreground hover:bg-sidebar-item-hover',@@ -804,7 +804,7 @@ function RenamingInputRow({ entry, depth, onSubmit, onCancel }: RenamingInputRowonKeyDown={handleKey}onBlur={commit}className={cn(- 'min-w-0 flex-1 bg-transparent text-[13px] leading-none outline-none',+ 'min-w-0 flex-1 bg-transparent text-13 leading-none outline-none','border border-[var(--cmd-palette-item-meta)] rounded-sm px-1 py-0.5','text-sidebar-item-active-foreground placeholder:text-[var(--cmd-palette-item-meta)]',)}@@ -875,7 +875,7 @@ function PendingInputRow({ pending, depth, onSubmit, onCancel }: PendingInputRowonBlur={commit}placeholder={pending.kind === 'folder' ? 'new-folder' : 'untitled'}className={cn(- 'min-w-0 flex-1 bg-transparent text-[13px] leading-none outline-none',+ 'min-w-0 flex-1 bg-transparent text-13 leading-none outline-none','border border-[var(--cmd-palette-item-meta)] rounded-sm px-1 py-0.5','text-sidebar-item-active-foreground placeholder:text-[var(--cmd-palette-item-meta)]',)}diff --git a/apps/desktop/src/renderer/features/cc-agent/workdir-browse/FilterResultList.tsx b/apps/desktop/src/renderer/features/cc-agent/workdir-browse/FilterResultList.tsxindex ff9d4608f8..eade2ed71a 100644--- a/apps/desktop/src/renderer/features/cc-agent/workdir-browse/FilterResultList.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/workdir-browse/FilterResultList.tsx@@ -42,14 +42,14 @@ export function FilterResultList({if (isLoading && files.length === 0) {return (- <div className="flex flex-1 items-center justify-center px-4 py-6 text-[11px] text-sidebar-muted">+ <div className="flex flex-1 items-center justify-center px-4 py-6 text-11 text-sidebar-muted">{t('rightSidebar.fileBrowser.filterIndexing')}</div>);}if (files.length === 0 && indexError) {return (- <div className="flex flex-1 items-center justify-center px-4 py-6 text-center text-[11px] text-sidebar-muted">+ <div className="flex flex-1 items-center justify-center px-4 py-6 text-center text-11 text-sidebar-muted">{indexError === 'RG_UNAVAILABLE'? t('rightSidebar.fileBrowser.filterRgUnavailable'): t('rightSidebar.fileBrowser.filterIndexFailed')}@@ -58,7 +58,7 @@ export function FilterResultList({}if (files.length === 0) {return (- <div className="flex flex-1 items-center justify-center px-4 py-6 text-[11px] text-sidebar-muted">+ <div className="flex flex-1 items-center justify-center px-4 py-6 text-11 text-sidebar-muted">{t('rightSidebar.fileBrowser.filterNoMatch')}</div>);@@ -88,14 +88,14 @@ export function FilterResultList({<span className="flex min-w-0 flex-1 flex-col leading-tight"><span className="truncate">{basename}</span>{dirname && (- <span className="truncate text-[10px] text-sidebar-muted">{dirname}</span>+ <span className="truncate text-10 text-sidebar-muted">{dirname}</span>)}</span></button>);})}{truncated && (- <div className="px-2 py-2 text-[10px] text-sidebar-muted">+ <div className="px-2 py-2 text-10 text-sidebar-muted">{t('rightSidebar.fileBrowser.filterTruncated', { limit: FILTER_RESULT_LIMIT })}</div>)}diff --git a/apps/desktop/src/renderer/features/cc-agent/workdir-browse/SessionTabsBar.tsx b/apps/desktop/src/renderer/features/cc-agent/workdir-browse/SessionTabsBar.tsxindex 674b9ee701..7b4c5dc498 100644--- a/apps/desktop/src/renderer/features/cc-agent/workdir-browse/SessionTabsBar.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/workdir-browse/SessionTabsBar.tsx@@ -269,7 +269,7 @@ export function SessionTabsBar({// 普遍比文件名长,要把横向密度提一档。'group/tab relative flex h-full shrink-0 items-center gap-1.5 px-2','border-r border-[var(--cmd-palette-border)]',- 'cursor-pointer text-[12px] transition-colors',+ 'cursor-pointer text-12 transition-colors',isActive? 'bg-[var(--chat-input-chip-bg)] text-foreground font-medium': 'text-[var(--cmd-palette-item-meta)] hover:bg-[var(--chat-input-chip-bg)] hover:text-foreground',@@ -308,7 +308,7 @@ export function SessionTabsBar({onDoubleClick={(e) => e.stopPropagation()}className={cn('max-w-[160px] h-5 px-1 rounded',- 'text-[12px] font-medium text-foreground',+ 'text-12 font-medium text-foreground','bg-transparent outline-none','border-[1.5px] border-[var(--focus-ring)]',)}@@ -386,14 +386,14 @@ export function SessionTabsBar({><DropdownMenuItemonSelect={() => onCreateNew('cc')}- className="h-7 px-2.5 rounded-md text-[13px] text-[var(--msg-assistant-text)] focus:bg-[var(--cmd-palette-item-hover)]"+ className="h-7 px-2.5 rounded-md text-13 text-[var(--msg-assistant-text)] focus:bg-[var(--cmd-palette-item-hover)]"><VendorIcon vendor="cc" size={14} className="mr-2 text-foreground" />Claude</DropdownMenuItem><DropdownMenuItemonSelect={() => onCreateNew('codex')}- className="h-7 px-2.5 rounded-md text-[13px] text-[var(--msg-assistant-text)] focus:bg-[var(--cmd-palette-item-hover)]"+ className="h-7 px-2.5 rounded-md text-13 text-[var(--msg-assistant-text)] focus:bg-[var(--cmd-palette-item-hover)]"><VendorIcon vendor="codex" size={14} className="mr-2 text-foreground" />Codexdiff --git a/apps/desktop/src/renderer/features/plugin/GhostPluginDetailView.tsx b/apps/desktop/src/renderer/features/plugin/GhostPluginDetailView.tsxindex d2941568bc..9ba14237db 100644--- a/apps/desktop/src/renderer/features/plugin/GhostPluginDetailView.tsx+++ b/apps/desktop/src/renderer/features/plugin/GhostPluginDetailView.tsx@@ -131,7 +131,7 @@ function permissionItemIcon(item: GhostPermissionItem): LucideIcon {const DETAIL_SECTION_CLASS = 'mt-10';const DETAIL_SECTION_HEADING_CLASS =- 'text-18 font-medium leading-[26px] text-[var(--text-primary)]';+ 'text-18 font-medium leading-[1.444] text-[var(--text-primary)]';const DETAIL_SECTION_CONTENT_CLASS = 'mt-5 max-w-[760px]';const DETAIL_SURFACE_CLASS ='border border-[color-mix(in_srgb,var(--border-default)_72%,transparent)] bg-[color-mix(in_srgb,var(--surface-elevated)_82%,var(--surface))]';@@ -245,7 +245,7 @@ export function GhostPluginDetailView({onIconLoadError={onIconLoadError}/><div className="min-w-0">- <h1 className="truncate text-28 font-medium leading-[34px] text-[var(--text-primary)]">+ <h1 className="truncate text-28 font-medium leading-[1.214] text-[var(--text-primary)]">{detail.name}</h1><GhostPluginMetadata author={detail.author} version={detail.version} />@@ -388,7 +388,7 @@ export function GhostPluginDetailView({<pref={descriptionRef}className={cn(- 'text-14 leading-[22px] text-[var(--text-secondary)]',+ 'text-14 leading-[1.571] text-[var(--text-secondary)]',!descriptionExpanded && 'line-clamp-3',)}>@@ -441,7 +441,7 @@ export function GhostPluginDetailView({aria-hidden="true"/><div className="min-w-0">- <p className="text-14 font-medium leading-[22px] text-[var(--text-primary)]">+ <p className="text-14 font-medium leading-[1.571] text-[var(--text-primary)]">{t('settings.ghosts.detail.settingsTitle', { name: detail.name })}</p><p className="mt-0.5 text-13 leading-5 text-[var(--text-secondary)]">@@ -612,7 +612,7 @@ export function ToolDescriptionChip({ tool }: { tool: GhostToolDecl }) {'inline-flex h-8 max-w-full items-center rounded-full px-3 text-[var(--text-secondary)] hover:text-[var(--text-primary)]',)}>- <code className="truncate font-mono text-13 leading-[18px]">{tool.name}</code>+ <code className="truncate font-mono text-13 leading-[1.385]">{tool.name}</code></button></PopoverTrigger><PopoverContent@@ -703,7 +703,7 @@ function PermissionDetailRow({ item }: { item: GhostPermissionItem }) {aria-hidden="true"/><div className="min-w-0 flex-1">- <p className="break-words text-14 font-medium leading-[22px] text-[var(--text-primary)]">+ <p className="break-words text-14 font-medium leading-[1.571] text-[var(--text-primary)]">{t(`settings.ghosts.perm.${item.labelKey}`, item.labelArgs)}</p>{hostDescription ? (@@ -906,7 +906,7 @@ function ExpandableDetailValue({<divref={valueRef}className={cn(- 'min-w-0 flex-1 text-14 leading-[22px] text-[var(--text-primary)]',+ 'min-w-0 flex-1 text-14 leading-[1.571] text-[var(--text-primary)]',expanded ? 'whitespace-pre-wrap break-words' : 'truncate whitespace-nowrap',monospace && 'font-mono text-13',)}diff --git a/apps/desktop/src/renderer/features/plugin/MarketPluginDetailView.tsx b/apps/desktop/src/renderer/features/plugin/MarketPluginDetailView.tsxindex 22d5c51e7a..9c93ffd6af 100644--- a/apps/desktop/src/renderer/features/plugin/MarketPluginDetailView.tsx+++ b/apps/desktop/src/renderer/features/plugin/MarketPluginDetailView.tsx@@ -69,7 +69,7 @@ export function MarketPluginDetailView({size="detail"/><div className="min-w-0">- <h1 className="truncate text-28 font-medium leading-[34px] text-[var(--text-primary)]">+ <h1 className="truncate text-28 font-medium leading-[1.214] text-[var(--text-primary)]">{detail.name}</h1><div className="mt-1.5 flex flex-wrap items-center gap-2 text-12 text-[var(--text-tertiary)]">@@ -103,7 +103,7 @@ export function MarketPluginDetailView({</div><pid={conflictDescription ? conflictDescriptionId : undefined}- className="mt-5 text-14 leading-[22px] text-[var(--text-secondary)]"+ className="mt-5 text-14 leading-[1.571] text-[var(--text-secondary)]">{conflictDescription ?? (detail.description || detail.ghostId)}</p>@@ -112,7 +112,7 @@ export function MarketPluginDetailView({<section className="mt-10" aria-labelledby="market-security-title"><h2id="market-security-title"- className="text-18 font-medium leading-[26px] text-[var(--text-primary)]"+ className="text-18 font-medium leading-[1.444] text-[var(--text-primary)]">{t('settings.ghosts.market.securityTitle')}</h2>@@ -136,7 +136,7 @@ export function MarketPluginDetailView({<div className="flex items-baseline gap-2"><h2id="market-permissions-title"- className="text-18 font-medium leading-[26px] text-[var(--text-primary)]"+ className="text-18 font-medium leading-[1.444] text-[var(--text-primary)]">{t('settings.ghosts.perm.grantsTitle')}</h2>diff --git a/apps/desktop/src/renderer/features/remote-device/ControlledBanner.tsx b/apps/desktop/src/renderer/features/remote-device/ControlledBanner.tsxindex 89f02412a7..26995c9ba1 100644--- a/apps/desktop/src/renderer/features/remote-device/ControlledBanner.tsx+++ b/apps/desktop/src/renderer/features/remote-device/ControlledBanner.tsx@@ -226,11 +226,11 @@ export function ControlledBanner({style={{ backgroundColor: 'var(--status-bar-accent)' }}aria-hidden/>- <span className="min-w-0 truncate text-[12px] text-[var(--text-primary)]">{label}</span>+ <span className="min-w-0 truncate text-12 text-[var(--text-primary)]">{label}</span><buttontype="button"onClick={hasMultipleControllers ? onViewControllers : () => void onRevoke()}- className="flex min-w-0 max-w-[45%] shrink items-center gap-1 rounded-full px-2 py-0.5 text-[12px] text-[var(--text-secondary)] transition-colors hover:text-[var(--text-primary)]"+ className="flex min-w-0 max-w-[45%] shrink items-center gap-1 rounded-full px-2 py-0.5 text-12 text-[var(--text-secondary)] transition-colors hover:text-[var(--text-primary)]">{hasMultipleControllers ? (<Eye size={13} className="shrink-0" />diff --git a/apps/desktop/src/renderer/features/right-sidebar/AddTabDropdown.tsx b/apps/desktop/src/renderer/features/right-sidebar/AddTabDropdown.tsxindex 560859a381..bcfab15dbd 100644--- a/apps/desktop/src/renderer/features/right-sidebar/AddTabDropdown.tsx+++ b/apps/desktop/src/renderer/features/right-sidebar/AddTabDropdown.tsx@@ -5,7 +5,7 @@* `RolePillDropdown.tsx` 的 WorkerLayoutMenu):* - 容器 12px 圆角 + 1px border-default + surface-elevated + shadow-menu, padding 4* - 分组头 10px / weight 500 / text-tertiary / px-2.5 pt-2 pb-1- * - menu item 28px / rounded-lg(8px) / px-2.5 py-1.5 / text-[12px] / text-primary,+ * - menu item 28px / rounded-lg(8px) / px-2.5 py-1.5 / text-12 / text-primary,* hover bg-surface-hover, disabled opacity-50* - 分隔线 mx-1 my-1 h-px bg-border-default*@@ -228,7 +228,7 @@ export function AddTabDropdown({ anchorRef, onClose, onSelect, existingKinds }:label={t(m.labelKey)}trailing={alreadyOpen ? (- <span className="text-[10px] text-[var(--text-tertiary)]">+ <span className="text-10 text-[var(--text-tertiary)]">{t('rightSidebar.tabs.menu.alreadyOpen')}</span>) : undefined@@ -253,7 +253,7 @@ export function AddTabDropdown({ anchorRef, onClose, onSelect, existingKinds }:function GroupHeader({ label }: { label: string }) {return (- <div className="px-2.5 pt-2 pb-1 text-[10px] font-medium text-[var(--text-tertiary)]">+ <div className="px-2.5 pt-2 pb-1 text-10 font-medium text-[var(--text-tertiary)]">{label}</div>);@@ -281,7 +281,7 @@ function DropdownItem({className={cn(// focus-visible 与 hover 同款背景:键盘打开时首项自动聚焦要有可见落点,// 鼠标交互不触发 focus-visible,无视觉噪音。- 'flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-[13px] leading-snug text-[var(--text-primary)] transition-colors focus:outline-none focus-visible:bg-[var(--surface-hover)]',+ 'flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-13 leading-snug text-[var(--text-primary)] transition-colors focus:outline-none focus-visible:bg-[var(--surface-hover)]',disabled ? 'cursor-not-allowed opacity-50' : 'hover:bg-[var(--surface-hover)]',)}>diff --git a/apps/desktop/src/renderer/features/right-sidebar/EmptyState.tsx b/apps/desktop/src/renderer/features/right-sidebar/EmptyState.tsxindex 4fcd04491e..76dee875fa 100644--- a/apps/desktop/src/renderer/features/right-sidebar/EmptyState.tsx+++ b/apps/desktop/src/renderer/features/right-sidebar/EmptyState.tsx@@ -43,13 +43,13 @@ export function EmptyState({return (<div className="flex min-h-0 flex-1 flex-col items-start gap-8 overflow-y-auto px-10 pb-8 pt-16"><div className="flex w-full flex-col gap-2">- <span className="text-[11px] font-semibold uppercase tracking-[0.08em] text-[var(--text-tertiary)]">+ <span className="text-11 font-semibold uppercase tracking-[0.08em] text-[var(--text-tertiary)]">{t('rightSidebar.tabs.empty.eyebrow')}</span>- <span className="text-[22px] font-semibold leading-tight text-[var(--text-primary)]">+ <span className="text-20 font-semibold leading-tight text-[var(--text-primary)]">{t('rightSidebar.tabs.empty.title')}</span>- <span className="text-[13px] leading-relaxed text-[var(--text-tertiary)]">+ <span className="text-13 leading-relaxed text-[var(--text-tertiary)]">{t('rightSidebar.tabs.empty.desc')}</span></div>@@ -97,7 +97,7 @@ export function EmptyState({onClick={onAddTerminalTab}/></div>- <p className="px-1 text-[11px] text-[var(--text-tertiary)]">+ <p className="px-1 text-11 text-[var(--text-tertiary)]">{t('rightSidebar.tabs.empty.addMoreHint')}</p></div>@@ -129,8 +129,8 @@ function ActionRow({><Icon size={16} className="text-[var(--text-secondary)]" /><span className="flex flex-1 flex-col gap-0.5">- <span className="text-[14px] font-medium text-[var(--text-primary)]">{label}</span>- <span className="text-[11px] text-[var(--text-tertiary)]">{sub}</span>+ <span className="text-14 font-medium text-[var(--text-primary)]">{label}</span>+ <span className="text-11 text-[var(--text-tertiary)]">{sub}</span></span><ChevronRightsize={14}diff --git a/apps/desktop/src/renderer/features/right-sidebar/RightSidebarShell.tsx b/apps/desktop/src/renderer/features/right-sidebar/RightSidebarShell.tsxindex f2bd31bbb9..46c4fd5ac5 100644--- a/apps/desktop/src/renderer/features/right-sidebar/RightSidebarShell.tsx+++ b/apps/desktop/src/renderer/features/right-sidebar/RightSidebarShell.tsx@@ -642,7 +642,7 @@ function PluginBodyHost({/** Plugin 未注册的兜底。 */function PlaceholderBody({ tab, t }: { tab: TabState; t: ReturnType<typeof useTranslation>['t'] }) {return (- <div className="flex flex-1 items-center justify-center text-[12px] text-[var(--text-tertiary)]">+ <div className="flex flex-1 items-center justify-center text-12 text-[var(--text-tertiary)]"><span>{t('rightSidebar.tabs.placeholderHint', { kind: tab.kind })}</span></div>);diff --git a/apps/desktop/src/renderer/features/right-sidebar/TabBar.tsx b/apps/desktop/src/renderer/features/right-sidebar/TabBar.tsxindex 6330d107f9..577f4fbd31 100644--- a/apps/desktop/src/renderer/features/right-sidebar/TabBar.tsx+++ b/apps/desktop/src/renderer/features/right-sidebar/TabBar.tsx@@ -477,7 +477,7 @@ export function TabStrip({closeContextMenu();onClose(id);}}- className="h-7 px-2.5 rounded-md text-[13px] leading-none text-[var(--msg-assistant-text)] focus:bg-[var(--cmd-palette-item-hover)]"+ className="h-7 px-2.5 rounded-md text-13 leading-none text-[var(--msg-assistant-text)] focus:bg-[var(--cmd-palette-item-hover)]">{t('rightSidebar.tabs.contextMenu.close')}</DropdownMenuItem>@@ -489,7 +489,7 @@ export function TabStrip({closeContextMenu();onCloseOthers?.(id);}}- className="h-7 px-2.5 rounded-md text-[13px] leading-none text-[var(--msg-assistant-text)] focus:bg-[var(--cmd-palette-item-hover)] data-[disabled]:opacity-50"+ className="h-7 px-2.5 rounded-md text-13 leading-none text-[var(--msg-assistant-text)] focus:bg-[var(--cmd-palette-item-hover)] data-[disabled]:opacity-50">{t('rightSidebar.tabs.contextMenu.closeOthers')}</DropdownMenuItem>@@ -498,7 +498,7 @@ export function TabStrip({closeContextMenu();onCloseAll?.();}}- className="h-7 px-2.5 rounded-md text-[13px] leading-none text-[var(--msg-assistant-text)] focus:bg-[var(--cmd-palette-item-hover)]"+ className="h-7 px-2.5 rounded-md text-13 leading-none text-[var(--msg-assistant-text)] focus:bg-[var(--cmd-palette-item-hover)]">{t('rightSidebar.tabs.contextMenu.closeAll')}</DropdownMenuItem>@@ -570,7 +570,7 @@ function TabPill({if (e.button === 1) e.preventDefault();}}className={cn(- 'group flex h-[30px] shrink-0 items-center gap-1.5 px-2.5 text-[12px] transition-colors',+ 'group flex h-[30px] shrink-0 items-center gap-1.5 px-2.5 text-12 transition-colors',pillVariant === 'chip' ? 'rounded-lg' : 'rounded-t-lg',active? cn(diff --git a/apps/desktop/src/renderer/features/right-sidebar/plugins/file-browser/FileBrowserBody.tsx b/apps/desktop/src/renderer/features/right-sidebar/plugins/file-browser/FileBrowserBody.tsxindex 7b5ffca3b6..ca4117f707 100644--- a/apps/desktop/src/renderer/features/right-sidebar/plugins/file-browser/FileBrowserBody.tsx+++ b/apps/desktop/src/renderer/features/right-sidebar/plugins/file-browser/FileBrowserBody.tsx@@ -817,7 +817,7 @@ function TreeLoadErrorPlaceholder({const { t } = useTranslation();return (<div className="flex flex-1 flex-col items-center justify-center gap-3 p-6 text-center">- <span className="text-[12px] text-[var(--text-tertiary)]">+ <span className="text-12 text-[var(--text-tertiary)]">{t(kind === 'device-too-old'? 'rightSidebar.fileBrowser.deviceTooOld'@@ -828,7 +828,7 @@ function TreeLoadErrorPlaceholder({<buttontype="button"onClick={onRetry}- className="rounded-md px-2 py-1 text-[12px] text-sidebar-action-icon hover:bg-sidebar-item-active hover:text-sidebar-item-active-foreground"+ className="rounded-md px-2 py-1 text-12 text-sidebar-action-icon hover:bg-sidebar-item-active hover:text-sidebar-item-active-foreground">{t('ccAgent.workdirBrowse.treeAction.refresh')}</button>@@ -844,7 +844,7 @@ function NoWorkdirPlaceholder() {<div className="flex h-12 w-12 items-center justify-center rounded-full bg-[var(--surface-elevated)]"><FolderX size={20} strokeWidth={1.5} className="text-[var(--text-tertiary)]" /></div>- <span className="text-[12px] text-[var(--text-tertiary)]">+ <span className="text-12 text-[var(--text-tertiary)]">{t('rightSidebar.fileBrowser.noWorkdir')}</span></div>diff --git a/apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/ImageDiffPreview.tsx b/apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/ImageDiffPreview.tsxindex 354139e63f..e8f4946827 100644--- a/apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/ImageDiffPreview.tsx+++ b/apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/ImageDiffPreview.tsx@@ -86,7 +86,7 @@ function ImageSidePanel({muted && 'opacity-85',)}>- <div className="flex h-8 items-center justify-between gap-2 border-b border-[var(--border-default)] px-3 text-[11px]">+ <div className="flex h-8 items-center justify-between gap-2 border-b border-[var(--border-default)] px-3 text-11"><span className="font-medium text-[var(--text-primary)]">{label}</span>{meta && <span className="truncate text-[var(--text-tertiary)]">{meta}</span>}</div>@@ -104,7 +104,7 @@ function ImageSidePanel({/></div>) : (- <div className="flex min-h-[180px] flex-col items-center justify-center gap-2 px-4 py-6 text-center text-[12px] text-[var(--text-tertiary)]">+ <div className="flex min-h-[180px] flex-col items-center justify-center gap-2 px-4 py-6 text-center text-12 text-[var(--text-tertiary)]"><AlertTriangle size={18} /><span>{sideMessage(side, maxBytes, t)}</span></div>@@ -172,7 +172,7 @@ export function ImageDiffPreview({if (state.status === 'loading') {return (- <div className="flex min-h-[160px] items-center justify-center gap-2 rounded-[8px] border border-[var(--border-default)] bg-[var(--surface)] text-[12px] text-[var(--text-tertiary)]">+ <div className="flex min-h-[160px] items-center justify-center gap-2 rounded-[8px] border border-[var(--border-default)] bg-[var(--surface)] text-12 text-[var(--text-tertiary)]"><Spinner size={16} /><span>{t('rightSidebar.review.imagePreview.loading')}</span></div>@@ -181,17 +181,17 @@ export function ImageDiffPreview({if (state.status === 'error') {return (- <div className="flex min-h-[160px] flex-col items-center justify-center gap-2 rounded-[8px] border border-[var(--border-default)] bg-[var(--surface)] px-4 py-6 text-center text-[12px] text-[var(--text-tertiary)]">+ <div className="flex min-h-[160px] flex-col items-center justify-center gap-2 rounded-[8px] border border-[var(--border-default)] bg-[var(--surface)] px-4 py-6 text-center text-12 text-[var(--text-tertiary)]"><ImageIcon size={18} /><span>{t('rightSidebar.review.imagePreview.loadFailed')}</span>- <span className="max-w-full truncate text-[11px]">{state.message}</span>+ <span className="max-w-full truncate text-11">{state.message}</span></div>);}if (panels.length === 0) {return (- <div className="flex min-h-[160px] items-center justify-center gap-2 rounded-[8px] border border-[var(--border-default)] bg-[var(--surface)] text-[12px] text-[var(--text-tertiary)]">+ <div className="flex min-h-[160px] items-center justify-center gap-2 rounded-[8px] border border-[var(--border-default)] bg-[var(--surface)] text-12 text-[var(--text-tertiary)]"><ImageIcon size={18} /><span>{t('rightSidebar.review.imagePreview.missing')}</span></div>diff --git a/apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/MarkdownDiffPreview.tsx b/apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/MarkdownDiffPreview.tsxindex 91060d0b53..f7d8925795 100644--- a/apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/MarkdownDiffPreview.tsx+++ b/apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/MarkdownDiffPreview.tsx@@ -44,7 +44,7 @@ function FallbackNotice({}) {const { t } = useTranslation();return (- <div className="mb-2 flex items-start gap-2 rounded-[8px] border border-[var(--border-default)] bg-[var(--surface)] px-3 py-2 text-[11px] leading-relaxed text-[var(--text-secondary)]">+ <div className="mb-2 flex items-start gap-2 rounded-[8px] border border-[var(--border-default)] bg-[var(--surface)] px-3 py-2 text-11 leading-relaxed text-[var(--text-secondary)]"><AlertTriangle size={13} className="mt-0.5 shrink-0 text-[var(--text-tertiary)]" /><span><span className="font-medium text-[var(--text-primary)]">{t('rightSidebar.review.richPreview.fallbackTitle')}</span>@@ -96,7 +96,7 @@ export function MarkdownDiffPreview({if (state.status === 'loading') {return (- <div className="flex min-h-[160px] items-center justify-center gap-2 rounded-[8px] border border-[var(--border-default)] bg-[var(--surface)] text-[12px] text-[var(--text-tertiary)]">+ <div className="flex min-h-[160px] items-center justify-center gap-2 rounded-[8px] border border-[var(--border-default)] bg-[var(--surface)] text-12 text-[var(--text-tertiary)]"><Spinner size={16} /><span>{t('rightSidebar.review.richPreview.loading')}</span></div>@@ -124,7 +124,7 @@ export function MarkdownDiffPreview({return (<divdata-review-markdown-preview="true"- className="min-w-0 rounded-[8px] border border-[var(--border-default)] bg-[var(--surface-elevated)] px-4 py-3 text-[13px] leading-relaxed text-[var(--text-primary)] [&_pre]:max-w-full [&_pre]:overflow-x-auto"+ className="min-w-0 rounded-[8px] border border-[var(--border-default)] bg-[var(--surface-elevated)] px-4 py-3 text-13 leading-relaxed text-[var(--text-primary)] [&_pre]:max-w-full [&_pre]:overflow-x-auto"><MarkdownRendererworkingDir={state.data.baseDir ?? ''}diff --git a/apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/PlainUnifiedDiff.tsx b/apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/PlainUnifiedDiff.tsxindex a76535d5de..73248f761a 100644--- a/apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/PlainUnifiedDiff.tsx+++ b/apps/desktop/src/renderer/features/right-sidebar/plugins/review/DiffViewer/PlainUnifiedDiff.tsx@@ -61,7 +61,7 @@ function prefix(type: DiffLine['type']): string {function HunkSeparator({ count }: { count: number }) {const { t } = useTranslation();return (- <div className="flex min-h-[20px] w-full select-none items-center bg-[var(--surface)] font-mono text-[11px] leading-5 text-[var(--text-tertiary)]">+ <div className="flex min-h-[20px] w-full select-none items-center bg-[var(--surface)] font-mono text-11 leading-5 text-[var(--text-tertiary)]"><span className="w-[3.5rem] shrink-0 border-r border-[var(--border-default)] px-2 text-right text-[var(--diff-line-num)]" /><span className="w-[3.5rem] shrink-0 border-r border-[var(--border-default)] px-2 text-right text-[var(--diff-line-num)]" /><span className="w-5 shrink-0 text-center">⋯</span>@@ -106,7 +106,7 @@ function HunkActionPill({aria-label={action.label}disabled={action.disabled || pending}onClick={() => action.onClick(hunk.index)}- className="inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-[10px] font-medium text-[var(--text-primary)] hover:bg-[var(--surface-hover)] disabled:cursor-not-allowed disabled:opacity-50"+ className="inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-10 font-medium text-[var(--text-primary)] hover:bg-[var(--surface-hover)] disabled:cursor-not-allowed disabled:opacity-50">{pending ? <Spinner size={11} /> : hunkActionIcon(action.icon)}<span className="sr-only">{action.label}</span>@@ -137,7 +137,7 @@ function UnifiedLineRow({wordWrap: boolean;}) {return (- <div className={cn('flex min-h-[20px] w-full font-mono text-[11px] leading-5', lineClass(line.type))}>+ <div className={cn('flex min-h-[20px] w-full font-mono text-11 leading-5', lineClass(line.type))}><span className="w-[3.5rem] shrink-0 select-none border-r border-[var(--border-default)] px-2 text-right text-[var(--diff-line-num)]">{line.oldLineNumber ?? ''}</span>@@ -168,7 +168,7 @@ function SplitLineRow({wordWrap: boolean;}) {return (- <div className="grid min-h-[20px] w-full grid-cols-2 font-mono text-[11px] leading-5">+ <div className="grid min-h-[20px] w-full grid-cols-2 font-mono text-11 leading-5"><SplitCellcell={left}side="left"@@ -400,7 +400,7 @@ export function PlainUnifiedDiff({? diff.error ?? t('rightSidebar.review.kindNotice.unrenderable'): t(`rightSidebar.review.kindNotice.${diff.kind}`, { defaultValue: status });return (- <div className="flex min-w-0 items-center gap-2 rounded-[8px] border border-[var(--border-default)] bg-[var(--surface)] px-3 py-2 text-[12px] text-[var(--text-secondary)]">+ <div className="flex min-w-0 items-center gap-2 rounded-[8px] border border-[var(--border-default)] bg-[var(--surface)] px-3 py-2 text-12 text-[var(--text-secondary)]"><span className="min-w-0 flex-1"><span className="font-medium text-[var(--text-primary)]">{status}</span><span className="ml-2">{notice}</span>@@ -409,7 +409,7 @@ export function PlainUnifiedDiff({<buttontype="button"onClick={() => onOpenFile(diff)}- className="inline-flex h-6 shrink-0 items-center gap-1 rounded-[6px] border border-[var(--border-default)] bg-[var(--surface-elevated)] px-2 text-[11px] font-medium text-[var(--text-primary)] hover:bg-[var(--surface-hover)]"+ className="inline-flex h-6 shrink-0 items-center gap-1 rounded-[6px] border border-[var(--border-default)] bg-[var(--surface-elevated)] px-2 text-11 font-medium text-[var(--text-primary)] hover:bg-[var(--surface-hover)]"><ExternalLink size={12} /><span>{t('rightSidebar.review.openFile')}</span>@@ -420,7 +420,7 @@ export function PlainUnifiedDiff({}if (diff.hunks.length === 0) {return (- <div className="rounded-[8px] border border-[var(--border-default)] bg-[var(--surface)] px-3 py-2 text-[12px] text-[var(--text-tertiary)]">+ <div className="rounded-[8px] border border-[var(--border-default)] bg-[var(--surface)] px-3 py-2 text-12 text-[var(--text-tertiary)]">{t('rightSidebar.review.noRenderableDiff')}</div>);diff --git a/apps/desktop/src/renderer/features/right-sidebar/plugins/review/ReviewTabBody.tsx b/apps/desktop/src/renderer/features/right-sidebar/plugins/review/ReviewTabBody.tsxindex 41f06ce858..a3e574d240 100644--- a/apps/desktop/src/renderer/features/right-sidebar/plugins/review/ReviewTabBody.tsx+++ b/apps/desktop/src/renderer/features/right-sidebar/plugins/review/ReviewTabBody.tsx@@ -501,7 +501,7 @@ function TurnChangeSetReviewBody({ state, ctx, setSource, setSelectedCommitOid }// 桶会话的 workdir,对 worker 的 worktree 语义错误。静态标题,关 tab 退出。<><FileDiffIcon size={15} className="shrink-0 text-[var(--text-secondary)]" />- <span className="min-w-0 truncate text-[12px] font-medium text-[var(--text-primary)]">+ <span className="min-w-0 truncate text-12 font-medium text-[var(--text-primary)]">{t('rightSidebar.review.turn.title')}</span></>@@ -520,13 +520,13 @@ function TurnChangeSetReviewBody({ state, ctx, setSource, setSelectedCommitOid }/>)}<span className="min-w-0 flex-1 truncate" />- <span className="shrink-0 whitespace-nowrap font-mono text-[11px] tabular-nums">+ <span className="shrink-0 whitespace-nowrap font-mono text-11 tabular-nums"><span className="text-[var(--diff-add-fg)]">+{totalAdd}</span>{' '}<span className="text-[var(--diff-del-fg)]">-{totalDel}</span></span></header>{!loading && !error && isPartial && (- <div className="flex shrink-0 items-start gap-2 border-b border-[var(--border-default)] bg-[var(--warning-bg-soft)] px-3 py-2 text-[11px] leading-relaxed text-[var(--text-secondary)]">+ <div className="flex shrink-0 items-start gap-2 border-b border-[var(--border-default)] bg-[var(--warning-bg-soft)] px-3 py-2 text-11 leading-relaxed text-[var(--text-secondary)]"><AlertTriangle size={13} className="mt-0.5 shrink-0 text-[var(--warning-fg)]" /><span>{t('rightSidebar.review.turn.partialNotice')}</span></div>@@ -1168,14 +1168,14 @@ function GitReviewTabBody({ state, ctx, source, setSource, selectedCommitOid, seonSelectCommit={selectCommitSource}onRefreshCommits={commitsState.refresh}/>- <span className="shrink-0 whitespace-nowrap font-mono text-[11px] tabular-nums">+ <span className="shrink-0 whitespace-nowrap font-mono text-11 tabular-nums"><span className="text-[var(--diff-add-fg)]">+{totalAdd}</span>{' '}<span className="text-[var(--diff-del-fg)]">-{totalDel}</span></span>{toolbarShowBranch && (<><div className="mx-0.5 h-4 w-px shrink-0 bg-[var(--border-default)]" />- <div className="flex min-w-0 flex-1 items-center gap-1.5 text-[12px] text-[var(--text-secondary)]">+ <div className="flex min-w-0 flex-1 items-center gap-1.5 text-12 text-[var(--text-secondary)]"><GitBranch size={13} className="shrink-0 text-[var(--text-tertiary)]" /><span className="min-w-0 truncate font-medium text-[var(--text-primary)]">{branchLabel}@@ -1259,7 +1259,7 @@ function GitReviewTabBody({ state, ctx, source, setSource, selectedCommitOid, se</div></div>{effectiveWriteDisabledReasons.length > 0 && (- <div className="mt-2 flex items-start gap-2 rounded-[8px] border border-[var(--border-default)] bg-[var(--warning-bg-soft)] px-2.5 py-2 text-[11px] leading-relaxed text-[var(--text-secondary)]">+ <div className="mt-2 flex items-start gap-2 rounded-[8px] border border-[var(--border-default)] bg-[var(--warning-bg-soft)] px-2.5 py-2 text-11 leading-relaxed text-[var(--text-secondary)]"><AlertTriangle size={13} className="mt-0.5 shrink-0 text-[var(--warning-fg)]" /><span>{t('rightSidebar.review.writeDisabledNotice', {reasons: writeDisabledReasonText,@@ -1501,7 +1501,7 @@ function AheadBehindPill({return (<Tip text={label}><span- className="shrink-0 rounded-full bg-[var(--surface-chip)] px-1.5 py-0.5 font-mono text-[10px] text-[var(--text-secondary)]"+ className="shrink-0 rounded-full bg-[var(--surface-chip)] px-1.5 py-0.5 font-mono text-10 text-[var(--text-secondary)]"aria-label={label}>↑{ahead} ↓{behind}@@ -1651,7 +1651,7 @@ function CommitOrPushDropdown({if (!triggerDisabled) setOpen(true);}}className={cn(- 'inline-flex h-6 shrink-0 items-center rounded-full border border-[var(--border-default)] bg-[var(--surface-elevated)] text-[10px] font-medium text-[var(--text-primary)] hover:bg-[var(--surface-hover)]',+ 'inline-flex h-6 shrink-0 items-center rounded-full border border-[var(--border-default)] bg-[var(--surface-elevated)] text-10 font-medium text-[var(--text-primary)] hover:bg-[var(--surface-hover)]',iconOnly ? 'w-6 justify-center px-0' : 'gap-1 px-2.5',triggerDisabled && 'cursor-not-allowed opacity-50',)}@@ -1668,10 +1668,10 @@ function CommitOrPushDropdown({onKeyDown={handleKeyDown}className="w-[min(22rem,calc(100vw-24px))] rounded-[10px] border border-[var(--cmd-palette-border)] bg-[var(--cmd-palette-bg)] p-2 shadow-[var(--shadow-menu)]">- <div className="flex min-w-0 items-center gap-2 rounded-[8px] bg-[var(--surface-chip)] px-2.5 py-2 text-[12px]">+ <div className="flex min-w-0 items-center gap-2 rounded-[8px] bg-[var(--surface-chip)] px-2.5 py-2 text-12"><GitBranch size={13} className="shrink-0 text-[var(--text-tertiary)]" /><span className="min-w-0 flex-1 truncate font-medium text-[var(--text-primary)]">{branchLabel}</span>- <span className="shrink-0 whitespace-nowrap font-mono text-[11px] tabular-nums">+ <span className="shrink-0 whitespace-nowrap font-mono text-11 tabular-nums"><span className="text-[var(--diff-add-fg)]">+{totalAdd}</span>{' '}<span className="text-[var(--diff-del-fg)]">-{totalDel}</span></span>@@ -1687,7 +1687,7 @@ function CommitOrPushDropdown({}}rows={4}placeholder={t('rightSidebar.review.commit.placeholder')}- className="min-h-[92px] w-full resize-none rounded-[8px] border border-[var(--border-default)] bg-[var(--surface-elevated)] px-2.5 py-2 text-[12px] leading-relaxed text-[var(--text-primary)] placeholder:text-[var(--text-placeholder)] focus:outline-none focus:ring-2 focus:ring-[var(--focus-ring-soft)]"+ className="min-h-[92px] w-full resize-none rounded-[8px] border border-[var(--border-default)] bg-[var(--surface-elevated)] px-2.5 py-2 text-12 leading-relaxed text-[var(--text-primary)] placeholder:text-[var(--text-placeholder)] focus:outline-none focus:ring-2 focus:ring-[var(--focus-ring-soft)]"/></div><DropdownMenuItem@@ -1695,7 +1695,7 @@ function CommitOrPushDropdown({event.preventDefault();setIncludeUnstaged((current) => !current);}}- className="mt-1 flex h-8 items-center gap-2 rounded-[6px] px-2 text-[12px] text-[var(--text-primary)] focus:bg-[var(--cmd-palette-item-hover)]"+ className="mt-1 flex h-8 items-center gap-2 rounded-[6px] px-2 text-12 text-[var(--text-primary)] focus:bg-[var(--cmd-palette-item-hover)]"><span className="flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-[3px] border border-[var(--border-default)] bg-[var(--surface-elevated)] text-[var(--text-primary)]">{includeUnstaged && <Check size={10} />}@@ -1730,7 +1730,7 @@ function CommitOrPushDropdown({}}>{push.ahead > 0 && (- <span className="rounded-full bg-[var(--surface-chip)] px-1 font-mono text-[9px] text-[var(--text-secondary)]">+ <span className="rounded-full bg-[var(--surface-chip)] px-1 font-mono text-10 text-[var(--text-secondary)]">↑{push.ahead}</span>)}@@ -1768,7 +1768,7 @@ function CommitDropdownAction({onSelect();}}className={cn(- 'flex h-8 items-center gap-2 rounded-[6px] px-2 text-[12px] text-[var(--text-primary)] focus:bg-[var(--cmd-palette-item-hover)]',+ 'flex h-8 items-center gap-2 rounded-[6px] px-2 text-12 text-[var(--text-primary)] focus:bg-[var(--cmd-palette-item-hover)]',disabled && 'cursor-not-allowed opacity-50',)}>@@ -1776,7 +1776,7 @@ function CommitDropdownAction({<span className="min-w-0 flex-1 truncate">{label}</span>{children}{shortcut && (- <span className="shrink-0 rounded bg-[var(--surface-chip)] px-1 py-0.5 font-mono text-[9px] text-[var(--text-tertiary)]">+ <span className="shrink-0 rounded bg-[var(--surface-chip)] px-1 py-0.5 font-mono text-10 text-[var(--text-tertiary)]">{shortcut}</span>)}@@ -1887,7 +1887,7 @@ function FileJumpPopover({onChange={(event) => setQuery(event.target.value)}placeholder={t('rightSidebar.review.fileJump.placeholder')}aria-label={t('rightSidebar.review.fileJump.placeholder')}- className="h-7 w-full rounded-full border border-[var(--border-default)] bg-[var(--surface-elevated)] pl-7 pr-2 text-[12px] text-[var(--text-primary)] placeholder:text-[var(--text-placeholder)] focus:outline-none focus:ring-2 focus:ring-[var(--focus-ring-soft)]"+ className="h-7 w-full rounded-full border border-[var(--border-default)] bg-[var(--surface-elevated)] pl-7 pr-2 text-12 text-[var(--text-primary)] placeholder:text-[var(--text-placeholder)] focus:outline-none focus:ring-2 focus:ring-[var(--focus-ring-soft)]"/></label><div@@ -1896,7 +1896,7 @@ function FileJumpPopover({className="mt-2 max-h-[280px] overflow-y-auto">{results.length === 0 ? (- <div className="px-2 py-4 text-[11px] text-[var(--text-tertiary)]">+ <div className="px-2 py-4 text-11 text-[var(--text-tertiary)]">{t('rightSidebar.review.fileJump.empty')}</div>) : (@@ -1913,11 +1913,11 @@ function FileJumpPopover({index === selectedIndex && 'bg-[var(--cmd-palette-item-hover)]',)}>- <span className="truncate text-[12px] font-medium text-[var(--text-primary)]">+ <span className="truncate text-12 font-medium text-[var(--text-primary)]">{result.fileName}</span>{result.directory && (- <span className="truncate text-[10px] text-[var(--text-tertiary)]">+ <span className="truncate text-10 text-[var(--text-tertiary)]">{result.directory}</span>)}@@ -1925,7 +1925,7 @@ function FileJumpPopover({)))}{overflowCount > 0 && (- <div className="px-2 py-1.5 text-[10px] text-[var(--text-tertiary)]">+ <div className="px-2 py-1.5 text-10 text-[var(--text-tertiary)]">{t('rightSidebar.review.fileJump.more', { count: overflowCount })}</div>)}@@ -2053,7 +2053,7 @@ export function ReviewMoreMenu({onCopyGitApply();}}className={cn(- 'flex h-8 items-center gap-2 rounded-[6px] px-2 text-[12px] text-[var(--text-primary)] focus:bg-[var(--cmd-palette-item-hover)]',+ 'flex h-8 items-center gap-2 rounded-[6px] px-2 text-12 text-[var(--text-primary)] focus:bg-[var(--cmd-palette-item-hover)]',!canCopyGitApply && 'cursor-not-allowed opacity-50',)}>@@ -2099,7 +2099,7 @@ export function ReviewMoreMenu({)}<DropdownMenuItemonSelect={() => onWordWrapChange(!wordWrap)}- className="flex h-8 items-center gap-2 rounded-[6px] px-2 text-[12px] text-[var(--text-primary)] focus:bg-[var(--cmd-palette-item-hover)]"+ className="flex h-8 items-center gap-2 rounded-[6px] px-2 text-12 text-[var(--text-primary)] focus:bg-[var(--cmd-palette-item-hover)]">{wordWrap? <WrapText size={12} className="text-[var(--text-secondary)]" />@@ -2108,7 +2108,7 @@ export function ReviewMoreMenu({</DropdownMenuItem><DropdownMenuItemonSelect={() => onWordDiffChange(!wordDiff)}- className="flex h-8 items-center gap-2 rounded-[6px] px-2 text-[12px] text-[var(--text-primary)] focus:bg-[var(--cmd-palette-item-hover)]"+ className="flex h-8 items-center gap-2 rounded-[6px] px-2 text-12 text-[var(--text-primary)] focus:bg-[var(--cmd-palette-item-hover)]">{wordDiff? <Diff size={12} className="text-[var(--text-secondary)]" />@@ -2117,7 +2117,7 @@ export function ReviewMoreMenu({</DropdownMenuItem><DropdownMenuItemonSelect={() => onHideWhitespaceChange(!hideWhitespace)}- className="flex h-8 items-center gap-2 rounded-[6px] px-2 text-[12px] text-[var(--text-primary)] focus:bg-[var(--cmd-palette-item-hover)]"+ className="flex h-8 items-center gap-2 rounded-[6px] px-2 text-12 text-[var(--text-primary)] focus:bg-[var(--cmd-palette-item-hover)]">{hideWhitespace? <EyeOff size={12} className="text-[var(--text-secondary)]" />@@ -2157,7 +2157,7 @@ function DiffExpansionMenuItem({onToggle();}}className={cn(- 'flex h-8 items-center gap-2 rounded-[6px] px-2 text-[12px] text-[var(--text-primary)] focus:bg-[var(--cmd-palette-item-hover)]',+ 'flex h-8 items-center gap-2 rounded-[6px] px-2 text-12 text-[var(--text-primary)] focus:bg-[var(--cmd-palette-item-hover)]',disabled && 'cursor-not-allowed opacity-50',)}>@@ -2188,7 +2188,7 @@ function FileTreeMenuItem({return (<DropdownMenuItemonSelect={onToggle}- className="flex h-8 items-center gap-2 rounded-[6px] px-2 text-[12px] text-[var(--text-primary)] focus:bg-[var(--cmd-palette-item-hover)]"+ className="flex h-8 items-center gap-2 rounded-[6px] px-2 text-12 text-[var(--text-primary)] focus:bg-[var(--cmd-palette-item-hover)]">{preferenceVisible? <FolderOpen size={12} className="text-[var(--text-secondary)]" />@@ -2248,7 +2248,7 @@ export function SourceDropdown({type="button"aria-label={t('rightSidebar.review.sourceDropdownAria')}className={cn(- 'flex h-7 shrink-0 items-center justify-between rounded-full border border-transparent bg-transparent px-1.5 text-left text-[12px] font-medium text-[var(--text-primary)] hover:bg-[var(--surface-hover)]',+ 'flex h-7 shrink-0 items-center justify-between rounded-full border border-transparent bg-transparent px-1.5 text-left text-12 font-medium text-[var(--text-primary)] hover:bg-[var(--surface-hover)]',layout === 'wide' ? 'max-w-[11rem]' : 'max-w-[10rem]',)}>@@ -2281,7 +2281,7 @@ export function SourceDropdown({if (open) onRefreshCommits?.();}}>- <DropdownMenuSubTrigger className="flex h-8 items-center gap-2 rounded-[6px] px-2 text-[12px] text-[var(--text-primary)] focus:bg-[var(--cmd-palette-item-hover)] data-[state=open]:bg-[var(--cmd-palette-item-hover)]">+ <DropdownMenuSubTrigger className="flex h-8 items-center gap-2 rounded-[6px] px-2 text-12 text-[var(--text-primary)] focus:bg-[var(--cmd-palette-item-hover)] data-[state=open]:bg-[var(--cmd-palette-item-hover)]"><span className="min-w-0 flex-1 truncate">{t('rightSidebar.review.source.commit')}</span><span className="flex h-4 w-4 shrink-0 items-center justify-center text-[var(--text-secondary)]">{source === 'commit' && <Check size={12} />}@@ -2297,7 +2297,7 @@ export function SourceDropdown({<><DropdownMenuItemdisabled- className="flex h-8 items-center gap-2 rounded-[6px] px-2 text-[12px] text-[var(--text-secondary)]"+ className="flex h-8 items-center gap-2 rounded-[6px] px-2 text-12 text-[var(--text-secondary)]"><AlertTriangle size={12} /><span>{t('rightSidebar.review.commitMenu.error')}</span>@@ -2307,7 +2307,7 @@ export function SourceDropdown({event.preventDefault();onRefreshCommits?.();}}- className="flex h-8 items-center gap-2 rounded-[6px] px-2 text-[12px] text-[var(--text-primary)] focus:bg-[var(--cmd-palette-item-hover)]"+ className="flex h-8 items-center gap-2 rounded-[6px] px-2 text-12 text-[var(--text-primary)] focus:bg-[var(--cmd-palette-item-hover)]"><Spinner icon={RefreshCw} size={12} spinning={commitsLoading} className="text-[var(--text-secondary)]" /><span>{t('rightSidebar.review.commitMenu.retry')}</span>@@ -2316,7 +2316,7 @@ export function SourceDropdown({) : !commitMenuLoaded || (commitsLoading && commitList.length === 0) ? (<DropdownMenuItemdisabled- className="flex h-8 items-center gap-2 rounded-[6px] px-2 text-[12px] text-[var(--text-secondary)]"+ className="flex h-8 items-center gap-2 rounded-[6px] px-2 text-12 text-[var(--text-secondary)]"><Spinner icon={RefreshCw} size={12} /><span>{t('rightSidebar.review.commitMenu.loading')}</span>@@ -2324,7 +2324,7 @@ export function SourceDropdown({) : commitList.length === 0 ? (<DropdownMenuItemdisabled- className="flex h-8 items-center gap-2 rounded-[6px] px-2 text-[12px] text-[var(--text-secondary)]"+ className="flex h-8 items-center gap-2 rounded-[6px] px-2 text-12 text-[var(--text-secondary)]"><FileDiffIcon size={12} /><span>{t('rightSidebar.review.commitMenu.empty')}</span>@@ -2337,12 +2337,12 @@ export function SourceDropdown({<DropdownMenuItemonSelect={() => onSelectCommit?.(commit.oid)}className={cn(- 'flex h-8 min-w-0 items-center gap-2 rounded-[6px] px-2 text-[12px] text-[var(--text-primary)] focus:bg-[var(--cmd-palette-item-hover)]',+ 'flex h-8 min-w-0 items-center gap-2 rounded-[6px] px-2 text-12 text-[var(--text-primary)] focus:bg-[var(--cmd-palette-item-hover)]',active && 'bg-[var(--surface-chip)]',)}><span className="min-w-0 flex-1 truncate">{title}</span>- <span className="shrink-0 text-[10px] text-[var(--text-tertiary)]">+ <span className="shrink-0 text-10 text-[var(--text-tertiary)]">{t('rightSidebar.review.commitMenu.relativeTime', {time: formatSidebarTime(new Date(commit.authorTime * 1000).toISOString(), t),})}@@ -2399,7 +2399,7 @@ function SourceDropdownItem({onSelect={() => {if (option.source !== 'turn') onChange(option.source);}}- className="flex h-8 items-center gap-2 rounded-[6px] px-2 text-[12px] text-[var(--text-primary)] focus:bg-[var(--cmd-palette-item-hover)]"+ className="flex h-8 items-center gap-2 rounded-[6px] px-2 text-12 text-[var(--text-primary)] focus:bg-[var(--cmd-palette-item-hover)]"><span className="min-w-0 flex-1 truncate">{option.label}</span><SourceCountBadge count={option.count} />@@ -2495,18 +2495,18 @@ function OperationNotice({const errorDetails = errorLines.slice(1).join('\n').trim();if (!error && failed.length === 0) return null;return (- <div className="mt-2 rounded-[8px] border border-[var(--error-border)] bg-[var(--error-bg)] px-2.5 py-2 text-[11px] leading-relaxed text-[var(--error-fg)]">+ <div className="mt-2 rounded-[8px] border border-[var(--error-border)] bg-[var(--error-bg)] px-2.5 py-2 text-11 leading-relaxed text-[var(--error-fg)]">{errorTitle ?? t('rightSidebar.review.actions.partialFailure', {succeeded: summary?.succeeded.length ?? 0,failed: failed.length,})}{errorDetails && (- <div className="mt-1 max-h-24 overflow-auto whitespace-pre-wrap break-words font-mono text-[10px] text-[var(--error-fg-strong)]">+ <div className="mt-1 max-h-24 overflow-auto whitespace-pre-wrap break-words font-mono text-10 text-[var(--error-fg-strong)]">{errorDetails}</div>)}{failed.length > 0 && (- <div className="mt-1 max-h-24 overflow-auto whitespace-pre-wrap break-words font-mono text-[10px] text-[var(--error-fg-strong)]">+ <div className="mt-1 max-h-24 overflow-auto whitespace-pre-wrap break-words font-mono text-10 text-[var(--error-fg-strong)]">{failed[0].path}: {failed[0].stderr || failed[0].error}</div>)}@@ -2776,7 +2776,7 @@ function DiffList({onRichMarkdownPreviewChange={onRichMarkdownPreviewChange}/>{topNotice && (- <div className="shrink-0 border-b border-[var(--border-default)] bg-[var(--warning-bg-soft)] px-3 py-2 text-[11px] leading-relaxed text-[var(--text-secondary)]">+ <div className="shrink-0 border-b border-[var(--border-default)] bg-[var(--warning-bg-soft)] px-3 py-2 text-11 leading-relaxed text-[var(--text-secondary)]">{topNotice}</div>)}@@ -2963,12 +2963,12 @@ export function ReviewFileTreeSidebar({onChange={(event) => setQuery(event.target.value)}placeholder={t('rightSidebar.review.fileTree.filterPlaceholder')}aria-label={t('rightSidebar.review.fileTree.filterPlaceholder')}- className="h-7 w-full rounded-full border border-[var(--border-default)] bg-[var(--surface-elevated)] pl-7 pr-2 text-[12px] text-[var(--text-primary)] placeholder:text-[var(--text-placeholder)] focus:outline-none focus:ring-2 focus:ring-[var(--focus-ring-soft)]"+ className="h-7 w-full rounded-full border border-[var(--border-default)] bg-[var(--surface-elevated)] pl-7 pr-2 text-12 text-[var(--text-primary)] placeholder:text-[var(--text-placeholder)] focus:outline-none focus:ring-2 focus:ring-[var(--focus-ring-soft)]"/></label></div>{flatNodes.length === 0 ? (- <div className="px-3 py-4 text-[11px] leading-relaxed text-[var(--text-tertiary)]">+ <div className="px-3 py-4 text-11 leading-relaxed text-[var(--text-tertiary)]">{t('rightSidebar.review.fileTree.empty')}</div>) : (@@ -3029,7 +3029,7 @@ function ReviewFileTreeRow({role="treeitem"aria-expanded={!collapsed}onClick={() => onToggleDirectory(node.id)}- className="flex h-7 w-full min-w-0 items-center gap-1 pr-2 text-left text-[12px] text-[var(--text-secondary)] hover:bg-[var(--surface-hover)]"+ className="flex h-7 w-full min-w-0 items-center gap-1 pr-2 text-left text-12 text-[var(--text-secondary)] hover:bg-[var(--surface-hover)]"style={{ paddingLeft }}>{collapsed ? <ChevronRight size={12} className="shrink-0 text-[var(--text-tertiary)]" /> : <ChevronDown size={12} className="shrink-0 text-[var(--text-tertiary)]" />}@@ -3048,7 +3048,7 @@ function ReviewFileTreeRow({aria-selected={active}onClick={() => onSelectFile(node.diff)}className={cn(- 'flex h-7 w-full min-w-0 items-center pr-2 text-left text-[12px] text-[var(--text-secondary)] hover:bg-[var(--surface-hover)]',+ 'flex h-7 w-full min-w-0 items-center pr-2 text-left text-12 text-[var(--text-secondary)] hover:bg-[var(--surface-hover)]',active && 'bg-[var(--surface-chip)] text-[var(--text-primary)]',)}style={{ paddingLeft: paddingLeft + 18 }}@@ -3147,12 +3147,12 @@ export function ReviewDiffListHeader({}, [rowEl]);return (- <div ref={setRowEl} className="flex h-9 shrink-0 items-center gap-2 border-b border-[var(--border-default)] px-3 text-[12px]">+ <div ref={setRowEl} className="flex h-9 shrink-0 items-center gap-2 border-b border-[var(--border-default)] px-3 text-12"><div data-testid="review-diff-list-header-left" className="flex min-w-0 flex-1 items-center gap-2">{branchBaseControl && (<>{showBranchBaseLabel && (- <span data-testid="review-branch-base-label" className="shrink-0 text-[11px] text-[var(--text-tertiary)]">+ <span data-testid="review-branch-base-label" className="shrink-0 text-11 text-[var(--text-tertiary)]">{t('rightSidebar.review.branch.baseLabel')}</span>)}@@ -3253,7 +3253,7 @@ function DiffViewModeToggle({type="button"onClick={() => onChange(option.mode)}className={cn(- 'rounded-full px-2 text-[10px] font-medium text-[var(--text-secondary)] hover:text-[var(--text-primary)]',+ 'rounded-full px-2 text-10 font-medium text-[var(--text-secondary)] hover:text-[var(--text-primary)]',option.mode === mode && 'bg-[var(--surface-elevated)] text-[var(--text-primary)] shadow-[var(--shadow-menu)]',)}>@@ -3369,7 +3369,7 @@ export function CappedSourceView({richMarkdownPreview={richMarkdownPreview}onRichMarkdownPreviewChange={onRichMarkdownPreviewChange}/>- <div className="shrink-0 border-b border-[var(--border-default)] bg-[var(--warning-bg-soft)] px-3 py-2 text-[11px] leading-relaxed text-[var(--text-secondary)]">+ <div className="shrink-0 border-b border-[var(--border-default)] bg-[var(--warning-bg-soft)] px-3 py-2 text-11 leading-relaxed text-[var(--text-secondary)]">{notice}</div><div ref={contentRef} className="relative min-h-0 min-w-0 flex-1 overflow-hidden">@@ -3437,12 +3437,12 @@ function CappedFileState({desc: string;}) {return (- <div className="m-3 rounded-[8px] border border-[var(--border-default)] bg-[var(--surface)] px-3 py-3 text-[12px] leading-relaxed text-[var(--text-secondary)]">+ <div className="m-3 rounded-[8px] border border-[var(--border-default)] bg-[var(--surface)] px-3 py-3 text-12 leading-relaxed text-[var(--text-secondary)]"><div className="flex items-center gap-2 font-medium text-[var(--text-primary)]"><span className="text-[var(--text-tertiary)]">{icon}</span><span>{title}</span></div>- <div className="mt-1 break-words text-[11px] text-[var(--text-tertiary)]">{desc}</div>+ <div className="mt-1 break-words text-11 text-[var(--text-tertiary)]">{desc}</div></div>);}@@ -3658,7 +3658,7 @@ export function BranchBaseDropdown({type="button"disabled={candidates.length === 0}aria-label={tooltip}- className="flex h-6 min-w-0 max-w-full items-center justify-between rounded-full border border-[var(--border-default)] bg-[var(--surface-elevated)] px-2 text-left text-[12px] text-[var(--text-primary)] hover:bg-[var(--surface-hover)] disabled:cursor-not-allowed disabled:opacity-60"+ className="flex h-6 min-w-0 max-w-full items-center justify-between rounded-full border border-[var(--border-default)] bg-[var(--surface-elevated)] px-2 text-left text-12 text-[var(--text-primary)] hover:bg-[var(--surface-hover)] disabled:cursor-not-allowed disabled:opacity-60"><span className="min-w-0 truncate">{label}</span><ChevronDown size={13} className="ml-1.5 shrink-0 text-[var(--text-tertiary)]" />@@ -3674,7 +3674,7 @@ export function BranchBaseDropdown({<DropdownMenuItemkey={candidate.refName}onSelect={() => onSelectBase(candidate.refName)}- className="flex h-8 items-center gap-2 rounded-[6px] px-2 text-[12px] text-[var(--text-primary)] focus:bg-[var(--cmd-palette-item-hover)]"+ className="flex h-8 items-center gap-2 rounded-[6px] px-2 text-12 text-[var(--text-primary)] focus:bg-[var(--cmd-palette-item-hover)]"><span className="flex h-4 w-4 items-center justify-center text-[var(--text-secondary)]">{candidate.refName === selectedBaseRef && <Check size={12} />}@@ -3728,13 +3728,13 @@ function CenteredState({return (<div className="flex flex-1 flex-col items-center justify-center gap-3 px-6 text-center"><div className="text-[var(--text-tertiary)]">{icon}</div>- <p className="text-[13px] font-medium text-[var(--text-primary)]">{title}</p>- <p className="max-w-[260px] text-[11px] leading-relaxed text-[var(--text-tertiary)]">{desc}</p>+ <p className="text-13 font-medium text-[var(--text-primary)]">{title}</p>+ <p className="max-w-[260px] text-11 leading-relaxed text-[var(--text-tertiary)]">{desc}</p>{actionLabel && onAction && (<buttontype="button"onClick={onAction}- className="mt-1 rounded-full border border-[var(--border-default)] bg-[var(--surface-elevated)] px-3 py-1.5 text-[11px] font-medium text-[var(--text-primary)] hover:bg-[var(--surface-hover)]"+ className="mt-1 rounded-full border border-[var(--border-default)] bg-[var(--surface-elevated)] px-3 py-1.5 text-11 font-medium text-[var(--text-primary)] hover:bg-[var(--surface-hover)]">{actionLabel}</button>@@ -3772,7 +3772,7 @@ function ActionButton({onClick();}}className={cn(- 'inline-flex h-6 items-center justify-center rounded-full border border-[var(--border-default)] bg-[var(--surface-elevated)] text-[10px] font-medium text-[var(--text-primary)] hover:bg-[var(--surface-hover)] disabled:cursor-not-allowed disabled:opacity-50',+ 'inline-flex h-6 items-center justify-center rounded-full border border-[var(--border-default)] bg-[var(--surface-elevated)] text-10 font-medium text-[var(--text-primary)] hover:bg-[var(--surface-hover)] disabled:cursor-not-allowed disabled:opacity-50',className,iconOnly ? 'w-6 px-0' : 'gap-1 px-2',)}@@ -3985,8 +3985,8 @@ function FileRow({<ChevronRight size={12} className="shrink-0 text-[var(--text-tertiary)]" />)}<span className="min-w-0 flex-1">- <span className="block truncate text-[13px] font-medium text-[var(--text-primary)]">{fileName}</span>- <span className="block truncate text-[10px] text-[var(--text-tertiary)]">+ <span className="block truncate text-13 font-medium text-[var(--text-primary)]">{fileName}</span>+ <span className="block truncate text-10 text-[var(--text-tertiary)]">{showsPathTransition ? (<><span className="opacity-70">{diff.oldPath}</span>@@ -3998,16 +3998,16 @@ function FileRow({</span></button>{changeChip && (- <span className="shrink-0 rounded-full bg-[var(--surface-chip)] px-2 py-0.5 text-[10px] text-[var(--text-secondary)]">+ <span className="shrink-0 rounded-full bg-[var(--surface-chip)] px-2 py-0.5 text-10 text-[var(--text-secondary)]">{changeChip}</span>)}{diff.kind !== 'text' && (- <span className="shrink-0 rounded-full bg-[var(--surface-chip)] px-2 py-0.5 text-[10px] text-[var(--text-secondary)]">+ <span className="shrink-0 rounded-full bg-[var(--surface-chip)] px-2 py-0.5 text-10 text-[var(--text-secondary)]">{t(`rightSidebar.review.status.${diff.kind}`, { defaultValue: diff.kind })}</span>)}- <span className="shrink-0 font-mono text-[11px] tabular-nums">+ <span className="shrink-0 font-mono text-11 tabular-nums"><span className="text-[var(--diff-add-fg)]">+{diff.additions}</span>{' '}<span className="text-[var(--diff-del-fg)]">-{diff.deletions}</span></span>@@ -4047,12 +4047,12 @@ function FileRow({{expanded && (<div className="min-w-0 px-3 pb-3">{showRenamePartialNotice && (- <div className="mb-2 rounded-[8px] border border-[var(--border-default)] bg-[var(--surface)] px-3 py-2 text-[12px] text-[var(--text-secondary)]">+ <div className="mb-2 rounded-[8px] border border-[var(--border-default)] bg-[var(--surface)] px-3 py-2 text-12 text-[var(--text-secondary)]">{t('rightSidebar.review.renamePartialNotice')}</div>)}{showTypechangePartialNotice && (- <div className="mb-2 rounded-[8px] border border-[var(--border-default)] bg-[var(--surface)] px-3 py-2 text-[12px] text-[var(--text-secondary)]">+ <div className="mb-2 rounded-[8px] border border-[var(--border-default)] bg-[var(--surface)] px-3 py-2 text-12 text-[var(--text-secondary)]">{t('rightSidebar.review.typechangePartialNotice')}</div>)}diff --git a/apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/BrowserChrome.tsx b/apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/BrowserChrome.tsxindex 66792bac79..74a52ea438 100644--- a/apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/BrowserChrome.tsx+++ b/apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/BrowserChrome.tsx@@ -259,7 +259,7 @@ export const BrowserChrome = forwardRef<BrowserChromeHandle, BrowserChromeProps>onBlur={handleBlur}placeholder={t('rightSidebar.browser.urlPlaceholder')}className={cn(- 'min-w-0 flex-1 bg-transparent text-[12px] leading-none text-[var(--text-primary)]',+ 'min-w-0 flex-1 bg-transparent text-12 leading-none text-[var(--text-primary)]','placeholder:text-[var(--text-tertiary)] outline-none',)}/>@@ -268,7 +268,7 @@ export const BrowserChrome = forwardRef<BrowserChromeHandle, BrowserChromeProps>type="button"onClick={beginEdit}// 整个 pill 中部区域都可点 → 进编辑态。truncate 让长 URL 单行省略。- className="min-w-0 flex-1 truncate text-left text-[12px] leading-none text-[var(--text-primary)]"+ className="min-w-0 flex-1 truncate text-left text-12 leading-none text-[var(--text-primary)]"title={url}>{displayValue}diff --git a/apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/BrowserCommentPopover.tsx b/apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/BrowserCommentPopover.tsxindex 0b7faa7424..d6e00675a9 100644--- a/apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/BrowserCommentPopover.tsx+++ b/apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/BrowserCommentPopover.tsx@@ -263,7 +263,7 @@ export function BrowserCommentPopover({const inputCls = cn('w-full rounded-md border border-[var(--border-default)] bg-transparent',- 'px-2 py-1 text-[12px] leading-[1.4] text-[var(--text-primary)]',+ 'px-2 py-1 text-12 leading-[1.4] text-[var(--text-primary)]','placeholder:text-[var(--text-tertiary)] outline-none','focus:border-[var(--focus-ring)] focus:ring-1 focus:ring-[var(--focus-ring-soft)]',);@@ -287,7 +287,7 @@ export function BrowserCommentPopover({placeholder={t('rightSidebar.browser.commentPlaceholder')}className={cn('w-full resize-none rounded-md border border-[var(--border-default)] bg-transparent',- 'px-2 py-1.5 text-[12px] leading-[1.5] text-[var(--text-primary)]',+ 'px-2 py-1.5 text-12 leading-[1.5] text-[var(--text-primary)]','placeholder:text-[var(--text-tertiary)] outline-none','focus:border-[var(--focus-ring)] focus:ring-1 focus:ring-[var(--focus-ring-soft)]',)}@@ -297,7 +297,7 @@ export function BrowserCommentPopover({{designBaseline && showStyles && (<div className="flex flex-col gap-1.5 rounded-md border border-[var(--border-default)] p-2">{designBaseline.editableText !== null && (- <label className="flex items-center gap-2 text-[11px] text-[var(--text-secondary)]">+ <label className="flex items-center gap-2 text-11 text-[var(--text-secondary)]"><span className="w-[88px] shrink-0 truncate">{t('rightSidebar.browser.styleTextLabel')}</span>@@ -317,7 +317,7 @@ export function BrowserCommentPopover({return (<labelkey={property}- className="flex items-center gap-2 text-[11px] text-[var(--text-secondary)]"+ className="flex items-center gap-2 text-11 text-[var(--text-secondary)]">{/* CSS 属性名是技术标识,保持原文不 i18n。 */}<span className="w-[88px] shrink-0 truncate font-mono">{property}</span>@@ -347,7 +347,7 @@ export function BrowserCommentPopover({onClick={handleResetStyles}disabled={submitting}className={cn(- 'flex h-5 items-center rounded px-1.5 text-[11px]',+ 'flex h-5 items-center rounded px-1.5 text-11','text-[var(--text-tertiary)] hover:bg-sidebar-item-active hover:text-sidebar-item-active-foreground',)}>@@ -384,7 +384,7 @@ export function BrowserCommentPopover({onClick={onCancel}disabled={submitting}className={cn(- 'flex h-6 items-center rounded-md px-2 text-[12px]',+ 'flex h-6 items-center rounded-md px-2 text-12','text-[var(--text-secondary)] hover:bg-sidebar-item-active hover:text-sidebar-item-active-foreground',submitting && 'opacity-40',)}@@ -396,7 +396,7 @@ export function BrowserCommentPopover({onClick={handleSubmit}disabled={!canSubmit}className={cn(- 'flex h-6 items-center rounded-md px-2.5 text-[12px] font-medium',+ 'flex h-6 items-center rounded-md px-2.5 text-12 font-medium','bg-[var(--accent-cta-bg)] text-[var(--accent-pure-cta-fg)]','hover:bg-[var(--accent-hover)]',!canSubmit && 'cursor-not-allowed opacity-40',diff --git a/apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/BrowserTabBody.tsx b/apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/BrowserTabBody.tsxindex 8f140f86a3..15d21052dc 100644--- a/apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/BrowserTabBody.tsx+++ b/apps/desktop/src/renderer/features/right-sidebar/plugins/web-browser/BrowserTabBody.tsx@@ -520,7 +520,7 @@ export function BrowserTabBody({ state, ctx, active, shellVisible }: BrowserTabBclassName={cn('absolute left-1/2 top-2 z-10 flex -translate-x-1/2 items-center gap-2','rounded-full border border-[var(--border-default)] bg-[var(--surface-elevated)]',- 'py-1 pl-3 pr-1 text-[11px] text-[var(--text-secondary)] shadow-sm',+ 'py-1 pl-3 pr-1 text-11 text-[var(--text-secondary)] shadow-sm',)}><Gauge size={12} strokeWidth={2} className="shrink-0 text-[var(--warning-fg)]" />@@ -531,7 +531,7 @@ export function BrowserTabBody({ state, ctx, active, shellVisible }: BrowserTabBbrowser.dismissResourceAlert();void forceKillBrowserTab(tabId);}}- className="rounded-full px-2 py-0.5 text-[11px] font-medium text-[var(--error-fg)] hover:bg-[var(--surface-hover)]"+ className="rounded-full px-2 py-0.5 text-11 font-medium text-[var(--error-fg)] hover:bg-[var(--surface-hover)]">{t('rightSidebar.browser.resourceAlert.terminate')}</button>@@ -551,7 +551,7 @@ export function BrowserTabBody({ state, ctx, active, shellVisible }: BrowserTabBclassName={cn('pointer-events-none absolute left-1/2 top-2 z-10 -translate-x-1/2','rounded-full border border-[var(--border-default)] bg-[var(--surface-elevated)]',- 'px-3 py-1 text-[11px] text-[var(--text-secondary)]',+ 'px-3 py-1 text-11 text-[var(--text-secondary)]',)}>{t('rightSidebar.browser.commentModeHint')}@@ -623,13 +623,13 @@ function BrowserCrashBanner({<div className="absolute inset-0 flex items-center justify-center bg-[var(--overlay-modal)] backdrop-blur-sm"><div className="flex max-w-xs flex-col items-center gap-3 rounded-lg border border-[var(--border-default)] bg-[var(--surface-elevated)] px-6 py-5 text-center"><AlertTriangle size={28} strokeWidth={1.5} className="text-[var(--error-fg)]" />- <div className="text-[13px] font-medium text-[var(--text-primary)]">{t(titleKey)}</div>- <div className="text-[12px] text-[var(--text-secondary)]">{t(descKey)}</div>+ <div className="text-13 font-medium text-[var(--text-primary)]">{t(titleKey)}</div>+ <div className="text-12 text-[var(--text-secondary)]">{t(descKey)}</div><div className="mt-1 flex items-center gap-2"><buttontype="button"onClick={onRecover}- className="flex h-7 items-center gap-1.5 rounded-md bg-[var(--accent-cta-bg)] px-3 text-[12px] font-medium text-[var(--accent-pure-cta-fg)] hover:bg-[var(--accent-hover)]"+ className="flex h-7 items-center gap-1.5 rounded-md bg-[var(--accent-cta-bg)] px-3 text-12 font-medium text-[var(--accent-pure-cta-fg)] hover:bg-[var(--accent-hover)]"><RotateCw size={12} strokeWidth={2.5} />{t('rightSidebar.browser.crash.reload')}@@ -638,7 +638,7 @@ function BrowserCrashBanner({<buttontype="button"onClick={onForceKill}- className="flex h-7 items-center rounded-md border border-[var(--border-default)] px-3 text-[12px] font-medium text-[var(--error-fg)] hover:bg-[var(--surface-hover)]"+ className="flex h-7 items-center rounded-md border border-[var(--border-default)] px-3 text-12 font-medium text-[var(--error-fg)] hover:bg-[var(--surface-hover)]">{t('rightSidebar.browser.crash.forceKill')}</button>diff --git a/apps/desktop/src/renderer/features/scheduler/components/RunHistoryCard.tsx b/apps/desktop/src/renderer/features/scheduler/components/RunHistoryCard.tsxindex c8b7b6110f..ea825cc820 100644--- a/apps/desktop/src/renderer/features/scheduler/components/RunHistoryCard.tsx+++ b/apps/desktop/src/renderer/features/scheduler/components/RunHistoryCard.tsx@@ -51,7 +51,7 @@ function StatusChip({ status }: { status: RunStatus }) {className={cn(// 高度去掉固定值,由 py + 文字行高决定,避免 13px 字号被 18px 框压扁'inline-flex items-center gap-1.5 rounded-full px-2.5 py-1',- 'text-[12px] font-medium leading-none whitespace-nowrap',+ 'text-12 font-medium leading-none whitespace-nowrap',filled? 'bg-[var(--chat-input-chip-bg)] text-[var(--msg-assistant-text)]': 'border border-[var(--cmd-palette-border)] bg-transparent text-[var(--cmd-palette-item-meta)]',diff --git a/apps/desktop/src/renderer/features/scheduler/components/ScheduleChips.tsx b/apps/desktop/src/renderer/features/scheduler/components/ScheduleChips.tsxindex 09ab96cc01..d5f35dd691 100644--- a/apps/desktop/src/renderer/features/scheduler/components/ScheduleChips.tsx+++ b/apps/desktop/src/renderer/features/scheduler/components/ScheduleChips.tsx@@ -73,7 +73,7 @@ export const ChipButton = React.forwardRef<HTMLButtonElement, ChipButtonProps>(fdisabled={disabled}onClick={onClick}className={cn(- 'inline-flex h-[34px] shrink-0 items-center rounded-full text-[13px] leading-none transition-colors',+ 'inline-flex h-[34px] shrink-0 items-center rounded-full text-13 leading-none transition-colors','gap-1.5 px-3',variant === 'toolbar'? cn(@@ -91,7 +91,7 @@ export const ChipButton = React.forwardRef<HTMLButtonElement, ChipButtonProps>(f{...rest}>{icon && <span className="shrink-0 -translate-y-px">{icon}</span>}- {label && <span className="truncate text-center text-[13px] font-normal leading-[1.33]">{label}</span>}+ {label && <span className="truncate text-center text-13 font-normal leading-[1.33]">{label}</span>}<ChevronDown size={13} className="shrink-0 opacity-60" /></button>);@@ -238,12 +238,12 @@ export function ScheduleSettingsButton({className={cn(POPOVER_BASE, 'w-[240px]')}onWheel={stopWheel}>- <div className="px-2 pt-1.5 pb-1 text-[13px] font-medium text-[var(--cmd-palette-item-meta)] dark:text-[var(--settings-section-desc)]">+ <div className="px-2 pt-1.5 pb-1 text-13 font-medium text-[var(--cmd-palette-item-meta)] dark:text-[var(--settings-section-desc)]">{t('scheduler.chips.advanced')}</div>{enabled && (- <p className="px-2 pb-1 text-[11px] leading-4 text-[var(--cmd-palette-item-meta)] dark:text-[var(--settings-section-desc)]">+ <p className="px-2 pb-1 text-11 leading-4 text-[var(--cmd-palette-item-meta)] dark:text-[var(--settings-section-desc)]">{t('scheduler.chips.worktreeHint')}</p>)}@@ -255,7 +255,7 @@ export function ScheduleSettingsButton({onClick={() => !switchDisabled && onEnabledChange(!enabled)}disabled={switchDisabled}className={cn(- 'flex h-8 w-full items-center gap-2 rounded-md px-2 text-[13px] transition-colors',+ 'flex h-8 w-full items-center gap-2 rounded-md px-2 text-13 transition-colors','hover:bg-[var(--surface-hover)] dark:hover:bg-[var(--settings-btn-secondary-hover-bg)]','disabled:cursor-not-allowed disabled:opacity-50',enabled ? 'text-[var(--msg-assistant-text)] dark:text-[var(--msg-assistant-text)]' : 'text-[var(--cmd-palette-item-meta)] dark:text-[var(--settings-section-desc)]',@@ -455,7 +455,7 @@ export function ScheduleChip({);})}</div>- <p className="px-1 pt-1.5 text-[11px] leading-4 text-[var(--cmd-palette-item-meta)] dark:text-[var(--settings-section-desc)]">+ <p className="px-1 pt-1.5 text-11 leading-4 text-[var(--cmd-palette-item-meta)] dark:text-[var(--settings-section-desc)]">{t(timingMode === 'interval' && !intervalIsPreset? 'scheduler.chips.timingMode.intervalUnsupportedHint'@@ -509,10 +509,10 @@ function ExactIntervalPanel({ summary }: { summary: string }) {const { t } = useTranslation();return (<div className="min-w-0 flex-1 rounded-xl border border-[var(--cmd-palette-border)] bg-[var(--cmd-palette-bg)] p-3 shadow-lg dark:border-[var(--cmd-palette-border)] dark:bg-[var(--cmd-palette-bg)]">- <div className="text-[13px] font-medium text-[var(--msg-assistant-text)]">+ <div className="text-13 font-medium text-[var(--msg-assistant-text)]">{t('scheduler.chips.timingMode.currentExact', { schedule: summary })}</div>- <p className="pt-2 text-[11px] leading-4 text-[var(--cmd-palette-item-meta)] dark:text-[var(--settings-section-desc)]">+ <p className="pt-2 text-11 leading-4 text-[var(--cmd-palette-item-meta)] dark:text-[var(--settings-section-desc)]">{t('scheduler.chips.timingMode.exactIntervalPanelHint')}</p></div>@@ -547,7 +547,7 @@ function ScheduleConfigPanel({onFocus={commit}onChange={(intervalMinutes) => onUpdate({ mode: 'intervalMinutes', intervalMinutes })}/>- <span className="text-[13px] text-[var(--cmd-palette-item-meta)] dark:text-[var(--settings-section-desc)]">{t('scheduler.chips.scheduleField.minutesSuffix')}</span>+ <span className="text-13 text-[var(--cmd-palette-item-meta)] dark:text-[var(--settings-section-desc)]">{t('scheduler.chips.scheduleField.minutesSuffix')}</span></div><PreviewPilltext={@@ -566,7 +566,7 @@ function ScheduleConfigPanel({onFocus={commit}onChange={(intervalHours) => onUpdate({ mode: 'interval', intervalHours })}/>- <span className="text-[13px] text-[var(--cmd-palette-item-meta)] dark:text-[var(--settings-section-desc)]">{t('scheduler.chips.scheduleField.hoursSuffix')}</span>+ <span className="text-13 text-[var(--cmd-palette-item-meta)] dark:text-[var(--settings-section-desc)]">{t('scheduler.chips.scheduleField.hoursSuffix')}</span></div><PreviewPill text={panelConfig.intervalHours === 1 ? t('scheduler.chips.schedulePreview.everyHour') : t('scheduler.chips.schedulePreview.everyHours', { count: panelConfig.intervalHours })} /></>@@ -777,7 +777,7 @@ function TimePicker({setOpen(next);}}>- <div className="grid h-[34px] w-[112px] grid-cols-[1fr_24px] items-center rounded-lg border border-[var(--settings-input-border)] bg-background px-2 text-[13px] font-medium text-[var(--settings-input-text)] dark:border-[var(--settings-input-border)] dark:text-[var(--settings-input-text)]">+ <div className="grid h-[34px] w-[112px] grid-cols-[1fr_24px] items-center rounded-lg border border-[var(--settings-input-border)] bg-background px-2 text-13 font-medium text-[var(--settings-input-text)] dark:border-[var(--settings-input-border)] dark:text-[var(--settings-input-text)]"><div className="flex items-center justify-center"><inputref={hourInputRef}@@ -809,7 +809,7 @@ function TimePicker({}}}aria-label={t('scheduler.chips.scheduleField.scheduleHourAria')}- className="w-5 bg-transparent text-center text-[13px] font-medium outline-none"+ className="w-5 bg-transparent text-center text-13 font-medium outline-none"/><span className="select-none text-[var(--cmd-palette-item-meta)] dark:text-[var(--settings-section-desc)]">:</span><input@@ -842,7 +842,7 @@ function TimePicker({}}}aria-label={t('scheduler.chips.scheduleField.scheduleMinuteAria')}- className="w-5 bg-transparent text-center text-[13px] font-medium outline-none"+ className="w-5 bg-transparent text-center text-13 font-medium outline-none"/></div><PopoverTrigger asChild>@@ -894,7 +894,7 @@ function TimeColumn({}) {return (<div className="min-w-0">- <div className="px-2 pb-1 text-[11px] text-[var(--cmd-palette-item-meta)] dark:text-[var(--settings-section-desc)]">{label}</div>+ <div className="px-2 pb-1 text-11 text-[var(--cmd-palette-item-meta)] dark:text-[var(--settings-section-desc)]">{label}</div><div className="max-h-[180px] overflow-y-auto pr-1" onWheel={stopWheel}>{options.map((option) => {const active = option === value;@@ -904,7 +904,7 @@ function TimeColumn({type="button"onClick={() => onChange(option)}className={cn(- 'flex h-7 w-full items-center justify-center rounded-md text-[13px] transition-colors',+ 'flex h-7 w-full items-center justify-center rounded-md text-13 transition-colors',active? 'bg-[var(--chat-input-chip-bg)] font-medium text-[var(--msg-assistant-text)] dark:bg-[var(--chat-input-chip-bg)] dark:text-[var(--msg-assistant-text)]': 'text-[var(--cmd-palette-item-meta)] hover:bg-[var(--surface-hover)] dark:text-[var(--settings-section-desc)] dark:hover:bg-[var(--settings-btn-secondary-hover-bg)]',@@ -943,7 +943,7 @@ function WeekdayRow({onFocus={onFocus}onClick={() => onChange(day)}className={cn(- 'flex h-8 w-[38px] items-center justify-center rounded-full border text-[13px] transition-colors',+ 'flex h-8 w-[38px] items-center justify-center rounded-full border text-13 transition-colors',active? 'border-transparent bg-[var(--chat-input-chip-bg)] font-medium text-[var(--msg-assistant-text)] dark:bg-[var(--chat-input-chip-bg)] dark:text-[var(--msg-assistant-text)]': 'border-[var(--cmd-palette-border)] bg-transparent text-[var(--cmd-palette-item-meta)] hover:bg-[var(--confirm-btn-secondary-hover)] dark:border-[var(--cmd-palette-border)] dark:hover:bg-[var(--settings-btn-secondary-hover-bg)]',@@ -977,7 +977,7 @@ function MonthDayRow({return (<div className="flex min-h-[34px] w-full items-center gap-1.5">- <span className="text-[13px] text-[var(--cmd-palette-item-meta)] dark:text-[var(--settings-section-desc)]">{t('scheduler.chips.scheduleField.daySuffix')}</span>+ <span className="text-13 text-[var(--cmd-palette-item-meta)] dark:text-[var(--settings-section-desc)]">{t('scheduler.chips.scheduleField.daySuffix')}</span><inputtype="text"inputMode="numeric"@@ -1003,7 +1003,7 @@ function MonthDayRow({function PreviewPill({ text }: { text: string }) {return (- <div className="flex h-[34px] w-full items-center rounded-full bg-background px-3 text-[13px] text-[var(--cmd-palette-item-meta)] dark:text-[var(--settings-section-desc)]">+ <div className="flex h-[34px] w-full items-center rounded-full bg-background px-3 text-13 text-[var(--cmd-palette-item-meta)] dark:text-[var(--settings-section-desc)]">{text}</div>);@@ -1011,7 +1011,7 @@ function PreviewPill({ text }: { text: string }) {function inputPillClass(className?: string) {return cn(- 'h-[34px] rounded-lg border px-3 text-[13px] outline-none',+ 'h-[34px] rounded-lg border px-3 text-13 outline-none','border-[var(--settings-input-border)] bg-background text-[var(--settings-input-text)]','dark:border-[var(--settings-input-border)] dark:text-[var(--settings-input-text)]',className,diff --git a/apps/desktop/src/renderer/features/scheduler/components/ScheduleFormDialog.tsx b/apps/desktop/src/renderer/features/scheduler/components/ScheduleFormDialog.tsxindex 52ad154497..be60eb19ac 100644--- a/apps/desktop/src/renderer/features/scheduler/components/ScheduleFormDialog.tsx+++ b/apps/desktop/src/renderer/features/scheduler/components/ScheduleFormDialog.tsx@@ -715,7 +715,7 @@ export function ScheduleFormDialog({<summary className="w-fit cursor-pointer select-none text-[var(--settings-btn-secondary-text)] hover:text-[var(--msg-assistant-text)]">{t('scheduler.editor.script.protocolExample')}</summary>- <pre className="mt-2 overflow-x-auto rounded-xl border border-[var(--settings-input-border)] bg-[var(--settings-input-bg)] p-3 font-mono text-[11px] leading-[1.5] text-[var(--settings-input-text)]">+ <pre className="mt-2 overflow-x-auto rounded-xl border border-[var(--settings-input-border)] bg-[var(--settings-input-bg)] p-3 font-mono text-11 leading-[1.5] text-[var(--settings-input-text)]"><code>{SCRIPT_PROTOCOL_PYTHON_EXAMPLE}</code></pre></details>@@ -1294,7 +1294,7 @@ export function ScheduleFormDialog({</div>)}{hookGenPath && (- <span className="truncate font-mono text-[11px] text-[var(--cmd-palette-item-meta)]">+ <span className="truncate font-mono text-11 text-[var(--cmd-palette-item-meta)]">{t('scheduler.editor.preRunHook.aiDone', { path: hookGenPath })}</span>)}@@ -1319,7 +1319,7 @@ export function ScheduleFormDialog({})}</span>{(hookTestResult.stdout.trim() || hookTestResult.stderr.trim()) && (- <span className="min-w-0 flex-1 truncate font-mono text-[11px] text-[var(--cmd-palette-item-meta)]">+ <span className="min-w-0 flex-1 truncate font-mono text-11 text-[var(--cmd-palette-item-meta)]">{(hookTestResult.stdout.trim() || hookTestResult.stderr.trim()).split('\n')[0]}</span>)}diff --git a/apps/desktop/src/renderer/features/scheduler/components/ScheduleStatusChip.tsx b/apps/desktop/src/renderer/features/scheduler/components/ScheduleStatusChip.tsxindex e981bed969..280673ae6c 100644--- a/apps/desktop/src/renderer/features/scheduler/components/ScheduleStatusChip.tsx+++ b/apps/desktop/src/renderer/features/scheduler/components/ScheduleStatusChip.tsx@@ -35,7 +35,7 @@ export function ScheduleStatusChip({ variant, className }: Props) {return (<spanclassName={cn(- 'inline-flex h-6 items-center gap-1 rounded-full px-2.5 text-[11px] font-medium',+ 'inline-flex h-6 items-center gap-1 rounded-full px-2.5 text-11 font-medium','leading-none whitespace-nowrap',isFilled? 'bg-[var(--chat-input-chip-bg)] text-[var(--msg-assistant-text)]'diff --git a/apps/desktop/src/renderer/features/scheduler/components/TaskListCell.tsx b/apps/desktop/src/renderer/features/scheduler/components/TaskListCell.tsxindex 3883f5c248..7cc6db35f8 100644--- a/apps/desktop/src/renderer/features/scheduler/components/TaskListCell.tsx+++ b/apps/desktop/src/renderer/features/scheduler/components/TaskListCell.tsx@@ -396,7 +396,7 @@ export function TaskListCell({{!isEditing && isProjectSchedule && (<spanclassName={cn(- 'shrink-0 inline-flex items-center gap-1 rounded-full border px-2 py-[2px] text-[11px] font-medium leading-none',+ 'shrink-0 inline-flex items-center gap-1 rounded-full border px-2 py-[2px] text-11 font-medium leading-none','border-[var(--cmd-palette-border)] text-[var(--cmd-palette-item-meta)]',)}title={t('scheduler.projectAutomation.cell.tooltip')}@@ -408,7 +408,7 @@ export function TaskListCell({{!isEditing && (s.manual || !s.recurring) && (<spanclassName={cn(- 'shrink-0 translate-x-[2px] rounded-full border px-2 py-[2px] text-[11px] font-medium leading-none',+ 'shrink-0 translate-x-[2px] rounded-full border px-2 py-[2px] text-11 font-medium leading-none','border-[var(--cmd-palette-border)] text-[var(--cmd-palette-item-meta)]',)}>@@ -443,7 +443,7 @@ export function TaskListCell({{costText && (<spanclassName={cn(- 'ml-auto shrink-0 text-[11px]',+ 'ml-auto shrink-0 text-11',selected? 'text-[var(--settings-section-desc)]': 'text-[var(--cmd-palette-item-meta)]',diff --git a/apps/desktop/src/renderer/features/skillhub/SkillhubDetailView.tsx b/apps/desktop/src/renderer/features/skillhub/SkillhubDetailView.tsxindex 234a579bb5..420c7d34ad 100644--- a/apps/desktop/src/renderer/features/skillhub/SkillhubDetailView.tsx+++ b/apps/desktop/src/renderer/features/skillhub/SkillhubDetailView.tsx@@ -102,7 +102,7 @@ const KIND_ICON: Record<SkillhubKind, LucideIcon> = {};// Compact chip — tuned to sit cleanly to the right of the h2 title (text-lg).-// h-5 + text-[11px] keeps the visual weight subdued so the title leads.+// h-5 + text-11 keeps the visual weight subdued so the title leads.function KindChip({ kind }: { kind: SkillhubKind }) {const Icon = KIND_ICON[kind];return (@@ -116,7 +116,7 @@ function KindChip({ kind }: { kind: SkillhubKind }) {{/* relative top-[1px]: optical correction — Inter's cap sits high inthe line-box at small sizes, so text-only nudge gets it levelwith the icon center without affecting layout. */}- <span className="relative top-[0.5px] text-[11px] font-medium leading-none">{KIND_LABEL[kind]}</span>+ <span className="relative top-[0.5px] text-11 font-medium leading-none">{KIND_LABEL[kind]}</span></span>);}@@ -132,7 +132,7 @@ function ScopeChip({ scope }: { scope: SkillhubScope }) {)}><Icon size={11} className="shrink-0 text-[var(--settings-theme-icon)]" />- <span className="relative top-[0.5px] text-[11px] font-medium leading-none">+ <span className="relative top-[0.5px] text-11 font-medium leading-none">{scope === 'global' ? t('skillhub.detail.scopeGlobal') : t('skillhub.detail.scopeProject')}</span></span>@@ -1878,7 +1878,7 @@ export function SkillhubDetailView() {'bg-[var(--settings-btn-secondary-bg)] text-[var(--msg-assistant-text)]',)}>- <span className="relative top-[0.5px] text-[11px] font-medium leading-none">+ <span className="relative top-[0.5px] text-11 font-medium leading-none">{le.label}</span></span>@@ -2068,7 +2068,7 @@ export function SkillhubDetailView() {) : (<span className={cn('inline-flex h-9 items-center gap-1.5 rounded-full border px-[14px]',- 'text-[13px] text-[var(--cmd-palette-item-meta)]',+ 'text-13 text-[var(--cmd-palette-item-meta)]','border-[var(--confirm-btn-secondary-border)]',)}><CheckCircle size={12} className="shrink-0" />@@ -2080,7 +2080,7 @@ export function SkillhubDetailView() {{detailAction?.kind === 'installed-tag' && (<span className={cn('inline-flex h-9 items-center gap-1.5 rounded-full border px-[14px]',- 'text-[13px] text-[var(--cmd-palette-item-meta)]',+ 'text-13 text-[var(--cmd-palette-item-meta)]','border-[var(--confirm-btn-secondary-border)]',)}><CheckCircle size={12} className="shrink-0" />diff --git a/apps/desktop/src/renderer/hooks/useFontSettings.ts b/apps/desktop/src/renderer/hooks/useFontSettings.tsindex 11b0e6a572..542297e318 100644--- a/apps/desktop/src/renderer/hooks/useFontSettings.ts+++ b/apps/desktop/src/renderer/hooks/useFontSettings.ts@@ -43,9 +43,9 @@ const MIN_UI_FONT_SIZE = APPEARANCE_LIMITS.uiSize.min;const MIN_FONT_SIZE = APPEARANCE_LIMITS.codeSize.min;const MAX_FONT_SIZE = APPEARANCE_LIMITS.codeSize.max;-const UI_TEXT_TOKEN_SIZES = [- 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,-] as const;+// DESIGN.md §3 numeric 字号白名单的运行时镜像;applyFontSettings 会按+// 用户 UI 字号缩放覆写 globals.css 的静态默认值。+const UI_TEXT_TOKEN_SIZES = [10, 11, 12, 13, 14, 15, 16, 18, 20, 24, 28] as const;const SCALED_TAILWIND_TOKENS = {xs: 12,diff --git a/apps/desktop/src/renderer/lib/__tests__/utils.test.ts b/apps/desktop/src/renderer/lib/__tests__/utils.test.tsindex 0000d727f7..ae773d4eb0 100644--- a/apps/desktop/src/renderer/lib/__tests__/utils.test.ts+++ b/apps/desktop/src/renderer/lib/__tests__/utils.test.ts@@ -12,10 +12,17 @@ describe('cn', () => {it('still resolves conflicts for custom font sizes, default font sizes, and colors', () => {expect(cn('text-14', 'text-16')).toBe('text-16');- expect(cn('text-[15px]', 'text-[var(--msg-assistant-text)]')).toBe(- 'text-[15px] text-[var(--msg-assistant-text)]',+ expect(cn('text-15', 'text-[var(--msg-assistant-text)]')).toBe(+ 'text-15 text-[var(--msg-assistant-text)]',);expect(cn('text-red-500', 'text-blue-500')).toBe('text-blue-500');expect(cn('text-sm', 'text-lg')).toBe('text-lg');});++ it('treats every DESIGN.md numeric font-size token as one merge group', () => {+ const sizes = [10, 11, 12, 13, 14, 15, 16, 18, 20, 24, 28];+ for (const size of sizes.slice(1)) {+ expect(cn('text-10', `text-${size}`)).toBe(`text-${size}`);+ }+ });});diff --git a/apps/desktop/src/renderer/lib/utils.ts b/apps/desktop/src/renderer/lib/utils.tsindex 2ba0dd39d3..842ffac36d 100644--- a/apps/desktop/src/renderer/lib/utils.ts+++ b/apps/desktop/src/renderer/lib/utils.ts@@ -7,7 +7,6 @@ const customTwMerge = extendTailwindMerge({'font-size': [{text: [- '9','10','11','12',@@ -15,17 +14,9 @@ const customTwMerge = extendTailwindMerge({'14','15','16',- '17','18',- '19','20',- '21',- '22',- '23','24',- '25',- '26',- '27','28',],},diff --git a/apps/desktop/src/renderer/panels/PanelChrome.tsx b/apps/desktop/src/renderer/panels/PanelChrome.tsxindex 49c363198b..003c9d8b1c 100644--- a/apps/desktop/src/renderer/panels/PanelChrome.tsx+++ b/apps/desktop/src/renderer/panels/PanelChrome.tsx@@ -103,7 +103,7 @@ export function PanelChrome({className="flex h-[36px] shrink-0 items-center justify-between gap-2 border-b border-[var(--border-default)] bg-[var(--panel-bg)] px-3"style={{ WebkitAppRegion: 'no-drag' } as CSSProperties}>- <div className="min-w-0 truncate text-[12px] font-medium text-[var(--text-secondary)]">+ <div className="min-w-0 truncate text-12 font-medium text-[var(--text-secondary)]">{title}</div>{(actions || showMaximize || onDetach || onMinimize || onClose) && (diff --git a/apps/desktop/src/renderer/styles/globals.css b/apps/desktop/src/renderer/styles/globals.cssindex c377046426..b4aab7955d 100644--- a/apps/desktop/src/renderer/styles/globals.css+++ b/apps/desktop/src/renderer/styles/globals.css@@ -43,7 +43,9 @@--text-3xl-line-height: 36px;--text-4xl-line-height: 40px;--text-5xl-line-height: 48px;- --text-9: 9px;+ /* DESIGN.md §3 的 numeric 字号白名单默认值。运行时会由+ useFontSettings 按用户 UI 缩放覆写;档位须与 tailwind.config.ts、+ UI_TEXT_TOKEN_SIZES、tailwind-merge 字号组保持权威来源与消费端一致。 */--text-10: 10px;--text-11: 11px;--text-12: 12px;@@ -51,17 +53,9 @@--text-14: 14px;--text-15: 15px;--text-16: 16px;- --text-17: 17px;--text-18: 18px;- --text-19: 19px;--text-20: 20px;- --text-21: 21px;- --text-22: 22px;- --text-23: 23px;--text-24: 24px;- --text-25: 25px;- --text-26: 26px;- --text-27: 27px;--text-28: 28px;/* Motion token(全局动效档位,规范见 DESIGN.md §14.4):新增过渡/动画一律@@ -375,6 +369,18 @@ html:lang(ko) {.chat-rail-compact [data-chat-input-root] .text-\[15px\] {font-size: 15px;}+.chat-rail-compact [data-chat-input-root] .text-12 {+ font-size: var(--text-12);+}+.chat-rail-compact [data-chat-input-root] .text-13 {+ font-size: var(--text-13);+}+.chat-rail-compact [data-chat-input-root] .text-14 {+ font-size: var(--text-14);+}+.chat-rail-compact [data-chat-input-root] .text-15 {+ font-size: var(--text-15);+}/* Tiptap ChatInput — placeholder hook & chip alignment(command-palette F2.5). The Placeholder extension injectsdiff --git a/apps/desktop/tailwind.config.ts b/apps/desktop/tailwind.config.tsindex 1d4c2ada96..9a7997213c 100644--- a/apps/desktop/tailwind.config.ts+++ b/apps/desktop/tailwind.config.ts@@ -57,6 +57,8 @@ const config: Config = {fontFamily: {mono: ['var(--app-font-code, var(--app-font-code-default))'],},+ // DESIGN.md §3 numeric 字号白名单的 Tailwind 权威来源之一。规范正本+ // 与三处权威来源代码由守卫互验;lib/utils.ts 是单独校验的消费端去重列表。fontSize: {xs: ['var(--text-xs)', { lineHeight: 'var(--text-xs-line-height)' }],sm: ['var(--text-sm)', { lineHeight: 'var(--text-sm-line-height)' }],@@ -67,7 +69,6 @@ const config: Config = {'3xl': ['var(--text-3xl)', { lineHeight: 'var(--text-3xl-line-height)' }],'4xl': ['var(--text-4xl)', { lineHeight: 'var(--text-4xl-line-height)' }],'5xl': ['var(--text-5xl)', { lineHeight: 'var(--text-5xl-line-height)' }],- 9: 'var(--text-9)',10: 'var(--text-10)',11: 'var(--text-11)',12: 'var(--text-12)',@@ -75,17 +76,9 @@ const config: Config = {14: 'var(--text-14)',15: 'var(--text-15)',16: 'var(--text-16)',- 17: 'var(--text-17)',18: 'var(--text-18)',- 19: 'var(--text-19)',20: 'var(--text-20)',- 21: 'var(--text-21)',- 22: 'var(--text-22)',- 23: 'var(--text-23)',24: 'var(--text-24)',- 25: 'var(--text-25)',- 26: 'var(--text-26)',- 27: 'var(--text-27)',28: 'var(--text-28)',},borderRadius: {diff --git a/docs/design-rules/DESIGN.md b/docs/design-rules/DESIGN.mdindex 08b23557b2..3927889f9f 100644--- a/docs/design-rules/DESIGN.md+++ b/docs/design-rules/DESIGN.md@@ -146,7 +146,7 @@ The grayscale rule is near-absolute. The following are the **only** sanctioned n- **UI 段:{10, 11, 12, 13, 14, 15, 16}px;标题 / 内容段:{18, 20, 24, 28}px。** 下限 10px —— 9px 及以下禁止(再小就不是文字是纹理)。- **下限约束的是「开发者写死的档位」,不约束运行期缩放结果。** 用户可把 UI 字号设到 `appearanceSettings.uiSize` 允许的最小值 12(默认 14),`useFontSettings` 按 `uiSize / 14` 缩放并 `Math.round`,此时 `--text-10` 与 `--text-11` 都会算成 9px(两档在该设置下失去区分)。这是用户主动选择的整体缩小,不是违反下限;守卫也只检查源码里写的档位,不检查运行期计算值。**若要保住 10px 视觉下限,应在字号设置侧(提高 `uiSize` 下限或改缩放曲线)解决,而不是往白名单里加更小的档位。**- **写法**:一律用 `tailwind.config.ts` 的 `text-<n>` token 类(映射 `--text-<n>` 变量;doc 紧凑模式与后续字号缩放能力都挂在这层变量上,任意值类会静默漏掉这些机制)。语义类 `text-xs / text-sm / text-base / text-lg` 只收编存量(等值 12 / 14 / 16 / 18);源码侧禁止使用 `text-xl` 及以上语义档位(由守卫拦截),配置侧 `theme.extend.fontSize` 的 `xl..5xl` 遗留项不在本轮删除范围,避免删除后静默回退到 Tailwind 内置固定值、失去用户字号缩放;其清理另行处理。**禁止新增任意值 `text-[Npx]`(含一切小数)与白名单外档位**;需要新档先改本表与权威来源,再进组件。-- **镜像约定(目标态;施工由 #1553 承接)**:当前 main 尚未建立白名单与字号实现的镜像关系。四个权威来源必须同步:本表(规范正本)与以下三处代码——`apps/desktop/tailwind.config.ts` 的 `fontSize`(类名可用性与变量映射;漏掉则 `text-<n>` 类根本不存在)、`apps/desktop/src/renderer/styles/globals.css` 的静态 `--text-<n>` 默认值(漏掉则变量未定义并回退到继承值)、`apps/desktop/src/renderer/hooks/useFontSettings.ts` 的 `UI_TEXT_TOKEN_SIZES` 运行时生效值(含用户字号缩放;漏掉则该档位不随用户设置缩放,反向漏则会写出已删档位的陈旧变量)。另有一个消费端需保持一致:`apps/desktop/src/renderer/lib/utils.ts` 的 tailwind-merge `classGroups['font-size']` 负责类名去重,不产生字号值;漏登记会让 `cn()` 合并两个字号类失效,两个类会同时留在 DOM 上。该消费端单独做一致性校验,不计入四个权威来源镜像。同一 hook 的 `SCALED_TAILWIND_TOKENS` 负责语义类运行时缩放,需与 Tailwind 语义类映射保持同步,但不改变本白名单的具体档位。PR4 的守卫按四个权威来源做镜像断言,并单独校验消费端一致性。+- **镜像约定(已成立,由 #1553 完成)**:四个权威来源必须同步:本表(规范正本)与以下三处代码——`apps/desktop/tailwind.config.ts` 的 `fontSize`(类名可用性与变量映射;漏掉则 `text-<n>` 类根本不存在)、`apps/desktop/src/renderer/styles/globals.css` 的静态 `--text-<n>` 默认值(漏掉则变量未定义并回退到继承值)、`apps/desktop/src/renderer/hooks/useFontSettings.ts` 的 `UI_TEXT_TOKEN_SIZES` 运行时生效值(含用户字号缩放;漏掉则该档位不随用户设置缩放,反向漏则会写出已删档位的陈旧变量)。另有一个消费端需保持一致:`apps/desktop/src/renderer/lib/utils.ts` 的 tailwind-merge `classGroups['font-size']` 负责类名去重,不产生字号值;漏登记会让 `cn()` 合并两个字号类失效,两个类会同时留在 DOM 上。该消费端单独做一致性校验,不计入四个权威来源镜像。同一 hook 的 `SCALED_TAILWIND_TOKENS` 负责语义类运行时缩放,需与 Tailwind 语义类映射保持同步,但不改变本白名单的具体档位。PR4 的守卫按四个权威来源做镜像断言,并单独校验消费端一致性。- 品牌画布域(登录 / Splash 家族等设计 px 坐标系表面)不映射本白名单:字面量只允许进画布常量文件(`loginDesignTokens.ts` 的地位,对齐手机端 `loginSkinLayout.ts`)**或下表登记的自包含品牌页生成器**(`oauthResultPage.ts` 整页由 main 侧生成,其内嵌 raw CSS 即该页的常量载体),组件消费端照常受守卫扫描。### 排版豁免登记表(2026-08,issue #1505)@@ -170,7 +170,8 @@ The grayscale rule is near-absolute. The following are the **only** sanctioned n以下漂移**已知且本轮明确不治理**,后人见到不要当「漏网」顺手修,治理需另立 issue:-- line-height:桌面存在 `leading-[1.45]` / `leading-[1.55]` 等微调档与无单位 / px 混轨。+- line-height **档位统一**:桌面存在 `leading-[1.45]` / `leading-[1.55]` 等微调档与无单位 / px 混轨,本轮不收敛成统一阶梯。+ - **但有一条例外,已在 #1553 治理完毕**:`text-<n>` 与**固定 px 行高**(`leading-[Mpx]`)并存属于**功能缺陷**,不是风格漂移 —— `text-<n>` 经 `--text-<n>` 响应「外观 → UI 字号」设置,固定 px 行框不跟随,用户放大字号时文字会裁切/重叠。原设计未考虑用户可自行调整字号,故留下这个洞。**该组合一律改为无单位比例**(比例 = 原 px ÷ 字号),渲染在默认字号下不变而放大时正确。#1553 已把当时全部 38 处清零(其中 14 处为字号归一新引入、24 处先于其存在);后续新增 `text-<n>` 时**不得再配固定 px 行高**,该约束由 `typographyDiscipline.test.ts` 的 `fixed-leading` 规则做机器门禁,**按 `className` / `cn(...)` 整块区域跨行判定**(只比对同一行会漏掉 `cn()` 分行写法,#1553 实际漏过一处)。行高被 JS 布局计算写死引用时(如按行高算 auto-grow 上限),须同时改成读计算值,否则上限不跟随缩放。- 语义类 `text-xs/sm/base/lg` → `text-<n>` 的机械统一:等值改写零收益,收编即可。- letter-spacing 与 font-family 治理。- 原生层排版:macOS agent-island helper 等 Swift / 原生 UI 的字号字重不在本白名单域(Web 白名单与守卫均不覆盖,治理需另立 issue)。diff --git a/docs/design-rules/cindy-design-system.md b/docs/design-rules/cindy-design-system.mdindex 9e146843f0..e9ea0a4610 100644--- a/docs/design-rules/cindy-design-system.md+++ b/docs/design-rules/cindy-design-system.md@@ -16,7 +16,7 @@## 版本记录- **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` 及以上,配置侧遗留项不在本轮删除范围;**四个权威来源构成目标态镜像,另有 tailwind-merge 字号去重消费端,施工由 #1553 承接**)、「排版豁免登记表」(登录品牌画布 / markdown `<strong>` / hljs 移植 / 外部页注入 / 手机 WebView 生成器 / 紧凑模式派生值)、「排版 non-goals」(line-height 混轨等本轮明确不治理)。走查数据、三项拍板与后续施工计划见 [`design-decision-log.md`](./design-decision-log.md)「2026-08-03」条与 issue #1505。+- **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。- **2026-07-29(修正:手机端功能区落位回新稿标注值)**:手机短屏 / 长屏的 `loginY` 由 main 原值 694 / 933 改回新稿标注值 **622 / 827**;短屏以下(dh<1334)改为 `min(622, max(0, dh-640))`——保留紧凑底距 18 再钳到短屏档落位(**不是**把锚常量改成 `dh-712`:那会让 dh∈[712,1222) 全段字标被面板压盖,review 实算 dh=1000 压 40 设计px)。起因:2026-07-28 剥离手机端跳过登录时把功能区落位一并退回 main,却保留了已换新稿的品牌簇,两半拼接使「字标底↔面板顶」间距变成 **92 / 131.65** 设计px(稿内为 20 / 25.65),实机肉眼可见一条空白。修正后间距回到稿值;面板 500→440 少掉的 60 落到底部留白(90 / 175,比稿内多 60)——审图拍板「方案 B」,未采纳「品牌簇整体下移 60」的方案 A。`DESIGN.md §16.2` 表与「60 去向」条目、§16 末尾勘误块 (6) 已就地更新;`loginSkinLayout.test.ts` 新增三条不变式:「间距上界不变式」(等于稿值,替代原先只判不重叠的下界)、「锚常量连续性不变式」(dh=1334 上下不跳变)、「间距不变式(短屏以下分支)」(dh∈[850,1334) 采样点面板顶不得压到字标底),防再次只改一半、也防窄屏压盖回归。pad 竖屏不受影响(无新稿帧、品牌簇未换基准,保持 621 / 158)。- **2026-07-28**:`DESIGN.md §2` 语义色清单新增警告橙合法消费者「workflow agent 状态方块条的运行中格子」(8×8px 方块,后台任务面板详情 + workflow 聊天卡;done/failed/queued 各走自己的语义 token),并明确「不引入新 token 的消费者由 §2 清单登记即可、需要新 token 才必须先进 §10 豁免表」;`DESIGN.md §5` 新增小例外「status micro-cells(2px)」——≤8px 的非交互状态方块保留 2px 圆角(方块条格子与 SystemCard 分类方块),档位圆角在该尺寸会把方块变成圆点、丢掉大编队一眼总览的「方块条」读法,范围严格限定非交互 / ≤8px / 仅状态,按钮·标签·行·徽章·容器一律仍走三档。- **2026-07-28(勘误:手机端跳过登录剥离)**:手机端「跳过登录」与无账号通路整体从登录改版中剥离(2026-07-24「手机 / pad 必须有账号」拍板仍有效,07-27 的推翻缺产品侧确认);手机端只保留纯视觉改版(品牌簇新稿基准 + 避脸),面板 / 组高 / 圆钮行 / 协议行 / error 槽 / 键盘停靠锚全部回到 main 等价值。`DESIGN.md §16` 末尾新增勘误块界定「哪些值只对桌面成立」,详情与依据归档至 [`design-decision-log.md`](./design-decision-log.md)「2026-07-28」条。