feat: expose compact task fields - #2109
Conversation
📝 WalkthroughWalkthroughTask outputs now include standard fields such as ChangesTask output projection
Task command discovery
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 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: 3
🤖 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/task/task_get_my_tasks.go`:
- Line 225: Update projectTaskFields to also project the standardized due and
status fields alongside the existing members and start fields. Preserve the
due_at and completed aliases, derive or project status from completed, and add
direct JSON assertions covering both due and status.
In `@shortcuts/task/task_output.go`:
- Around line 24-31: Update projectTaskFields to accept a typed task-output
struct rather than raw map[string]interface{} input, and project its validated
fields into the destination map. Decode task responses into that struct at the
boundary before invoking projectTaskFields, preserving one projection path for
the task-output shape and preventing malformed or silently missing fields from
being propagated.
In `@shortcuts/task/task_reminder.go`:
- Line 174: Add a contract test covering the successful reminder update path in
the task reminder tests, using --set or removing an existing reminder rather
than --remove with no reminders. Assert the response includes the standard task
output fields produced by projectTaskFields, so removing that projection causes
the test to fail.
🪄 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: 25f12817-5eba-44c3-be94-ce2a0e8aadb0
📒 Files selected for processing (21)
shortcuts/task/shortcuts.goshortcuts/task/task_assign.goshortcuts/task/task_complete.goshortcuts/task/task_complete_test.goshortcuts/task/task_followers.goshortcuts/task/task_get_my_tasks.goshortcuts/task/task_get_my_tasks_test.goshortcuts/task/task_get_related_tasks_test.goshortcuts/task/task_output.goshortcuts/task/task_output_test.goshortcuts/task/task_query_helpers.goshortcuts/task/task_query_helpers_test.goshortcuts/task/task_reminder.goshortcuts/task/task_reminder_test.goshortcuts/task/task_reopen.goshortcuts/task/task_update.goshortcuts/task/task_update_test.goshortcuts/task/tasklist_add_task.goshortcuts/task/tasklist_add_task_test.goshortcuts/task/tasklist_create.goshortcuts/task/tasklist_create_test.go
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@bd2c6c1b5f487413a5e97fddbe57e0c6ef1f9831🧩 Skill updatenpx skills add ILUO/cli#feat/task-compact-fields -y -g |
Summary
Expose task title, members, start, due, and completion state in compact task shortcut results without renaming or removing existing fields. The projection reuses Task entities already returned by each API flow, so it adds no network requests.
Changes
summary,members,start,due, andstatus.Test Plan
go test ./...make unit-testgo vet ./...go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.6 run --new-from-rev=origin/mainRelated Issues
Summary by CodeRabbit