Skip to content

feat: support sub-page-list block for docx document#1168

Open
ZEden0 wants to merge 2 commits into
larksuite:mainfrom
ZEden0:feat-cli-docx-folder-manager
Open

feat: support sub-page-list block for docx document#1168
ZEden0 wants to merge 2 commits into
larksuite:mainfrom
ZEden0:feat-cli-docx-folder-manager

Conversation

@ZEden0
Copy link
Copy Markdown
Collaborator

@ZEden0 ZEden0 commented May 29, 2026

Summary

Document the CLI-facing Docx child page list resource block for the FolderManager rollout. This PR updates the lark-doc skill references so agents can read <sub-page-list> fetch output and produce <sub-page-list></sub-page-list> insert/edit input for Wiki documents.

Changes

  • Added fetch documentation for <sub-page-list> output, including wiki-token, space-id, has-more, and nested <sub-page> metadata.
  • Updated XML authoring documentation to list <sub-page-list> as a resource block that can be inserted only in Wiki documents.
  • Added sub-page-list to the documented resource block copy support list and complete XML example set.
  • Kept the CLI contract scoped to Agent-readable and writable XML.

Test Plan

  • Reviewed the requirement doc's CLI section and matched the documented XML contract.
  • Verified the branch diff against main is limited to skills/lark-doc/references/lark-doc-fetch.md and skills/lark-doc/references/lark-doc-xml.md.
  • make unit-test

Summary by CodeRabbit

  • Documentation
    • Added documentation for the <sub-page-list> resource block feature available in wiki documents.
    • Documented copy and move capabilities for this block type.
    • Included usage examples demonstrating implementation of the new resource block.

Review Change Stack

- lark-doc-xml.md §三「资源块」: add <folder-manager wiki-token="..."> entry
  with full sub-page schema (title / url / file-type+doc-id fallback /
  space-id / owner / owner-id / create-time / edit-time, ms timestamps,
  has-more="true" beyond 100 children)
- lark-doc-xml.md §四「复制」: append folder-manager to copy support list
  (per spec FE-1 TC-D acceptance)
- lark-doc-xml.md §八 完整示例: add folder-manager example
- lark-doc-fetch.md: add 子页面列表 section explaining fetch behavior,
  url-first / file-type+doc-id fallback, container-only on wiki.core
  failure or no permission

Spec ref: cli-docx-folder-manager FE-1

Change-Id: I746fbebcc3398c5ec0b144f2eb2a306e6d96fb74
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 29, 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: 6a12ead7-d195-4987-9b9c-3c484ba4c810

📥 Commits

Reviewing files that changed from the base of the PR and between 8ec3f8a and d2869fc.

📒 Files selected for processing (1)
  • skills/lark-doc/references/lark-doc-xml.md
✅ Files skipped from review due to trivial changes (1)
  • skills/lark-doc/references/lark-doc-xml.md

📝 Walkthrough

Walkthrough

The PR updates Lark Doc XML documentation to introduce <sub-page-list> as a supported resource block. Changes add the element to the reference table with wiki-only scope, extend block-copy rules to include it alongside other resource blocks, and provide a complete usage example.

Changes

Sub-page-list Element Documentation

Layer / File(s) Summary
Sub-page-list reference, rules, and examples
skills/lark-doc/references/lark-doc-xml.md
Reference table adds <sub-page-list> entry marked as wiki-only, block-copy rules extend to support <sub-page-list> alongside other resource blocks, and complete example demonstrates the element usage.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Suggested reviewers

  • SunPeiYang996

Poem

🐰 A new block arrives, so modest and small,
Sub-page-list joins the wiki's hall,
Copy rules expand with a gentle touch,
Examples now show us just how much,
Documentation grows, we needn't stall!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title describes a feature addition for sub-page-list block documentation, which aligns with the main change of updating lark-doc skill references.
Description check ✅ Passed The description includes all required sections: Summary, Changes, and Test Plan with checkboxes, following the template structure completely.
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.

@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 May 29, 2026
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-doc/references/lark-doc-fetch.md`:
- Around line 138-142: The <sub-page> fetch output is underspecified — update
lark-doc-fetch.md to document the complete <sub-page> element schema and
fallback rules: enumerate every attribute/key the CLI produces (e.g., title,
doc-id, file-type, updated-at/modified-by/owner, excerpt/summary, url/permalink,
has-children/child-count, mime-type, thumbnails/preview, permissions/visibility,
and any source/provider id), state which attributes are optional vs required,
and specify fallback/derivation precedence (e.g., use metadata.title then
fallback to first heading then filename; use doc-id if present else construct
from space-id+path; prefer explicit file-type then infer from mime-type),
reference the <sub-page> tag and the surrounding <sub-page-list> example, and
replace the minimal example XML with a full annotated example showing all fields
and an explicit note about parser behavior when fields are missing.
🪄 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: 32b23e98-b0fa-43fc-b0cd-03248c056998

📥 Commits

Reviewing files that changed from the base of the PR and between 0a2c320 and 8ec3f8a.

📒 Files selected for processing (2)
  • skills/lark-doc/references/lark-doc-fetch.md
  • skills/lark-doc/references/lark-doc-xml.md

Comment thread skills/lark-doc/references/lark-doc-fetch.md Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 29, 2026

🚀 PR Preview Install Guide

🧰 CLI update

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

🧩 Skill update

npx skills add ZEden0/cli#feat-cli-docx-folder-manager -y -g

@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.90%. Comparing base (a2cc5e1) to head (d2869fc).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1168      +/-   ##
==========================================
+ Coverage   68.77%   68.90%   +0.12%     
==========================================
  Files         628      628              
  Lines       58670    58735      +65     
==========================================
+ Hits        40353    40473     +120     
+ Misses      15021    14958      -63     
- Partials     3296     3304       +8     

☔ 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.

Change-Id: I6a19d223a45b3d01f22ed194b98a4a18efa55424
@ZEden0 ZEden0 force-pushed the feat-cli-docx-folder-manager branch from 8ec3f8a to d2869fc Compare May 29, 2026 07:59
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.

1 participant