Skip to content

Added support for Asana sections - #21912

Merged
raycastbot merged 13 commits into
raycast:mainfrom
abcd-ca:feature/asana-extension-additions
Oct 28, 2025
Merged

raycastbot merged 13 commits into
raycast:mainfrom
abcd-ca:feature/asana-extension-additions

Conversation

@abcd-ca

@abcd-ca abcd-ca commented Oct 2, 2025 •

Copy link
Copy Markdown
Contributor

Description

  • Added option for assigning a section when creating a task. User can select from a list of existing sections.
image
  • Added action on tasks returned from My Tasks allowing user to move a task to another section
image

Checklist

* 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
@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: asana Issues related to the asana extension labels Oct 2, 2025
@raycastbot

ghost commented Oct 2, 2025 •

Copy link
Copy Markdown
Collaborator

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.

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:
  1. 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.

  2. 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 Section type definition and related API functions (getSections, addTaskToSection) in the projects API
  • A useSections custom hook for fetching project sections with caching
  • Enhanced TaskFormValues type 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

Edit Code Review Agent Settings | Greptile

abcd-ca and others added 6 commits October 1, 2025 20:46
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
@raycastbot

ghost commented Oct 16, 2025

Copy link
Copy Markdown
Collaborator

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 😊

@raycastbot raycastbot added the status: stalled Stalled due inactivity label Oct 16, 2025
@abcd-ca

ghost commented Oct 16, 2025 •

Copy link
Copy Markdown
Contributor Author

Would someone please review so this can be merged? @dehesa ?

@raycastbot raycastbot removed the status: stalled Stalled due inactivity label Oct 16, 2025

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 useSections hook fetches sections for a project
  • CreateTaskForm now shows section dropdown when single project selected
  • TaskActions adds "Move to Section" submenu for tasks in single projects
  • New API functions getSections and addTaskToSection in projects.ts

Implementation notes:

  • Section selection only appears when exactly one project is selected (correct behavior per Asana API)
  • The hook properly uses execute: !!projectId to 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

Edit Code Review Agent Settings | Greptile

Comment thread extensions/asana/CHANGELOG.md Resolved
@dehesa

ghost commented Oct 16, 2025

Copy link
Copy Markdown
Contributor

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.

@pernielsentikaer

ghost commented Oct 20, 2025

Copy link
Copy Markdown
Contributor

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>
@pernielsentikaer
pernielsentikaer force-pushed the feature/asana-extension-additions branch from 129d86d to 9d3ff85 Compare October 20, 2025 13:40
@pernielsentikaer

ghost commented Oct 20, 2025

Copy link
Copy Markdown
Contributor

Hi @abcd-ca 👋

Could you make sure I didn't break something while optimizing it a bit 😊

@abcd-ca

ghost commented Oct 21, 2025 •

Copy link
Copy Markdown
Contributor Author

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
@abcd-ca

ghost commented Oct 21, 2025

Copy link
Copy Markdown
Contributor Author

@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
@abcd-ca

ghost commented Oct 21, 2025

Copy link
Copy Markdown
Contributor Author

@pernielsentikaer Pushed another feature

  • 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

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, approved 🔥

@raycastbot
raycastbot merged commit 77f6477 into raycast:main Oct 28, 2025
@github-actions

ghost commented Oct 28, 2025

Copy link
Copy Markdown
Contributor

@raycastbot

ghost commented Oct 28, 2025

Copy link
Copy Markdown
Collaborator

🎉 🎉 🎉

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.

@abcd-ca
abcd-ca deleted the feature/asana-extension-additions branch November 13, 2025 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extension: asana Issues related to the asana extension extension fix / improvement Label for PRs with extension's fix improvements platform: macOS platform: Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants