Skip to content

refactor(slides): streamline create workflow and validation#1887

Merged
ethan-zhx merged 10 commits into
mainfrom
refactor/slides-create-workflow-validation
Jul 15, 2026
Merged

refactor(slides): streamline create workflow and validation#1887
ethan-zhx merged 10 commits into
mainfrom
refactor/slides-create-workflow-validation

Conversation

@ethan-zhx

@ethan-zhx ethan-zhx commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Streamline the Lark Slides create/edit workflow and add validation coverage for XML, namespaces, icon types, text overlap, and screenshot requests.

Changes

  • Add and test XML readback and SML namespace validation flows.
  • Run slide lint before create and validate icon types, text overlap, and screenshot page limits.
  • Reorganize and update the lark-slides workflow and reference documentation.

Test Plan

  • Unit tests pass (not run locally per repository safety instructions)
  • Manual local verification confirms the lark-cli Slides flows work as expected (not run)

Related Issues

  • None

Summary by CodeRabbit

  • New Features
    • slides +xml-get can now fetch full presentation XML or a single slide XML (by ID/number), with optional --output, default JSON envelope, and --raw stdout mode.
    • slides +screenshot enforces max 10 pages per request when using slide selectors.
  • Bug Fixes
    • Improved validation for selector limits and conflicting/unsupported option combinations, including clearer validation hints.
  • Documentation
    • Updated slide workflows and references to standardize the slides +xml-get readback/verification flow and usage guidance.
  • Quality
    • Strengthened XML linting (schema/icon/namespace/overlap/overflow) and expanded automated test coverage.

@github-actions github-actions Bot added the size/XL Architecture-level or global-impact change label Jul 14, 2026
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Slides shortcuts now support bounded screenshot batches and flexible full- or single-slide XML retrieval. The XML linter adds schema, namespace, icon, text-overlap, and whiteboard checks, while Slides guidance documents revised creation, validation, readback, and template workflows.

Changes

Slides shortcut behavior

Layer / File(s) Summary
Enforce screenshot selector limits
shortcuts/slides/slides_screenshot.go, shortcuts/slides/slides_screenshot_test.go
SlidesScreenshot documents and enforces a maximum of 10 combined selectors across validation, dry-run, and execution.
Retrieve and emit XML
shortcuts/slides/slides_xml_get.go, shortcuts/slides/slides_xml_get_test.go
SlidesXMLGet supports full or single-slide retrieval, JSON envelopes, raw XML, optional file output, and selector validation.

XML linting and Slides guidance

