Skip to content

Update freeagent extension - #22818

Merged
raycastbot merged 4 commits into
raycast:mainfrom
SteveEdson:ext/freeagent
Nov 12, 2025
Merged

raycastbot merged 4 commits into
raycast:mainfrom
SteveEdson:ext/freeagent

Conversation

@SteveEdson

@SteveEdson SteveEdson commented Nov 11, 2025 •

Copy link
Copy Markdown
Contributor

Description

Introduces a new command and form UI for creating tasks in FreeAgent. Resolves #22813

Screencast

Checklist

- Merge branch \'contributions/merge-1762881780293\'
- Pull contributions
- Add pull script to package.json
- Add create task functionality for FreeAgent
- Update package.json
@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: freeagent Issues related to the freeagent extension platform: macOS platform: Windows OP is author The OP of the PR is the author of the extension labels Nov 11, 2025
@raycastbot

ghost commented Nov 11, 2025

Copy link
Copy Markdown
Collaborator

Thank you for the update! 🎉

Due to our current reduced availability, the initial review may take up to 10 business days.

@SteveEdson
SteveEdson marked this pull request as ready for review November 11, 2025 17:26
Copilot Bot review requested due to automatic review settings November 11, 2025 17:26
@greptile-apps

ghost commented Nov 11, 2025 •

Copy link
Copy Markdown
Contributor

Greptile Overview

Greptile Summary

This 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

Filename Score Overview
extensions/freeagent/CHANGELOG.md 5/5 Adds properly formatted changelog entry with required {PR_MERGE_DATE} template
extensions/freeagent/src/types.ts 5/5 Introduces three new interfaces for task creation with proper TypeScript typing
extensions/freeagent/src/create-task.tsx 4/5 Implements comprehensive task creation form following established patterns but with mixed error handling approaches
extensions/freeagent/src/services/freeagent.ts 5/5 Adds createTask function to service layer following existing architectural patterns
extensions/freeagent/package.json 5/5 Adds new command definition, Windows platform support, and pull script

Confidence score: 4/5

  • This PR is safe to merge with minimal risk as it adds new functionality without modifying existing features
  • Score reflects solid implementation following established patterns, but deducted one point due to mixed error handling approaches in create-task.tsx that should be standardized
  • Pay close attention to create-task.tsx for the inconsistent error handling pattern (mixing handleError from useFreeAgent hook with direct showFailureToast calls)

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.

5 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

Comment thread extensions/freeagent/CHANGELOG.md Outdated

## [Added new command to create tasks in projects] - {PR_MERGE_DATE}

- New `Create a new task in Freeagent` command

ghost Nov 11, 2025

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.

style: capitalization inconsistency: 'Freeagent' should be 'FreeAgent' to match the rest of the changelog

Suggested change
- 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>("");

ghost Nov 11, 2025

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.

logic: The selectedProject state is set but not synchronized with the form's dropdown value. This could cause inconsistencies.

Suggested change
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?

Comment on lines +92 to +95
value={selectedProject}
onChange={(value) => {
setSelectedProject(value);
}}

ghost Nov 11, 2025

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.

style: The value and onChange props are unnecessary for Form.Dropdown when using id. Raycast forms handle state internally.

Suggested change
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!

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.

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

Comment thread extensions/freeagent/CHANGELOG.md Outdated

## [Added new command to create tasks in projects] - {PR_MERGE_DATE}

- New `Create a new task in Freeagent` command

Copilot AI Nov 11, 2025

Copy link

Choose a reason for hiding this comment

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

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.

Suggested change
- New `Create a new task in Freeagent` command
- New `Create a new task in FreeAgent` command

Copilot uses AI. Check for mistakes.
Comment on lines +30 to +43
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;
}

Copilot AI Nov 11, 2025

Copy link

Choose a reason for hiding this comment

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

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

Copilot uses AI. Check for mistakes.
@pernielsentikaer

ghost commented Nov 11, 2025

Copy link
Copy Markdown
Contributor

Hi @SteveEdson👋

Thanks for your contribution 🔥

Could you look into the feedback?

@pernielsentikaer
pernielsentikaer marked this pull request as draft November 11, 2025 20:04
- Update create-task.tsx
- Improve error handling in CreateTask form
- Fix typo in changelog for new command
@SteveEdson
SteveEdson marked this pull request as ready for review November 11, 2025 22:46
@SteveEdson

ghost commented Nov 11, 2025

Copy link
Copy Markdown
Contributor Author

@pernielsentikaer resolved

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.

5 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment on lines +34 to +48
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;
}

ghost Nov 11, 2025

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.

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!

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 fc0f8be into raycast:main Nov 12, 2025
@github-actions

ghost commented Nov 12, 2025

Copy link
Copy Markdown
Contributor

@raycastbot

ghost commented Nov 12, 2025

Copy link
Copy Markdown
Collaborator

🎉 🎉 🎉

We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.

@SteveEdson
SteveEdson deleted the ext/freeagent branch January 7, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extension fix / improvement Label for PRs with extension's fix improvements extension: freeagent Issues related to the freeagent extension OP is author The OP of the PR is the author of the extension platform: macOS platform: Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FreeAgent] Ability to create a "Task"

4 participants