Skip to content

test(shared): buildMainchainSummary + 4 个 workbench route/hook 补 119 个单元测试(Lane D #1764 第十批) - #1779

Merged
DeliciousBuding merged 1 commit into
masterfrom
test/shared-workbench-mainchain-routes-hooks-unit-tests
Aug 19, 2026
Merged

test(shared): buildMainchainSummary + 4 个 workbench route/hook 补 119 个单元测试(Lane D #1764 第十批)#1779
DeliciousBuding merged 1 commit into
masterfrom
test/shared-workbench-mainchain-routes-hooks-unit-tests

Conversation

@DeliciousBuding

Copy link
Copy Markdown
Collaborator

Summary

延续 #1765#1778,落地 Lane D 前端测试补债 (#1764) 第十批:给 1 个纯逻辑模块 + 4 个 workbench hook 补 119 个单元测试。不改任何产品代码。

为什么选它

  • mainchain/buildMainchainSummary.ts(176 行):mainchain 摘要构建纯逻辑,此前零覆盖。
  • useWorkbenchAgentsRoute/useWorkbenchDocsRoute:与既有 contacts/projects route 测试同模式,补齐 route 层。
  • useWorkbenchPanelLayout/useWorkbenchProfileChrome:面板布局与 profile chrome 交互状态,此前零覆盖。

覆盖范围

  • buildMainchainSummary(+53):9 态空输入、平台 surface(web/desktop/mobile)、supervisor label 回退链、worker 优先级、路由/事件计数矩阵、edgeRunId/runtime 优先级、evidence 覆盖
  • agents/docs route(+29):mockData 默认值、realDataMode guard、空选择 no-op、save/delete 短路、状态快照语义、草稿语义
  • panelLayout/profileChrome(+37):localStorage 恢复(含非法值)、拖拽/键盘 resize 阈值、workspace-pressure 自动折叠、DM 三分支、头像 plan、深链

Test plan

  • vitest run 新文件 — 119/119 通过
  • tsc --noEmit 全包 0 错误
  • CI 前端测试 job 通过

关联

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@DeliciousBuding, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 12 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 979c6b62-ffd2-4d76-a98f-a9e8fec42df2

📥 Commits

Reviewing files that changed from the base of the PR and between 36299d7 and 2262de3.

📒 Files selected for processing (5)
  • app/shared/src/workbench/mainchain/buildMainchainSummary.test.ts
  • app/shared/src/workbench/useWorkbenchAgentsRoute.test.ts
  • app/shared/src/workbench/useWorkbenchDocsRoute.test.ts
  • app/shared/src/workbench/useWorkbenchPanelLayout.test.ts
  • app/shared/src/workbench/useWorkbenchProfileChrome.test.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…个单元测试(Lane D #1764 第十批)

- mainchain/buildMainchainSummary.ts:+53(纯逻辑,9 态空输入/平台 surface/label 回退链/计数矩阵)
- useWorkbenchAgentsRoute/useWorkbenchDocsRoute:+29(renderHook 模式,guard/状态快照/草稿语义)
- useWorkbenchPanelLayout/useWorkbenchProfileChrome:+37(localStorage 恢复/拖拽阈值/DM 分支/头像计划)

不改任何产品代码。Lane D #1764

Co-authored-by: Cursor <cursor@vectorcontrol.tech>
@DeliciousBuding
DeliciousBuding force-pushed the test/shared-workbench-mainchain-routes-hooks-unit-tests branch from 01067cc to 2262de3 Compare August 19, 2026 19:58
@DeliciousBuding
DeliciousBuding merged commit a83da0e into master Aug 19, 2026
33 of 34 checks passed
@DeliciousBuding
DeliciousBuding deleted the test/shared-workbench-mainchain-routes-hooks-unit-tests branch August 19, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant