chore(coderd): introduce TaskAppID and deprecate AITaskSidebarAppID (#20336)

As we're moving away from the SidebarAppID nomenclature, this PR
introduces a new `TaskAppID` field to `codersdk.WorkspaceBuild` and
deprecates the `AITaskSidebarAppID` field. They both contain the same
value.
This commit is contained in:
Danielle Maywood
2025-10-24 10:57:32 +01:00
committed by GitHub
parent e8e31dcb2c
commit e60112e54f
12 changed files with 49 additions and 16 deletions
+4
View File
@@ -6363,7 +6363,11 @@ export interface WorkspaceBuild {
readonly matched_provisioners?: MatchedProvisioners;
readonly template_version_preset_id: string | null;
readonly has_ai_task?: boolean;
/**
* Deprecated: This field has been replaced with `TaskAppID`
*/
readonly ai_task_sidebar_app_id?: string;
readonly task_app_id?: string;
readonly has_external_agent?: boolean;
}
+1 -1
View File
@@ -34,7 +34,7 @@ export const TaskApps: FC<TaskAppsProps> = ({ task }) => {
// The Chat UI app will be displayed in the sidebar, so we don't want to
// show it as a web app.
(app) =>
app.id !== task.workspace.latest_build.ai_task_sidebar_app_id &&
app.id !== task.workspace.latest_build.task_app_id &&
app.health !== "disabled",
);
const [embeddedApps, externalApps] = splitEmbeddedAndExternalApps(apps);
+2 -2
View File
@@ -190,7 +190,7 @@ export const SidebarAppNotFound: Story = {
...workspace,
latest_build: {
...workspace.latest_build,
ai_task_sidebar_app_id: "non-existent-app-id",
task_app_id: "non-existent-app-id",
},
},
});
@@ -497,7 +497,7 @@ function mockTaskWorkspace(
latest_build: {
...MockWorkspace.latest_build,
has_ai_task: true,
ai_task_sidebar_app_id: sidebarApp.id,
task_app_id: sidebarApp.id,
resources: [
{
...MockWorkspaceResource,
+1 -1
View File
@@ -143,7 +143,7 @@ const TaskPage = () => {
content = <TaskStartingAgent agent={agent} />;
} else {
const chatApp = getTaskApps(task).find(
(app) => app.id === task.workspace.latest_build.ai_task_sidebar_app_id,
(app) => app.id === task.workspace.latest_build.task_app_id,
);
content = (
<PanelGroup autoSaveId="task" direction="horizontal">