Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions coderd/apidoc/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions coderd/apidoc/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion coderd/workspacebuilds.go
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,6 @@ func (api *API) convertWorkspaceBuild(
TemplateVersionPresetID: presetID,
HasAITask: hasAITask,
AITaskSidebarAppID: taskAppID,
TaskAppID: taskAppID,
HasExternalAgent: hasExternalAgent,
}, nil
}
Expand Down
3 changes: 1 addition & 2 deletions codersdk/workspacebuilds.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,8 @@ type WorkspaceBuild struct {
MatchedProvisioners *MatchedProvisioners `json:"matched_provisioners,omitempty"`
TemplateVersionPresetID *uuid.UUID `json:"template_version_preset_id" format:"uuid"`
HasAITask *bool `json:"has_ai_task,omitempty"`
// Deprecated: This field has been replaced with `TaskAppID`
// Deprecated: This field has been replaced with `Task.WorkspaceAppID`
Copy link
Member

Choose a reason for hiding this comment

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

❤️

AITaskSidebarAppID *uuid.UUID `json:"ai_task_sidebar_app_id,omitempty" format:"uuid"`
TaskAppID *uuid.UUID `json:"task_app_id,omitempty" format:"uuid"`
HasExternalAgent *bool `json:"has_external_agent,omitempty"`
}

Expand Down
8 changes: 1 addition & 7 deletions docs/reference/api/builds.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions docs/reference/api/schemas.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions docs/reference/api/workspaces.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions site/src/api/typesGenerated.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion site/src/pages/TaskPage/TaskApps.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {
MockPrimaryWorkspaceProxy,
MockTask,
MockUserOwner,
MockWorkspace,
MockWorkspaceAgent,
Expand All @@ -8,7 +9,7 @@ import {
} from "testHelpers/entities";
import { withAuthProvider, withProxyProvider } from "testHelpers/storybook";
import type { Meta, StoryObj } from "@storybook/react-vite";
import type { Workspace, WorkspaceApp } from "api/typesGenerated";
import type { Task, Workspace, WorkspaceApp } from "api/typesGenerated";
import { getPreferredProxy } from "contexts/ProxyContext";
import kebabCase from "lodash/kebabCase";
import { TaskApps } from "./TaskApps";
Expand All @@ -19,6 +20,11 @@ const mockExternalApp: WorkspaceApp = {
health: "healthy",
};

const mockTask: Task = {
...MockTask,
workspace_app_id: null,
};

const meta: Meta<typeof TaskApps> = {
title: "pages/TaskPage/TaskApps",
component: TaskApps,
Expand All @@ -33,24 +39,28 @@ type Story = StoryObj<typeof TaskApps>;

export const NoEmbeddedApps: Story = {
args: {
task: mockTask,
workspace: mockWorkspaceWithApps([]),
},
};

export const WithExternalAppsOnly: Story = {
args: {
task: mockTask,
workspace: mockWorkspaceWithApps([mockExternalApp]),
},
};

export const WithEmbeddedApps: Story = {
args: {
task: mockTask,
workspace: mockWorkspaceWithApps([mockEmbeddedApp()]),
},
};

export const WithMixedApps: Story = {
args: {
task: mockTask,
workspace: mockWorkspaceWithApps([mockEmbeddedApp(), mockExternalApp]),
},
};
Expand All @@ -69,6 +79,7 @@ export const WithWildcardWarning: Story = {
user: MockUserOwner,
},
args: {
task: mockTask,
workspace: mockWorkspaceWithApps([
{
...mockEmbeddedApp(),
Expand All @@ -80,6 +91,7 @@ export const WithWildcardWarning: Story = {

export const WithManyEmbeddedApps: Story = {
args: {
task: mockTask,
workspace: mockWorkspaceWithApps([
mockEmbeddedApp("Code Server"),
mockEmbeddedApp("Jupyter Notebook"),
Expand Down
Loading
Loading