Repository navigation
Added support for Asana sections - #21912
Conversation
* Added option for assigning a section when creating a task. User can select from a list of existing sections. * Added action on tasks returned from My Tasks allowing user to move a task to another section
|
Thank you for your first contribution! 🎉 🔔 @thomaslombart @spaceDolph1n @tuzemec @xmok you might want to have a look. You can use this guide to learn how to check out the Pull Request locally in order to test it. You can expect an initial review within five business days. |
left a comment
There was a problem hiding this comment.
Greptile Overview
Summary
This PR adds comprehensive support for Asana sections to the existing Raycast extension, enabling users to organize tasks within projects more effectively. The implementation introduces two main features:-
Section selection during task creation: When creating a task, users can now assign it to a specific section if exactly one project is selected. The section dropdown appears dynamically and includes a "No Section" option for flexibility.
-
Task movement between sections: A new "Move to Section" submenu has been added to the task actions, allowing users to move existing tasks between different sections within the same project.
The changes are well-architected and follow existing patterns in the codebase. The implementation includes:
- A new
Sectiontype definition and related API functions (getSections,addTaskToSection) in the projects API - A
useSectionscustom hook for fetching project sections with caching - Enhanced
TaskFormValuestype to include optional section information - Conditional UI rendering that only shows section-related controls when appropriate (single project selected)
- Proper error handling with toast notifications and optimistic updates
The feature integrates seamlessly with Asana's existing project structure, where sections are project-specific organizational tools. The conditional approach (only showing sections when one project is selected) prevents user confusion and maintains a clean interface.
Changed Files
| Filename | Score | Overview |
|---|---|---|
| extensions/asana/src/create-task.tsx | 5/5 | Added optional section field to TaskFormValues type |
| extensions/asana/src/api/projects.ts | 5/5 | Added Section type and API functions for getting sections and adding tasks to sections |
| extensions/asana/src/api/tasks.ts | 4/5 | Added memberships field to TaskPayload for section assignment |
| extensions/asana/src/hooks/useSections.ts | 4/5 | New custom hook for fetching project sections with caching |
| extensions/asana/src/components/TaskActions.tsx | 4/5 | Added SectionsSubmenu component for moving tasks between sections |
| extensions/asana/package.json | 4/5 | Added new contributor 'abcd_ca' to contributors list |
| extensions/asana/src/components/CreateTaskForm.tsx | 4/5 | Implemented section dropdown and task creation logic with section assignment |
Confidence score: 4/5
- This PR is safe to merge with minimal risk as the changes are additive and maintain backward compatibility
- Score reflects well-structured implementation following existing patterns, but with minor concerns around error handling edge cases
- Pay attention to useSections.ts and CreateTaskForm.tsx for potential type safety improvements and error handling robustness
7 files reviewed, 3 comments
greptile suggestion Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
…a/ray-cast-extension-asana into feature/asana-extension-additions
commented
Oct 16, 2025
|
This pull request has been automatically marked as stale because it did not have any recent activity. It will be closed if no further activity occurs in the next 7 days to keep our backlog clean 😊 |
|
Would someone please review so this can be merged? @dehesa ? |
left a comment
There was a problem hiding this comment.
Greptile Overview
Summary
This PR adds section support to the Asana extension, allowing users to assign sections when creating tasks and move existing tasks between sections.
Key changes:
- New
useSectionshook fetches sections for a project CreateTaskFormnow shows section dropdown when single project selectedTaskActionsadds "Move to Section" submenu for tasks in single projects- New API functions
getSectionsandaddTaskToSectioninprojects.ts
Implementation notes:
- Section selection only appears when exactly one project is selected (correct behavior per Asana API)
- The hook properly uses
execute: !!projectIdto prevent unnecessary API calls - Section assignment in task creation happens as a separate API call after task creation (not atomic)
Confidence Score: 4/5
- This PR is safe to merge with one minor fix needed for the changelog date format
- The implementation is well-structured with proper error handling in most areas. The main issue is the CHANGELOG date format (required fix). The section assignment after task creation could theoretically leave a task without its intended section if that call fails, but proper error messaging is shown to the user. The type assertion in useSections is acceptable given the execute guard.
- CHANGELOG.md requires the date format fix. CreateTaskForm.tsx has adequate error handling for section assignment despite the non-atomic operation.
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| extensions/asana/src/hooks/useSections.ts | 3/5 | New hook for fetching sections with unsafe type assertion on line 9 (projectId as string), though mitigated by execute condition |
| extensions/asana/src/components/TaskActions.tsx | 4/5 | Adds section selection submenu for tasks in single projects, well-implemented with proper error handling and loading states |
| extensions/asana/src/components/CreateTaskForm.tsx | 3/5 | Adds section dropdown in task creation form, but section assignment after task creation lacks proper error handling and may leave task in inconsistent state |
| extensions/asana/CHANGELOG.md | 3/5 | Adds changelog entry with hardcoded date instead of {PR_MERGE_DATE} placeholder as required by custom instructions |
8 files reviewed, 1 comment
commented
Oct 16, 2025
|
Hey @abcd-ca, sorry this become stale. I am not in charge of reviewing extensions but @pernielsentikaer is. I think he might be able to help. |
commented
Oct 20, 2025
|
Hi @abcd-ca 👋 I'm not sure why I was never assigned automatically by our bot, but I will check it now 😊 |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
129d86d to
9d3ff85
Compare
commented
Oct 20, 2025
|
Hi @abcd-ca 👋 Could you make sure I didn't break something while optimizing it a bit 😊 |
Thank you, @pernielsentikaer. It's still working well. |
Fixed filtering My Tasks by section
commented
Oct 21, 2025
|
@pernielsentikaer I pushed another fix in the last commit that fixes filtering My Tasks by section, and adds being able to see the section name in the task detail view |
* Add zero or more tags to a task when using Create Task * Task Details now displays tags * My Tasks can now be filtered by tags
commented
Oct 21, 2025
|
@pernielsentikaer Pushed another feature
|
commented
Oct 28, 2025
|
Published to the Raycast Store: |
commented
Oct 28, 2025
|
🎉 🎉 🎉 Such a great contribution deserves a reward, but unfortunately we couldn't find your Raycast account based on your GitHub username (@abcd-ca). Please link your GitHub account to your Raycast account to receive your credits and soon be able to exchange them for some swag. |
Description
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare located outside the metadata folder if they were not generated with our metadata tool