feat(devboard): Batch 6 DevTools 只读四页(Contracts/Deps/Coverage/Groups) - #37
Merged
Merged
Conversation
平台级只读浏览四页,全部落 @gocell/devboard,零跨包 import、零后端调用、 零图形库依赖(graph/tree/matrix 纯 SVG/CSS)。严守「绝不伪造」:可派生数据 走 CELL_MANIFEST 真实派生,不可派生数据走明确标注的静态快照。 - /contracts: registry 自所有 cell 的 produces/consumes 聚合派生(serve/call 关系,useContractsRegistry);governance gates CH-01..06 + typed response envelope 为静态快照,页头 banner 标注,待接 gocell validate --strict。 - /deps: cell 依赖图自 dependsOnCells 派生,4 视图 list/graph/tree/matrix, 视图切换器复用 useRovingTablist(APG tablist + roving tabindex)。 - /coverage: 实施进度矩阵(手维护 meta,真相源 dev-coverage.jsx,PRD §514)。 - /groups: Smart Groups preview,规则静态、成员实时计算自真实 manifest 字段。 集成:4 路由(apps/web)+ 4 exports 子路径;PDP 门降级 requiredResource:'cell' (后端无 contract/dep/group resource),/coverage 仅 requiresAuth(dev-tool 自览)。 i18n contracts/deps/coverage/groups 四命名空间(zh-CN + en-US)。 测试:devboard +191 新测试全绿(360 总),apps/web 74 绿,新文件覆盖率 98%。 ref: dev-coverage.jsx / dev-extras3.jsx / dev-develop.jsx / dev-cell.jsx Closes #17 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
review 实跑 6 reviewer(diff≥1500),修复全部 Cx1/Cx2 IN_SCOPE finding:
i18n(最关键,运行时 bug):
- 补全 10 个被引用但未定义的 key(contracts.detail.{panelLabel,kind}、
contracts.kind.filterLabel、coverage.{empty,kpi.regionLabel,legend.regionLabel,
filter.groupLabel}、deps.detail.{label,close}、groups.detail.and)——vue-i18n
非 key-typed + spec mock t 导致 typecheck/test/build 全过、仅 review 抓到。
另补 deps.list.tableLabel 供 a11y 修复用。zh-CN + en-US 同步,MessageSchema 校验。
a11y:
- CoverageView: aria-label 漏冒号绑定(渲染字面量)→ :aria-label;section
heading scope=colgroup → role=rowheader。
- ContractsView: <tr aria-selected>(table 角色非法)→ aria-current。
- GovernanceGatesPanel: 删除徽章重复 aria-label(保留 sr-only),避免双重朗读。
- DepsTreeView: 递归子树叶节点补 sr-only leaf 文本;外层 div+aria-label 无 role
→ section + aria-labelledby。
- DepsViewBar: aria-controls 覆盖所有 tab(panel 常驻 DOM,APG)。
- DepsListView / GroupsView: 表格补 aria-label / aria-labelledby;groups 详情区补标签。
类型/性能:
- ContractsView: selectedEnvelope computed 消除 responseEnvelopeFor 重复调用 + ! 断言;合并同源 import。
- useRovingTablist 泛型化 <T extends string = string>,DepsViewBar 去 as 强转(CellTabBar 向后兼容)。
- DepsGraphView: SVG font-size=11 魔法数字 → CSS class var(--text-xs);边 :key 用稳定 from-to。
- GroupsView: 去冗余 ?? [];memberCount 改 computed Map 备忘。
- DepsTreeView 递归子组件 emits 类型化。
延后(OUT_OF_SCOPE 既有债,非本 PR 文件):CellDetailView v1-mono 未定义类、
CellsListView ?? [] 冗余。
devboard 366 测试绿、覆盖率 98%;apps/web 74 绿、build OK;-w lint/typecheck 0 issue。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4 tasks
后端 ghbvf/gocell e5670302e(trace_id → audit reverse lookup)给 http/audit/list/v1 response 增加了 traceId 字段。codegen-readonly CI 对最新后端默认分支重新派生时检出 本仓库生成物漂移而变红。本地 `pnpm codegen` 后提交,解除门禁。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- ContractsView:可选择表格行从 `<tr tabindex=0>`+keydown 改为首列真实 `<button>` (aria-pressed 表达选中态),消除 tr-as-button a11y 反模式,与 CellsListView / DepsListView 的"首列交互件"house pattern 一致 - GroupsView:移除静态 Preview badge 上误用的 `role="status"`(live-region 语义) - DepsGraphView:为 SVG `rx="4"` 补 --r-sm token 豁免注释 - 同步更新 ContractsView / GroupsView 单测 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
Batch 6 平台级 DevTools 只读浏览四页,全部落
@gocell/devboard,零跨包 import、零后端调用、零图形库依赖(graph/tree/matrix 纯 SVG/CSS)。严守 cell README 的「绝不伪造」:可派生数据走CELL_MANIFEST真实派生,不可派生的后端事实走明确标注的静态快照。/contractsproduces/consumes(serve/call 关系,useContractsRegistry)静态快照banner,待接gocell validate --strict/depsdependsOnCells派生;4 视图 list/graph/tree/matrix,切换器复用useRovingTablist(APG tablist + roving tabindex)/coverageCELL_MANIFEST正交)dev-coverage.jsx,PRD §514)/groupsgroupMembers)方向经用户确认:真实派生 cell 依赖图 · 静态快照明确标注 · 单 PR 交付整个 Batch 6。
涉及包清单
@gocell/devboard:4 views + 2 composables + 4 静态数据模块 + deps 子组件(ViewBar/List/Graph/Tree/Matrix)+ contracts 子组件(GovernanceGatesPanel)+ README@gocell/core:i18n 新增contracts/deps/coverage/groups四命名空间(zh-CN + en-US,satisfies MessageSchema校验对齐)apps/web:4 路由注册 + router spec包边界 / 契约
packages/contracts/(git diff --exit-code packages/contracts/src/clean)。package.json#exports子路径(./views/{contracts,deps,coverage,groups}),与路由的深路径 dynamic import 对齐(Hard 收口)。contract/dep/groupresource,路由守卫降级requiredResource: 'cell'(同/cells);/coverage为 dev-tool 自览仅requiresAuth(设requiredAction会对不存在 resource fail-closed)。Test plan
pnpm -F @gocell/devboard test --run— 360 绿(+191 新)pnpm -F @gocell/devboard test:coverage— 新文件 98% stmts / 87% branch(门槛 80%)pnpm -F @gocell/web test --run— 74 绿(含 4 条新 Batch 6 路由断言)pnpm -w lint— 0 issuespnpm -w typecheck— 全包通过pnpm -F @gocell/web build— 成功,4 视图各自独立异步 chunk(Deps 13.3kB / Contracts 9.7kB / Coverage 8.9kB / Groups 5.7kB),无新 vendor 依赖ref: dev-coverage.jsx / dev-extras3.jsx / dev-develop.jsx / dev-cell.jsx
Closes #17
🤖 Generated with Claude Code