feat(whiteboard): enhance whiteboard svg parser - #1970
Conversation
📝 WalkthroughWalkthroughWhiteboard documentation now defines SVG parsing and fallback behavior more precisely, updates write-workflow guidance, and upgrades documented ChangesWhiteboard documentation
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@53b4cb5b9ce3add2309d44868e737c846f16278e🧩 Skill updatenpx skills add larksuite/cli#feat/whiteboard-svg-enhance -y -g |
There was a problem hiding this comment.
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
📒 Files selected for processing (15)
skills/lark-doc/references/lark-doc-whiteboard.mdskills/lark-whiteboard/SKILL.mdskills/lark-whiteboard/elements/layout.mdskills/lark-whiteboard/elements/schema.mdskills/lark-whiteboard/references/lark-whiteboard-update.mdskills/lark-whiteboard/references/lark-whiteboard-workflow.mdskills/lark-whiteboard/routes/dsl.mdskills/lark-whiteboard/routes/mermaid.mdskills/lark-whiteboard/routes/svg-edit.mdskills/lark-whiteboard/routes/svg.mdskills/lark-whiteboard/scenes/bar-chart.mdskills/lark-whiteboard/scenes/fishbone.mdskills/lark-whiteboard/scenes/flywheel.mdskills/lark-whiteboard/scenes/line-chart.mdskills/lark-whiteboard/scenes/treemap.md
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
c0a4957 to
53b4cb5
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
skills/lark-whiteboard/SKILL.md (1)
15-15:⚠️ Potential issue | 🟠 MajorPin every whiteboard CLI example to the exact reviewed version.
Replace
@^0.2.13with@0.2.13at 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
📒 Files selected for processing (15)
skills/lark-doc/references/lark-doc-whiteboard.mdskills/lark-whiteboard/SKILL.mdskills/lark-whiteboard/elements/layout.mdskills/lark-whiteboard/elements/schema.mdskills/lark-whiteboard/references/lark-whiteboard-update.mdskills/lark-whiteboard/references/lark-whiteboard-workflow.mdskills/lark-whiteboard/routes/dsl.mdskills/lark-whiteboard/routes/mermaid.mdskills/lark-whiteboard/routes/svg-edit.mdskills/lark-whiteboard/routes/svg.mdskills/lark-whiteboard/scenes/bar-chart.mdskills/lark-whiteboard/scenes/fishbone.mdskills/lark-whiteboard/scenes/flywheel.mdskills/lark-whiteboard/scenes/line-chart.mdskills/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
Summary
whiteboard SVG parser support shadow, gradient
Changes
Test Plan
lark-cli <domain> <command>flow works as expectedRelated Issues
Summary by CodeRabbit
<filter>shadow and<linearGradient>/<radialGradient>behaviors, and a clearer list of unsupported decorative features/boundary conditions.--idempotent-tokendescription with generation rules, and streamlined “write to board” strategy recommendations.