Layer / File(s) Summary
Add XML schema and namespace validation
skills/lark-slides/scripts/xml_text_overlap_lint.py, skills/lark-slides/scripts/xml_text_overlap_lint_test.py
The linter validates XML structure, SXSD tags and attributes, SML prefixes, IconPark types, and icon fills.
Expand geometry and overlap detection
skills/lark-slides/scripts/xml_text_overlap_lint.py, skills/lark-slides/scripts/xml_text_overlap_lint_test.py
Element extraction, Unicode-aware text sizing, horizontal overflow detection, and whiteboard boundary-overlap reporting are expanded and tested.
Document planning and validation workflow
skills/lark-slides/SKILL.md, skills/lark-slides/references/*
Guidance adds planning, lint gates, readback, layout, icon, whiteboard, template-editing, and command-reference rules.

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant SlidesXMLGet
  participant SlidesAPI
  participant OutputWriter
  CLI->>SlidesXMLGet: provide presentation and optional slide selector
  SlidesXMLGet->>SlidesAPI: request full or single-slide XML
  SlidesAPI-->>SlidesXMLGet: return XML content
  SlidesXMLGet->>OutputWriter: emit JSON, raw XML, or file metadata
Loading

Possibly related PRs

  • larksuite/cli#1358: Introduced the Slides screenshot implementation extended here with the 10-selector limit.
  • larksuite/cli#1585: Introduced the SlidesXMLGet shortcut modified here for slide selectors and output modes.

Suggested labels: domain/ccm

Suggested reviewers: fangshuyu-768

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

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.
✅ Passed checks (4 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 is concise and accurately reflects the main refactor of the slides workflow and validation.
Description check ✅ Passed The description follows the required template with Summary, Changes, Test Plan, and Related Issues sections filled out.
✨ 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 refactor/slides-create-workflow-validation

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.

Comment thread skills/lark-slides/scripts/xml_text_overlap_lint.py Dismissed
Comment thread skills/lark-slides/scripts/xml_text_overlap_lint.py Dismissed
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 67.54967% with 49 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.68%. Comparing base (8acd55e) to head (87c055d).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
shortcuts/slides/slides_xml_get.go 67.64% 32 Missing and 12 partials ⚠️
shortcuts/slides/slides_screenshot.go 66.66% 2 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1887      +/-   ##
==========================================
+ Coverage   74.66%   74.68%   +0.01%     
==========================================
  Files         878      878              
  Lines       91764    91894     +130     
==========================================
+ Hits        68520    68633     +113     
- Misses      17930    17941      +11     
- Partials     5314     5320       +6     

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

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

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

🧩 Skill update

npx skills add larksuite/cli#refactor/slides-create-workflow-validation -y -g

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

🤖 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 `@shortcuts/slides/slides_screenshot_test.go`:
- Around line 293-298: Update the error assertion in the slide screenshot test
to inspect typed metadata through errs.ProblemOf instead of matching the error
message substring. Assert the expected category, subtype, and parameter metadata
for the maximum-pages validation while retaining the existing requirement that
an error is returned.

In `@shortcuts/slides/slides_screenshot.go`:
- Around line 284-288: Update validateSlidesScreenshotSelectorLimit so the
validation error message contains only the limit violation details, and attach
the “request at most 10 pages at a time” recovery guidance via WithHint.
Construct the error directly with errs.NewValidationError and preserve the
existing nil return when count is within maxSlidesPerScreenshot.

In `@shortcuts/slides/slides_xml_get_test.go`:
- Around line 387-406: Update TestSlidesXMLGetRejectsConflictingSlideSelectors,
TestSlidesXMLGetRejectsEmptySlideID, and
TestSlidesXMLGetRejectsRemoveAttrIDForSingleSlide to validate errors through
errs.ProblemOf(err), matching TestSlidesXMLGetRejectsUnsafeOutputPath. Assert
the expected category, subtype, and parameter metadata, and verify the
underlying cause is preserved instead of only checking ValidationError.Param.

In `@skills/lark-slides/references/examples.md`:
- Around line 10-11: Update the two table-of-contents links for 示例 7 and 示例 8 to
use fragments generated from their exact example headings, including the correct
Markdown anchor normalization. Verify both targets resolve successfully and
preserve the existing link text.
- Around line 57-71: Update the presentation creation flow around
PRESENTATION_ID so the lark-cli slides +create exit status is captured
separately from writing create.json, preserving failures instead of allowing the
pipeline to report jq’s status. Extract .data.xml_presentation_id from
create.json with jq -e and validate that it is a non-empty string before saving
it for readback.

In `@skills/lark-slides/references/troubleshooting.md`:
- Line 13: Update the two-step creation guidance in the troubleshooting
documentation to use the registered command syntax `xml_presentation.slide
create` instead of `xml_presentation.slide.create`, while preserving the
surrounding recovery flow.

In `@skills/lark-slides/references/validation-checklist.md`:
- Line 92: Update the whiteboard coordinate validation guidance in the checklist
to include lower-bound checks: topLeftX and topLeftY must be at least zero, and
width and height must be non-negative, alongside the existing right and bottom
upper bounds.

In `@skills/lark-slides/references/xml-schema-quick-ref.md`:
- Line 149: 更新该 XML schema 快速参考中关于 iconType 的说明,明确要求其必须存在于离线 IconPark 索引
iconpark-index.json 中,而非仅使用“已验证路径”的表述;保持 fillColor 和 iconpark.md 的相关规则不变。

In `@skills/lark-slides/scripts/xml_text_overlap_lint.py`:
- Around line 500-536: Update the shape text extraction in the element-building
loop so paragraph boundaries from separate <p> elements are preserved before
line-width estimation. Replace the strip_xml(content) path used for the
element’s “text” value with paragraph-aware normalization that emits newline
separators between paragraphs, and apply the same handling to the related text
extraction around the later reference. Keep existing tag removal and whitespace
behavior for content within each paragraph.
- Around line 733-734: Update lint_slide and the should_flag_overlap flow so
should_flag_horizontal_text_overflow is evaluated before the
declared-bounding-box intersection gate, allowing overflow across gaps to be
detected. Preserve intersection-based handling for other overlap cases, and add
a regression test covering adjacent text boxes with non-intersecting declared
boxes.
- Around line 408-462: Update validate_sml_tag_prefixes to create the Expat
parser with a namespace separator so StartNamespaceDeclHandler is enabled and
namespace_map is populated before prefixed-tag validation. Preserve the existing
declaration scoping and SML_NAMESPACE checks.

In `@skills/lark-slides/SKILL.md`:
- Line 13: Update the global hard constraint in the slide guidance to treat
960x540 as the default canvas size rather than an invariant. Instruct
implementations to preserve and use the declared dimensions of imported or
existing presentations, keeping all content within that presentation’s actual
page boundaries.
- Line 183: Replace the bare Chinese text under the XML <data> element with a
valid XML comment, preserving its guidance that shape, line, table, and chart
elements belong there.
🪄 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: 4d4fef28-2413-438b-b56e-985b09dcabb7

📥 Commits

Reviewing files that changed from the base of the PR and between ac2508d and 7d67a41.

📒 Files selected for processing (25)
  • shortcuts/slides/slides_screenshot.go
  • shortcuts/slides/slides_screenshot_test.go
  • shortcuts/slides/slides_xml_get.go
  • shortcuts/slides/slides_xml_get_test.go
  • skills/lark-slides/SKILL.md
  • skills/lark-slides/references/examples.md
  • skills/lark-slides/references/iconpark.md
  • skills/lark-slides/references/lark-slides-create.md
  • skills/lark-slides/references/lark-slides-media-upload.md
  • skills/lark-slides/references/lark-slides-pptx-template-workflows.md
  • skills/lark-slides/references/lark-slides-replace-pages.md
  • skills/lark-slides/references/lark-slides-replace-slide.md
  • skills/lark-slides/references/lark-slides-screenshot.md
  • skills/lark-slides/references/lark-slides-xml-get.md
  • skills/lark-slides/references/lark-slides-xml-presentation-slide-create.md
  • skills/lark-slides/references/lark-slides-xml-presentation-slide-delete.md
  • skills/lark-slides/references/lark-slides-xml-presentation-slide-get.md
  • skills/lark-slides/references/lark-slides-xml-presentations-get.md
  • skills/lark-slides/references/planning-layer.md
  • skills/lark-slides/references/troubleshooting.md
  • skills/lark-slides/references/validation-checklist.md
  • skills/lark-slides/references/visual-planning.md
  • skills/lark-slides/references/xml-schema-quick-ref.md
  • skills/lark-slides/scripts/xml_text_overlap_lint.py
  • skills/lark-slides/scripts/xml_text_overlap_lint_test.py
💤 Files with no reviewable changes (2)
  • skills/lark-slides/references/lark-slides-xml-presentation-slide-create.md
  • skills/lark-slides/references/lark-slides-media-upload.md

Comment thread shortcuts/slides/slides_screenshot_test.go
Comment thread shortcuts/slides/slides_screenshot.go
Comment thread shortcuts/slides/slides_xml_get_test.go
Comment thread skills/lark-slides/references/examples.md
Comment thread skills/lark-slides/references/examples.md Outdated
Comment thread skills/lark-slides/scripts/xml_text_overlap_lint.py
Comment thread skills/lark-slides/scripts/xml_text_overlap_lint.py Outdated
Comment thread skills/lark-slides/scripts/xml_text_overlap_lint.py Outdated
Comment thread skills/lark-slides/SKILL.md
Comment thread skills/lark-slides/SKILL.md Outdated
Comment thread skills/lark-slides/scripts/xml_text_overlap_lint.py
Comment thread shortcuts/slides/slides_xml_get.go
Comment thread skills/lark-slides/SKILL.md Outdated
Comment thread skills/lark-slides/SKILL.md
Comment thread skills/lark-slides/SKILL.md
Comment thread skills/lark-slides/scripts/xml_text_overlap_lint.py

@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: 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-slides/scripts/xml_text_overlap_lint_test.py`:
- Around line 595-596: Update the test assertions for the horizontal-overflow
case to also verify that the reported issue code is exactly bbox_overlap, while
preserving the existing error-count and element-pair assertions.
🪄 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: 2a49e8e2-b4c4-4815-9a40-9316053055f6

📥 Commits

Reviewing files that changed from the base of the PR and between 7d67a41 and 6d90cb3.

📒 Files selected for processing (10)
  • shortcuts/slides/slides_screenshot.go
  • shortcuts/slides/slides_screenshot_test.go
  • shortcuts/slides/slides_xml_get.go
  • shortcuts/slides/slides_xml_get_test.go
  • skills/lark-slides/SKILL.md
  • skills/lark-slides/references/asset-planning.md
  • skills/lark-slides/references/examples.md
  • skills/lark-slides/references/troubleshooting.md
  • skills/lark-slides/scripts/xml_text_overlap_lint.py
  • skills/lark-slides/scripts/xml_text_overlap_lint_test.py
💤 Files with no reviewable changes (1)
  • skills/lark-slides/references/asset-planning.md
🚧 Files skipped from review as they are similar to previous changes (7)
  • shortcuts/slides/slides_screenshot_test.go
  • skills/lark-slides/references/examples.md
  • shortcuts/slides/slides_xml_get_test.go
  • skills/lark-slides/SKILL.md
  • shortcuts/slides/slides_screenshot.go
  • shortcuts/slides/slides_xml_get.go
  • skills/lark-slides/scripts/xml_text_overlap_lint.py

Comment thread skills/lark-slides/scripts/xml_text_overlap_lint_test.py
@ethan-zhx
ethan-zhx force-pushed the refactor/slides-create-workflow-validation branch from 6d90cb3 to fba8d5e Compare July 15, 2026 03:47

@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

🧹 Nitpick comments (2)
skills/lark-slides/scripts/xml_text_overlap_lint.py (2)

246-296: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

path doesn't disambiguate siblings, so multi-slide validation output is ambiguous.

validate_sxsd_tag_attributes and validate_iconpark_icon_types both run once against the full <presentation> root (line 905-906), but the recursive visit() never records a child's ordinal position among its siblings. For a presentation with multiple <slide> elements (a supported, tested scenario per test_lint_xml_preserves_presentation_canvas_and_slide_order), an unsupported tag/attr or icon issue on slide 2 gets the exact same path string (e.g. "presentation/slide/data/shape") as the same issue would get on slide 1, making it hard to locate which slide actually has the problem.

♻️ Suggested fix: thread a sibling index into the path
-    def visit(element: ET.Element, ancestors: list[str], path: str) -> None:
+    def visit(element: ET.Element, ancestors: list[str], path: str, position: int | None = None) -> None:
         if should_skip_sxsd_subtree(element, ancestors):
             return

         tag_name = xml_local_name(element.tag)
-        current_path = f"{path}/{tag_name}" if path else tag_name
+        segment = f"{tag_name}[{position}]" if position is not None else tag_name
+        current_path = f"{path}/{segment}" if path else segment
         ...
-        for child in element:
-            visit(child, [*ancestors, tag_name], current_path)
+        for index, child in enumerate(element):
+            visit(child, [*ancestors, tag_name], current_path, index)

-    visit(root, [], "")
+    visit(root, [], "")

The same pattern applies to validate_iconpark_icon_types's visit() (lines 340-381). None of the provided tests assert on exact path strings, so this is safe to land independently.

Also applies to: 309-384

🤖 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.py` around lines 246 - 296,
Update the recursive visit functions in validate_sxsd_tag_attributes and
validate_iconpark_icon_types to include each element’s ordinal sibling index in
the generated path, while preserving existing tag names and traversal behavior.
Thread the index through recursion so repeated slide paths, such as slide 1
versus slide 2, are distinct in all reported issues.

481-495: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Switch parse_xml_root to defusedxml
ET.fromstring(xml) parses arbitrary slide XML here; defusedxml.ElementTree.fromstring is a safer drop-in that blocks DTD/entity-expansion payloads.

🤖 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.py` around lines 481 - 495,
Update parse_xml_root to use defusedxml.ElementTree.fromstring instead of the
standard ET.fromstring, while preserving the existing ParseError handling and
root validation behavior. Ensure the imported defusedxml parser exposes the
exception type caught by the current error handling.
🤖 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/examples.md`:
- Line 5: Update the command reference in the slide-creation guidance to use the
registered syntax “xml_presentation.slide create” instead of the dotted
“xml_presentation.slide.create” form, while preserving the surrounding
instructions about adding slides incrementally.

In `@skills/lark-slides/references/lark-slides-create.md`:
- Around line 8-10: Rephrase the guidance in the create slides documentation to
recommend using directly generated single-slide XML and avoiding payloads split
from presentation XML, rather than stating that such input is prohibited or
rejected. Preserve the behavior that slides +create accepts a JSON array and
submits each element as a slide.

---

Nitpick comments:
In `@skills/lark-slides/scripts/xml_text_overlap_lint.py`:
- Around line 246-296: Update the recursive visit functions in
validate_sxsd_tag_attributes and validate_iconpark_icon_types to include each
element’s ordinal sibling index in the generated path, while preserving existing
tag names and traversal behavior. Thread the index through recursion so repeated
slide paths, such as slide 1 versus slide 2, are distinct in all reported
issues.
- Around line 481-495: Update parse_xml_root to use
defusedxml.ElementTree.fromstring instead of the standard ET.fromstring, while
preserving the existing ParseError handling and root validation behavior. Ensure
the imported defusedxml parser exposes the exception type caught by the current
error handling.
🪄 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: d86534e1-7518-4c5c-8b7c-a936d709df7c

📥 Commits

Reviewing files that changed from the base of the PR and between 6d90cb3 and fba8d5e.

📒 Files selected for processing (26)
  • shortcuts/slides/slides_screenshot.go
  • shortcuts/slides/slides_screenshot_test.go
  • shortcuts/slides/slides_xml_get.go
  • shortcuts/slides/slides_xml_get_test.go
  • skills/lark-slides/SKILL.md
  • skills/lark-slides/references/asset-planning.md
  • skills/lark-slides/references/examples.md
  • skills/lark-slides/references/iconpark.md
  • skills/lark-slides/references/lark-slides-create.md
  • skills/lark-slides/references/lark-slides-media-upload.md
  • skills/lark-slides/references/lark-slides-pptx-template-workflows.md
  • skills/lark-slides/references/lark-slides-replace-pages.md
  • skills/lark-slides/references/lark-slides-replace-slide.md
  • skills/lark-slides/references/lark-slides-screenshot.md
  • skills/lark-slides/references/lark-slides-xml-get.md
  • skills/lark-slides/references/lark-slides-xml-presentation-slide-create.md
  • skills/lark-slides/references/lark-slides-xml-presentation-slide-delete.md
  • skills/lark-slides/references/lark-slides-xml-presentation-slide-get.md
  • skills/lark-slides/references/lark-slides-xml-presentations-get.md
  • skills/lark-slides/references/planning-layer.md
  • skills/lark-slides/references/troubleshooting.md
  • skills/lark-slides/references/validation-checklist.md
  • skills/lark-slides/references/visual-planning.md
  • skills/lark-slides/references/xml-schema-quick-ref.md
  • skills/lark-slides/scripts/xml_text_overlap_lint.py
  • skills/lark-slides/scripts/xml_text_overlap_lint_test.py
💤 Files with no reviewable changes (3)
  • skills/lark-slides/references/lark-slides-xml-presentation-slide-create.md
  • skills/lark-slides/references/asset-planning.md
  • skills/lark-slides/references/lark-slides-media-upload.md
🚧 Files skipped from review as they are similar to previous changes (16)
  • skills/lark-slides/references/lark-slides-replace-pages.md
  • skills/lark-slides/references/visual-planning.md
  • skills/lark-slides/references/lark-slides-xml-presentation-slide-get.md
  • skills/lark-slides/references/planning-layer.md
  • shortcuts/slides/slides_screenshot.go
  • shortcuts/slides/slides_screenshot_test.go
  • skills/lark-slides/references/lark-slides-xml-presentation-slide-delete.md
  • skills/lark-slides/references/lark-slides-xml-get.md
  • skills/lark-slides/references/lark-slides-screenshot.md
  • skills/lark-slides/references/xml-schema-quick-ref.md
  • skills/lark-slides/references/lark-slides-replace-slide.md
  • shortcuts/slides/slides_xml_get.go
  • skills/lark-slides/references/validation-checklist.md
  • shortcuts/slides/slides_xml_get_test.go
  • skills/lark-slides/references/lark-slides-xml-presentations-get.md
  • skills/lark-slides/SKILL.md

Comment thread skills/lark-slides/references/examples.md
Comment thread skills/lark-slides/references/lark-slides-create.md
@ethan-zhx
ethan-zhx force-pushed the refactor/slides-create-workflow-validation branch from fba8d5e to 87c055d Compare July 15, 2026 04:38

@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-slides/scripts/xml_text_overlap_lint.py`:
- Around line 713-719: Update the sibling filtering logic around
is_text_element, has_text_content, is_template_text_stack, and
is_similar_text_overlay so only the left element must be a text element with
content; allow non-text right siblings as overflow targets. Apply the text-stack
and similar-overlay exclusions only when the right element is also text, and add
a regression case covering text overflowing into an image.
- Around line 908-918: Update the pre-parse validation alongside the
namespace_issues handling so fatal structural SXSD issues, including
sxsd_unsupported_tag, return the existing structured error response before
parse_presentation is called. Alternatively, make slide parsing consume the
already validated root; preserve the machine-readable output shape and existing
handling for valid presentations.
🪄 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: 045c9b0c-1686-481c-b83f-e5f0cf901065

📥 Commits

Reviewing files that changed from the base of the PR and between fba8d5e and 87c055d.

📒 Files selected for processing (10)
  • shortcuts/slides/slides_screenshot.go
  • shortcuts/slides/slides_screenshot_test.go
  • shortcuts/slides/slides_xml_get.go
  • shortcuts/slides/slides_xml_get_test.go
  • skills/lark-slides/SKILL.md
  • skills/lark-slides/references/asset-planning.md
  • skills/lark-slides/references/examples.md
  • skills/lark-slides/references/troubleshooting.md
  • skills/lark-slides/scripts/xml_text_overlap_lint.py
  • skills/lark-slides/scripts/xml_text_overlap_lint_test.py
💤 Files with no reviewable changes (1)
  • skills/lark-slides/references/asset-planning.md
🚧 Files skipped from review as they are similar to previous changes (7)
  • shortcuts/slides/slides_screenshot_test.go
  • shortcuts/slides/slides_screenshot.go
  • skills/lark-slides/references/examples.md
  • shortcuts/slides/slides_xml_get.go
  • skills/lark-slides/SKILL.md
  • shortcuts/slides/slides_xml_get_test.go
  • skills/lark-slides/scripts/xml_text_overlap_lint_test.py

Comment thread skills/lark-slides/scripts/xml_text_overlap_lint.py
Comment thread skills/lark-slides/scripts/xml_text_overlap_lint.py
@ethan-zhx
ethan-zhx merged commit 49b4ccc into main Jul 15, 2026
68 checks passed
@ethan-zhx
ethan-zhx deleted the refactor/slides-create-workflow-validation branch July 15, 2026 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XL Architecture-level or global-impact change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants