-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Problem
On the Workspace page, the "View task" button (which links to /tasks/{owner}/{task_id}) is currently only rendered when the AppStatuses component is displayed. The AppStatuses component renders conditionally based on whether there are app statuses present:
AppStatusesreturnsnullifallStatuses.length === 0(source)- The "View task" button is a child of the
AppStatusescomponent (source)
This means that for task workspaces where there are no app status updates, the "View task" button is never shown. The only indication that it's a task workspace is the label in the workspaces list.
Expected Behavior
The "View task" button should always be shown for task workspaces (i.e., when workspace.task_id is present), regardless of whether there are any app status updates.
This ensures:
- Users can always navigate to the task view from the workspace page
- There's a clear visual indication that the workspace is a task workspace
Proposed Solution
Move the "View task" button rendering outside of the AppStatuses component, or ensure it's rendered independently when workspace.task_id exists. The button could be placed:
- In the
AgentRowcomponent at a consistent location - Or as a separate element that doesn't depend on the presence of app statuses
Relevant Code
site/src/pages/WorkspacePage/AppStatuses.tsx- contains the "View task" buttonsite/src/modules/resources/AgentRow.tsx- rendersAppStatusesconditionally based onworkspace.latest_app_status?.agent_id === agent.id
Created on behalf of @mafredri