Skip to content

feat: add parent_id column to workspace_agents table #17758

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
May 12, 2025
Merged
Prev Previous commit
Next Next commit
fix: invert condition
  • Loading branch information
DanielleMaywood committed May 12, 2025
commit 91c22e1e5b6eb409dd9b0924192a860da243d78b
18 changes: 8 additions & 10 deletions site/src/pages/WorkspacePage/Workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ export const Workspace: FC<WorkspaceProps> = ({
// child of another agent. We do not want these agents
// to be displayed at the top-level on this page. We
// want them to display _as children_ of their parents.
?.filter((agent) => agent.parent_id !== null)
?.filter((agent) => agent.parent_id === null)
.map((agent) => (
<AgentRow
key={agent.id}
Expand Down Expand Up @@ -354,15 +354,13 @@ export const Workspace: FC<WorkspaceProps> = ({
color: theme.palette.text.secondary,
}}
>
{
// Calculate total status count
selectedResource.agents
?.flatMap((agent) => agent.apps ?? [])
.reduce(
(count, app) => count + (app.statuses?.length ?? 0),
0,
)
}{" "}
{// Calculate total status count
selectedResource.agents
?.flatMap((agent) => agent.apps ?? [])
.reduce(
(count, app) => count + (app.statuses?.length ?? 0),
0,
)}{" "}
Total
</div>
</div>
Expand Down
Loading