feat(integrations): add Todoist integration block#4904
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Login and signup pages now redirect in server components when a session exists (or auth is disabled), sending users to a validated Dev-only CSP adds Reviewed by Cursor Bugbot for commit 6cb9530. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR adds a complete Todoist integration (8 tools covering task CRUD, project listing, and comments) plus a few infrastructure fixes: active-session redirects moved from the middleware layer into Server Components,
Confidence Score: 3/5Safe to merge after fixing the signup-page guard ordering; the Todoist tools and infrastructure changes are solid. The Todoist integration itself is well-structured and the auth changes on the login page are correct. However, moving the session redirect out of the middleware without matching the guard order in the signup page means authenticated users who visit apps/sim/app/(auth)/signup/page.tsx — session check must be reordered to run before the registration-disabled guard. Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Middleware as proxy.ts (middleware)
participant SC as Server Component
participant TodoistAPI as Todoist REST API
Note over User,Middleware: Auth redirect flow (login/signup)
User->>Middleware: GET /login or /signup
Middleware->>SC: next() (no session redirect)
SC->>SC: getSession()
alt has active session or auth disabled
SC-->>User: redirect /workspace
else no session
SC-->>User: render login/signup form
end
Note over User,TodoistAPI: Todoist tool execution
User->>SC: invoke Todoist block operation
SC->>TodoistAPI: POST /tasks (create_task)
TodoistAPI-->>SC: 200 + task JSON
SC-->>User: mapped TodoistTask output
SC->>TodoistAPI: POST /tasks/:id (update_task)
TodoistAPI-->>SC: 200 + updated task
SC-->>User: mapped TodoistTask output
SC->>TodoistAPI: POST /tasks/:id/close (close_task)
TodoistAPI-->>SC: 204 No Content
SC-->>User: "{ success: true, taskId }"
SC->>TodoistAPI: DELETE /tasks/:id (delete_task)
TodoistAPI-->>SC: 204 No Content
SC-->>User: "{ success: true, taskId }"
SC->>TodoistAPI: POST /comments (add_comment)
TodoistAPI-->>SC: 200 + comment JSON
SC-->>User: mapped TodoistComment output
|
| .split(',') | ||
| .map((l: string) => l.trim()) | ||
| .filter((l: string) => l.length > 0) | ||
| : undefined |
There was a problem hiding this comment.
Labels param crashes on arrays
Medium Severity
tools.config.params builds labelsArray by calling .split(',') on params.labels whenever it is truthy. Wired workflow inputs or agent-provided values can be a string array, which causes a runtime TypeError and fails the block run.
Reviewed by Cursor Bugbot for commit 2e92c72. Configure here.
…and fix Windows path normalization in api-validation script
|
@iamshubham1704 is attempting to deploy a commit to the Sim Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6a56fcf. Configure here.


Summary
Adds a complete Todoist integration to Sim, enabling agents to manage
tasks, projects, and comments via the Todoist REST API.
Changes
Todoist Integration (
apps/sim/tools/todoist/)create_task— Create tasks with description, project, priority, labelsget_task— Retrieve task details by IDlist_tasks— List/filter tasks by project, query, or labelupdate_task— Update task propertiesclose_task— Mark a task as completedelete_task— Permanently delete a tasklist_projects— Fetch all projects in the user's Todoistadd_comment— Append comments to tasksBlock & Registry
TodoistBlockinapps/sim/blocks/blocks/todoist.tswithcorrect dropdown states, conditional visibility, and tool mapping
TodoistIconinapps/sim/components/icons.tsxAuth Flow Improvements
LoginPageandSignupPagenow handle active session redirectsdirectly in Next.js Server Components (cleaner than middleware layer)
unsafe-evalin dev mode (fixes HMR issues)optimizeCssnow only runs in production (faster local dev)scripts for Windows compatibility
Verification
bun run type-checkbun run testbun run check:boundariesbun run check:api-validationbun run check:utilsNotes
check:api-validation,check:utils) are presenton the base branch (
1ce8e9226) and are not caused by these changes