Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: show skip causes on the Schedule tab (#8936)

[._.]/ Adam Eivy3737dda516b3
diff --git a/client/src/components/cos/tabs/schedule/GlobalConfigControls.jsx b/client/src/components/cos/tabs/schedule/GlobalConfigControls.jsx
index 6dbd56186b..d7a79e5321 100644
--- a/client/src/components/cos/tabs/schedule/GlobalConfigControls.jsx
+++ b/client/src/components/cos/tabs/schedule/GlobalConfigControls.jsx
@@ -8,6 +8,7 @@ import Banner from '../../../ui/Banner';
import InfoTooltip from '../../../ui/InfoTooltip';
import { FormField } from '../../../ui/FormField';
import { formatDateTime } from '../../../../utils/formatters';
+import { formatSkipCauses } from '../../../../lib/perpetualSkipCauses';
import { useCodeReviewDefaults } from '../../../../hooks/useCodeReviewDefaults';
import useReviewerModelOptions from '../../../../hooks/useReviewerModelOptions';
import { reviewerModelsFromDefaults, reviewerEffortsFromDefaults } from '../../../../lib/reviewerModels';
@@ -403,11 +404,12 @@ export default function GlobalConfigControls({ taskType, config, onUpdate, onTri
const allParked = p.globalParked || (p.trackedAppCount > 0 && p.parkedAppCount === p.trackedAppCount);
if (allParked) {
const scope = p.trackedAppCount > 0 ? `${p.trackedAppCount} app(s) parked` : 'Parked';
+ const skipSummary = formatSkipCauses(p.parkSkipCauses);
return (
<>
{stallNote}
<p className="text-xs text-port-warning mt-1">
- {scope}{p.parkReason ? ` (${p.parkReason})` : ''}{p.nextRecheckAt ? ` — next recheck ${formatDateTime(p.nextRecheckAt)}` : ''}
+ {scope}{p.parkReason ? ` (${p.parkReason})` : ''}{skipSummary ? ` — ${skipSummary}` : ''}{p.nextRecheckAt ? ` — next recheck ${formatDateTime(p.nextRecheckAt)}` : ''}
</p>
</>
);
@@ -422,11 +424,12 @@ export default function GlobalConfigControls({ taskType, config, onUpdate, onTri
}
// Global (non-app) perpetual task: the global status.reason is accurate.
if (status.reason === 'perpetual-parked') {
+ const skipSummary = formatSkipCauses(status.parkSkipCauses);
return (
<>
{stallNote}
<p className="text-xs text-port-warning mt-1">
- Parked{status.parkReason ? ` (${status.parkReason})` : ''}{status.nextRunAt ? ` — rechecks ${formatDateTime(status.nextRunAt)}` : ''}
+ Parked{status.parkReason ? ` (${status.parkReason})` : ''}{skipSummary ? ` — ${skipSummary}` : ''}{status.nextRunAt ? ` — rechecks ${formatDateTime(status.nextRunAt)}` : ''}
</p>
</>
);
diff --git a/client/src/components/cos/tabs/schedule/GlobalConfigControls.test.jsx b/client/src/components/cos/tabs/schedule/GlobalConfigControls.test.jsx
index 7ff71efa86..d6717c35b3 100644
--- a/client/src/components/cos/tabs/schedule/GlobalConfigControls.test.jsx
+++ b/client/src/components/cos/tabs/schedule/GlobalConfigControls.test.jsx
@@ -360,6 +360,45 @@ describe('GlobalConfigControls — cadence + perpetual', () => {
renderControls({ config: { type: 'cron', cronExpression: '0 7 * * *', perpetual: true } });
expect(screen.queryByText('Recheck Cadence')).not.toBeInTheDocument();
});
+
+ it('shows parked skip causes while leaving unattributed parks unchanged', () => {
+ renderControls({
+ config: {
+ type: 'on-demand',
+ perpetual: true,
+ autoStart: true,
+ status: { reason: 'perpetual-drain' },
+ perpetualStatus: {
+ globalParked: false,
+ parkedAppCount: 1,
+ trackedAppCount: 1,
+ nextRecheckAt: null,
+ parkReason: 'no-actionable-issues',
+ parkCounts: { open: 88, inFlight: 2, filtered: 86 },
+ parkSkipCauses: { 'needs-input': 49, blocked: 17 }
+ }
+ }
+ });
+ expect(screen.getByText('1 app(s) parked (no-actionable-issues) — 49 needs-input, 17 blocked')).toBeInTheDocument();
+
+ cleanup();
+ renderControls({
+ config: {
+ type: 'on-demand',
+ perpetual: true,
+ autoStart: true,
+ status: { reason: 'perpetual-drain' },
+ perpetualStatus: {
+ globalParked: false,
+ parkedAppCount: 1,
+ trackedAppCount: 1,
+ nextRecheckAt: null,
+ parkReason: 'branch-reconcile'
+ }
+ }
+ });
+ expect(screen.getByText('1 app(s) parked (branch-reconcile)')).toBeInTheDocument();
+ });
});
// A stall (the forge CLI failing several evaluations in a row) can coexist
diff --git a/client/src/components/cos/tabs/schedule/scheduleConstants.js b/client/src/components/cos/tabs/schedule/scheduleConstants.js
index e82ca04d3e..b126abfbd9 100644
--- a/client/src/components/cos/tabs/schedule/scheduleConstants.js
+++ b/client/src/components/cos/tabs/schedule/scheduleConstants.js
@@ -5,6 +5,7 @@ import {
} from '../../../../utils/providers';
import { timeUntil } from '../../../../utils/formatters';
import { describeCron, summarizeAppSchedules } from '../../../../utils/cronHelpers';
+import { formatSkipCauses } from '../../../../lib/perpetualSkipCauses';
// The cadence model is two variants; `perpetual` is an orthogonal flag that
// renders as its own badge alongside whichever one is selected.
@@ -276,10 +277,12 @@ export function describeNextRun(config) {
const allParked = p.globalParked || (p.trackedAppCount > 0 && p.parkedAppCount === p.trackedAppCount);
if (allParked) {
const scope = p.trackedAppCount > 0 ? `${p.trackedAppCount} app(s) parked` : 'parked';
+ const skipSummary = formatSkipCauses(p.parkSkipCauses);
+ const skipSuffix = skipSummary ? ` — ${skipSummary}` : '';
return {
- text: p.nextRecheckAt ? `${scope} · rechecks ${timeUntil(p.nextRecheckAt, 'soon')}` : `${scope} — no work`,
+ text: `${scope}${skipSuffix}${p.nextRecheckAt ? ` · rechecks ${timeUntil(p.nextRecheckAt, 'soon')}` : ' — no work'}`,
tone: 'text-gray-400',
- title: p.parkReason ? `Parked: ${p.parkReason}` : undefined,
+ title: p.parkReason ? `Parked: ${p.parkReason}${skipSuffix}` : skipSummary ? `Parked: ${skipSummary}` : undefined,
};
}
return { text: 'draining — runs back-to-back until done', tone: 'text-port-success' };
@@ -287,10 +290,12 @@ export function describeNextRun(config) {
// Global (non-app) perpetual task: the global status.reason is accurate.
if (config.status?.reason === 'perpetual-parked') {
const next = config.status?.nextRunAt;
+ const skipSummary = formatSkipCauses(config.status?.parkSkipCauses);
+ const skipSuffix = skipSummary ? ` — ${skipSummary}` : '';
return {
- text: next ? `parked · rechecks ${timeUntil(next, 'soon')}` : 'parked — no work',
+ text: `parked${skipSuffix}${next ? ` · rechecks ${timeUntil(next, 'soon')}` : ' — no work'}`,
tone: 'text-gray-400',
- title: config.status?.parkReason ? `Parked: ${config.status.parkReason}` : undefined,
+ title: config.status?.parkReason ? `Parked: ${config.status.parkReason}${skipSuffix}` : skipSummary ? `Parked: ${skipSummary}` : undefined,
};
}
return { text: 'draining — runs back-to-back until done', tone: 'text-port-success' };
diff --git a/client/src/components/cos/tabs/schedule/scheduleConstants.test.js b/client/src/components/cos/tabs/schedule/scheduleConstants.test.js
index da58530777..25833d4298 100644
--- a/client/src/components/cos/tabs/schedule/scheduleConstants.test.js
+++ b/client/src/components/cos/tabs/schedule/scheduleConstants.test.js
@@ -244,7 +244,7 @@ describe('describeNextRun', () => {
status: { reason: 'perpetual-parked', nextRunAt: '2999-01-01T00:00:00Z', parkReason: 'no-actionable-issues' }
});
expect(out.text).toMatch(/parked · rechecks/);
- expect(out.title).toContain('no-actionable-issues');
+ expect(out.title).toBe('Parked: no-actionable-issues');
});
it('prefers the per-app aggregate over the global drain status for app-scoped perpetual tasks', () => {
@@ -254,10 +254,18 @@ describe('describeNextRun', () => {
type: 'on-demand',
perpetual: true,
status: { reason: 'perpetual-drain' },
- perpetualStatus: { parkedAppCount: 2, trackedAppCount: 2, globalParked: false, nextRecheckAt: '2999-01-01T00:00:00Z', parkReason: 'no-actionable-issues' }
+ perpetualStatus: {
+ parkedAppCount: 2,
+ trackedAppCount: 2,
+ globalParked: false,
+ nextRecheckAt: '2999-01-01T00:00:00Z',
+ parkReason: 'no-actionable-issues',
+ parkCounts: { open: 88, inFlight: 2, filtered: 86 },
+ parkSkipCauses: { 'needs-input': 49, blocked: 17 }
+ }
});
- expect(out.text).toMatch(/2 app\(s\) parked · rechecks/);
- expect(out.title).toContain('no-actionable-issues');
+ expect(out.text).toMatch(/2 app\(s\) parked — 49 needs-input, 17 blocked · rechecks/);
+ expect(out.title).toBe('Parked: no-actionable-issues — 49 needs-input, 17 blocked');
});
it('shows draining when some apps still have work in the aggregate', () => {
diff --git a/server/services/taskSchedule.js b/server/services/taskSchedule.js
index 91f826ecfd..b55f51fd68 100644
--- a/server/services/taskSchedule.js
+++ b/server/services/taskSchedule.js
@@ -431,6 +431,8 @@ function parkedUntilMs(record) {
* soonestParkAt ms of the earliest un-elapsed park, or null when none
* anyDueNow some tracked scope is unparked or its park has elapsed
* parkReason first parked app's reason, else the parked global's
+ * parkCounts first parked app's counts, else the parked global's
+ * parkSkipCauses first parked app's skip breakdown, else the parked global's
*/
function aggregatePerpetualParks(execution, now) {
const appRecords = Object.values(execution?.perApp || {});
@@ -466,6 +468,8 @@ function aggregatePerpetualParks(execution, now) {
}
}
+ const parkedRecord = firstParkedApp || (globalParked ? execution : null);
+
return {
trackedAppCount: appRecords.length,
trackedCount: appRecords.length + (globalTracked ? 1 : 0),
@@ -473,7 +477,9 @@ function aggregatePerpetualParks(execution, now) {
globalParked,
soonestParkAt,
anyDueNow,
- parkReason: firstParkedApp?.parkReason || (globalParked ? execution.parkReason : null) || null
+ parkReason: firstParkedApp?.parkReason || (globalParked ? execution.parkReason : null) || null,
+ parkCounts: parkedRecord?.parkCounts ?? null,
+ parkSkipCauses: parkedRecord?.parkSkipCauses ?? null
};
}
@@ -1513,6 +1519,8 @@ export async function getScheduleStatus() {
trackedAppCount: parks.trackedAppCount,
nextRecheckAt: parks.soonestParkAt === null ? null : new Date(parks.soonestParkAt).toISOString(),
parkReason: parks.parkReason,
+ ...(parks.parkCounts != null && { parkCounts: parks.parkCounts }),
+ ...(parks.parkSkipCauses != null && { parkSkipCauses: parks.parkSkipCauses }),
// A stall means the probe (e.g. gh/glab) has failed several evaluations
// in a row WITHOUT parking — the drain keeps ticking, so it can be
// present at the same time `globalParked`/`parkedAppCount` read "not
diff --git a/server/services/taskSchedule.test.js b/server/services/taskSchedule.test.js
index c2ba4f6f37..41195f825a 100644
--- a/server/services/taskSchedule.test.js
+++ b/server/services/taskSchedule.test.js
@@ -3444,13 +3444,28 @@ describe('taskSchedule', () => {
mockSchedule({
tasks: { 'claim-issue': { type: 'on-demand', perpetual: true, enabled: true } },
executions: { 'task:claim-issue': { lastRun: null, count: 0, perApp: {
- 'app-1': { lastRun: null, count: 0, parkedUntil: future, parkReason: 'no-actionable-issues' },
+ 'app-1': {
+ lastRun: null,
+ count: 0,
+ parkedUntil: future,
+ parkReason: 'no-actionable-issues',
+ parkCounts: { open: 88, inFlight: 2, filtered: 86 },
+ parkSkipCauses: { 'needs-input': 49, blocked: 17 }
+ },
'app-2': { lastRun: null, count: 0 }
} } }
})
const status = await getScheduleStatus()
const p = status.tasks['claim-issue'].perpetualStatus
- expect(p).toMatchObject({ parkedAppCount: 1, trackedAppCount: 2, globalParked: false, nextRecheckAt: future, parkReason: 'no-actionable-issues' })
+ expect(p).toMatchObject({
+ parkedAppCount: 1,
+ trackedAppCount: 2,
+ globalParked: false,
+ nextRecheckAt: future,
+ parkReason: 'no-actionable-issues',
+ parkCounts: { open: 88, inFlight: 2, filtered: 86 },
+ parkSkipCauses: { 'needs-input': 49, blocked: 17 }
+ })
})
})