fix(slides): normalize presentation flag aliases#2032
Conversation
📝 WalkthroughWalkthroughSlide shortcuts now normalize presentation-related flag aliases to ChangesPresentation alias compatibility
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant CLI
participant SlidesShortcut
participant pflag
participant SlidesAPI
CLI->>SlidesShortcut: provide presentation alias
SlidesShortcut->>pflag: normalize alias to presentation
SlidesShortcut->>SlidesAPI: issue GET request for presentation
SlidesAPI-->>CLI: return dry-run request details
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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: 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 `@tests/cli_e2e/slides/slides_presentation_alias_dryrun_test.go`:
- Around line 16-50: Add a live E2E test alongside
TestSlidesPresentationAliasesDryRunE2E that creates a presentation, uses a
representative alias flag (such as --presentation-id) in a real Slides command,
and cleans up the created resource. Keep the existing dry-run alias matrix
unchanged, and assert the live command succeeds using the created presentation
identifier.
🪄 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: 6199fac5-7864-423f-a642-8041ef558012
📒 Files selected for processing (3)
shortcuts/slides/shortcuts.goshortcuts/slides/shortcuts_alias_test.gotests/cli_e2e/slides/slides_presentation_alias_dryrun_test.go
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@dbfe7e15a53212027c4b1b0ab19e7d36a8183ccc🧩 Skill updatenpx skills add larksuite/cli#fix/slides-presentation-flag-aliases -y -g |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2032 +/- ##
==========================================
+ Coverage 75.06% 75.08% +0.01%
==========================================
Files 905 905
Lines 96048 96066 +18
==========================================
+ Hits 72101 72128 +27
+ Misses 18397 18387 -10
- Partials 5550 5551 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Normalize common agent-generated presentation flag spellings to the canonical
--presentationflag across Slides shortcuts. The compatibility aliases are parse-time only, so they stay out of help and completion while avoiding an error/retry round trip.Changes
--presentation-id,--presentation-token,--token,--presentation_id,--xml-presentation-id, and--urlto--presentationon every Slides shortcut that declares the canonical flag.--help.+xml-getAPI request.Test Plan
GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_NOSYSTEM=1 make unit-testgo test ./shortcuts/slides ./tests/cli_e2e/slidesgo vet ./...gofmt -lproduces no output for changed Go filesgo mod tidyproduces no changesgolangci-lintreports 0 issueslark-cli slides +xml-get --helponly exposes--presentationRelated Issues
Summary by CodeRabbit
New Features
Bug Fixes
Tests