fix(site): hide hidden apps in Tasks tabs (#24823)

## Summary
- Exclude `hidden` workspace apps from the Tasks page app tabs.
- Keep terminal link agent selection based on the full app list so
hidden apps do not affect terminal routing.
- Add a focused unit test covering hidden app filtering in `TaskApps`.

## Test plan
- `pnpm --dir site test TaskApps.test.tsx`
- `pnpm -C site exec biome check src/pages/TaskPage/TaskApps.tsx
src/pages/TaskPage/TaskApps.test.tsx`


Made with [Cursor](https://cursor.com)
This commit is contained in:
Max Schwenk
2026-04-30 18:43:42 +01:00
committed by GitHub
parent fb6e00de18
commit 201de14a9d
2 changed files with 17 additions and 3 deletions
@@ -65,6 +65,19 @@ export const WithMixedApps: Story = {
},
};
export const WithHiddenApps: Story = {
args: {
task: mockTask,
workspace: mockWorkspaceWithApps([
mockEmbeddedApp("Visible App"),
{
...mockEmbeddedApp("Hidden App"),
hidden: true,
},
]),
},
};
export const WithWildcardWarning: Story = {
decorators: [
withAuthProvider,
+4 -3
View File
@@ -31,16 +31,17 @@ type TaskAppsProps = {
const TERMINAL_TAB_ID = "terminal";
export const TaskApps: FC<TaskAppsProps> = ({ task, workspace }) => {
const apps = getAllAppsWithAgent(workspace).filter(
const allApps = getAllAppsWithAgent(workspace);
const apps = allApps.filter(
// 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_app_id,
(app) => app.id !== task.workspace_app_id && !app.hidden,
);
const [embeddedApps, externalApps] = splitEmbeddedAndExternalApps(apps);
const [activeAppId, setActiveAppId] = useState(embeddedApps.at(0)?.id);
const hasAvailableAppsToDisplay =
embeddedApps.length > 0 || externalApps.length > 0;
const taskAgent = apps.at(0)?.agent;
const taskAgent = allApps.at(0)?.agent;
const terminalHref = getTerminalHref({
username: task.owner_name,
workspace: task.workspace_name,