Skip to content

docs(wiki): clarify personal space discovery limits#1854

Open
xu91102 wants to merge 2 commits into
larksuite:mainfrom
xu91102:docs/wiki-personal-space-discovery
Open

docs(wiki): clarify personal space discovery limits#1854
xu91102 wants to merge 2 commits into
larksuite:mainfrom
xu91102:docs/wiki-personal-space-discovery

Conversation

@xu91102

@xu91102 xu91102 commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Fixes #1773

背景

wiki spaces list 可能不返回个人知识库或“我的文档库”。将空列表当作权限缺失会导致无效翻页或错误地切换为 bot 身份。

核心改动

  • 说明 personmy_library 不能可靠地通过 spaces list 枚举。
  • 保留已知 my_library ID 的直接获取路径。
  • 为未知目标补充 Drive 搜索到 origin_space_id 再列节点的发现流程。

验证

  • go test ./internal/qualitygate/rules -count=1
  • git diff --check

风险与回滚

仅补充 Skill/reference 的发现策略,不改变 CLI 命令或 API 行为。回滚本提交即可恢复原文档。

Summary by CodeRabbit

  • Documentation
    • Clarified that personal spaces and the “My Document Library” may not be reliably enumerated in space-list results (including when using user-mode listing).
    • Updated discovery workflow for unknown personal spaces: search in Drive to find the matching document and use its origin_space_id, then list nodes from that space.
    • Specified that if a Wiki URL/token is provided, users should resolve the space_id directly first to avoid unreliable listings.

@github-actions github-actions Bot added domain/ccm PR touches the ccm domain size/M Single-domain feat or fix with limited business impact labels Jul 11, 2026
@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4132db15-1c95-417f-bb92-b47ea3c43584

📥 Commits

Reviewing files that changed from the base of the PR and between 3aabf4a and 578a5b8.

📒 Files selected for processing (2)
  • skills/lark-wiki/SKILL.md
  • skills/lark-wiki/references/lark-wiki-space-list.md
✅ Files skipped from review due to trivial changes (1)
  • skills/lark-wiki/references/lark-wiki-space-list.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • skills/lark-wiki/SKILL.md

📝 Walkthrough

Walkthrough

更新 Wiki 技能文档,说明个人空间和“我的文档库”可能无法通过空间列表发现,并补充使用 Drive 搜索、origin_space_id 和已知空间 ID 查询节点的流程。

Changes

个人空间发现

Layer / File(s) Summary
个人空间发现与查询流程
skills/lark-wiki/SKILL.md, skills/lark-wiki/references/lark-wiki-space-list.md
说明 spaces list 可能不返回 personmy_library 空间;已知空间 ID 时使用 wiki spaces get,未知目标时通过 Drive 搜索获取 origin_space_id,再使用 wiki +node-list 查询节点。

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

  • larksuite/cli#512:同样调整 Wiki 文档中的个人库空间解析与 space_id 获取指引。
  • larksuite/cli#919:涉及 --as 身份选择及个人空间发现说明。
  • larksuite/cli#1275:同样调整 Wiki 路由和个人空间 space_id 解析指引。

Suggested reviewers: fangshuyu-768, wittam-01

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the documentation change about personal space discovery limits.
Description check ✅ Passed The description includes the motivation, main changes, verification, and related issue, though it uses custom headings instead of the template.
Linked Issues check ✅ Passed The PR documents the personal/my_library discovery gap and the Drive-search plus origin_space_id workaround required by #1773.
Out of Scope Changes check ✅ Passed The changes stay limited to documentation and guidance updates, with no unrelated behavior or API changes introduced.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 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-wiki/references/lark-wiki-space-list.md`:
- Around line 63-65: Update the direct my_library lookup in the spaces list
guidance to include the explicit --as user identity flag, matching the
user-owned resource requirement and the existing fallback command.

In `@skills/lark-wiki/SKILL.md`:
- Around line 25-30: Update the personal-space lookup guidance to first preserve
direct retrieval when the user provides a known my_library ID, using the
appropriate direct Wiki command with --as user. Only route unknown
personal-space targets through Drive +search, then use the returned
origin_space_id with wiki +node-list; keep the existing Wiki URL/token space_id
resolution precedence.
🪄 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: a104a98a-6ccd-4da8-9ac5-46b0867271ff

📥 Commits

Reviewing files that changed from the base of the PR and between 4847f06 and 3aabf4a.

📒 Files selected for processing (2)
  • skills/lark-wiki/SKILL.md
  • skills/lark-wiki/references/lark-wiki-space-list.md

Comment thread skills/lark-wiki/references/lark-wiki-space-list.md
Comment thread skills/lark-wiki/SKILL.md
@xu91102

xu91102 commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai 已处理两项建议:my_library 的直接查询现在显式使用 --as user;主 skill 现按已知 my_library ID、已给 Wiki URL/token、未知目标的 Drive 搜索三种路径依次处理,未知目标才使用 origin_space_idwiki +node-list。已运行 go test ./internal/qualitygate/rules -count=1git diff --check

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

@xu91102 Thanks for the update — glad to hear both suggestions are in: explicit --as user for the direct my_library lookup, and the ordered three-path resolution (known my_library ID → provided Wiki URL/token → Drive search fallback using origin_space_id with wiki +node-list) in the main skill doc. Good call on running go test ./internal/qualitygate/rules -count=1 and git diff --check to confirm nothing broke.

(=^・ω・^=)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain/ccm PR touches the ccm 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.

bug: does not return personal/my_library spaces

1 participant