Skip to content

feat(whiteboard): enhance whiteboard svg parser - #1970

Merged
cl900811 merged 1 commit into
mainfrom
feat/whiteboard-svg-enhance
Jul 20, 2026
Merged

feat(whiteboard): enhance whiteboard svg parser#1970
cl900811 merged 1 commit into
mainfrom
feat/whiteboard-svg-enhance

Conversation

@cl900811

@cl900811 cl900811 commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

whiteboard SVG parser support shadow, gradient

Changes

  • change whiteboard skill to support shadow, gradient

Test Plan

  • Unit tests pass
  • Manual local verification confirms the lark-cli <domain> <command> flow works as expected

Related Issues

  • None

Summary by CodeRabbit

  • Documentation
    • Expanded SVG handling guidance with precise editable-node vs embedded-image fallback rules, supported <filter> shadow and <linearGradient>/<radialGradient> behaviors, and a clearer list of unsupported decorative features/boundary conditions.
    • Refreshed whiteboard workflow instructions (DSL, Mermaid, SVG edit/render/export, and common scenes) with updated CLI version references and more actionable validation/preview guidance.
    • Improved --idempotent-token description with generation rules, and streamlined “write to board” strategy recommendations.

@github-actions github-actions Bot added domain/ccm PR touches the ccm domain size/L Large or sensitive change across domains or core paths labels Jul 20, 2026
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Whiteboard documentation now defines SVG parsing and fallback behavior more precisely, updates write-workflow guidance, and upgrades documented @larksuite/whiteboard-cli commands from ^0.2.12 to ^0.2.13.

Changes

Whiteboard documentation

