Skip to content

chore: clear lark-slides sync changes#1862

Closed
liuxin-0319 wants to merge 1 commit into
mainfrom
chore/sync-lark-slides-0706
Closed

chore: clear lark-slides sync changes#1862
liuxin-0319 wants to merge 1 commit into
mainfrom
chore/sync-lark-slides-0706

Conversation

@liuxin-0319

@liuxin-0319 liuxin-0319 commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

No changes are included in this PR.

Changes

  • Cleared the branch contents and left an empty commit only.

Test Plan

  • Not run; this PR has no file changes.

Related Issues

  • None

@github-actions github-actions Bot added the size/L Large or sensitive change across domains or core paths label Jul 13, 2026
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Lark Slides documentation now defines stricter generation, template, visual planning, asset fallback, chart, whiteboard, icon, and XML schema rules. Template overlap lint tests now discover and validate all XML templates in the assets directory.

Changes

Lark Slides guidance and validation

Layer / File(s) Summary
Generation rules and workflow constraints
skills/lark-slides/SKILL.md, skills/lark-slides/references/planning-layer.md, skills/lark-slides/references/visual-styles.md
Adds stricter canvas, template, image, auto-fit, planning, style, placeholder, and workflow requirements, including two new visual-style presets.
Asset, chart, and whiteboard guidance
skills/lark-slides/references/asset-planning.md, skills/lark-slides/references/iconpark.md, skills/lark-slides/references/lark-slides-whiteboard.md, skills/lark-slides/references/visual-planning.md, skills/lark-slides/references/xml-format-guide.md, skills/lark-slides/references/slides_xml_schema_definition.xml
Updates XML-native asset fallbacks, chart routing, icon colors, whiteboard/Mermaid/SVG selection, layout rules, and chart documentation.
XML schema reference expansion
skills/lark-slides/references/xml-schema-quick-ref.md
Expands presentation, slide, content, shape, image, table, chart, complete-example, and best-practice guidance based on the authoritative XSD.
Template overlap lint coverage
skills/lark-slides/scripts/xml_text_overlap_lint_test.py
Changes the helper to accept template paths and lints every XML file under assets/templates.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • larksuite/cli#389: Established the Lark Slides skill documentation and slide creation guidance extended here.
  • larksuite/cli#847: Introduced the XML text-overlap lint workflow that this test coverage continues.
  • larksuite/cli#1720: Covers overlapping hard constraints and user-uploaded PPTX template rules.

Suggested labels: domain/ccm

