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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
timeline UX: deep-link zoom+selection, keep interval-based perpetual recheck, rename tab to Timeline
[._.]/ Adam Eivyeeee171c0948
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 2708b7c263..0c2ed7cb15 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -14,6 +14,8 @@## Added+- **CoS → Timeline: the Workflow tab is now a schedule timeline — see when every active task will run, and fix collisions in place.** The conceptual stage-pipeline visualization at `/cos/workflow` has been replaced with a real execution timeline over a 24-hour or 7-day window: cron launches at their exact slots, interval tasks/jobs at their learning-adjusted next runs and repeats, perpetual tasks as an open-ended draining band with reset/recheck markers, and a "Scheduled order" strip showing the next launches in sequence. Launches from different tasks within 15 minutes of each other get a collision ring plus a "tight handoffs" counter, so schedules can be staggered before they pile onto the concurrent-agent slots. Selecting any track (or an unpinned rotation/on-demand task) opens an inline editor to change its timing mode, frequency, enabled state, weekday-only flag, and hard `runAfter` dependencies without leaving the page — with the zoom window and open track deep-linked via URL params. Projections respect parked app-scoped perpetual tasks and weekday-only schedules (weekend slots that the scheduler would refuse are never drawn), and switching a system job between pinned-cron and interval modes now explicitly clears the inactive mode's fields.+- **[issue-2328] Auto-fix outcomes are now aggregated into dashboard telemetry with a success-rate trend.** The structured `metadata.diagnostics` persisted on every error-driven task (tier / category / failure reason) were queryable but never surfaced. A new pure aggregator (`server/services/autoFixMetrics.js`) reads them off task records and rolls them up by fallback tier, failure category, and task status — plus a time-to-recovery summary (count / avg / median / min / max) and a daily success-rate trend — exposed via `GET /api/autofix/metrics` and rendered by a new **Auto-Fix Telemetry** dashboard widget (overall recovery rate, trend sparkline, per-tier breakdown, median recovery time). To measure time-to-recovery, each diagnostics record now carries an `observedAt` failure timestamp; recovery is derived from the task's completion edit. Sentinel discipline throughout — a rate with no denominator and a duration with no completed-with-timing samples return `null`, never a fabricated `0`, so "no data yet" can't read as "0% success". (Further #2328 slice remains: full 4-tier fallback *execution* wiring — the classifier still annotates the investigation task rather than attempting each tier's fix in sequence.)- **[issue-2333] Untyped task executions are now auto-classified instead of piling up as `unknown`.** Task-learning's `extractTaskType` used to dump every execution it couldn't pattern-match into a single blind `unknown` bucket — those tasks bypassed routing logic, skipped outcome learning, and leaked unstructured failures. It now runs an execution-entry classification hook (`classifyUntypedTask`, pure/idempotent/<50ms) that, before giving up, infers a concrete domain from additional signals — a `selfImprovementType` metadata hint, an explicit `task.taskType` the primary extractor didn't special-case (e.g. `scheduled` → `scheduled-task`), and broader whole-word description keyword signatures (`fix`/`investigate`/`crash` → `auto-fix`, `refactor`/`optimize` → `self-improve:general`, `review`/`audit` → `idle-review`, `unit test`/`coverage` → `test-task`) — and only falls back to a new sandboxed `external/untyped` type when nothing matches. Newly-classified and fallback executions flow through the existing #2329 failure-signature harvesting so their failures are captured in the normalized telemetry schema. The `external/untyped` bucket is explicitly walled off from routing (it never drives a model-tier suggestion and is never globally skipped) so a heterogeneous grab-bag can't create a routing blind spot or loop. (Partial delivery of #2333; the spawn-time key mirror in `agentModelSelection.extractTaskTypeKey` and deeper self-improvement-loop consumption of the harvested `failureSignatures` remain.)- **[issue-2333] The spawn-time routing lookup key now mirrors the recorded domain, and the self-improvement loop reads the enriched failure signatures (the #2333 remainder).** Two follow-ons close out #2333. First, `agentModelSelection.extractTaskTypeKey` — the key used at spawn time to look up historical routing performance — no longer falls back to a blind `'unknown'`; it now delegates the fallback to the same `classifyUntypedTask` the completion path records under, so an untyped task's routing lookup keys off the exact bucket its outcome will be recorded in (a concrete inferred domain, or the sandboxed `external/untyped`) instead of a bucket that never matches. Second, a new pure `summarizeFailureSignatures` reader turns the per-completion `failureSignatures` map (provider/model-attributed, success-criteria-aware) into a ranked, display-ready summary that the self-improvement loop now consumes: `getPromptImprovementRecommendations` emits a provider-attributed "route this task type away from X" suggestion (escalated to high priority when recent runs missed a declared success criterion) and exposes the structured signatures, and the Learning insights view surfaces the summary plus a provider/model-named recommendation once a provider crosses three recent failures — attribution the coarse `errorPatterns` count could never express. This closes #2333.diff --git a/client/src/components/Layout.jsx b/client/src/components/Layout.jsxindex b828022f78..448866cd46 100644--- a/client/src/components/Layout.jsx+++ b/client/src/components/Layout.jsx@@ -89,7 +89,8 @@ import {PinOff,Navigation,Music,- Workflow as WorkflowIcon+ Workflow as WorkflowIcon,+ ChartGantt} from 'lucide-react';/* global __APP_VERSION__ */import Logo from './Logo';@@ -194,7 +195,7 @@ const navItems = [{ to: '/cos/productivity', label: 'Streaks', icon: Flame },{ to: '/cos/jobs', label: 'System Tasks', icon: Bot },{ to: '/cos/tasks', label: 'Tasks', icon: FileText },- { to: '/cos/workflow', label: 'Workflow', icon: WorkflowIcon },+ { to: '/cos/workflow', label: 'Timeline', icon: ChartGantt },],},{diff --git a/client/src/components/cos/constants.js b/client/src/components/cos/constants.jsindex b09f4ed8f9..16b95990e4 100644--- a/client/src/components/cos/constants.js+++ b/client/src/components/cos/constants.js@@ -11,7 +11,7 @@ import {Bot,Flame,Newspaper,- Workflow as WorkflowIcon+ ChartGantt} from 'lucide-react';export const TABS = [@@ -20,7 +20,7 @@ export const TABS = [{ id: 'agents', label: 'Agents', icon: Cpu },{ id: 'jobs', label: 'System Tasks', icon: Bot },{ id: 'schedule', label: 'Schedule', icon: Clock },- { id: 'workflow', label: 'Workflow', icon: WorkflowIcon },+ { id: 'workflow', label: 'Timeline', icon: ChartGantt },{ id: 'digest', label: 'Digest', icon: Calendar },{ id: 'gsd', label: 'GSD', icon: Compass },{ id: 'productivity', label: 'Streaks', icon: Flame },diff --git a/client/src/components/cos/tabs/WorkflowTab.jsx b/client/src/components/cos/tabs/WorkflowTab.jsxindex af356d2e6a..05a590a7ae 100644--- a/client/src/components/cos/tabs/WorkflowTab.jsx+++ b/client/src/components/cos/tabs/WorkflowTab.jsx@@ -1,4 +1,5 @@import { useCallback, useEffect, useMemo, useRef, useState } from 'react';+import { useSearchParams } from 'react-router-dom';import { AlertTriangle, ArrowRight, Bot, CalendarDays, Clock3, GitBranch, Infinity as InfinityIcon, RefreshCw, RotateCcw, TimerReset, Workflow } from 'lucide-react';import * as api from '../../../services/api';import { describeCron } from '../../../utils/cronHelpers';@@ -25,7 +26,12 @@ function describeSchedule(node) {}if (schedule.cronExpression) return describeCron(schedule.cronExpression) || schedule.cronExpression;if (node.kind === 'job' && schedule.scheduledTime) return `${schedule.type} at ${schedule.scheduledTime}`;- if (schedule.type === 'custom' && schedule.intervalMs) return `every ${Math.round(schedule.intervalMs / 3_600_000)}h`;+ if (schedule.type === 'custom' && schedule.intervalMs) {+ const intervalHours = schedule.intervalMs / 3_600_000;+ if (intervalHours >= 24) return `every ${Math.round(intervalHours / 24)}d`;+ if (intervalHours >= 1) return `every ${Math.round(intervalHours)}h`;+ return `every ${Math.round(schedule.intervalMs / 60_000)}m`;+ }return schedule.type?.replaceAll('-', ' ') || 'flexible';}@@ -144,11 +150,30 @@ function NextUp({ occurrences, nodeMap, hours, timezone, onSelect }) {}export default function WorkflowTab() {- const [hours, setHours] = useState(24);+ // Zoom window + selected track live in the URL so the open editor and view+ // are shareable/bookmarkable and survive reload — the same "URL is the+ // source of truth for what's open" convention as ScheduleTab's ?task=.+ const [searchParams, setSearchParams] = useSearchParams();+ const hoursParam = Number.parseInt(searchParams.get('hours'), 10);+ const hours = [24, 168].includes(hoursParam) ? hoursParam : 24;+ const setHours = useCallback((next) => {+ const params = new URLSearchParams(searchParams);+ if (next === 24) params.delete('hours');+ else params.set('hours', String(next));+ setSearchParams(params, { replace: true });+ }, [searchParams, setSearchParams]);++ const selectedId = searchParams.get('track');+ const setSelectedId = useCallback((next) => {+ const params = new URLSearchParams(searchParams);+ if (next) params.set('track', next);+ else params.delete('track');+ setSearchParams(params, { replace: true });+ }, [searchParams, setSearchParams]);+const [graph, setGraph] = useState(null);const [loading, setLoading] = useState(true);const [error, setError] = useState(null);- const [selectedId, setSelectedId] = useState(null);const fetchGeneration = useRef(0);const fetchGraph = useCallback(async () => {diff --git a/client/src/components/cos/tabs/workflow/ScheduleEditor.jsx b/client/src/components/cos/tabs/workflow/ScheduleEditor.jsxindex ed5735d0e9..60c7cf4efd 100644--- a/client/src/components/cos/tabs/workflow/ScheduleEditor.jsx+++ b/client/src/components/cos/tabs/workflow/ScheduleEditor.jsx@@ -52,7 +52,11 @@ export default function ScheduleEditor({ node, allNodes, timezone, onClose, onSaenabled: node.enabled,mode: node.kind === 'job' ? (schedule.cronExpression ? 'cron' : 'interval') : schedule.type,cronExpression: schedule.cronExpression || '',- recheckCron: schedule.recheckCron || '0 9 * * *',+ // Empty means "no recheck cron": the task keeps its interval-based+ // recheck cadence (recheckIntervalMs, default daily). Prefilling a cron+ // here would silently override that cadence on any unrelated save,+ // because recheckCron takes precedence over recheckIntervalMs.+ recheckCron: schedule.recheckCron || '',interval: node.kind === 'job' ? (schedule.type || 'daily') : 'daily',intervalHours: Math.max(1, Math.round((schedule.intervalMs || 3_600_000) / 3_600_000)),scheduledTime: schedule.scheduledTime || '',@@ -205,14 +209,16 @@ export default function ScheduleEditor({ node, allNodes, timezone, onClose, onSa{node.kind === 'task' && form.mode === 'perpetual' && (<div className="space-y-2 rounded border border-port-warning/20 bg-port-warning/5 p-3">- <p className="text-xs text-gray-400">Drains work back-to-back. Once parked, this is its daily reset/recheck.</p>+ <p className="text-xs text-gray-400">+ Drains work back-to-back. Once parked, this is its reset/recheck time — leave blank to keep the default interval-based recheck cadence.+ </p><inputtype="time"value={dailyTimeFromCron(form.recheckCron)}onChange={event => set('recheckCron', cronFromDailyTime(event.target.value))}className="w-full rounded border border-port-border bg-port-bg px-3 py-2 text-sm text-white"/>- <input value={form.recheckCron} onChange={event => set('recheckCron', event.target.value)} className="w-full rounded border border-port-border bg-port-bg px-3 py-2 font-mono text-xs text-gray-300" aria-label="Perpetual recheck cron" />+ <input value={form.recheckCron} onChange={event => set('recheckCron', event.target.value)} placeholder="0 9 * * *" className="w-full rounded border border-port-border bg-port-bg px-3 py-2 font-mono text-xs text-gray-300" aria-label="Perpetual recheck cron" /></div>)}diff --git a/server/lib/navManifest.js b/server/lib/navManifest.jsindex d52522d997..572c206c31 100644--- a/server/lib/navManifest.js+++ b/server/lib/navManifest.js@@ -90,10 +90,10 @@ export const NAV_COMMANDS = [{ id: 'nav.cos.memory', path: '/cos/memory', label: 'Memory', section: 'Chief of Staff', aliases: ['cos-memory'] },{ id: 'nav.cos.schedule', path: '/cos/schedule', label: 'Schedule', section: 'Chief of Staff', aliases: ['schedule', 'cos-schedule'] },{ id: 'nav.social-agents', path: '/agents', label: 'Social Agents', section: 'Chief of Staff', aliases: ['social-agents'] },- // Note: `pipeline` is intentionally NOT an alias here — that token now- // resolves to the dedicated /pipeline page (nav.create.pipeline). CoS still- // surfaces "task pipeline" via the `pipeline` keyword in the palette.- { id: 'nav.cos.workflow', path: '/cos/workflow', label: 'Workflow', section: 'Chief of Staff', aliases: ['workflow', 'cos-workflow'], keywords: ['pipeline', 'dependencies', 'order', 'stages', 'task pipeline'] },+ // The page at /cos/workflow is now the Schedule Timeline (launch-order+ // visualization + inline schedule editor). The `workflow` aliases are kept+ // for muscle memory; the bare `timeline` alias stays with /media/timeline.+ { id: 'nav.cos.workflow', path: '/cos/workflow', label: 'Timeline', section: 'Chief of Staff', aliases: ['workflow', 'cos-workflow', 'cos-timeline', 'schedule-timeline'], keywords: ['timeline', 'schedule', 'launch order', 'run order', 'gantt', 'upcoming runs', 'overlap', 'dependencies'] },{ id: 'nav.cos.productivity', path: '/cos/productivity', label: 'Streaks', section: 'Chief of Staff', aliases: ['streaks', 'cos-productivity'] },{ id: 'nav.messages.inbox', path: '/messages/inbox', label: 'Inbox', section: 'Comms', aliases: ['messages', 'comms', 'comms-inbox'], keywords: ['comms', 'email', 'inbox'] },