Skip to content

Commit 91c22e1

Browse files
fix: invert condition
1 parent 579b9c0 commit 91c22e1

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

site/src/pages/WorkspacePage/Workspace.tsx

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ export const Workspace: FC<WorkspaceProps> = ({
274274
// child of another agent. We do not want these agents
275275
// to be displayed at the top-level on this page. We
276276
// want them to display _as children_ of their parents.
277-
?.filter((agent) => agent.parent_id !== null)
277+
?.filter((agent) => agent.parent_id === null)
278278
.map((agent) => (
279279
<AgentRow
280280
key={agent.id}
@@ -354,15 +354,13 @@ export const Workspace: FC<WorkspaceProps> = ({
354354
color: theme.palette.text.secondary,
355355
}}
356356
>
357-
{
358-
// Calculate total status count
359-
selectedResource.agents
360-
?.flatMap((agent) => agent.apps ?? [])
361-
.reduce(
362-
(count, app) => count + (app.statuses?.length ?? 0),
363-
0,
364-
)
365-
}{" "}
357+
{// Calculate total status count
358+
selectedResource.agents
359+
?.flatMap((agent) => agent.apps ?? [])
360+
.reduce(
361+
(count, app) => count + (app.statuses?.length ?? 0),
362+
0,
363+
)}{" "}
366364
Total
367365
</div>
368366
</div>

0 commit comments

Comments
 (0)