Skip to content

test(shared): hubClientPayloadRequestsSocial + PayloadPaths + chatview adapter 补 137 个单元测试(Lane D #1764 第七批) - #1776

Merged
DeliciousBuding merged 1 commit into
masterfrom
test/shared-social-paths-adapter-unit-tests
Aug 19, 2026
Merged

test(shared): hubClientPayloadRequestsSocial + PayloadPaths + chatview adapter 补 137 个单元测试(Lane D #1764 第七批)#1776
DeliciousBuding merged 1 commit into
masterfrom
test/shared-social-paths-adapter-unit-tests

Conversation

@DeliciousBuding

Copy link
Copy Markdown
Collaborator

Summary

延续 #1765#1773,落地 Lane D 前端测试补债 (#1764) 第七批:给 3 个纯逻辑模块补 137 个单元测试。不改任何产品代码。

为什么选它

  • hubClientPayloadRequestsSocial.ts(367 行):27 个 social 请求 builder,optional 字段存在性(hasOwnProperty vs undefined)是回归风险点。
  • hubClientPayloadPaths.ts(471 行):96 个 path builder,qs/URLSearchParams 语义(0/false/'' 保留、null/undefined 跳过)与 percent-encoding 边界。
  • chatview/adapter.ts(327 行):transcript→chatview 适配核心;resolveCompactDividerIndices 此前零覆盖。

覆盖范围

  • social(+23):27 个 builder、optional message 存在性、method-only bodyless、编码(CJK/emoji/斜杠)、seq 边界
  • paths(+27):96 个 builder 全量、qs 假值保留、空串 id 双斜杠、unicode、publicCatalog 参数覆盖
  • adapter(+87):blocksToTranscriptItems 全分支(agent_timeline 展平/run_step_group 递归/tool call-result 合并)+ resolveUnreadAnchorItemIndex(12)+ resolveCompactDividerIndices(13,首次覆盖)

Test plan

  • vitest run 新文件 — 137/137 通过
  • 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: 50 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?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

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: 888e2b04-c716-4083-93ea-de8b11488bb1

📥 Commits

Reviewing files that changed from the base of the PR and between 3737cdd and b638db0.

📒 Files selected for processing (3)
  • app/shared/src/chatview/adapter.test.ts
  • app/shared/src/hub/hubClientPayloadPaths.test.ts
  • app/shared/src/hub/hubClientPayloadRequestsSocial.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.

…w adapter 补 137 个单元测试(Lane D #1764 第七批)

- hubClientPayloadRequestsSocial.ts:+23(27 个 social builder 全量覆盖,optional 字段 hasOwnProperty 断言)
- hubClientPayloadPaths.ts:+27(96 个 path builder,qs 语义/percent-encoding/空串/unicode)
- chatview/adapter.ts:+87(blocksToTranscriptItems 全分支 + resolveUnreadAnchorItemIndex/resolveCompactDividerIndices 首次覆盖)

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

Co-authored-by: Cursor <cursor@vectorcontrol.tech>
@DeliciousBuding
DeliciousBuding force-pushed the test/shared-social-paths-adapter-unit-tests branch from 136c023 to b638db0 Compare August 19, 2026 16:41
@DeliciousBuding
DeliciousBuding merged commit 7f046f2 into master Aug 19, 2026
34 checks passed
@DeliciousBuding
DeliciousBuding deleted the test/shared-social-paths-adapter-unit-tests branch August 19, 2026 16:56
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