feat(minutes): add minutes edit shortcuts#1036
Conversation
|
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (11)
📝 WalkthroughWalkthroughAdds two minutes CLI shortcuts: ChangesMinutes Shortcuts
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1036 +/- ##
==========================================
+ Coverage 67.93% 67.96% +0.03%
==========================================
Files 603 605 +2
Lines 55779 55903 +124
==========================================
+ Hits 37894 37997 +103
- Misses 14750 14762 +12
- Partials 3135 3144 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@0c8f5cedeb460d51d58ff26942ac7631e81cb3fb🧩 Skill updatenpx skills add larksuite/cli#feat/minutes-shortcut -y -g |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
shortcuts/minutes/minutes_speaker_replace_test.go (1)
105-129: ⚡ Quick winStrengthen execute-path assertions for output contract.
Line 126-Line 129 currently verifies only success status. Add assertions for
minute_token,from_user_id, andto_user_idin formatted output to catch response-format regressions.🤖 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/minutes/minutes_speaker_replace_test.go` around lines 105 - 129, In TestMinutesSpeakerReplace_Execute enhance the success-path assertions by parsing the command output (stdout) produced by mountAndRun when running MinutesSpeakerReplace and asserting the formatted JSON includes the expected fields: minute_token (should equal "obcnq3b9jl72l83w4f149w9c"), from_user_id (should equal "ou_old_speaker"), and to_user_id (should equal "ou_new_speaker"); update the test to unmarshal stdout into a struct/map and add checks for these keys alongside the existing success check to catch response-format regressions.
🤖 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/minutes/minutes_speaker_replace_test.go`:
- Around line 18-19: Add explicit config-dir isolation to the unit tests by
calling t.Setenv("LARKSUITE_CLI_CONFIG_DIR", t.TempDir()) at the start of each
test (e.g., inside TestMinutesSpeakerReplace_Validate and the other test
functions in this file) or by invoking a shared helper before calling
cmdutil.TestFactory; ensure the environment variable is set before any config is
loaded so tests do not share config state across runs.
In `@shortcuts/minutes/minutes_update_test.go`:
- Around line 18-20: Several unit tests (including TestMinutesUpdate_Validate
and the other test functions that call cmdutil.TestFactory within this file)
share global CLI config state; add isolation by calling
t.Setenv("LARKSUITE_CLI_CONFIG_DIR", t.TempDir()) at the start of each test that
invokes cmdutil.TestFactory (i.e., before f, _, _, _ :=
cmdutil.TestFactory(...)). This ensures each test uses its own temporary config
directory and prevents cross-test state leakage.
---
Nitpick comments:
In `@shortcuts/minutes/minutes_speaker_replace_test.go`:
- Around line 105-129: In TestMinutesSpeakerReplace_Execute enhance the
success-path assertions by parsing the command output (stdout) produced by
mountAndRun when running MinutesSpeakerReplace and asserting the formatted JSON
includes the expected fields: minute_token (should equal
"obcnq3b9jl72l83w4f149w9c"), from_user_id (should equal "ou_old_speaker"), and
to_user_id (should equal "ou_new_speaker"); update the test to unmarshal stdout
into a struct/map and add checks for these keys alongside the existing success
check to catch response-format regressions.
🪄 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: 409325d5-606f-4978-95a7-5d4aea9a1a08
📒 Files selected for processing (10)
shortcuts/minutes/minutes_speaker_replace.goshortcuts/minutes/minutes_speaker_replace_test.goshortcuts/minutes/minutes_update.goshortcuts/minutes/minutes_update_test.goshortcuts/minutes/shortcuts.goskills/lark-minutes/SKILL.mdskills/lark-minutes/references/lark-minutes-speaker-replace.mdskills/lark-minutes/references/lark-minutes-update.mdtests/cli_e2e/minutes/minutes_speaker_replace_test.gotests/cli_e2e/minutes/minutes_update_test.go
201fc1e to
1be0b96
Compare
1be0b96 to
0c8f5ce
Compare
Summary
Adds minutes editing shortcuts so agents can update minute titles and replace transcript speakers from the CLI with structured validation and actionable API error hints.
Changes
minutes +updatefor updating a minute title through the minutes update API.minutes +speaker-replacefor rebinding transcript speakers between user open IDs.lark-minutesskill, and add unit plus dry-run E2E coverage.Test Plan
make unit-testgo vet ./...gofmt -l .produced no outputgo mod tidyleft the worktree cleango run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.6 run --new-from-rev=origin/maingo test ./tests/cli_e2e/minutesRelated Issues
Summary by CodeRabbit
New Features
Bug Fixes / UX
Documentation
Tests