refactor(ccui): 多代理组件优化——深色模式 token 化 / 逻辑·响应式修复 / 可访问性 / 一致性 - #20
Merged
Conversation
阶段化多子代理编排:81 组件并行发现 → 对抗验证(剔除误报)→ 67 组件并行最小修复, 全程测试+真实构建守门,3 处破坏测试契约的行为变更已回退。 - 深色模式:55 处硬编码 rgba(0,0,0,..)/阴影 → $ccui-* token,深色下正常反色 - 逻辑:anchor 字面量 0 渲染、死 prop showInkInFixed;watermark/color-picker/ image-preview 等边界条件修复 - 清理:18 处定时器/监听/Observer 补 onBeforeUnmount 卸载,消除泄漏 - 样式去重 + 删除 avatar 死文件 icon-nobody.tsx(引用已清) 验证:vp test 2023 通过/93 文件(基线不变);真实库构建 ✓ built 无 Undefined variable; 新引入 33 个 token 全部比对 358 个已定义 token、@use 就位。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
对上一轮"待人工审"131条做多代理重确认(每条2对立视角+分歧裁决): 确认0误报,其中73条实为确定性安全修复(不改对外API/行为/快照),本提交落地之。 - a11y:close/clear/分页/菜单项等补 tabindex/role/aria-label/键盘(Enter|Space) 可达, 仅新增属性、不动既有 class/结构/事件 - 响应式:card boxClass→computed、breadcrumb separator→toRef、check-box inject/computed 上提至 setup 顶层、check-box-group 不可变数组等价改写(DOM 输出逐字不变) - 一致性:写死类名→ns.e()/ns.m() 并与 scss 选择器锁步 - perf:数组下标 key→稳定唯一 key(masonry/space 等) - logic:form-list key 对齐、若干边界修复 跳过6项(image-preview 固定深色查看器 chrome、不存在的 token、menu 本已正确等)。 验证:vp test 2023 通过/93 文件;真实构建无 Undefined variable;新增 token 全已定义、@use 就位。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (135)
Walkthrough新增风险报告文档,并为多个 ccui 组件更新了键盘交互、ARIA 语义、受控状态同步、滚动/选择逻辑以及主题变量引用。 Changes风险报告文档
组件行为与样式更新
Sequence Diagram(s)未生成。 Estimated Code Review Effort🎯 5 (Critical) | ⏱️ ~90+ minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
多代理审查驱动的全库组件优化收口。从多代理扫描 → 重确认(每条 2 个对立视角 + 分歧裁决)
→ 73 条安全自动修 → 58 条人工决策落地 →
/code-review-expert审查再整改,分阶段完成。93 files / 2028 tests通过 ·vue-tsc0 错误 ·docs:build无Undefined variable提交脉络
15a3548759b980e64b0bf2c91dd141643db主要变更
深色模式(固定 token 组) —
themes/{light,dark}.ts新增menu-dark-*/layout-dark-*/button-*-shadow,收口 layout/menu/button 硬编码色;强制深色组件(深色侧栏/menu theme="dark")不随
.dark切换,保「浅色页深色侧栏」语义。响应式 — config-provider 注入 computed ref + Proxy 解包(恢复 15 个消费者响应性);
tabs/tree/avatar 补响应;descriptions slot thunk 化;textarea 受控空串修复(modelValue 默认 undefined)。
逻辑 — date-picker clear 重置 pending;modal Escape 改栈式(只关栈顶);message 走 leave 过渡;
table-column 改按 DOM 位置排序(解决重挂载/中间插列错位);time-picker now 尊重 step/disabled。
可访问性(25 处) — 补 role/aria/tabindex/keydown + 处理器签名放宽;color-picker clear 移出 button;
segmented radiogroup + 每实例 name;carousel 正确 aria 关联;date-picker grid 三层语义。
一致性 BEM — radio/check-box/calendar/timeline/button-3d/rate 状态类走 ns 命名空间约定。
设计取舍 — tag solid 实现饱和度差异;steps 移除无样式的
navigation死类型。性能/去重 — form 删重复 deep watch;grid resize rAF 节流;badge
@mixin抽公共块。审查整改
落地后经
/code-review-expert:0 P0 / 0 P1 / 2 P2 / 6 P3,已全部整改(textarea no-op 真修、table-column 改 DOM 排序、modal/message/tree/date-picker/tag/config-provider 6 项 P3)。
排除项
input-number经验证为非缺陷(clamp-on-keystroke 是有意 UX、测试断言该行为),未改。测试
cd packages/ccui && npx vp test --environment jsdom --run→ 93 files / 2028 passedpnpm docs:build→ 无 Undefined variable,build complete人工抽检(可选,单测覆盖不到)
slidesToShow>1下 aria 关联的读屏体验Summary by CodeRabbit
New Features
Bug Fixes
Improvements