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

address review (codex): expose overrides for unpinned tasks + show 0/N badge

[._.]/ Adam Eivy0eeb8a8982be
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index b60ea4296a..21f2a99537 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -24,7 +24,7 @@
## Features
-- **The CoS Schedule Timeline can now expand each task track to see and edit its per-app overrides inline.** Which apps run a given scheduled task type (and each app's interval / agent-option / issue-author / swarm overrides) was previously only visible on the Schedule tab's per-task drawer — the Timeline showed the task cadence but not who it runs for. Every task row now carries a chevron that expands to the same `PerAppOverrideList` used on the Schedule tab (enable/disable per app, "Enable/Disable All", per-app interval and metadata), plus an `enabled/total` app-count badge on the row so an at-a-glance "3/5 apps" is visible without expanding. Edits save through the existing per-app override endpoints and refresh the timeline in place. System-job tracks (which are not per-app) show no expand toggle. The timeline graph node now forwards the `appOverrides`/`enabledAppCount`/`totalAppCount` plus the global `taskMetadata`/`managedAgentOptions` defaults that `getScheduleStatus` already computes; no migration needed (read-only surfacing of existing data).
+- **The CoS Schedule Timeline can now expand each task track to see and edit its per-app overrides inline.** Which apps run a given scheduled task type (and each app's interval / agent-option / issue-author / swarm overrides) was previously only visible on the Schedule tab's per-task drawer — the Timeline showed the task cadence but not who it runs for. Every task track — both the pinned timeline rows and the unpinned rotation/on-demand tasks in the "Unpinned runner queue" — now carries a chevron that expands to the same `PerAppOverrideList` used on the Schedule tab (enable/disable per app, "Enable/Disable All", per-app interval and metadata), plus an `enabled/total` app-count badge (shown even at `0/N` so "runs for none of my apps" is distinguishable from "no app scope") so an at-a-glance "3/5 apps" is visible without expanding. Edits save through the existing per-app override endpoints and refresh the timeline in place. System-job tracks (which are not per-app) show no expand toggle. The timeline graph node now forwards the `appOverrides`/`enabledAppCount`/`totalAppCount` plus the global `taskMetadata`/`managedAgentOptions` defaults that `getScheduleStatus` already computes; no migration needed (read-only surfacing of existing data).
- **Layered Intelligence now evaluates a managed app against its OWN goals and performance — not PortOS's agent telemetry.** Running the loop on a managed app previously fed it the PortOS install's global autonomous-agent run stats (`data/cos/learning.json`) as the "CoS metrics" source — which is on by default for every app — so a managed-app run reasoned over PortOS's tooling performance instead of the app's own product performance. Two changes fix this: (1) a new **App metrics (METRICS.md)** telemetry source, on by default for every app, reads a repo-root `METRICS.md` from the app (same as `GOALS.md`/`PLAN.md`) — the place an app documents how it measures success (user-success KPIs, production telemetry, where its data lives, and read-only queries an agent can run); and (2) the **CoS metrics** source now defaults **on only for the PortOS install** (where the agent stats genuinely are its own-performance metric) and **off for managed apps** (where they're a tooling/interaction signal, still opt-in). The reasoning prompt is reframed around "how is THIS app performing against its own goals and purpose," and when a managed app exposes no own-performance metrics the loop is nudged to propose adding a `METRICS.md` as an `app-data-gap`. New standard documented in [`docs/METRICS.md`](../docs/METRICS.md); apps can also wire a custom `cmd`/`http` source to feed live numbers into each run. Back-compat: these are default changes only — any explicitly-stored source toggle is preserved, so no migration is needed.
diff --git a/client/src/components/cos/tabs/WorkflowTab.jsx b/client/src/components/cos/tabs/WorkflowTab.jsx
index 36b926f217..cb616ea444 100644
--- a/client/src/components/cos/tabs/WorkflowTab.jsx
+++ b/client/src/components/cos/tabs/WorkflowTab.jsx
@@ -101,6 +101,26 @@ function TrackGrid({ divisions }) {
));
}
+// Reshapes a task node into the `config` shape PerAppOverrideList expects and
+// renders it. Shared by the pinned TimelineRow and the flexible-queue rows so
+// the config reconstruction lives in exactly one place.
+function AppOverridePanel({ node, apps, onUpdateOverride, onBulkToggleOverride }) {
+ return (
+ <PerAppOverrideList
+ taskType={node.label}
+ config={{
+ appOverrides: node.appOverrides,
+ type: node.schedule?.type,
+ taskMetadata: node.taskMetadata,
+ managedAgentOptions: node.managedAgentOptions
+ }}
+ apps={apps}
+ onUpdateOverride={onUpdateOverride}
+ onBulkToggleOverride={onBulkToggleOverride}
+ />
+ );
+}
+
function TimelineRow({ node, occurrences, windows, timeline, hours, timezone, selected, apps, expanded, onSelect, onToggleExpand, onUpdateOverride, onBulkToggleOverride }) {
const palette = trackPalette(node);
const Icon = node.kind === 'job' ? Bot : GitBranch;
@@ -139,8 +159,8 @@ function TimelineRow({ node, occurrences, windows, timeline, hours, timezone, se
<span className="mt-0.5 block truncate text-[10px] text-gray-500">{describeSchedule(node)}</span>
</span>
</button>
- {canExpand && enabledAppCount > 0 && (
- <span className="shrink-0 rounded-sm bg-port-accent/15 px-1 py-px text-[9px] font-medium text-port-accent" title={countTitle}>
+ {canExpand && (
+ <span className={`shrink-0 rounded-sm px-1 py-px text-[9px] font-medium ${enabledAppCount > 0 ? 'bg-port-accent/15 text-port-accent' : 'bg-white/5 text-gray-500'}`} title={countTitle}>
{enabledAppCount}/{totalAppCount}
</span>
)}
@@ -180,18 +200,7 @@ function TimelineRow({ node, occurrences, windows, timeline, hours, timezone, se
</div>
{canExpand && expanded && (
<div className="border-t border-port-border/40 bg-port-bg/20 px-3 py-3">
- <PerAppOverrideList
- taskType={node.label}
- config={{
- appOverrides: node.appOverrides,
- type: node.schedule?.type,
- taskMetadata: node.taskMetadata,
- managedAgentOptions: node.managedAgentOptions
- }}
- apps={apps}
- onUpdateOverride={onUpdateOverride}
- onBulkToggleOverride={onBulkToggleOverride}
- />
+ <AppOverridePanel node={node} apps={apps} onUpdateOverride={onUpdateOverride} onBulkToggleOverride={onBulkToggleOverride} />
</div>
)}
</div>
@@ -413,12 +422,37 @@ export default function WorkflowTab({ apps }) {
<div className="flex items-center gap-2 text-xs font-medium text-gray-400"><RotateCcw className="h-3.5 w-3.5" /> Unpinned runner queue</div>
<p className="mt-1 text-[11px] text-gray-600">These are active, but rotation and on-demand schedules do not promise a clock time.</p>
<div className="mt-2 flex flex-wrap gap-2">
- {model.flexible.map(node => (
- <button key={node.id} type="button" onClick={() => setSelectedId(node.id)} className={`rounded border px-2.5 py-1.5 text-xs ${selectedId === node.id ? 'border-port-accent bg-port-accent/10 text-port-accent' : 'border-port-border bg-port-bg/40 text-gray-400 hover:text-white'}`}>
- {node.label} <span className="text-gray-600">· {node.schedule?.type}</span>
- </button>
- ))}
+ {model.flexible.map(node => {
+ const canExpand = node.kind === 'task' && (node.totalAppCount || 0) > 0;
+ const isSelected = selectedId === node.id;
+ return (
+ <span key={node.id} className={`inline-flex items-center rounded border text-xs ${isSelected ? 'border-port-accent bg-port-accent/10' : 'border-port-border bg-port-bg/40'}`}>
+ <button type="button" onClick={() => setSelectedId(node.id)} className={`px-2.5 py-1.5 ${isSelected ? 'text-port-accent' : 'text-gray-400 hover:text-white'}`}>
+ {node.label} <span className="text-gray-600">· {node.schedule?.type}</span>
+ {canExpand && node.enabledAppCount > 0 && <span className="ml-1 text-port-accent">{node.enabledAppCount}/{node.totalAppCount}</span>}
+ </button>
+ {canExpand && (
+ <button
+ type="button"
+ onClick={() => toggleExpand(node.id)}
+ aria-expanded={expandedIds.has(node.id)}
+ aria-label={`${expandedIds.has(node.id) ? 'Hide' : 'Show'} app overrides for ${node.label}`}
+ title={`${node.enabledAppCount || 0} of ${node.totalAppCount} apps enabled`}
+ className="flex h-full items-center border-l border-port-border/60 px-1.5 text-gray-500 hover:bg-white/10 hover:text-gray-300"
+ >
+ <ChevronRight className={`h-3.5 w-3.5 transition-transform ${expandedIds.has(node.id) ? 'rotate-90' : ''}`} />
+ </button>
+ )}
+ </span>
+ );
+ })}
</div>
+ {model.flexible.filter(node => expandedIds.has(node.id) && node.kind === 'task' && (node.totalAppCount || 0) > 0).map(node => (
+ <div key={node.id} className="mt-2 rounded border border-port-border/60 bg-port-bg/20 px-3 py-3">
+ <div className="mb-2 text-xs font-medium text-gray-300">{node.label} <span className="text-gray-600">· app overrides</span></div>
+ <AppOverridePanel node={node} apps={apps} onUpdateOverride={handleUpdateOverride} onBulkToggleOverride={handleBulkToggleOverride} />
+ </div>
+ ))}
</section>
)}