Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite189dc1

Browse files
authored
fix: complete Tasks GA promotion (docs, site) (#20927)
## SummaryCompletes the Coder Tasks GA promotion by updating swagger tags andregenerating API documentation and updating the frontend API structure.## RelatedFollows#20923 and#20921 which promoted Tasks from Beta/Experimental toGA.---🤖 This change was written by Claude Sonnet 4.5 Thinking using[mux](https://github.com/coder/mux) and reviewed by a human 🏂
1 parent2f399ea commite189dc1

File tree

19 files changed

+118
-129
lines changed

19 files changed

+118
-129
lines changed

‎coderd/aitasks.go‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import (
3535
// @Security CoderSessionToken
3636
// @Accept json
3737
// @Produce json
38-
// @TagsExperimental
38+
// @TagsTasks
3939
// @Param user path string true "Username, user ID, or 'me' for the authenticated user"
4040
// @Param request body codersdk.CreateTaskRequest true "Create task request"
4141
// @Success 201 {object} codersdk.Task
@@ -401,7 +401,7 @@ func deriveTaskCurrentState(
401401
// @ID list-ai-tasks
402402
// @Security CoderSessionToken
403403
// @Produce json
404-
// @TagsExperimental
404+
// @TagsTasks
405405
// @Param q query string false "Search query for filtering tasks. Supports: owner:<username/uuid/me>, organization:<org-name/uuid>, status:<status>"
406406
// @Success 200 {object} codersdk.TasksListResponse
407407
// @Router /tasks [get]
@@ -501,7 +501,7 @@ func (api *API) convertTasks(ctx context.Context, requesterID uuid.UUID, dbTasks
501501
// @ID get-ai-task-by-id-or-name
502502
// @Security CoderSessionToken
503503
// @Produce json
504-
// @TagsExperimental
504+
// @TagsTasks
505505
// @Param user path string true "Username, user ID, or 'me' for the authenticated user"
506506
// @Param task path string true "Task ID, or task name"
507507
// @Success 200 {object} codersdk.Task
@@ -573,7 +573,7 @@ func (api *API) taskGet(rw http.ResponseWriter, r *http.Request) {
573573
// @Summary Delete AI task
574574
// @ID delete-ai-task
575575
// @Security CoderSessionToken
576-
// @TagsExperimental
576+
// @TagsTasks
577577
// @Param user path string true "Username, user ID, or 'me' for the authenticated user"
578578
// @Param task path string true "Task ID, or task name"
579579
// @Success 202
@@ -642,7 +642,7 @@ func (api *API) taskDelete(rw http.ResponseWriter, r *http.Request) {
642642
// @ID update-ai-task-input
643643
// @Security CoderSessionToken
644644
// @Accept json
645-
// @TagsExperimental
645+
// @TagsTasks
646646
// @Param user path string true "Username, user ID, or 'me' for the authenticated user"
647647
// @Param task path string true "Task ID, or task name"
648648
// @Param request body codersdk.UpdateTaskInputRequest true "Update task input request"
@@ -722,7 +722,7 @@ func (api *API) taskUpdateInput(rw http.ResponseWriter, r *http.Request) {
722722
// @ID send-input-to-ai-task
723723
// @Security CoderSessionToken
724724
// @Accept json
725-
// @TagsExperimental
725+
// @TagsTasks
726726
// @Param user path string true "Username, user ID, or 'me' for the authenticated user"
727727
// @Param task path string true "Task ID, or task name"
728728
// @Param request body codersdk.TaskSendRequest true "Task input request"
@@ -791,7 +791,7 @@ func (api *API) taskSend(rw http.ResponseWriter, r *http.Request) {
791791
// @ID get-ai-task-logs
792792
// @Security CoderSessionToken
793793
// @Produce json
794-
// @TagsExperimental
794+
// @TagsTasks
795795
// @Param user path string true "Username, user ID, or 'me' for the authenticated user"
796796
// @Param task path string true "Task ID, or task name"
797797
// @Success 200 {object} codersdk.TaskLogsResponse

‎coderd/apidoc/docs.go‎

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/apidoc/swagger.json‎

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎docs/manifest.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,10 +1166,6 @@
11661166
"title":"Enterprise",
11671167
"path":"./reference/api/enterprise.md"
11681168
},
1169-
{
1170-
"title":"Experimental",
1171-
"path":"./reference/api/experimental.md"
1172-
},
11731169
{
11741170
"title":"Files",
11751171
"path":"./reference/api/files.md"
@@ -1214,6 +1210,10 @@
12141210
"title":"Schemas",
12151211
"path":"./reference/api/schemas.md"
12161212
},
1213+
{
1214+
"title":"Tasks",
1215+
"path":"./reference/api/tasks.md"
1216+
},
12171217
{
12181218
"title":"Templates",
12191219
"path":"./reference/api/templates.md"

‎docs/reference/api/experimental.md‎renamed to ‎docs/reference/api/tasks.md‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎site/src/api/api.ts‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2644,22 +2644,6 @@ class ApiMethods {
26442644
markAllInboxNotificationsAsRead=async()=>{
26452645
awaitthis.axios.put<void>("/api/v2/notifications/inbox/mark-all-as-read");
26462646
};
2647-
}
2648-
2649-
// Experimental API methods call endpoints under the /api/experimental/ prefix.
2650-
// These endpoints are not stable and may change or be removed at any time.
2651-
//
2652-
// All methods must be defined with arrow function syntax. See the docstring
2653-
// above the ApiMethods class for a full explanation.
2654-
2655-
exporttypeTaskFeedbackRating="good"|"okay"|"bad";
2656-
2657-
exporttypeCreateTaskFeedbackRequest={
2658-
rate:TaskFeedbackRating;
2659-
comment?:string;
2660-
};
2661-
classExperimentalApiMethods{
2662-
constructor(protectedreadonlyaxios:AxiosInstance){}
26632647

26642648
createTask=async(
26652649
user:string,
@@ -2716,6 +2700,22 @@ class ExperimentalApiMethods {
27162700
setTimeout(()=>res(),500);
27172701
});
27182702
};
2703+
}
2704+
2705+
exporttypeTaskFeedbackRating="good"|"okay"|"bad";
2706+
2707+
exporttypeCreateTaskFeedbackRequest={
2708+
rate:TaskFeedbackRating;
2709+
comment?:string;
2710+
};
2711+
2712+
// Experimental API methods call endpoints under the /api/experimental/ prefix.
2713+
// These endpoints are not stable and may change or be removed at any time.
2714+
//
2715+
// All methods must be defined with arrow function syntax. See the docstring
2716+
// above the ApiMethods class for a full explanation.
2717+
classExperimentalApiMethods{
2718+
constructor(protectedreadonlyaxios:AxiosInstance){}
27192719

27202720
getAIBridgeInterceptions=async(options:SearchParamOptions)=>{
27212721
consturl=getURLWithSearchParams(

‎site/src/modules/dashboard/Navbar/NavbarView.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ const TasksNavItem: FC<TasksNavItemProps> = ({ user }) => {
207207
};
208208
const{data:idleCount}=useQuery({
209209
queryKey:["tasks",filter],
210-
queryFn:()=>API.experimental.getTasks(filter),
210+
queryFn:()=>API.getTasks(filter),
211211
refetchInterval:1_000*60,
212212
enabled:canSeeTasks,
213213
refetchOnWindowFocus:true,

‎site/src/modules/tasks/TaskDeleteDialog/TaskDeleteDialog.stories.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const DeleteTaskSuccess: Story = {
2727
},
2828
},
2929
beforeEach:()=>{
30-
spyOn(API.experimental,"deleteTask").mockResolvedValue();
30+
spyOn(API,"deleteTask").mockResolvedValue();
3131
},
3232
play:async({ canvasElement, step})=>{
3333
constbody=within(canvasElement.ownerDocument.body);
@@ -39,7 +39,7 @@ export const DeleteTaskSuccess: Story = {
3939
awaituserEvent.click(confirmButton);
4040
awaitstep("Confirm delete",async()=>{
4141
awaitwaitFor(()=>{
42-
expect(API.experimental.deleteTask).toHaveBeenCalledWith(
42+
expect(API.deleteTask).toHaveBeenCalledWith(
4343
MockTask.owner_name,
4444
MockTask.id,
4545
);

‎site/src/modules/tasks/TaskDeleteDialog/TaskDeleteDialog.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const TaskDeleteDialog: FC<TaskDeleteDialogProps> = ({
2020
})=>{
2121
constqueryClient=newQueryClient();
2222
constdeleteTaskMutation=useMutation({
23-
mutationFn:()=>API.experimental.deleteTask(task.owner_name,task.id),
23+
mutationFn:()=>API.deleteTask(task.owner_name,task.id),
2424
onSuccess:async()=>{
2525
awaitqueryClient.invalidateQueries({queryKey:["tasks"]});
2626
},

‎site/src/modules/tasks/TaskFeedbackDialog/TaskFeedbackDialog.stories.tsx‎

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const Idle: Story = {};
2121

2222
exportconstSubmitting:Story={
2323
beforeEach:async()=>{
24-
spyOn(API.experimental,"createTaskFeedback").mockImplementation(()=>{
24+
spyOn(API,"createTaskFeedback").mockImplementation(()=>{
2525
returnnewPromise(()=>{});
2626
});
2727
},
@@ -53,7 +53,7 @@ export const Success: Story = {
5353
},
5454
decorators:[withGlobalSnackbar],
5555
beforeEach:async()=>{
56-
spyOn(API.experimental,"createTaskFeedback").mockResolvedValue();
56+
spyOn(API,"createTaskFeedback").mockResolvedValue();
5757
},
5858
play:async({ canvasElement, step})=>{
5959
constbody=within(canvasElement.ownerDocument.body);
@@ -77,20 +77,17 @@ export const Success: Story = {
7777

7878
step("submitted successfully",async()=>{
7979
awaitbody.findByText("Feedback submitted successfully");
80-
expect(API.experimental.createTaskFeedback).toHaveBeenCalledWith(
81-
MockTask.id,
82-
{
83-
rate:"regular",
84-
comment:"This is my comment",
85-
},
86-
);
80+
expect(API.createTaskFeedback).toHaveBeenCalledWith(MockTask.id,{
81+
rate:"regular",
82+
comment:"This is my comment",
83+
});
8784
});
8885
},
8986
};
9087

9188
exportconstFailure:Story={
9289
beforeEach:async()=>{
93-
spyOn(API.experimental,"createTaskFeedback").mockRejectedValue(
90+
spyOn(API,"createTaskFeedback").mockRejectedValue(
9491
mockApiError({
9592
message:"Failed to submit feedback",
9693
detail:"Server is down",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp