HD-04 scope, against heroui ce90ea3 cn sources: - stale/fictional content: input.md no longer claims TextField is unmigrated; color-field.md no longer claims ColorPicker is private; header.md drops the fictional Header.Root subcomponent and the stale 'menus not migrated' wording (MenuSection label registration is now documented from HeaderRoot source); radio-group.md drops three copied CheckboxGroup wordings (variant override is Radio's, scalar emits, native single-value submit); input-otp.md drops the fictional data-complete state and lists the real missing upstream props - toggle-button disabled row now matches the real CSS hooks (:disabled / [aria-disabled], with data-disabled as a marker only) - part API / CSS classes / interactive states restored per pinned sources: button (full class lists + real variable-based global CSS), accordion (per-part tables + variant/state lists), card (per-part tables + variant list), switch (SwitchGroup snippet + Switch/ SwitchGroup class lists + states), color-field Group (class list + states), input-otp (variant notes, global CSS, class/state lists); input-group gains the two upstream usage chapters - RelatedComponents restored from the pinned componentRelationships (first-3, filtered against componentsMap): 64 pages rewritten, list-box/slider sections added, 7 empty-mapping pages' fabricated entries removed; RelatedShowcases left unmigrated with its real data inventory recorded (2 cases, showcase-site cards) - defaults unified on implementation evidence: granularity (inferred day/minute) and visibleYears (full min-max span, no "or 20" fallback); HD-03 hand-offs resolved (trigger focus-visible noted for HD-06, width guards kept) - new demos: header-collection-grouping (MenuSection/ListBoxSection label wiring), empty-state-collection (collection empty slot); empty-state page deduplicated with a boundary compatibility note - ComponentPreview minHeight/isBgSolid restored per the 30 upstream marks; tabs-overflow max-w-full kept after measuring internal scroll - tests: +3 header registration/demo cases, +1 empty-state collection case; full suite 110 files / 1630 tests, typecheck and build:docs pass
验证入口
测试按风险选择,不要求每次局部修改遍历全库。当前仅支持浏览器客户端使用,暂不支持SSR、服务端水合或Nuxt服务端渲染。除用户明确重新启用外,不开发、不修复、不新增也不运行相关专项;历史通过记录不构成支持承诺。SSR遗留文件和混合案例已删除,仅从Git查询,客户端回归保留。
日常修改
先选组件与共享依赖的明确测试。例如修改ComboBox/Autocomplete:
pnpm exec vitest run tests/combo-box.test.ts tests/autocomplete.test.ts tests/b02-public-integration.test.ts tests/regressions/collection/picker-public-contracts.test.ts
pnpm typecheck
修改字段、集合、弹层等共享协议时,加入其基础测试和使用者。用rg '组件名|协议文件' tests找回归,不要求阅读所有历史报告。文档代码、样式和公共导出分别补相应的demo/构建/产物验证。
辅助选择命令:
pnpm test:related packages/vue/src/components/combo-box/ComboBox.vue
这是Vitest静态依赖图筛选,包根导入可能扩大范围,CSS/动态依赖可能漏选;只作辅助,不能代替任务卡列出的行为场景。无关联测试会失败,不能解释为组件已验收。
集成检查
| 命令 | 范围 |
|---|---|
| pnpm test / pnpm test:unit | 全部现存客户端回归,没有SSR排除或skip配置 |
pnpm test:related <源文件> |
同一客户端范围下的静态依赖辅助筛选 |
| pnpm typecheck | 源码/工作区类型,不代替发布类型 |
| pnpm build:docs | 库、样式与文档站静态构建,保留文档渲染要求,不视为组件SSR支持 |
| pnpm build:playground | 浏览器验证入口生产构建 |
现有97个测试文件包含1415项客户端用例,默认全部运行;不再维护SSR排除规则或相关命令。逐像素自动对比、完整读屏矩阵、真机矩阵、Nuxt集成暂不投入。
不新增普遍服务端、无document运行、ID水合稳定、Teleport服务端、Nuxt服务端适配等验收要求。NodeNext是发布类型解析模式,不代表要求SSR支持。
真浏览器与产物
- 弹层/拖动/滚动/动画/布局:真实打开公开组合,确认面板可见、可点、选择生效、焦点与关闭正确。aria-expanded或jsdom挂载不是可见性证据。
- 同次变更先验核心路径,再验受控/禁用/表单/动态更新等适用边界;不要求逐个点击所有文档页面。
- 公开API/导出/打包变动:用最终tarball独立安装,执行相关 消费契约,包含NodeNext/bundler正反类型;不使用源码alias。
- SSR/水合/Nuxt服务端不支持、不执行。读屏/逐像素等没做的专项写清楚,不自动扩大范围。
新增与整理测试
先检查同一行为是否已有断言。修复时优先补到对应组件或基础协议套件;独立且有必要的场景才新建文件,以能力命名,不按“review-第几轮”新增。历史probe逐步随组件维护归并;删除前必须给出等价覆盖位置,不能通过减少期望、skip或删除反例掩盖客户端回归。用户已明确移出范围的SSR历史代码已删除,不作为客户端覆盖要求。共享夹具只在真实重复已确认时提取,不建立另一层测试框架。
返修回归位置
20份历史review/probe/takeover/fidelity套件已按能力移入tests/regressions:toast-table、menu-dropdown、collection、overlay、color、toolbar、button-toggle、navigation-otp。文件以行为命名;断言原样保留,未来修复优先补到对应能力目录。不因减少文件数量而合并隔离的cleanup生命周期,不把本轮归组描述为重复断言已删除。