fix(base): add default-table follow-up hint to base-create#600
fix(base): add default-table follow-up hint to base-create#600
Conversation
📝 WalkthroughWalkthroughAdded a user-facing hint printed to stderr after successful base creation and updated tests to reset and assert stderr contains that hint when running the command. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Suggested reviewers
Poem
🚥 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@shortcuts/base/base_execute_test.go`:
- Around line 99-101: The test is asserting the follow-up hint from the JSON
envelope (data["hint"]) but the hint should be emitted to stderr; change the
assertion to capture and inspect the stderr buffer returned by
cmdutil.TestFactory(t, config) (or the TestFactory helper used in this test) and
assert that stderr contains baseCreateHint instead of checking data["hint"];
remove or stop setting expectations on data["hint"] and add an assertion that
the stderr buffer contains baseCreateHint (repeating the same change for the
similar assertions around the previous 204-206 block).
In `@shortcuts/base/base_ops.go`:
- Around line 67-69: Remove the "hint" field from the JSON envelope sent with
runtime.Out (the out map created in this block) and instead emit baseCreateHint
via the runtime stderr/diagnostic path; specifically, update the code around the
out map and runtime.Out(out, nil) (and after augmentBasePermissionGrant(...)) to
no longer set "hint": baseCreateHint and add a separate call that writes
baseCreateHint to the runtime's stderr/diagnostic API (e.g., runtime.Err or the
project's diagnostics/logging helper) so program output remains data-only on
stdout while the follow-up hint goes to stderr.
🪄 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: e63a1558-7cbf-4fe3-b689-d34d8f957e14
📒 Files selected for processing (2)
shortcuts/base/base_execute_test.goshortcuts/base/base_ops.go
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #600 +/- ##
=======================================
Coverage 59.81% 59.82%
=======================================
Files 404 404
Lines 42526 42527 +1
=======================================
+ Hits 25439 25440 +1
Misses 15082 15082
Partials 2005 2005 ☔ 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@7b2fefffbf92fbdbfc2cb714800dc0fe3ae594d8🧩 Skill updatenpx skills add larksuite/cli#fix-empty-base-v2 -y -g |
Summary
Add a follow-up hint to
base +base-createsuccess output so agents know a new Base includes a default empty table and should ask whether to remove it after later table/field setup.Changes
data.hintstring tobase +base-createsuccess outputTest Plan
lark xxxcommand works as expectedRelated Issues
Summary by CodeRabbit