Conversation
doistbot
left a comment
There was a problem hiding this comment.
This PR introduces the new td folder command group, providing a complete set of CRUD operations for workspace-scoped folders along with excellent test coverage. These additions thoughtfully extend the CLI's capabilities by seamlessly integrating folder management with workspace auto-detection. A few adjustments are needed to ensure the --cursor flag is properly passed to the pagination function in the list command, and to include the 'folder' entity type argument for formatJson in mutating commands for consistent output formatting.
0da8a44 to
3ecfc8a
Compare
bd82746 to
e6ee682
Compare
e6ee682 to
a1100c0
Compare
Adds `td folder` with list, view, create, update, and delete subcommands, exposing the SDK's folder CRUD endpoints for workspace folder management. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Pass startCursor to paginate() in folder list so --cursor works - Add 'folder' to EntityType and pass it to formatJson in create/update - Define FOLDER_ESSENTIAL_FIELDS for consistent JSON output Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove parseInt() wrappers and update test expectations to match the string-typed workspaceId from SDK v9. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
a1100c0 to
4e26a1c
Compare
SDK 9.8 adds folderId filter to getProjects() and folderId field to updateProject() (Doist/todoist-sdk-typescript#590). - folder view now uses getProjects({ folderId }) instead of fetching all projects and filtering client-side - project update --folder <ref> moves a workspace project into a folder - project update --no-folder removes a workspace project from its folder Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@doistbot /review |
doistbot
left a comment
There was a problem hiding this comment.
This PR introduces the td folder command group, bringing comprehensive CRUD operations for workspace folders to the CLI. The implementation is solid, featuring a strong test suite and clean integration with the workspace auto-detection logic. There are just a couple of adjustments needed, specifically passing the project's workspace ID during folder resolution to prevent errors for multi-workspace users, and adding upfront validation for order flags to ensure malformed inputs aren't sent to the SDK.
- project update --folder now passes the project's workspaceId to the folder resolver, so users with multiple workspaces don't get a confusing "specify --workspace" error - folder create/update validate --default-order and --child-order upfront via a parseOrderArg validator (non-negative integer), instead of silently coercing malformed input Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
## [1.51.0](v1.50.0...v1.51.0) (2026-04-20) ### Features * add folder command group ([#248](#248)) ([4a17765](4a17765))
|
🎉 This PR is included in version 1.51.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary
td foldercommand group withlist,view,create,update, anddeletesubcommandsgetFolders,getFolder,addFolder,updateFolder,deleteFolder)listandcreaterequire a workspace ref (positional or--workspace), whileupdate/delete/viewsupportid:xxxdirectly or name-based lookup with--workspaceTest plan
folder.test.tscovering all subcommands, JSON output, dry-run, empty states, workspace auto-detection, and error casestd folder list <workspace>,td folder create <workspace> --name "Test",td folder view <ref>,td folder update <ref> --name "New",td folder delete <ref> --yes🤖 Generated with Claude Code