Suggested reviewers: fangshuyu-768, sunpeiyang996, syh-cpdsss

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning No pull request description was provided, so the required Summary, Changes, Test Plan, and Related Issues sections are missing. Add the template sections: Summary, Changes, Test Plan, and Related Issues, and briefly describe the motivation, main edits, and verification.
✅ Passed checks (3 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly summarizes the main change: syncing the lark-slides skill from the Doubao version.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/sync-lark-slides-0706

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.

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

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

🧩 Skill update

npx skills add larksuite/cli#chore/sync-lark-slides-0706 -y -g

@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.51%. Comparing base (83352fe) to head (ff05e8a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1862   +/-   ##
=======================================
  Coverage   74.51%   74.51%           
=======================================
  Files         871      871           
  Lines       90876    90876           
=======================================
  Hits        67720    67720           
  Misses      17888    17888           
  Partials     5268     5268           

☔ View full report in Codecov by Harness.
📢 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.

@liuxin-0319
liuxin-0319 force-pushed the chore/sync-lark-slides-0706 branch from b7f6616 to d1fae52 Compare July 13, 2026 09:14

@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: 4

🤖 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-slides/references/lark-slides-whiteboard.md`:
- Around line 53-57: The Mermaid type table in the whiteboard documentation is
out of sync with the authoritative schema. Remove the erDiagram and journey
entries from the applicable Mermaid types, including the entries near the
symbols shown in the diff, so the documentation matches
slides_xml_schema_definition.xml’s supported scenarios.

In `@skills/lark-slides/references/planning-layer.md`:
- Line 195: Update the adoption-trend chart entry’s fallback_if_missing guidance
to prohibit fabricated or unlabeled measurements. Specify that the fallback must
use a clearly labeled illustrative/mock chart or a qualitative XML-native
placeholder without invented data values.

In `@skills/lark-slides/scripts/xml_text_overlap_lint_test.py`:
- Around line 36-45: Guard
test_xml_text_overlap_lint_accepts_all_template_xml_files against a missing or
empty TEMPLATES_DIR glob by skipping the test when no XML templates are
available, or ensure the required template fixtures are restored. Preserve the
existing lint assertions when template_paths contains files.

In `@skills/lark-slides/SKILL.md`:
- Line 19: Revise the auto-fit guidance at skills/lark-slides/SKILL.md:19-19,
skills/lark-slides/SKILL.md:116-116, and
skills/lark-slides/references/visual-styles.md:40-40 so text is first shortened,
split, or moved during planning and readability is validated before using
auto-fit; describe auto-fit as a last-resort safeguard rather than a mandatory
default.
🪄 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: 9c4a43cd-60fe-4517-8bcd-d5d6224d4c6a

📥 Commits

Reviewing files that changed from the base of the PR and between 1ab8530 and d1fae52.

📒 Files selected for processing (11)
  • skills/lark-slides/SKILL.md
  • skills/lark-slides/references/asset-planning.md
  • skills/lark-slides/references/iconpark.md
  • skills/lark-slides/references/lark-slides-whiteboard.md
  • skills/lark-slides/references/planning-layer.md
  • skills/lark-slides/references/slides_xml_schema_definition.xml
  • skills/lark-slides/references/visual-planning.md
  • skills/lark-slides/references/visual-styles.md
  • skills/lark-slides/references/xml-format-guide.md
  • skills/lark-slides/references/xml-schema-quick-ref.md
  • skills/lark-slides/scripts/xml_text_overlap_lint_test.py

Comment on lines 53 to 57
| 饼图 | `pie` |
| 甘特图 | `gantt` |
| 状态图 | `stateDiagram-v2` |
| 思维导图 | `mindmap` |
| ER 图 | `erDiagram` |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Schema removed ER diagrams and user journeys from Mermaid applicable scenarios, but this doc still lists them.

slides_xml_schema_definition.xml line 3021 (the authoritative XML protocol source per SKILL.md) now reads: "适用场景: 流程图、时序图、思维导图、类图、甘特图、饼图等结构化图表" — explicitly dropping "ER 图、用户旅程". However, this file still lists erDiagram (line 57) and journey (line 269) as supported Mermaid types. Since the schema is the single source of truth, either update this doc to remove those entries or update the schema to retain them.

Also applies to: 264-269

🤖 Prompt for 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.

In `@skills/lark-slides/references/lark-slides-whiteboard.md` around lines 53 -
57, The Mermaid type table in the whiteboard documentation is out of sync with
the authoritative schema. Remove the erDiagram and journey entries from the
applicable Mermaid types, including the entries near the symbols shown in the
diff, so the documentation matches slides_xml_schema_definition.xml’s supported
scenarios.

- `{"asset_type":"architecture_diagram","purpose":"Explain component relationships.","suggested_query":"service architecture diagram","fallback_if_missing":"Draw a component diagram with grouped boxes, connector arrows, and short labels."}`
- `{"asset_type":"logo","purpose":"Identify the customer context.","suggested_query":"customer logo","fallback_if_missing":"Use a text label in a small badge."}`
- `{"asset_type":"chart","purpose":"Show adoption trend.","suggested_query":"monthly adoption trend chart","fallback_if_missing":"Render a native `<chart>` using the provided series when available; otherwise render a native `<chart>` with mock placeholder values and label it as 模拟数据,仅占位,待替换真实数据."}`
- `{"asset_type":"chart","purpose":"Show adoption trend.","suggested_query":"monthly adoption trend chart","fallback_if_missing":"Draw a simple trend line chart with axis labels and data points."}`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Do not fabricate unlabeled chart data in the fallback.

For an adoption-trend chart with missing data, drawing a trend line with data points can be mistaken for real measurements. Use a clearly labeled illustrative/mock chart, or render a qualitative XML-native placeholder without invented values.

Proposed wording
- "fallback_if_missing":"Draw a simple trend line chart with axis labels and data points."
+ "fallback_if_missing":"Render a clearly labeled illustrative trend diagram without implying real measurements."
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- `{"asset_type":"chart","purpose":"Show adoption trend.","suggested_query":"monthly adoption trend chart","fallback_if_missing":"Draw a simple trend line chart with axis labels and data points."}`
`{"asset_type":"chart","purpose":"Show adoption trend.","suggested_query":"monthly adoption trend chart","fallback_if_missing":"Render a clearly labeled illustrative trend diagram without implying real measurements."}`
🤖 Prompt for 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.

In `@skills/lark-slides/references/planning-layer.md` at line 195, Update the
adoption-trend chart entry’s fallback_if_missing guidance to prohibit fabricated
or unlabeled measurements. Specify that the fallback must use a clearly labeled
illustrative/mock chart or a qualitative XML-native placeholder without invented
data values.

Comment on lines +36 to +45
def test_xml_text_overlap_lint_accepts_all_template_xml_files(self) -> None:
template_paths = sorted(TEMPLATES_DIR.glob("*.xml"))
self.assertTrue(template_paths)
for template_path in template_paths:
with self.subTest(template=template_path.name):
result = xml_text_overlap_lint.lint_xml(
sample_xml,
sample_name,
template_path.read_text(encoding="utf-8"),
str(template_path),
)
self.assertNoXmlTextOverlapLintIssues(result, sample_name)
self.assertNoXmlTextOverlapLintIssues(result, template_path)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify whether the templates directory exists and contains XML files
TEMPLATES_DIR="skills/lark-slides/assets/templates"
if [ -d "$TEMPLATES_DIR" ]; then
  count=$(find "$TEMPLATES_DIR" -name '*.xml' | wc -l)
  echo "Directory exists. XML file count: $count"
  find "$TEMPLATES_DIR" -name '*.xml' -exec echo "  {}" \;
else
  echo "MISSING: $TEMPLATES_DIR does not exist"
fi

Repository: larksuite/cli

Length of output: 211


🏁 Script executed:

#!/bin/bash
set -euo pipefail

file="skills/lark-slides/scripts/xml_text_overlap_lint_test.py"

echo "--- file outline ---"
ast-grep outline "$file" --view expanded || true

echo "--- relevant lines ---"
sed -n '1,120p' "$file"

Repository: larksuite/cli

Length of output: 6509


Guard the template-XML smoke test This will fail until skills/lark-slides/assets/templates exists and contains at least one *.xml file; self.assertTrue(template_paths) trips on the empty glob. Add a skip/fixture guard or restore the templates before merging.

🤖 Prompt for 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.

In `@skills/lark-slides/scripts/xml_text_overlap_lint_test.py` around lines 36 -
45, Guard test_xml_text_overlap_lint_accepts_all_template_xml_files against a
missing or empty TEMPLATES_DIR glob by skipping the test when no XML templates
are available, or ensure the required template fixtures are restored. Preserve
the existing lint assertions when template_paths contains files.

Comment thread skills/lark-slides/SKILL.md Outdated

**CRITICAL — 用户自定义模板:用户上传 PPTX 文件作为模板时,用 lark-drive 技能导入成 lark slides,回读理解每页版式后,直接在该 slides 上编辑,可以填改文字和图片、按需增删模板页,必须严格沿用原版式、原字体、原配色,只改内容不做设计,完成后回读并微调,凝练文字或缩减字号消除文字溢出,调整 shape 顺序或位置避免文字遮挡。**

**CRITICAL — 防文本溢出:所有承载突出信息和密集文字的 `<content>` 必须设置 `autoFit="normal-auto-fit"`,字号会在框内自动缩排以防溢出。**

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Make auto-fit a last-resort safeguard, not the default text strategy.

The same mandatory shrink-to-fit rule appears in all three locations and conflicts with the planning contract that long text should be shortened, split, or moved before XML generation.

  • skills/lark-slides/SKILL.md#L19-L19: revise the global rule to require readability validation before auto-fit.
  • skills/lark-slides/SKILL.md#L116-L116: apply the same last-resort wording to Doubao dense-card guidance.
  • skills/lark-slides/references/visual-styles.md#L40-L40: keep the special-style rule consistent with the planning-layer policy.
📍 Affects 2 files
  • skills/lark-slides/SKILL.md#L19-L19 (this comment)
  • skills/lark-slides/SKILL.md#L116-L116
  • skills/lark-slides/references/visual-styles.md#L40-L40
🤖 Prompt for 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.

In `@skills/lark-slides/SKILL.md` at line 19, Revise the auto-fit guidance at
skills/lark-slides/SKILL.md:19-19, skills/lark-slides/SKILL.md:116-116, and
skills/lark-slides/references/visual-styles.md:40-40 so text is first shortened,
split, or moved during planning and readability is validated before using
auto-fit; describe auto-fit as a last-resort safeguard rather than a mandatory
default.

@liuxin-0319
liuxin-0319 force-pushed the chore/sync-lark-slides-0706 branch from d1fae52 to ff05e8a Compare July 13, 2026 12:50
@github-actions github-actions Bot added size/M Single-domain feat or fix with limited business impact and removed size/L Large or sensitive change across domains or core paths labels Jul 13, 2026
@liuxin-0319 liuxin-0319 changed the title docs: sync lark-slides skill from doubao version chore: clear lark-slides sync changes Jul 13, 2026
@liuxin-0319

Copy link
Copy Markdown
Collaborator Author

Closing this empty PR.

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

Labels

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