diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index 941674524f..53b59ac57d 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -68,6 +68,9 @@ - `todo_write` recovery reminders now distinguish rejected payloads from runtime aborts, preserve the available cause, and require durable state reconciliation instead of incorrectly telling the agent to change a valid payload (#3743, #3760). - Authority-absent Darwin `appendSync` regression coverage now exercises the replace-based race window (destination mutation during successor staging) instead of the retired in-place `O_APPEND` open path, and documents that ctime-only destination transitions are tolerated by exact replacement. - The legacy interactive footer now uses the session manager's cumulative usage index, so completed task and subagent tokens, premium requests, and estimated costs are included exactly once instead of reporting only the parent agent's assistant messages. +### Fixed + +- Hiding the `jobs` status-line segment now also hides the background-job counter. The status line appended a hardcoded `N jobs running` chip after rendering the configured segments, without consulting `statusLine.leftSegments` / `statusLine.rightSegments`, so setting `jobs` to hidden in `/settings` removed only the monitor/cron widget while the async job counter kept rendering with the same icon and color. Every bundled preset keeps `jobs` in `rightSegments`, so default output is unchanged. ## [0.12.10] - 2026-08-03 diff --git a/packages/coding-agent/src/modes/components/tool-status-header.ts b/packages/coding-agent/src/modes/components/tool-status-header.ts index c9658f9f8c..fff7ecae8f 100644 --- a/packages/coding-agent/src/modes/components/tool-status-header.ts +++ b/packages/coding-agent/src/modes/components/tool-status-header.ts @@ -806,8 +806,13 @@ export class StatusLineComponent implements Component { } right.push(...actionHints.map(hint => hint.content)); - const runningBackgroundJobs = - this.session.getAsyncJobSnapshot()?.running.filter(job => job.metadata?.monitor !== true).length ?? 0; + // Background (non-monitor) jobs are part of the `jobs` widget, so honor its + // placement: hiding the `jobs` segment must hide this counter too. + const jobsSegmentVisible = + effectiveSettings.leftSegments.includes("jobs") || effectiveSettings.rightSegments.includes("jobs"); + const runningBackgroundJobs = jobsSegmentVisible + ? (this.session.getAsyncJobSnapshot()?.running.filter(job => job.metadata?.monitor !== true).length ?? 0) + : 0; if (runningBackgroundJobs > 0) { const icon = theme.icon.agents ? `${theme.icon.agents} ` : ""; const label = `${formatCount("job", runningBackgroundJobs)} running`; diff --git a/packages/coding-agent/test/jobs-segment.test.ts b/packages/coding-agent/test/jobs-segment.test.ts index 2036ff8b35..806b371b75 100644 --- a/packages/coding-agent/test/jobs-segment.test.ts +++ b/packages/coding-agent/test/jobs-segment.test.ts @@ -145,4 +145,17 @@ describe("jobs status-line segment", () => { const rendered = Bun.stripANSI(component.render(120).join("\n")); expect(rendered).toContain("job running"); }); + + test("status line drops the legacy job count when the jobs segment is hidden", () => { + const component = new StatusLineComponent(makeStatusLineSession([{ id: "task-1", type: "task" }])); + component.updateSettings({ + preset: "custom", + leftSegments: [], + rightSegments: ["cost"], + showSkillHud: false, + }); + + const rendered = Bun.stripANSI(component.render(120).join("\n")); + expect(rendered).not.toContain("job running"); + }); });