Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,7 @@ describe("ProjectSidebar multi-project completed-subagent toggles", () => {
expect(view.getByTestId(agentItemTestId("parent"))).toBeTruthy();
const groupRow = view.getByTestId("task-group-best-of-demo");
expect(groupRow.textContent).toContain("Best of 3");
expect(groupRow.textContent).toContain("0/3");
expect(view.queryByTestId(agentItemTestId("child-1"))).toBeNull();
expect(view.queryByTestId(agentItemTestId("child-2"))).toBeNull();
expect(view.queryByTestId(agentItemTestId("child-3"))).toBeNull();
Expand Down Expand Up @@ -1287,9 +1288,13 @@ describe("ProjectSidebar multi-project completed-subagent toggles", () => {

// One header per run, even though beta-1 interleaves between the alpha tasks.
const alphaHeader = view.getByTestId("task-group-wfr_alpha");
expect(view.getByTestId("task-group-wfr_beta")).toBeTruthy();
const betaHeader = view.getByTestId("task-group-wfr_beta");
expect(betaHeader).toBeTruthy();
// The stamped workflow name reaches the header label.
expect(alphaHeader.textContent).toContain("review-pipeline");
// Workflow rows keep the live status text but omit the compact completed/total fraction.
expect(betaHeader.textContent).toContain("1 running");
expect(betaHeader.textContent).not.toContain("0/1");

// Active workflow groups default to expanded (D6), so members render as
// group members without an explicit toggle.
Expand Down
16 changes: 12 additions & 4 deletions src/browser/components/ProjectSidebar/TaskGroupListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export function TaskGroupListItem(props: TaskGroupListItemProps) {
const statusDescriptionId = `task-group-status-${props.groupId}`;
const paddingLeft = getSidebarItemPaddingLeft(props.depth);
const KindGlyph = props.kind === "workflow" ? Workflow : Layers3;
const showProgressFraction = props.kind !== "workflow";
const statusParts: string[] = [];
if (props.runningCount > 0) {
statusParts.push(`${props.runningCount} running`);
Expand Down Expand Up @@ -109,7 +110,12 @@ export function TaskGroupListItem(props: TaskGroupListItemProps) {
/>
</span>
<div className="ml-1.5 flex min-w-0 flex-1 flex-col gap-0.5">
<div className="grid min-w-0 grid-cols-[minmax(0,1fr)_auto] items-center gap-1.5">
<div
className={cn(
"grid min-w-0 items-center gap-1.5",
showProgressFraction ? "grid-cols-[minmax(0,1fr)_auto]" : "grid-cols-1"
)}
>
<span className="flex min-w-0 items-center gap-1.5">
<KindGlyph
aria-hidden="true"
Expand All @@ -128,9 +134,11 @@ export function TaskGroupListItem(props: TaskGroupListItemProps) {
{formatSidebarTaskGroupHeader(props.kind, props.totalCount, props.title)}
</span>
</span>
<span className="text-muted text-[11px]">
{props.completedCount}/{props.totalCount}
</span>
{showProgressFraction && (
<span className="text-muted text-[11px]">
{props.completedCount}/{props.totalCount}
</span>
)}
</div>
<div
id={statusDescriptionId}
Expand Down
Loading