docs: clarify mail message shortcut guidance#1306
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (14)
✅ Files skipped from review due to trivial changes (5)
🚧 Files skipped from review as they are similar to previous changes (8)
📝 WalkthroughWalkthroughClarifies mail shortcuts: ChangesMail shortcut guidance and documentation
IM typed response updates
Sequence Diagram(s)sequenceDiagram
participant User
participant CLI as "mail +messages"
participant Backend as "messages.batch_get"
participant CLI_Merge as "CLI merger"
User->>CLI: provide N message IDs (e.g., 41)
CLI->>Backend: request IDs[0:20]
Backend-->>CLI: messages 0-19
CLI->>Backend: request IDs[20:40]
Backend-->>CLI: messages 20-39
CLI->>Backend: request IDs[40:41]
Backend-->>CLI: message 40
CLI->>CLI_Merge: merge responses preserving input order, collect unavailable IDs
CLI_Merge-->>User: merged output for all IDs (or backend rejects if total > 50)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
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. Comment |
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@9542b07307cb5e7be1306a9b29b9216029c9f6f6🧩 Skill updatenpx skills add bubbmon233/cli#feat/89883ef -y -g |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1306 +/- ##
==========================================
+ Coverage 70.95% 70.98% +0.02%
==========================================
Files 685 685
Lines 65702 65702
==========================================
+ Hits 46622 46639 +17
+ Misses 15401 15383 -18
- Partials 3679 3680 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
bcf7bf1 to
214b2f3
Compare
Clarify mail +message as single-email only and mail +messages as the multi-email path that chunks batch_get requests at 20 IDs and merges output while documenting the backend raw 50-ID validation limit. Update the mail +triage table tip and lark-mail docs to route one selected message to +message and multiple selected messages to +messages. Test: go test -count=1 ./shortcuts/mail Change-Type: ci-fix
Change-Type: ci-fix
| @@ -52,7 +52,7 @@ var MailMessages = common.Shortcut{ | |||
| body["message_ids"] = messageIDs | |||
There was a problem hiding this comment.
🤖 AI Review | [P2 正确性] dry-run 展示的 batch_get 请求与真实分批执行不一致
这里会把用户传入的全部 message_ids 放进一个 POST /messages/batch_get body,但 Execute 实际会按 20 个 ID 拆批。故障场景是 AI 对 41 或 60 个 ID 先跑 --dry-run:输出看起来像一次 raw 请求携带 41/60 个 ID,其中 60 个 ID 又与下方文案“raw request rejects more than 50 IDs”冲突,容易让调用方误判 +messages 不能处理 50+ 输入或复制出不可执行的 raw API 样例。
修复建议: 让 dry-run 也表达真实执行计划:对 >20 IDs 输出分批计划/多段 body,或只展示首批并明确 “dry-run body is illustrative; execution splits N IDs into M requests”,避免生成 raw-invalid 的单次请求。
如有疑问或认为判断不准确,欢迎直接回复讨论。
| } | ||
|
|
||
| data, err := runtime.DoAPIJSON("GET", feedGroupListPath, feedGroupListGroupsQuery(runtime), nil) | ||
| data, err := runtime.DoAPIJSONTyped("GET", feedGroupListPath, feedGroupListGroupsQuery(runtime), nil) |
There was a problem hiding this comment.
🤖 AI Review | [P3 可维护性] IM feed group 错误契约迁移缺少回归覆盖
这里把 feed group 调用从 DoAPIJSON 切到 DoAPIJSONTyped,成功数据结构不变,但错误分类/输出契约会从 legacy API error 路径变为 typed error 路径;同类改动还出现在 im_feed_group_list_item.go 和 im_feed_group_query_item.go。如果脚本或 AI 依赖旧的错误 envelope/message,非零 API code 场景会发生可见行为变化,但当前新增测试主要覆盖 mail 文案和成功分批,没有锁住 feed group 的错误输出。
修复建议: 补一组 feed group 非零 API code / HTTP error 的单测,断言返回的 code、message、log_id/subtype 等关键字段;或者在 PR 描述中明确这是有意的 IM 错误契约迁移。
如有疑问或认为判断不准确,欢迎直接回复讨论。
|
🤖 AI Review | CR 汇总 | 有风险(1 个 P2,1 个 P3) 增量审查:基于已有自动审查评论,本次新增 2 条评论。
已验证: |
Generated by the harness-coding skill.
Sprints
Source specs
This MR was created autonomously. Quality gates were enforced by the repo's own pre-commit hooks.
Summary by CodeRabbit
Documentation
mail +messageis single-message only; added guidance to usemail +messagesfor multiple IDs, client-side batching (20 IDs/request), merge behavior, and backend raw limit (50); updated triage/skill/reference docs and usage tips.Tests
Improvements