fix(slides): improve missing screenshot selector guidance - #2177
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughThe screenshot command now uses shared structured errors for missing selectors and empty ChangesSlide screenshot validation
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
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 |
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@633872ba76ee9e7de2716ea175ba841585d2f870🧩 Skill updatenpx skills add larksuite/cli#fix/slides-screenshot-require-selector -y -g |
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 `@shortcuts/slides/slides_screenshot.go`:
- Line 84: Update list-mode slide selector validation around normalizeSlideIDs
and slidesScreenshotMissingSelectorError so an explicitly supplied empty
--slide-id is rejected before empty values are discarded, rather than allowing
the accompanying slide number to proceed. Preserve normal trimming and
normalization for non-empty IDs, and add a regression test covering --slide-id
"" together with --slide-number 1.
🪄 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: 434161a0-412a-41af-976f-5aab3133db1f
📒 Files selected for processing (5)
shortcuts/slides/slides_screenshot.goshortcuts/slides/slides_screenshot_test.goskills/lark-slides/SKILL.mdskills/lark-slides/references/lark-slides-screenshot.mdtests/cli_e2e/slides/slides_screenshot_dryrun_test.go
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2177 +/- ##
=======================================
Coverage 75.70% 75.71%
=======================================
Files 944 944
Lines 100288 100295 +7
=======================================
+ Hits 75926 75935 +9
+ Misses 18565 18564 -1
+ Partials 5797 5796 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Improve
slides +screenshothandling when list mode is invoked without--slide-idor--slide-number. The CLI now returns actionable typed guidance without issuing an API request.Changes
Validateas the selector validation source and remove the unreachable DryRun check.Test Plan
make unit-testgo vet ./...gofmt -l .go mod tidyproduced no changesgolangci-lintreported 0 issuesRelated Issues
Summary by CodeRabbit
Bug Fixes
Documentation