Repository navigation
Update freeagent extension - #22818
Conversation
- Merge branch \'contributions/merge-1762881780293\' - Pull contributions - Add pull script to package.json - Add create task functionality for FreeAgent - Update package.json
commented
Nov 11, 2025
|
Thank you for the update! 🎉 Due to our current reduced availability, the initial review may take up to 10 business days. |
Greptile OverviewGreptile SummaryThis PR introduces a new "Create Task" command to the FreeAgent extension, addressing user request #22813. The implementation adds a comprehensive task creation form with project selection, billability configuration, and status management. The changes include new TypeScript interfaces for proper typing, a new service layer function for API communication, and a complete form UI component that follows the established patterns in the codebase. The command allows users to create tasks directly from Raycast, which is particularly useful for integration with timer applications that can link to FreeAgent tasks but cannot create them independently. Additionally, the PR expands platform support to include Windows and adds a pull script for contribution management. Important Files Changed
Confidence score: 4/5
|
|
|
||
| ## [Added new command to create tasks in projects] - {PR_MERGE_DATE} | ||
|
|
||
| - New `Create a new task in Freeagent` command |
There was a problem hiding this comment.
style: capitalization inconsistency: 'Freeagent' should be 'FreeAgent' to match the rest of the changelog
| - New `Create a new task in Freeagent` command | |
| - New `Create a new task in FreeAgent` command |
|
|
||
| const CreateTask = function Command() { | ||
| const [projects, setProjects] = useState<Project[]>([]); | ||
| const [selectedProject, setSelectedProject] = useState<string>(""); |
There was a problem hiding this comment.
logic: The selectedProject state is set but not synchronized with the form's dropdown value. This could cause inconsistencies.
| const [selectedProject, setSelectedProject] = useState<string>(""); | |
| const { isLoading, isAuthenticated, accessToken, handleError } = useFreeAgent(); |
Should the selectedProject state be removed in favor of using the form's built-in state management?
| value={selectedProject} | ||
| onChange={(value) => { | ||
| setSelectedProject(value); | ||
| }} |
There was a problem hiding this comment.
style: The value and onChange props are unnecessary for Form.Dropdown when using id. Raycast forms handle state internally.
| value={selectedProject} | |
| onChange={(value) => { | |
| setSelectedProject(value); | |
| }} | |
| placeholder="Select a project" |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
left a comment
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new "Create Task" command to the FreeAgent extension, allowing users to create tasks within FreeAgent projects directly from Raycast. The implementation follows the existing patterns established by other commands in the extension.
Key changes:
- Added a new form-based command for creating tasks in FreeAgent projects
- Extended type definitions to support task creation
- Added a new API service method for task creation
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
extensions/freeagent/src/create-task.tsx |
New file implementing the Create Task command with form UI for task input |
extensions/freeagent/src/types.ts |
Added type definitions for task form values, task creation data, and task response |
extensions/freeagent/src/services/freeagent.ts |
Added createTask function to handle API requests for task creation |
extensions/freeagent/package.json |
Registered new "create-task" command with subtitle and added platforms configuration |
extensions/freeagent/CHANGELOG.md |
Added changelog entry for the new task creation feature |
|
|
||
| ## [Added new command to create tasks in projects] - {PR_MERGE_DATE} | ||
|
|
||
| - New `Create a new task in Freeagent` command |
There was a problem hiding this comment.
The product name 'Freeagent' should be 'FreeAgent' (with capital A) to match the consistent branding used throughout the extension in package.json title, command subtitles, and README.
| - New `Create a new task in Freeagent` command | |
| - New `Create a new task in FreeAgent` command |
| if (!accessToken) { | ||
| handleError(new Error("No access token available"), "Failed to create task"); | ||
| return; | ||
| } | ||
|
|
||
| if (!values.project) { | ||
| handleError(new Error("Please select a project"), "Failed to create task"); | ||
| return; | ||
| } | ||
|
|
||
| if (!values.name || values.name.trim() === "") { | ||
| handleError(new Error("Please enter a task name"), "Failed to create task"); | ||
| return; | ||
| } |
There was a problem hiding this comment.
The validation logic uses handleError for form validation failures, but these are user input errors rather than system errors. Consider using showToast with Toast.Style.Failure directly for validation messages to provide more appropriate feedback. The handleError function is better suited for unexpected errors like API failures. For example:\n\ntypescript\nif (!values.project) {\n await showToast({\n style: Toast.Style.Failure,\n title: \"Please select a project\"\n });\n return;\n}\n
commented
Nov 11, 2025
|
Hi @SteveEdson👋 Thanks for your contribution 🔥 Could you look into the feedback? |
- Update create-task.tsx - Improve error handling in CreateTask form - Fix typo in changelog for new command
commented
Nov 11, 2025
|
@pernielsentikaer resolved |
| if (!values.project) { | ||
| await showToast({ | ||
| style: Toast.Style.Failure, | ||
| title: "Please select a project", | ||
| }); | ||
| return; | ||
| } | ||
|
|
||
| if (!values.name || values.name.trim() === "") { | ||
| await showToast({ | ||
| style: Toast.Style.Failure, | ||
| title: "Please enter a task name", | ||
| }); | ||
| return; | ||
| } |
There was a problem hiding this comment.
style: Inconsistent error handling pattern - these manual showToast calls could be replaced with the handleError function from the useFreeAgent hook for consistency
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
commented
Nov 12, 2025
|
Published to the Raycast Store: |
commented
Nov 12, 2025
|
🎉 🎉 🎉 We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag. |
Description
Introduces a new command and form UI for creating tasks in FreeAgent. Resolves #22813
Screencast
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare placed outside of themetadatafolder