Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(desktop): 按参考图微调用量配色并取消选中外框
kirozengfce51fa28647
diff --git a/apps/desktop/src/renderer/components/new-chat/UsageHeatmap.tsx b/apps/desktop/src/renderer/components/new-chat/UsageHeatmap.tsxindex 8cf4376385..a815ddfdad 100644--- a/apps/desktop/src/renderer/components/new-chat/UsageHeatmap.tsx+++ b/apps/desktop/src/renderer/components/new-chat/UsageHeatmap.tsx@@ -8,7 +8,7 @@* 那个页面不出现任何金额, 见 issue #2785)。两种口径共用同一套分位分桶与色阶。** 视觉: 7 行 (周日起) × 至少 20 列周网格, 单色阶 — 非零值按 4 分位分桶,- * 用 color-mix 在 --accent-emphasis 上做透明度阶梯 (黑白反色设计, 不引入彩色)。+ * 用 color-mix 做强度阶梯:用量历史使用登记蓝色,其余入口沿用 --accent-emphasis。* 格子用原生 title 做 tooltip (Radix per-cell 实例太重)。*/diff --git a/apps/desktop/src/renderer/components/settings/usage/UsageTokenBars.tsx b/apps/desktop/src/renderer/components/settings/usage/UsageTokenBars.tsxindex 4b38fe34c1..94bbb1038d 100644--- a/apps/desktop/src/renderer/components/settings/usage/UsageTokenBars.tsx+++ b/apps/desktop/src/renderer/components/settings/usage/UsageTokenBars.tsx@@ -154,7 +154,7 @@ export function UsageTokenBars({/>))}<div className="absolute inset-0">- <div className="flex h-full items-end gap-[3px]">+ <div className="usage-token-plot flex h-full items-end gap-[3px]">{bars.list.map((b) => {const ratio = bars.max > 0 ? b.tokens / bars.max : 0;const visualHeight =diff --git a/apps/desktop/src/renderer/components/settings/usage/usageCharts.css b/apps/desktop/src/renderer/components/settings/usage/usageCharts.cssindex 9399b73fa9..5b78bf2049 100644--- a/apps/desktop/src/renderer/components/settings/usage/usageCharts.css+++ b/apps/desktop/src/renderer/components/settings/usage/usageCharts.css@@ -15,7 +15,7 @@}.usage-history-charts .usage-chart-mark {- transition-property: width, height;+ transition-property: width, height, opacity;transition-duration: var(--motion-fast);transition-timing-function: var(--motion-ease-out);}@@ -43,12 +43,26 @@}}-/* A quiet persistent selection cue, separate from the animated mark. */-.usage-history-charts .usage-chart-target[aria-pressed='true'] .usage-chart-indicator {- outline: 1px solid var(--text-primary);- outline-offset: 2px;+/* Selection uses emphasis, never a pointer-selection outline. Only categorical+ bars fade; heatmap intensity must keep encoding usage without attenuation.+ :has scopes this to dates actually present in the 30-day plot. */+.usage-history-charts+ .usage-token-plot:has(.usage-chart-target[aria-pressed='true'])+ .usage-chart-target:not([aria-pressed='true']):not(:focus-visible)+ .usage-chart-mark {+ opacity: 0.24;+}++@media (hover: hover) {+ .usage-history-charts+ .usage-token-plot:has(.usage-chart-target[aria-pressed='true'])+ .usage-chart-target:enabled:hover+ .usage-chart-mark {+ opacity: 1;+ }}+/* Keyboard focus remains independently visible; mouse selection adds no frame. */.usage-history-charts .usage-chart-target:focus-visible .usage-chart-indicator {outline: 2px solid var(--focus-ring);outline-offset: 1px;diff --git a/apps/desktop/src/renderer/themes/__tests__/fixtures/desktop-color-defaults.json b/apps/desktop/src/renderer/themes/__tests__/fixtures/desktop-color-defaults.jsonindex 705a4e6e52..da58088ee0 100644--- a/apps/desktop/src/renderer/themes/__tests__/fixtures/desktop-color-defaults.json+++ b/apps/desktop/src/renderer/themes/__tests__/fixtures/desktop-color-defaults.json@@ -284,28 +284,28 @@},{"id": "usage-model-1",- "light": "var(--process-agent-task-icon)",- "dark": "var(--process-agent-task-icon)"+ "light": "#14B8A6",+ "dark": "#2DD4BF"},{"id": "usage-model-2",- "light": "var(--process-renderer-icon)",- "dark": "var(--process-renderer-icon)"+ "light": "#F43F5E",+ "dark": "#FB7185"},{"id": "usage-model-3",- "light": "var(--process-agent-service-icon)",- "dark": "var(--process-agent-service-icon)"+ "light": "#8B5CF6",+ "dark": "#A78BFA"},{"id": "usage-model-4",- "light": "var(--process-utility-icon)",- "dark": "var(--process-utility-icon)"+ "light": "#6366F1",+ "dark": "#818CF8"},{"id": "usage-model-5",- "light": "var(--process-gpu-icon)",- "dark": "var(--process-gpu-icon)"+ "light": "#F59E0B",+ "dark": "#FBBF24"},{"id": "shadow-soft-panel",diff --git a/apps/desktop/src/renderer/themes/colors.ts b/apps/desktop/src/renderer/themes/colors.tsindex bb14e3ba6a..7f65f1714b 100644--- a/apps/desktop/src/renderer/themes/colors.ts+++ b/apps/desktop/src/renderer/themes/colors.ts@@ -241,32 +241,32 @@ registerColor('process-utility-icon', {light: '#059669',dark: '#34D399',}, '资源用量表:Utility 服务进程图标');-// Usage History colors: owner-approved 2026-09-08. Reuse the existing palette-// through separate chart roles; do not redefine process or status semantics.+// Usage History colors: owner-approved 2026-09-08 reference refinement.+// Chart-specific category hues; process/status colors and heatmap blue stay unchanged.registerColor('usage-heatmap-high', {light: 'var(--process-agent-task-icon)',dark: 'var(--process-agent-task-icon)',}, '用量历史图表:usage-heatmap-high(09-08 登记的配色引用)');registerColor('usage-model-1', {- light: 'var(--process-agent-task-icon)',- dark: 'var(--process-agent-task-icon)',-}, '用量历史图表:usage-model-1(09-08 登记的配色引用)');+ light: '#14B8A6',+ dark: '#2DD4BF',+}, '用量历史图表:模型类别 1(09-08 参考图配色裁决)');registerColor('usage-model-2', {- light: 'var(--process-renderer-icon)',- dark: 'var(--process-renderer-icon)',-}, '用量历史图表:usage-model-2(09-08 登记的配色引用)');+ light: '#F43F5E',+ dark: '#FB7185',+}, '用量历史图表:模型类别 2(09-08 参考图配色裁决)');registerColor('usage-model-3', {- light: 'var(--process-agent-service-icon)',- dark: 'var(--process-agent-service-icon)',-}, '用量历史图表:usage-model-3(09-08 登记的配色引用)');+ light: '#8B5CF6',+ dark: '#A78BFA',+}, '用量历史图表:模型类别 3(09-08 参考图配色裁决)');registerColor('usage-model-4', {- light: 'var(--process-utility-icon)',- dark: 'var(--process-utility-icon)',-}, '用量历史图表:usage-model-4(09-08 登记的配色引用)');+ light: '#6366F1',+ dark: '#818CF8',+}, '用量历史图表:模型类别 4(09-08 参考图配色裁决)');registerColor('usage-model-5', {- light: 'var(--process-gpu-icon)',- dark: 'var(--process-gpu-icon)',-}, '用量历史图表:usage-model-5(09-08 登记的配色引用)');+ light: '#F59E0B',+ dark: '#FBBF24',+}, '用量历史图表:模型类别 5(09-08 参考图配色裁决)');registerColor('shadow-soft-panel', {light: '0 4px 12px rgb(0 0 0 / 0.08)',diff --git a/docs/design-evidence/2026-09-08/usage-chart-shapes.md b/docs/design-evidence/2026-09-08/usage-chart-shapes.mdindex 945cfe0a06..e450832d38 100644--- a/docs/design-evidence/2026-09-08/usage-chart-shapes.md+++ b/docs/design-evidence/2026-09-08/usage-chart-shapes.md@@ -3,11 +3,13 @@日期:2026-09-08。平台:Desktop / macOS arm64,Global 隔离开发版,Electron 41.10.3。PR:[#4076](https://github.com/makecindy/cindy/pull/4076),类别:有意可见变化。图表形状修复前基线:`760005b411406daca9016b2c33a6876c5d3de4f9`;首轮灰阶几何修复:`723fad34eb7cc12fbba43533a7dacf8a5340c793`。- 实际场景:运行中的 Cindy → 设置 → 用量历史;独立临时 userData。首次用两组 fixture 模型、150 天历史确认形状和密度;配色与微弹验证扩为六组 fixture 模型,覆盖五种模型色、其它类别、零值日、不同柱高。未修改正式数据库或真实用量记录。两轮 fixture 不同,不把两轮图片声称为同数据逐像素比较。-- 截图来自运行中的 Electron;微弹视频为 macOS 对该隔离实例窗口的约 5 秒真实录屏,非设计稿、SSR 或模拟图表。最终代码 SHA、生产文件 blob ID 与附件 hash 记录在附件 manifest 和 PR 正文;公开附件链接待上传后回填。+- 截图来自运行中的 Electron;微弹视频为 macOS 对该隔离实例窗口的约 6 秒真实录屏,非设计稿、SSR 或模拟图表。最终代码 SHA、生产文件 blob ID 与附件 hash 记录在附件 manifest 和 PR 正文;公开附件链接待上传后回填。- 800px 窗口:形状修复前柱图区 807px,可见区域约 410px;修复后 30 柱绘图区 clientWidth/scrollWidth 均为 410px,静止单柱约 10.77px,无逐柱最小宽度撑开。热力格静止 12×12px,四角始终 2px;日期输入 190×36px,提交按钮高 36px。-- 09-08 配色实测:Light 五色为 rgb(37,99,235)、rgb(8,145,178)、rgb(124,58,237)、rgb(5,150,105)、rgb(217,119,6);Dark 对应 rgb(96,165,250)、rgb(34,211,238)、rgb(167,139,250)、rgb(52,211,153)、rgb(245,158,11)。颜色定义只在 colors.ts,本文为本次 computed 取样。模型表色块与同一模型柱段一致,“其它”为中性灰。+- 09-08 参考图微调后的配色实测:Light 五色为 rgb(20,184,166)、rgb(244,63,94)、rgb(139,92,246)、rgb(99,102,241)、rgb(245,158,11);Dark 对应 rgb(45,212,191)、rgb(251,113,133)、rgb(167,139,250)、rgb(129,140,248)、rgb(251,191,36)。颜色定义只在 colors.ts,本文为本轮 computed 取样。模型表色块与同一模型柱段一致,“其它”为中性灰;替代前轮进程色别名的柱图样本,热力图蓝色保持不变。- Light/Dark 动效逐帧实测:柱宽约 10.77→12.77px,采样最大增量约 2.08px,小于 3px 间隙;柱高、基线、分段颜色、2px 圆角、点击框尺寸全程不变。选中后移走鼠标仍保持放大。热力格选中后 14×14px,点击框仍为 12×12px,四角仍 2px。- 交互验证:点击热力格、点击柱体、填写日期并提交得到同一筛选结果;编辑草稿不提前筛选。键盘 Tab/Enter 的可达、焦点轮廓和筛选已实测,原有 Space 原生语义保留。减少动态效果时 computed transition-duration 为 0s,选中/焦点反馈仍可见。原生 tooltip 保留在可命中的日期按钮上,避免放大层的 pointer-events 设置吞掉提示。+- 参考图反馈复核:最初 fixture 每 7 天固定零值恰逢星期六,导致最后一行全空;本轮只重分布隔离模拟数据的零值日期,150 天中 130 天非零,七个星期行均有数据(星期六 18 天非零)。生产日期排列和零值判断未改。新旧 fixture 不同,不作同数据视觉对比。+- 无框选中实测:Light/Dark 鼠标选中轮廓均为 0px,选中柱 opacity=1,其余柱为 0.24;热力图 opacity 始终为 1。选择柱图窗口外的历史日期时,所有柱恢复 opacity=1。键盘焦点轮廓仍为 2px,三个日期入口等价检查继续通过。- 非交互分支由组件单测覆盖;当前源码未找到旧 HomeUsageDashboard 的运行期挂载入口,因此未伪造首页实机验收。Windows/Linux 实机与屏幕阅读器未验证。-- 栅格与录屏不入仓。附件在工作区忽略目录 `.cindy/usage-chart-evidence-2026-09-08/`;最新文件以 `color-` 开头,旧 `before-` / `final-` 为首轮几何证据。PNG、MOV、JSON 均待人工上传至 PR 评论并回填稳定链接;尚无公开附件时,不记为证据交付完成。+- 栅格与录屏不入仓。附件在工作区忽略目录 `.cindy/usage-chart-evidence-2026-09-08/`;最新文件以 `refined-` 开头;`color-` 是已被本轮配色和无框选中处理取代的前轮样本,旧 `before-` / `final-` 为首轮几何证据。PNG、MOV、JSON 均待人工上传至 PR 评论并回填稳定链接;尚无公开附件时,不记为证据交付完成。- **人工视觉验收:待所有者批准最终实机效果。** 09-08 已确认的是设计方向;作者采集、测试和自审不替代视觉批准,整个 `desktop.settings` surface 不记为 migrated。diff --git a/docs/design-rules/DESIGN.md b/docs/design-rules/DESIGN.mdindex 432bd382d4..a5a87d3fb8 100644--- a/docs/design-rules/DESIGN.md+++ b/docs/design-rules/DESIGN.md@@ -90,8 +90,8 @@ The grayscale rule is near-absolute. The following are the **only** sanctioned n> **Additional narrowly-scoped exceptions** (documented in their respective component specs, do NOT generalize as system semantic colors):>> - **Toast Info / Success / Warning / Error** — `#417CDD` / `#2AAE5B` / `#F3A115` / `#D91F37`(finalized 2026-07-17; Toast exemption lifted) — used ONLY on the 16×16 lucide icon inside Toast pill notifications. The pill body (background, text, border, close icon) remains strictly grayscale. Info blue #417CDD equals the focus-ring / Auto Approval value (originally #3B82F6, added 2026-07-14, now finalized); success/warning/error equal the global status colors (done green / status error / warning foreground).-> - **Usage History chart color (owner-approved 2026-09-08).** The registered usage heatmap uses a blue intensity scale. Daily token bars and their corresponding model-table swatches/share marks use five existing palette hues through `--usage-model-1` … `--usage-model-5`; unlisted models stay neutral. `--usage-heatmap-high` supplies the high end of the heatmap. These chart roles reuse the process-category palette by explicit adjudication, not by inheriting process/status semantics. Agent/task marks, text and control frames stay neutral. See [the component specification](./usage-history-charts.md); colors.ts remains the value source.-> - **Resource Usage Process Categories** — the Resource Usage table may color only its 14px process-type glyphs so dense rows can be scanned by category (user-requested 2026-08-06). The six category pairs are task Agent blue `#2563EB / #60A5FA`, Agent service purple `#7C3AED / #A78BFA`, main-process pink `#DB2777 / #F472B6`, renderer cyan `#0891B2 / #22D3EE`, GPU amber `#D97706 / #F59E0B`, and utility green `#059669 / #34D399` (Light / Dark). These colors encode process category, **not health or status**; row backgrounds, labels, metrics, selection and actions remain on the neutral system. Direct use is confined to `resource-usage` process glyphs; the explicitly registered Usage History aliases above may also reference these palette values. No other table or process UI inherits this permission. Tokens: `--process-agent-task-icon`, `--process-agent-service-icon`, `--process-main-icon`, `--process-renderer-icon`, `--process-gpu-icon`, `--process-utility-icon`.+> - **Usage History chart color (owner-approved 2026-09-08).** The registered usage heatmap uses a blue intensity scale. Daily token bars and their corresponding model-table swatches/share marks use five owner-refined reference hues through `--usage-model-1` … `--usage-model-5`; unlisted models stay neutral. `--usage-heatmap-high` supplies the high end of the heatmap. The heatmap retains its process-blue alias; model roles use the owner-provided reference palette, registered in colors.ts, without inheriting process/status semantics. Agent/task marks, text and control frames stay neutral. See [the component specification](./usage-history-charts.md); colors.ts remains the value source.+> - **Resource Usage Process Categories** — the Resource Usage table may color only its 14px process-type glyphs so dense rows can be scanned by category (user-requested 2026-08-06). The six category pairs are task Agent blue `#2563EB / #60A5FA`, Agent service purple `#7C3AED / #A78BFA`, main-process pink `#DB2777 / #F472B6`, renderer cyan `#0891B2 / #22D3EE`, GPU amber `#D97706 / #F59E0B`, and utility green `#059669 / #34D399` (Light / Dark). These colors encode process category, **not health or status**; row backgrounds, labels, metrics, selection and actions remain on the neutral system. Direct use is confined to `resource-usage` process glyphs; the explicitly registered Usage History heatmap alias above may also reference the task-blue value. No other table or process UI inherits this permission. Tokens: `--process-agent-task-icon`, `--process-agent-service-icon`, `--process-main-icon`, `--process-renderer-icon`, `--process-gpu-icon`, `--process-utility-icon`.> - **Bot Avatar Hues** — the Bots feature may fill a Bot's round avatar with one of nine registered tints so a list of persistent assistants can be told apart at a glance (registered 2026-08-17). The hue encodes **which Bot this is** — an identity cue like the file-type badges above, never health, status, or channel. Light mode uses soft tints, Dark mode the matching deep tints; the emoji and the initial-letter fallback (always `--text-primary`) stay legible in both. Tokens: `--bot-avatar-red-bg` / `-orange-` / `-amber-` / `-green-` / `-teal-` / `-blue-` / `-violet-` / `-pink-` / `-graphite-bg` (the last is the neutral step, and is where legacy `graphite` avatar data lands). Scope is strictly the Bot avatar fill in `features/bots` — do not reuse these tints for status dots, badges, row backgrounds, or any other surface. External theme import never touches them (the import template is allow-list only), so Bot identity colors do not drift between themes.> - **Bot Unread Badge** — the Bots sidebar may paint its unread pill and its pending-todo dot in information blue `#417CDD` with white text (registered 2026-08-19). The color encodes **IM unread semantics** ("how much have I not seen"), the one signal every chat list has taught users to read by color alone; it is not a CTA and not a health/status tone. The pill was previously the inverse-CTA fill, which on the selected row's light-gray pill turned into two high-contrast marks competing for the same glance. Same value both modes — an unread count means the same thing in Light and Dark, and the value is already the registered focus-ring / Auto Approval / Toast-info blue. The foreground is a standalone white: `--accent-pure-cta-fg` flips to black in Dark and cannot be borrowed. Tokens: `--bot-unread-bg` / `--bot-unread-fg`. Scope is strictly the teammate-list unread badge and the pending-todo dot in `features/bots/BotsSidebar.tsx` — do not reuse it for other badges, status dots, row backgrounds, or any other surface.> - **ConfirmDialog Danger** — `#EF4444` used ONLY on the confirm button background in the Danger variant. The cancel button and rest of the dialog remain grayscale.@@ -331,7 +331,7 @@ The usage heatmap, daily-token bars, their separate interaction indicators and t### Border Radius Scale-**Usage chart interaction geometry (owner-approved 2026-09-08).** For `usage-heatmap-day` and `usage-token-bar` in Usage History, the bounded hover/focus/selection expansion in [the component specification](./usage-history-charts.md) is part of the approved member treatment. It supersedes a blanket prohibition on changing these members’ visible dimensions during interaction: heatmap width/height and bar width may expand; bar height, baseline, data colors, hit regions and resting geometry do not. All four corner radii remain 2px throughout. This is an explicit registration update, not permission for other marks to scale or for an interaction wrapper to distort data.+**Usage chart interaction geometry (owner-approved 2026-09-08).** For `usage-heatmap-day` and `usage-token-bar` in Usage History, the bounded hover/focus/selection expansion in [the component specification](./usage-history-charts.md) is part of the approved member treatment. It supersedes a blanket prohibition on changing these members’ visible dimensions during interaction: heatmap width/height and bar width may expand; bar height, baseline, categorical color tokens, heatmap intensity, hit regions and resting geometry do not. The later 09-08 reference refinement permits only the token chart to fade non-selected bars while a date in that plot is selected, as specified by the component entry; mouse selection has no outline, and keyboard focus stays independently visible. All four corner radii remain 2px throughout. This is an explicit registration update, not permission for other marks to scale or for an interaction wrapper to distort data.Three tiers — **these three only** (wording hardened 2026-08-29, designer ruling — see `design-decision-log.md` 08-29). **Tier assignment is a single decision tree in this §5 section; §4 component entries, the §7 Do/Don't lists and the §9 iteration guide restate it for convenience — when wording drifts, this section wins:**@@ -524,7 +524,7 @@ Theme switching: `useTheme.ts` provides `theme` (System / Light / Dark mode) plu| `--file-badge-pdf/-doc/-sheet/-slide/-code` + `--file-badge-fg` | `#B23A26` / `#2C5CA8` / `#2E7D4F` / `#A25A12` / `#5B49A8`, fg `#FFFFFF` | same | File-type badges on the self-drawn attachment icon (2026-07-27). Bound to _what the file is_, not to the theme, so both modes share one value. Each accent is picked for ≥4.5:1 against `--file-badge-fg` (5.96 / 6.56 / 5.05 / 5.24 / 7.09) — the badge label renders at 10px (Micro Label floor, §3), so AA small-text applies. `--file-badge-fg` is a standalone white: `--accent-pure-cta-fg` flips to black in Dark and cannot be borrowed. || `--bot-avatar-red-bg` … `--bot-avatar-graphite-bg` (9 tokens) | soft tints (`#f7ded9` … `#e5e5e5`) | deep tints (`#4a2e2a` … `#3c3c3a`) | Bot avatar fills in `features/bots` only (2026-08-17). Identity cue ("which Bot"), not status; emoji / initial-letter fallback reads `--text-primary` in both modes. Not part of the external-theme import allow-list, so the hues stay stable across themes. || `--bot-unread-bg` / `--bot-unread-fg` | `#417CDD` / `#FFFFFF` | same | Teammate-list unread badge + pending-todo dot in `features/bots/BotsSidebar.tsx` only (2026-08-19). IM unread semantics, not a CTA and not status; theme-invariant because "unread" means the same thing in both modes. Value is the registered focus-ring / Auto Approval / Toast-info blue; the fg is a standalone white because `--accent-pure-cta-fg` flips to black in Dark. Must not leak to other badges, dots or surfaces. |-| `--usage-heatmap-high`, `--usage-model-1` … `--usage-model-5` | Existing process-category palette aliases; see colors.ts | Existing Light/Dark palette aliases; see colors.ts | Usage History heatmap, token bars and matching model-table marks only (2026-09-08). Category/intensity, never status. No existing token values or theme overrides change. |+| `--usage-heatmap-high`, `--usage-model-1` … `--usage-model-5` | Heatmap blue alias + reference-refined model palette; see colors.ts | Corresponding Dark palette; see colors.ts | Usage History heatmap, token bars and matching model-table marks only (2026-09-08). Category/intensity, never status. Only these newly introduced model-role defaults are refined; process tokens and user theme overrides do not change. || `--process-agent-task-icon`, `--process-agent-service-icon`, `--process-main-icon`, `--process-renderer-icon`, `--process-gpu-icon`, `--process-utility-icon` | `#2563EB` / `#7C3AED` / `#DB2777` / `#0891B2` / `#D97706` / `#059669` | `#60A5FA` / `#A78BFA` / `#F472B6` / `#22D3EE` / `#F59E0B` / `#34D399` | Resource Usage 14px process-category glyphs only (2026-08-06). Category cue, not status; all surrounding UI stays neutral. Protected from automatic external-theme import so category identity does not drift. |Mobile's `betaChannelBadgeBackground/Foreground` remain the cross-theme fixed pair `#DF0C27` /@@ -724,7 +724,7 @@ _Reference-implementation paths in this table are relative to `apps/desktop/src/#### Registered response: Usage History chart emphasis (2026-09-08)-Only the two registered chart members inside Usage History may enlarge their non-hit-testing visible layer on hover, keyboard focus or selection. Enter uses `--motion-base` and the component-scoped `--usage-mark-ease`; leave uses `--motion-fast` / `--motion-ease-out`. The local curve has one small overshoot; no looping, replay on unrelated rerenders, or whole-chart motion. Selection holds the enlarged state after pointer leave. The bounded width/height transition is a one-shot non-compositor exception already allowed by the red lines; the exact local geometry/curve is specified in [usage-history-charts.md](./usage-history-charts.md). Corners remain 2px, bar height/baseline and all data colors stay fixed, and targets do not grow or overlap. Reduced motion removes the transition while retaining immediate, visible focus/selection feedback. No other component may borrow this response.+Only the two registered chart members inside Usage History may enlarge their non-hit-testing visible layer on hover, keyboard focus or selection. Enter uses `--motion-base` and the component-scoped `--usage-mark-ease`; leave uses `--motion-fast` / `--motion-ease-out`. The local curve has one small overshoot; no looping, replay on unrelated rerenders, or whole-chart motion. Selection holds the enlarged state after pointer leave. The bounded width/height transition is a one-shot non-compositor exception already allowed by the red lines; the exact local geometry/curve is specified in [usage-history-charts.md](./usage-history-charts.md). Corners remain 2px, bar height/baseline, categorical color tokens and heatmap intensity stay fixed, and targets do not grow or overlap. The token-chart-only selection fade follows the component entry; pointer selection adds no outline, while keyboard focus retains its separate indicator. Reduced motion removes the transition while retaining immediate, visible focus/selection feedback. No other component may borrow this response.#### Exception category: container transform (chip lifts off and grows)diff --git a/docs/design-rules/design-decision-log.md b/docs/design-rules/design-decision-log.mdindex 412f7d0c86..50c11f8b4c 100644--- a/docs/design-rules/design-decision-log.md+++ b/docs/design-rules/design-decision-log.md@@ -12,6 +12,8 @@## 2026-09+- **09-08(参考图微调)** **用量柱图配色与无框选中反馈**——所有者指出首版多色堆叠“有一点脏”,提供参考图 3 要求微调,并明确“选中之后不要外面有一个框,参考截图 4”。据此将五个 usage-model 角色由进程色别名改为专属青绿、珊瑚红、紫、靛蓝、琥珀 Light/Dark 配色,数值仅由 colors.ts 维护;热力图蓝色与原进程颜色不变。两图取消鼠标选中外框,保留轻弹和选中放大;柱图内存在选中日时,其他柱降为 24% 不透明度,选中柱与临时悬停/键盘聚焦柱保持全色,无选中日或日期在图外时不淡化。**此限定调整替代本日早先“数据颜色交互呈现一概不变”及组件条目的选中细框处理**;类别 Token、堆叠比例、柱高、基线和命中框不变,热力图强度不参与淡化。键盘 `:focus-visible` 仍保留独立可见提示,不将鼠标去框误用于无障碍焦点。没有新增图形成员或改变四角 2px。最后一行全空已核实来自隔离演示 fixture 每 7 天固定零值恰逢星期六;重采样时改为分散零值日,生产日期与零值算法不改,不把模拟数据问题描述为产品修复。方向授权不等于最终实机视觉批准,后者仍待所有者验收。+- **09-08** **用量历史采用蓝色热力图、多色模型柱图与悬停微弹**——所有者在本轮选择卡明确选择“蓝色热力图+多色柱图(推荐)”和“悬停微弹,选中保持(推荐)”,作为 #4076 的后续设计裁决。热力图沿用强度映射,蓝色高值端;柱图前五模型用既有蓝/青/紫/绿/琥珀调色板,新图表用途通过 colors.ts 的 usage 专属别名登记,不改变原进程/状态语义;模型表色块与柱段对应,Agent/任务色保持中性。仅 `usage-heatmap-day`、`usage-token-bar` 登记悬停/焦点/选中的可见尺寸扩张:格子宽高各加 2px,柱体仅宽加 2px;基准形状、四角 2px、柱高、基线、数据颜色、堆叠比例及点击命中框不变。直接过渡宽/高,200ms 一次轻微回弹,150ms 退出;选中保持,减少动态效果时立即切换。本条**明确替代 09-07 对这两个成员交互几何一概不变的限制**,不推广给其他图元,亦不新增形状成员。§14.4 同步登记为独立于 Done 的窄范围回弹,§2/§10 登记颜色用途;具体交互规格见 `usage-history-charts.md`。等价日期选择与密度修复保留;**设计方向已批准,最终实机视觉验收仍待所有者完成**,不是 AI 自批截图。diff --git a/docs/design-rules/design-inventory.md b/docs/design-rules/design-inventory.mdindex 642c39a2b8..4335acbb6f 100644--- a/docs/design-rules/design-inventory.md+++ b/docs/design-rules/design-inventory.md@@ -138,7 +138,7 @@ Mobile 尚未展开顶层 screen,**待 DS-7 增量发现**;数值接管在 D| `desktop.overlay.toast` | unassigned | legacy | — | DS-8 提供适用数值;DS-9 按入口核对标准组件与呈现继承 | DS-9 核对实际消费者、局部 alias 与跨入口影响;保留现有保护合同,残余项登记理由、实际负责人及复查日期 || `desktop.plugins.app-main` | unassigned | legacy | — | DS-8 提供适用数值;DS-9 按入口核对标准组件与呈现继承 | DS-9 核对实际消费者、局部 alias 与跨入口影响;保留现有保护合同,残余项登记理由、实际负责人及复查日期 || `desktop.plugins.installed` | unassigned | legacy | — | DS-8 提供适用数值;DS-9 按入口核对标准组件与呈现继承 | DS-9 核对实际消费者、局部 alias 与跨入口影响;保留现有保护合同,残余项登记理由、实际负责人及复查日期 |-| `desktop.settings` | unassigned(用量图表修复与验收跟进:kirozeng) | pilot | DESIGN.md §10 语义豁免色族消费者;外部主题导入保护 token(资源用量类别色在独立窗) | DS-4 / DS-4b 的 Button / Input 与 SettingsTextInput 局部兼容壳已落地;DS-6 完整表单和第二消费者,DS-8 数值同源 | DS-6 补全状态、说明与公开附件;focus、ivory/elevated 见治理 §10。旧 alias 与 slot 按作用域生效,禁止仅因同值删除局部配色;DS-6/8/9/11 按实际消费者分批核对跨 surface alias,confirm-dialog 归 DS-6;用量图表形状、等价日期选择与密度修复,以及 09-08 蓝色热力图、多色模型柱图与微弹裁决见 [组件规范](./usage-history-charts.md),实现已提交时仍须等待视觉验收,不提前标记 migrated |+| `desktop.settings` | unassigned(用量图表修复与验收跟进:kirozeng) | pilot | DESIGN.md §10 语义豁免色族消费者;外部主题导入保护 token(资源用量类别色在独立窗) | DS-4 / DS-4b 的 Button / Input 与 SettingsTextInput 局部兼容壳已落地;DS-6 完整表单和第二消费者,DS-8 数值同源 | DS-6 补全状态、说明与公开附件;focus、ivory/elevated 见治理 §10。旧 alias 与 slot 按作用域生效,禁止仅因同值删除局部配色;DS-6/8/9/11 按实际消费者分批核对跨 surface alias,confirm-dialog 归 DS-6;用量图表形状、等价日期选择与密度修复,以及 09-08 蓝色热力图、参考图微调的多色模型柱图、无框选中与微弹裁决见 [组件规范](./usage-history-charts.md),实现已提交时仍须等待视觉验收,不提前标记 migrated || `desktop.shell.main-layout` | unassigned | legacy | DESIGN.md §15 CINDY 皮肤族(侧栏 vibrancy / 选中 pill);外部主题导入保护 token | DS-8 提供适用数值;DS-9 按入口核对标准组件与呈现继承 | DS-9 核对实际消费者、局部 alias 与跨入口影响;保留现有保护合同,残余项登记理由、实际负责人及复查日期 || `desktop.skillhub.local` | unassigned | legacy | — | DS-8 提供适用数值;DS-9 按入口核对标准组件与呈现继承 | DS-9 核对实际消费者、局部 alias 与跨入口影响;保留现有保护合同,残余项登记理由、实际负责人及复查日期 || `desktop.skillhub.market` | unassigned | legacy | — | DS-8 提供适用数值;DS-9 按入口核对标准组件与呈现继承 | DS-9 核对实际消费者、局部 alias 与跨入口影响;保留现有保护合同,残余项登记理由、实际负责人及复查日期 |diff --git a/docs/design-rules/usage-history-charts.md b/docs/design-rules/usage-history-charts.mdindex 0f8a5189e4..4b2750e21d 100644--- a/docs/design-rules/usage-history-charts.md+++ b/docs/design-rules/usage-history-charts.md@@ -13,7 +13,7 @@## 配色(2026-09-08 所有者裁决)-热力图用蓝色深浅表示用量,沿用四档强度映射,零值日保留 `--surface-chip`。高值色使用 `--usage-heatmap-high`。柱图前五个模型依次使用 `--usage-model-1` … `--usage-model-5`(蓝、青、紫、绿、琥珀),未列入 colorOrder 的模型统一中性灰;即便不足五个模型,“其它”也不占用某一模型的颜色。值在 colors.ts 注册为已有进程类别调色板的别名,原进程 Token/状态语义及用户主题均不修改。+热力图用蓝色深浅表示用量,沿用四档强度映射,零值日保留 `--surface-chip`。高值色使用 `--usage-heatmap-high`。柱图前五个模型依次使用 `--usage-model-1` … `--usage-model-5`(青绿、珊瑚红、紫、靛蓝、琥珀),未列入 colorOrder 的模型统一中性灰;即便不足五个模型,“其它”也不占用某一模型的颜色。按所有者提供的参考图 3 微调为图表专用 Light/Dark 配色,取值只在 colors.ts 维护;替代本日早先的进程色别名方案,不修改原进程 Token/状态语义及用户主题。热力图蓝色别名保持不变。颜色对应完整图表窗口的模型顺序,与明细表同一模型的色块、占比短条保持一致,不因日期筛选后的排序变化而跳色。Agent 与任务排行仍用既有中性色;本裁决不登记新形状、不扩张其几何用途。颜色表示类别,不表示“成功/警告”。Tooltip 和带名称的明细表仍提供非颜色识别渠道;分类颜色不能保证仅靠颜色满足所有色觉条件。@@ -23,7 +23,8 @@- 热力图从 12×12px 平滑扩大到 14×14px,中心不动;柱体只增加 2px 宽度,高度、基线及各模型分段高度不变。进入曲线只有一次轻微超调,扩张总量小于 3px 间隙。直接调整可见层的宽/高而非整体 scale,确保**四角在动画中仍为 2px**。- 进入/聚焦/选中使用 `--motion-base`(200ms)与组件专属 `--usage-mark-ease: cubic-bezier(0.2, 0.8, 0.25, 1.18)`;退出使用 `--motion-fast`(150ms)与 `--motion-ease-out`。同一已选中图元再次悬停不重复弹跳;选中后移开指针仍保持放大。禁止循环动画,不移动其他图元。- 命中框始终保持原尺寸:热力图 12×12px,柱图高度 `max(24px, 柱高)`、宽度按可用空间均分。放大的可见层和指示层均 `pointer-events: none`,不把相邻日期的命中区叠在一起。-- Hover 不改填充色、强度档位或堆叠比例。选中保留独立的 1px 中性细轮廓(偏移 2px),键盘焦点用 2px `--focus-ring` 轮廓(偏移 1px);这些指示不覆盖数据填充。无额外阴影或亮度变化。+- **鼠标选中不画外框**,两图都保持已登记的放大状态。按所有者参考图 4,柱图区内有选中日时,其余柱整体降到 24% 不透明度,选中柱保留全色;临时悬停/键盘聚焦另一柱时,该柱恢复全色以供查看,离开后恢复淡化。没有选中日、或所选日期不在 30 天柱图内时,全图正常显示,不能全图变淡。此为柱图类别色的限定交互强调,不改变类别色 Token、柱高、基线或堆叠比例,**不推广到以颜色深浅编码数据的热力图**;热力图强度始终不变。透明度随既有过渡切换,减少动态效果时立即切换。+- 键盘焦点仍使用独立的 2px `--focus-ring` 轮廓(偏移 1px),仅 `:focus-visible` 显示;这不是鼠标选中边框,不因取消选中外框而删除键盘可见焦点。无阴影。- `prefers-reduced-motion: reduce` 时不播放过渡,立即落到对应大小与清晰的焦点/选中状态;触摸设备不依赖 hover,禁用柱不触发强调。- 原生 Enter/Space 点击继续使用原 `handleDayClick` → `day:YYYY-MM-DD` 筛选路径。图表继续显示固定窗口,概览和明细按所选日期过滤;单日模式下任务明细的既有隐藏规则不变。