feat(base): Add Base URL and title resolve shortcuts#1338
Conversation
📝 WalkthroughWalkthroughAdds two Base shortcuts, ChangesBase URL and Title Resolution Shortcuts
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
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 unit tests (beta)
Warning Review ran into problems🔥 ProblemsStopped waiting for pipeline failures after 30000ms. One of your pipelines takes longer than our 30000ms fetch window to run, so review may not consider pipeline-failure results for inline comments if any failures occurred after the fetch window. Increase the timeout if you want to wait longer or run a 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 |
8d36067 to
3d80cfc
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1338 +/- ##
==========================================
+ Coverage 71.47% 71.85% +0.37%
==========================================
Files 688 691 +3
Lines 65483 65916 +433
==========================================
+ Hits 46807 47362 +555
+ Misses 15031 14886 -145
- Partials 3645 3668 +23 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@ba4e57e1b6e221e2a6816db233250210ab359f4d🧩 Skill updatenpx skills add zgz2048/cli#codex/base-url-title-resolve -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/base/base_resolve.go`:
- Around line 369-399: The code is turning nil metadata into the string "<nil>"
when building keys; update formatResolvedRecord and resolvedRecordFieldKey to
treat nil as missing: in formatResolvedRecord only set out["record_id"] if
recordIDs[0] != nil (don’t fmt.Sprintf nil), and in resolvedRecordFieldKey check
each slice element for nil before stringifying (if nil treat as empty string) so
the key-building logic falls back to the remaining metadata or a default like
"field_<index>" (e.g., prefer non-empty fieldID, else use fieldName if
non-empty, else "field_<index>"). Use the existing symbols recordIDs, fieldIDs,
fieldNames, formatResolvedRecord and resolvedRecordFieldKey to locate the
changes.
🪄 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: 93a7a065-e621-4728-9bb2-2071d0e1aeae
📒 Files selected for processing (2)
shortcuts/base/base_resolve.goshortcuts/base/base_resolve_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
- shortcuts/base/base_resolve_test.go
2399ea5 to
820113f
Compare
Summary
base +url-resolveto resolve Base, Wiki, record-share, and form-share URLs into actionable Base coordinatesbase +title-resolveto search BITABLE resources by title or keyword through Search v2+url-resolveand titles through+title-resolveDetails
--urlwith--queryas a compatibility alias, rejects raw tokens, and returns typed validation errors for unsupported Base URL patterns.hintwith record content and table fields.hint.fields; URLs without table IDs guide agents to+base-block-list.hint.record/hint.fieldsdata.Validation
go build ./shortcuts/basegit diff --checkNote: local Go unit tests were intentionally not run per request; CI should cover them.
Summary by CodeRabbit
New Features
Behavior
Tests
Documentation