0727 fix rich text - #2062
Conversation
📝 WalkthroughWalkthroughCalendar create, update, get, and agenda commands now use ChangesCalendar description unification
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
tests/cli_e2e/calendar/calendar_description_rich_dryrun_test.go (2)
90-117: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winAssert that update omits the plain
descriptionfield.The create tests verify this, but
TestCalendar_UpdateDescriptionRichDryRunchecks onlydescription_rich. A request that sends both fields could therefore pass.🤖 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 `@tests/cli_e2e/calendar/calendar_description_rich_dryrun_test.go` around lines 90 - 117, Update TestCalendar_UpdateDescriptionRichDryRun to also assert that api.0.body.description is absent from the dry-run request, while preserving the existing description_rich assertion.
20-42: 📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy liftAdd live E2E coverage for rich
--description.The calendar E2E workflows only cover plain
Descriptionpayloads;TestCalendar_CreateEventandTestCalendar_UpdateEventWorkflowassertdata.event.descriptionand use simple strings, whilecalendar_description_rich_dryrun_test.goonly coversdescription_richvia dry-run. Add a self-contained live create/update workflow with credentials that sends Markdown--descriptionand asserts it is persisted/returned with the service’sdescription_richrepresentation, or reference equivalent coverage if it exists.🤖 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 `@tests/cli_e2e/calendar/calendar_description_rich_dryrun_test.go` around lines 20 - 42, Add self-contained live E2E coverage for rich Markdown descriptions, using the existing calendar create/update workflow symbols such as TestCalendar_CreateEvent and TestCalendar_UpdateEventWorkflow as references. Create an event with Markdown passed via --description, update it if needed, and assert the live service response persists and returns the content through data.event.description_rich rather than data.event.description; reuse existing credential and cleanup patterns, or reference equivalent coverage if already present.Source: Coding guidelines
shortcuts/calendar/description_rich_images_test.go (1)
256-277: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winAssert the complete typed error contract.
This test checks only
ValidationErrorandParam. Useerrs.ProblemOffor category/subtype, retain theValidationErrorassertion forParam, and verify that the underlying path-validation cause is preserved.🤖 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 `@shortcuts/calendar/description_rich_images_test.go` around lines 256 - 277, Expand TestCreate_LocalImageAbsolutePathRejected to assert the complete typed error contract: use errs.ProblemOf to verify the expected category and subtype, retain the *errs.ValidationError assertion for Param, and confirm the underlying absolute-path validation cause is preserved.Sources: Coding guidelines, Learnings
🤖 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-calendar/references/lark-calendar-create.md`:
- Line 35: Update the --description row in the documentation table to remove
spaces immediately inside the inline-code spans for the heading and quote
markers, while preserving the displayed Markdown syntax and all surrounding
description text.
In `@skills/lark-calendar/references/lark-calendar-update.md`:
- Line 46: Update the Markdown table entry for --description to remove spaces
immediately inside every inline-code span, including the heading-level examples,
while preserving the documented syntax and spacing outside the backticks.
---
Outside diff comments:
In `@shortcuts/calendar/description_rich_images_test.go`:
- Around line 256-277: Expand TestCreate_LocalImageAbsolutePathRejected to
assert the complete typed error contract: use errs.ProblemOf to verify the
expected category and subtype, retain the *errs.ValidationError assertion for
Param, and confirm the underlying absolute-path validation cause is preserved.
In `@tests/cli_e2e/calendar/calendar_description_rich_dryrun_test.go`:
- Around line 90-117: Update TestCalendar_UpdateDescriptionRichDryRun to also
assert that api.0.body.description is absent from the dry-run request, while
preserving the existing description_rich assertion.
- Around line 20-42: Add self-contained live E2E coverage for rich Markdown
descriptions, using the existing calendar create/update workflow symbols such as
TestCalendar_CreateEvent and TestCalendar_UpdateEventWorkflow as references.
Create an event with Markdown passed via --description, update it if needed, and
assert the live service response persists and returns the content through
data.event.description_rich rather than data.event.description; reuse existing
credential and cleanup patterns, or reference equivalent coverage if already
present.
🪄 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 Plus
Run ID: 27d964fb-7721-4abc-80b5-bb7f29741f8b
📒 Files selected for processing (13)
shortcuts/calendar/calendar_agenda.goshortcuts/calendar/calendar_create.goshortcuts/calendar/calendar_get.goshortcuts/calendar/calendar_test.goshortcuts/calendar/calendar_update.goshortcuts/calendar/description_rich_images.goshortcuts/calendar/description_rich_images_test.goshortcuts/calendar/helpers.goskills/lark-calendar/SKILL.mdskills/lark-calendar/references/lark-calendar-create.mdskills/lark-calendar/references/lark-calendar-recurring.mdskills/lark-calendar/references/lark-calendar-update.mdtests/cli_e2e/calendar/calendar_description_rich_dryrun_test.go
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@73712c7aa0fa0ece62b799e665325e70336ba57c🧩 Skill updatenpx skills add larksuite/cli#feat/0727_rich_text -y -g |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2062 +/- ##
=======================================
Coverage 75.15% 75.16%
=======================================
Files 912 912
Lines 96453 96451 -2
=======================================
+ Hits 72492 72495 +3
+ Misses 18383 18380 -3
+ Partials 5578 5576 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Changes
Test Plan
lark-cli <domain> <command>flow works as expectedRelated Issues
Summary by CodeRabbit
New Features
--descriptionMarkdown field for creating and updating events.Bug Fixes
descriptionfield.Documentation
--descriptioninstead of the deprecated description flag.