Skip to content

docs(mail): expose user_mailbox.allow_senders/blocked_senders#943

Open
haidaodashushu wants to merge 2 commits into
larksuite:mainfrom
haidaodashushu:feat/27a6227
Open

docs(mail): expose user_mailbox.allow_senders/blocked_senders#943
haidaodashushu wants to merge 2 commits into
larksuite:mainfrom
haidaodashushu:feat/27a6227

Conversation

@haidaodashushu
Copy link
Copy Markdown
Collaborator

@haidaodashushu haidaodashushu commented May 18, 2026

Expose mail user mailbox allow/block sender resources through the CLI metadata so users can invoke list / batch_create / batch_remove against the new endpoints from the lark-cli surface.

Changes

  • Add mail.user_mailbox.allow_senders and mail.user_mailbox.blocked_senders resources (list / batch_create / batch_remove).
  • Refresh generated mail metadata to surface these methods to the CLI.
  • Reuse existing mail:user_mailbox.message:readonly / mail:user_mailbox.message:modify scopes — no new scope namespace.

Sprints

ID Title Status
S5 Synthesize transport contract for larksuite/cli passed
S8 Update public larksuite/cli generated mail metadata passed

This PR was created autonomously. Quality gates were enforced by the repo's pre-commit hooks.

Summary by CodeRabbit

  • Documentation
    • Added documentation for managing trusted (allow) and blocked sender lists, including address/domain granularity and mutual-exclusivity rules.
    • Documented limits (per-user max ~2000 entries, batch operation max 100) and behavior for batch create/remove and listing with pagination/sorting.
    • Updated API resource descriptions and required permission scopes for sender-list management operations.

Review Change Stack

Surface the new per-user allow / blocked sender resources (list /
batch_create / batch_remove) in skills/lark-mail/SKILL.md so AI agents
can discover and call them via the native API path. Both resources
reuse the existing mail:user_mailbox.message scope namespace; no new
scope is introduced.

Also add an "信任/屏蔽发件人 (Allow/Block List)" entry to the mail
domain skill template so the new concept appears under "核心概念"
alongside Rule and Template. SKILL.md is regenerated by the registry
pipeline from this template plus the refreshed mail meta; the
incidental description / wording updates on existing resources are
the same regeneration's output.

skills/lark-mail/SKILL.md is the only generated artifact tracked in
this repo; internal/registry/meta_data.json stays gitignored and is
fetched at build time.

sprint: S8
@github-actions github-actions Bot added domain/mail PR touches the mail domain size/M Single-domain feat or fix with limited business impact labels May 18, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 18, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d41c68ee-b728-45ab-864a-a2aa216a2e1f

📥 Commits

Reviewing files that changed from the base of the PR and between 5b95544 and 20a2c47.

📒 Files selected for processing (1)
  • skills/lark-mail/SKILL.md

📝 Walkthrough

Walkthrough

This PR adds documentation for a new mail sender filtering feature: an Allow/Block List concept, two new mailbox API resources (allow_senders, blocked_senders) with batch/list operations and limits, and updated permission mappings and mailbox resource notes.

Changes

Allow/Block List Mail Feature

Layer / File(s) Summary
Core concept definition for allow/block list
skill-template/domains/mail.md, skills/lark-mail/SKILL.md
Defines Allow/Block List (trusted/blocked senders) with mutual exclusivity, sender_type granularity (email or domain), 2000-item per-user limit, and 100-item batch operation limits.
New allow_senders and blocked_senders API resources
skills/lark-mail/SKILL.md
Introduces user_mailbox.allow_senders and user_mailbox.blocked_senders endpoints supporting batch_create, batch_remove, and list operations with constraints, matcher rules, and pagination/sorting semantics.
Permission mappings and resource documentation refinement
skills/lark-mail/SKILL.md
Adds permission table rows mapping all allow/block sender operations to mail:user_mailbox.message:modify scope, and enriches documentation for existing mailbox resources (drafts, events, folders, labels, contacts, messages, rules, templates, threads) with clarified behavior and semantics.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

documentation

Suggested reviewers

  • chanthuang
  • infeng

Poem

A rabbit nibbled bits of mail,
Whitelists blooming, blacklists pale,
Two thousand trusted, batches by the score,
I hopped through docs to add one more,
Hooray—now senders sleep or sail! 🐇📬

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description covers summary, main changes, and sprints, but is missing the required 'Test Plan' and 'Related Issues' sections from the template. Add the 'Test Plan' section documenting how the changes were verified, and add the 'Related Issues' section (or confirm 'None' if applicable).
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change—exposing new allow_senders and blocked_senders resources for user mailbox in mail documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@skills/lark-mail/SKILL.md`:
- Around line 567-568: The resource index is missing descriptions for
user_mailbox.rules.reorder and user_mailbox.rules.update; update SKILL.md to add
concise descriptions for both methods that state their purpose, required
parameters, return values, and error behavior—for example, explain that
user_mailbox.rules.reorder reorders rule IDs in the mailbox and accepts an
ordered list of rule IDs (returns the updated ordering or success status), and
that user_mailbox.rules.update updates a single rule by ID with provided rule
fields (returns the updated rule or an error if validation fails); ensure the
descriptions mention notable constraints (e.g., atomicity, validation) and match
the style/format of the surrounding API entries.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 73f74fd4-fdb4-4efe-82cb-69e554485f09

📥 Commits

Reviewing files that changed from the base of the PR and between 4b721c0 and 5b95544.

📒 Files selected for processing (2)
  • skill-template/domains/mail.md
  • skills/lark-mail/SKILL.md

Comment thread skills/lark-mail/SKILL.md Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.62%. Comparing base (7bad9f2) to head (20a2c47).
⚠️ Report is 44 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #943      +/-   ##
==========================================
+ Coverage   65.92%   67.62%   +1.69%     
==========================================
  Files         523      575      +52     
  Lines       49694    54336    +4642     
==========================================
+ Hits        32760    36743    +3983     
- Misses      14134    14549     +415     
- Partials     2800     3044     +244     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 18, 2026

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@20a2c478d3136ad7c3e2545c1752756f4b193f6f

🧩 Skill update

npx skills add haidaodashushu/lark-cli#feat/27a6227 -y -g

Per CodeRabbit review on PR larksuite#943 (skills/lark-mail/SKILL.md L567-568): the
user_mailbox.rules.reorder / user_mailbox.rules.update entries in the resource
index had empty descriptions. Filled with one-line descriptions following the
style of the surrounding entries (e.g. user_mailbox.templates.update). Both
descriptions state semantics + full-replacement / ordering invariant so users
scanning the index can tell them apart from create/delete.

Change-Type: ci-fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain/mail PR touches the mail domain size/M Single-domain feat or fix with limited business impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant