From edcee32ab92d0e5e81f45522c93386799eb86038 Mon Sep 17 00:00:00 2001 From: Jake Howell Date: Fri, 6 Feb 2026 21:10:27 +1100 Subject: [PATCH] fix: always show `View Task` for Tasks workspaces (#21970) Closes [`internal#1292`](https://github.com/coder/internal/issues/1292) This pull-request reduces our nesting of the `View Task` button. Its easier to jump to tasks now as we don't have to wait for the app status to exist. --- site/src/modules/resources/AgentRow.tsx | 25 ++++++++++++++------ site/src/pages/WorkspacePage/AppStatuses.tsx | 13 ---------- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/site/src/modules/resources/AgentRow.tsx b/site/src/modules/resources/AgentRow.tsx index 9838e7ca83..7ba64fa485 100644 --- a/site/src/modules/resources/AgentRow.tsx +++ b/site/src/modules/resources/AgentRow.tsx @@ -10,8 +10,8 @@ import type { } from "api/typesGenerated"; import { Button } from "components/Button/Button"; import { DropdownArrow } from "components/DropdownArrow/DropdownArrow"; -import { Stack } from "components/Stack/Stack"; import { useProxy } from "contexts/ProxyContext"; +import { SquareCheckBigIcon } from "lucide-react"; import { useFeatureVisibility } from "modules/dashboard/useFeatureVisibility"; import { AppStatuses } from "pages/WorkspacePage/AppStatuses"; import { @@ -22,6 +22,7 @@ import { useRef, useState, } from "react"; +import { Link as RouterLink } from "react-router"; import AutoSizer from "react-virtualized-auto-sizer"; import type { FixedSizeList as List, ListOnScrollProps } from "react-window"; import { AgentApps, organizeAgentApps } from "./AgentApps/AgentApps"; @@ -144,10 +145,9 @@ export const AgentRow: FC = ({ hasSubdomainApps && !proxy.proxy?.wildcard_hostname; return ( - = ({ )} + {workspace.task_id && ( + + )} + {shouldShowWildcardWarning && } {shouldDisplayAppsSection && ( @@ -325,7 +336,7 @@ export const AgentRow: FC = ({ - +
- +
)} -
+ ); }; diff --git a/site/src/pages/WorkspacePage/AppStatuses.tsx b/site/src/pages/WorkspacePage/AppStatuses.tsx index 7c415ac241..c57ea16731 100644 --- a/site/src/pages/WorkspacePage/AppStatuses.tsx +++ b/site/src/pages/WorkspacePage/AppStatuses.tsx @@ -19,12 +19,10 @@ import { ExternalLinkIcon, FileIcon, LayoutGridIcon, - SquareCheckBigIcon, } from "lucide-react"; import { AppStatusStateIcon } from "modules/apps/AppStatusStateIcon"; import { useAppLink } from "modules/apps/useAppLink"; import { type FC, useState } from "react"; -import { Link as RouterLink } from "react-router"; import { timeFrom } from "utils/time"; import { truncateURI } from "utils/uri"; @@ -114,17 +112,6 @@ export const AppStatuses: FC = ({ ))} - {workspace.task_id && ( - - )} -