Layer / File(s) Summary
SVG parsing and compatibility guidance
skills/lark-doc/references/lark-doc-whiteboard.md, skills/lark-whiteboard/routes/svg.md, skills/lark-whiteboard/routes/svg-edit.md
Documents editable-node recognition, embedded-image fallback, supported shadows and gradients, unsupported decorations, and SVG validation checks.
Whiteboard write workflow contracts
skills/lark-whiteboard/references/lark-whiteboard-workflow.md, skills/lark-whiteboard/references/lark-whiteboard-update.md
Updates input-format selection guidance, centralizes command references, and expands idempotent-token generation instructions.
CLI version alignment across workflows
skills/lark-whiteboard/SKILL.md, skills/lark-whiteboard/elements/*, skills/lark-whiteboard/routes/*, skills/lark-whiteboard/scenes/*
Changes documented whiteboard CLI commands to version ^0.2.13 across validation, rendering, conversion, and coordinate-export examples.

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

Possibly related PRs

  • larksuite/cli#502: Adds the whiteboard SVG documentation section refined by this change.
  • larksuite/cli#617: Also updates whiteboard CLI versions across SVG, DSL, Mermaid, and write workflows.
  • larksuite/cli#661: Also changes guidance for unsupported SVG decorations and gradient behavior.

Suggested reviewers: liangshuo-1

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: enhancing the whiteboard SVG parser.
Description check ✅ Passed The description matches the template and includes all required sections, though the test plan is still a placeholder.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/whiteboard-svg-enhance

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 20, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

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

🧩 Skill update

npx skills add larksuite/cli#feat/whiteboard-svg-enhance -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: 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-doc/references/lark-doc-whiteboard.md`:
- Line 116: Fix the malformed Markdown emphasis in the “不支持的装饰特性” heading by
removing the space immediately after the opening emphasis markers, while
preserving the heading text and closing markers.

In `@skills/lark-whiteboard/references/lark-whiteboard-update.md`:
- Line 19: Update the --idempotent-token documentation to state that the
timestamp-plus-scenario token is generated once for each logical update and
reused unchanged across retries; do not generate a fresh timestamp or
idempotency key per retry, since that can duplicate the write.

In `@skills/lark-whiteboard/routes/svg.md`:
- Line 55: Update the warning heading in the SVG guidance to use the standard
Markdown admonition syntax: replace the bold “[!IMPORTANT]” form with a
blockquote containing “[!IMPORTANT]” followed by the warning text, preserving
the existing Chinese message.

In `@skills/lark-whiteboard/SKILL.md`:
- Line 15: Pin every whiteboard CLI npx invocation to the exact `@0.2.13` version
instead of the floating @^0.2.13 range. Update all affected examples in
skills/lark-whiteboard/SKILL.md (15-15), skills/lark-whiteboard/routes/dsl.md
(16-16 and 28-33), skills/lark-whiteboard/routes/mermaid.md (19-22),
skills/lark-whiteboard/routes/svg-edit.md (56-59),
skills/lark-whiteboard/elements/layout.md (339-339),
skills/lark-whiteboard/elements/schema.md (275-282), and
skills/lark-whiteboard/scenes/bar-chart.md (11-11); each site requires the same
version-only replacement.
🪄 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: 2648ec13-7abb-4572-a8ef-13a122c314bb

📥 Commits

Reviewing files that changed from the base of the PR and between 78390f8 and c0a4957.

📒 Files selected for processing (15)
  • skills/lark-doc/references/lark-doc-whiteboard.md
  • skills/lark-whiteboard/SKILL.md
  • skills/lark-whiteboard/elements/layout.md
  • skills/lark-whiteboard/elements/schema.md
  • skills/lark-whiteboard/references/lark-whiteboard-update.md
  • skills/lark-whiteboard/references/lark-whiteboard-workflow.md
  • skills/lark-whiteboard/routes/dsl.md
  • skills/lark-whiteboard/routes/mermaid.md
  • skills/lark-whiteboard/routes/svg-edit.md
  • skills/lark-whiteboard/routes/svg.md
  • skills/lark-whiteboard/scenes/bar-chart.md
  • skills/lark-whiteboard/scenes/fishbone.md
  • skills/lark-whiteboard/scenes/flywheel.md
  • skills/lark-whiteboard/scenes/line-chart.md
  • skills/lark-whiteboard/scenes/treemap.md

Comment thread skills/lark-doc/references/lark-doc-whiteboard.md Outdated
Comment thread skills/lark-whiteboard/references/lark-whiteboard-update.md Outdated
Comment thread skills/lark-whiteboard/routes/svg.md Outdated
Comment thread skills/lark-whiteboard/SKILL.md
@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.97%. Comparing base (3c2cc27) to head (53b4cb5).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1970   +/-   ##
=======================================
  Coverage   74.97%   74.97%           
=======================================
  Files         897      897           
  Lines       94474    94474           
=======================================
  Hits        70831    70831           
  Misses      18216    18216           
  Partials     5427     5427           

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

@cl900811
cl900811 force-pushed the feat/whiteboard-svg-enhance branch from c0a4957 to 53b4cb5 Compare July 20, 2026 12:31

@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

♻️ Duplicate comments (1)
skills/lark-whiteboard/SKILL.md (1)

15-15: ⚠️ Potential issue | 🟠 Major

Pin every whiteboard CLI example to the exact reviewed version.

Replace @^0.2.13 with @0.2.13 at every affected site to prevent documentation from executing unreviewed future releases.

  • skills/lark-whiteboard/SKILL.md#L15-L15: pin the availability-check command.
  • skills/lark-whiteboard/routes/svg.md#L35-L37: pin the render, check, and export commands.
  • skills/lark-whiteboard/routes/svg.md#L40-L40: pin the standalone check command.
🤖 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-whiteboard/SKILL.md` at line 15, Pin every whiteboard CLI example
to the exact reviewed version by replacing @^0.2.13 with `@0.2.13` in
skills/lark-whiteboard/SKILL.md lines 15-15 and
skills/lark-whiteboard/routes/svg.md lines 35-37 and 40-40, covering the
availability-check, render, check, and export commands.

Source: Linters/SAST tools

🤖 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-whiteboard/routes/svg.md`:
- Line 40: Update the standalone `@larksuite/whiteboard-cli` --check example in
the SVG instructions to include the same -i <dir>/diagram.svg and -f svg
arguments as the full command, ensuring the check targets the intended SVG
input.

---

Duplicate comments:
In `@skills/lark-whiteboard/SKILL.md`:
- Line 15: Pin every whiteboard CLI example to the exact reviewed version by
replacing @^0.2.13 with `@0.2.13` in skills/lark-whiteboard/SKILL.md lines 15-15
and skills/lark-whiteboard/routes/svg.md lines 35-37 and 40-40, covering the
availability-check, render, check, and export commands.
🪄 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: 6b9561c1-bbd8-486b-b4d9-48e5164af178

📥 Commits

Reviewing files that changed from the base of the PR and between c0a4957 and 53b4cb5.

📒 Files selected for processing (15)
  • skills/lark-doc/references/lark-doc-whiteboard.md
  • skills/lark-whiteboard/SKILL.md
  • skills/lark-whiteboard/elements/layout.md
  • skills/lark-whiteboard/elements/schema.md
  • skills/lark-whiteboard/references/lark-whiteboard-update.md
  • skills/lark-whiteboard/references/lark-whiteboard-workflow.md
  • skills/lark-whiteboard/routes/dsl.md
  • skills/lark-whiteboard/routes/mermaid.md
  • skills/lark-whiteboard/routes/svg-edit.md
  • skills/lark-whiteboard/routes/svg.md
  • skills/lark-whiteboard/scenes/bar-chart.md
  • skills/lark-whiteboard/scenes/fishbone.md
  • skills/lark-whiteboard/scenes/flywheel.md
  • skills/lark-whiteboard/scenes/line-chart.md
  • skills/lark-whiteboard/scenes/treemap.md
🚧 Files skipped from review as they are similar to previous changes (10)
  • skills/lark-whiteboard/scenes/treemap.md
  • skills/lark-whiteboard/routes/mermaid.md
  • skills/lark-whiteboard/scenes/flywheel.md
  • skills/lark-whiteboard/references/lark-whiteboard-workflow.md
  • skills/lark-whiteboard/scenes/line-chart.md
  • skills/lark-whiteboard/routes/dsl.md
  • skills/lark-doc/references/lark-doc-whiteboard.md
  • skills/lark-whiteboard/routes/svg-edit.md
  • skills/lark-whiteboard/scenes/fishbone.md
  • skills/lark-whiteboard/scenes/bar-chart.md

Comment thread skills/lark-whiteboard/routes/svg.md
@cl900811
cl900811 merged commit 4cdfa2f into main Jul 20, 2026
42 of 47 checks passed
@cl900811
cl900811 deleted the feat/whiteboard-svg-enhance branch July 20, 2026 12:56
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/L Large or sensitive change across domains or core paths

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants