模型菜单视觉重做:照 Codex 观感 + 我们的暖色 token(复核反馈 2 之二)
Project CI / AI game creator shell Rust crates (pull_request) Successful in 5m57s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 7m6s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 7m51s
Project CI / Backend tests (pull_request) Successful in 8m11s
Project CI / Frontend tests (pull_request) Successful in 3m35s
Project CI / AI game creator shell web tests (pull_request) Successful in 3m32s
Project CI / Native shell tests (pull_request) Successful in 8m45s
Project CI / Repository checks (pull_request) Successful in 7m3s

- 卡片:圆角 12 → 16px、内边距 12px、描边换成极淡 `--platform-line-soft`、投影改暖色 `rgb(112 57 30 / …)`(不用纯黑);去掉横贯分隔线,强度区与列表之间只用留白分开
- 强度区:标题 `--platform-text-strong` 12/600、右侧「当前:X」`--platform-text-soft` 11px;单列铺满(`minmax(0,1fr)`,否则 `auto` 轨道只按 max-content 定尺、滑块被压回 129px);滑块与档位点包一层相对定位容器,点改绝对定位叠在轨道中线
- 滑块:轨道 6px 圆头,已选段 `--platform-accent`、未选段 `--platform-subpanel-border`(进度由组件写进来的 `--strength-progress` 驱动双色渐变,不写死颜色);圆钮 18 → 20px(`--platform-input-highlight` 底 + `--platform-accent` 2px 描边 + 柔影),hover/active/focus-visible 与 Firefox 伪元素同步
- 档位点:5px 淡点 → 7px 且落在轨道中线上(带输入区底色的 1.5px 描边提对比),`pointer-events: none` 不挡命中
- 模型列表:行高 34px、行圆角 9px、hover `--platform-nav-item-icon-fill`、选中 `--platform-warm-bg` 轻量 pill(覆盖前文那几条 `!important` 同属性规则);`max-height: 170px`(=5×34,不出现半行);滚动条 6px、平时透明,悬停卡片才显形
- 校验:typecheck、4 个 vitest 文件 212 passed / 9 skipped、eslint、prettier、encoding、spacetime-schema、diff-check 全通过;无头 Chromium 夹具(447px / 900px)截图为证(见 PR 正文)
This commit is contained in:
2026-10-05 00:34:59 +08:00
parent c197edb203
commit 3383c13bba
3 changed files with 203 additions and 71 deletions
@@ -18,6 +18,9 @@
- 关掉旧的独立触发钮(底行元素 2 → 1);浮层的开合、Esc 与点击外部关闭都由模型菜单既有行为负责,强度区不再自带浮层。
- **取舍**:强度区随菜单挂载,打开时先显示「默认」再回读成落盘档位(一次 IPC 往返),测试里要 `waitFor`;换掉这一点需要把档位状态提到宿主,暂不做。
- **判据/取证**:`tests/appSurface/chat-composer.suite.ts`(底行不再有第二颗控件、菜单里改档落同一条持久化通道、Esc/点外部关闭、滑块不在 listbox 内)+ `tests/chatDialogFrameLayout.test.ts`(外壳向上展开 / 强度区网格 / 底行高度不增)+ `tests/appSurface/design-agent.suite.ts`(策划菜单里没有滑块)。
- **视觉口径(用户复核二次要求)**:卡片与滑块的观感照 Codex 参考图,颜色只取我们自己的暖色 token——卡片圆角 16px、内边距 12px、极淡描边(`--platform-line-soft`)+ 柔和暖色投影(`rgb(112 57 30 / …)`,不用纯黑)、**不画横贯分隔线**(只靠留白);强度区标题 `--platform-text-strong` 12/600、右侧当前档位 `--platform-text-soft` 11px;轨道 6px 圆头,已选段 `--platform-accent`、未选段 `--platform-subpanel-border`(进度由组件写进来的 `--strength-progress` 驱动渐变),圆钮 20px(`--platform-input-highlight` 底 + `--platform-accent` 2px 描边 + 柔影),档位点 7px 绝对定位叠在轨道中线(`pointer-events: none`,不挡命中);模型列表行高 34px、行圆角 9px、hover `--platform-nav-item-icon-fill`、选中 `--platform-warm-bg` 轻量 pill + 右侧对勾;列表 `max-height: 170px`(=5×34,不出现半行),滚动条 6px 且平时透明、悬停卡片才显形。
- **实测(无头 Chromium 夹具,447px / 900px)**:卡片 260×263(圆角 16 / 内边距 12)、强度区 234×61、滑块 222×26、档位点 7px 且中心与轨道中线重合(点 270 / 轨道 269)、列表行高 34、`max-height` 170(内容 315 → 滚动)、默认档进度 0%,按 `End` 到 100% 且文案变「当前:最高」;卡片右缘未溢出视口。
- **关联**:`features/project-workspace/ConversationModelSelect.tsx`、`view/project-development/chat/components/DirectProjectComposer/{DirectProjectComposer.tsx,ComposerControls.tsx}`、`src/styles.css`。
## 2026-10-03 AGC 输入区控件叠在一起:输入区内的操作排与状态提示不能用绝对定位