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
address review (codex): seed default cron on mode switch; preserve recheck weekday on time edit
[._.]/ Adam Eivy09caacc0bc88
diff --git a/client/src/components/apps/tabs/CustomTasksSection.jsx b/client/src/components/apps/tabs/CustomTasksSection.jsxindex 2b606787a9..2e3749d2fb 100644--- a/client/src/components/apps/tabs/CustomTasksSection.jsx+++ b/client/src/components/apps/tabs/CustomTasksSection.jsx@@ -94,6 +94,11 @@ function scheduleSummary(job) {function TaskForm({ form, setForm, onSave, onCancel, saveLabel }) {const update = (key, val) => setForm(f => ({ ...f, [key]: val }));+ // Switching to cron seeds the expression with the default the picker displays+ // (07:00 daily) so an untouched picker is actually saveable — otherwise the+ // form shows a schedule while cronExpression stays empty and Save is blocked.+ const setScheduleMode = (mode) =>+ setForm(f => ({ ...f, scheduleMode: mode, cronExpression: mode === 'cron' && !f.cronExpression ? DEFAULT_CRON : f.cronExpression }));// Toggle a git-workflow flag while preserving the system-wide invariant that// openPR implies useWorktree (matches toggleAppMetadataOverride used elsewhere):// turning openPR on forces useWorktree on; turning useWorktree off forces openPR off.@@ -136,7 +141,7 @@ function TaskForm({ form, setForm, onSave, onCancel, saveLabel }) {<buttonkey={mode}type="button"- onClick={() => update('scheduleMode', mode)}+ onClick={() => setScheduleMode(mode)}className={`px-2 py-1 text-xs rounded transition-colors ${form.scheduleMode === mode ? 'bg-port-accent/20 text-port-accent' : 'bg-port-bg text-gray-500 hover:text-gray-300'}`}diff --git a/client/src/components/cos/tabs/JobsTab.jsx b/client/src/components/cos/tabs/JobsTab.jsxindex 56f06ca209..3605b398ac 100644--- a/client/src/components/cos/tabs/JobsTab.jsx+++ b/client/src/components/cos/tabs/JobsTab.jsx@@ -181,7 +181,12 @@ function ScheduleFields({ data, onChange }) {<buttonkey={opt.value}type="button"- onClick={() => onChange('scheduleMode', opt.value)}+ onClick={() => {+ onChange('scheduleMode', opt.value);+ // Seed the expression with the picker's displayed default (07:00+ // daily) so an untouched Cron picker is actually saveable.+ if (opt.value === 'cron' && !data.cronExpression) onChange('cronExpression', DEFAULT_CRON);+ }}className={`px-2 py-1 text-xs rounded transition-colors ${data.scheduleMode === opt.value? 'bg-port-accent/20 text-port-accent'diff --git a/client/src/components/cos/tabs/workflow/ScheduleEditor.jsx b/client/src/components/cos/tabs/workflow/ScheduleEditor.jsxindex 1e370aad11..e712ca1aa2 100644--- a/client/src/components/cos/tabs/workflow/ScheduleEditor.jsx+++ b/client/src/components/cos/tabs/workflow/ScheduleEditor.jsx@@ -71,6 +71,14 @@ export default function ScheduleEditor({ node, allNodes, timezone, onClose, onSaconst Icon = node.kind === 'job' ? Bot : GitBranch;const set = (key, value) => setForm(current => ({ ...current, [key]: value }));+ // Switching to cron seeds the expression with the picker's displayed default+ // (07:00 daily) so the visible schedule is actually saveable instead of+ // failing validation on an empty cronExpression.+ const setMode = (mode) => setForm(current => ({+ ...current,+ mode,+ cronExpression: mode === 'cron' && !current.cronExpression ? DEFAULT_CRON : current.cronExpression+ }));const validateCron = (value) => String(value || '').trim().split(/\s+/).length === 5;const handleSave = async () => {@@ -160,7 +168,7 @@ export default function ScheduleEditor({ node, allNodes, timezone, onClose, onSa{node.kind === 'task' ? (<label className="block text-xs text-gray-400">Scheduling behavior- <select value={form.mode} onChange={event => set('mode', event.target.value)} className="mt-1.5 w-full rounded border border-port-border bg-port-bg px-3 py-2 text-sm text-white">+ <select value={form.mode} onChange={event => setMode(event.target.value)} className="mt-1.5 w-full rounded border border-port-border bg-port-bg px-3 py-2 text-sm text-white">{TASK_MODES.map(([value, label]) => <option key={value} value={value}>{label}</option>)}</select></label>@@ -169,7 +177,7 @@ export default function ScheduleEditor({ node, allNodes, timezone, onClose, onSa<span className="block text-xs text-gray-400">Scheduling behavior</span><div className="mt-1.5 grid grid-cols-2 rounded border border-port-border bg-port-bg p-1">{['cron', 'interval'].map(mode => (- <button key={mode} type="button" onClick={() => set('mode', mode)} className={`rounded px-2 py-1.5 text-xs capitalize ${form.mode === mode ? 'bg-port-accent/20 text-port-accent' : 'text-gray-500 hover:text-gray-300'}`}>+ <button key={mode} type="button" onClick={() => setMode(mode)} className={`rounded px-2 py-1.5 text-xs capitalize ${form.mode === mode ? 'bg-port-accent/20 text-port-accent' : 'text-gray-500 hover:text-gray-300'}`}>{mode === 'cron' ? 'Pinned time' : 'Interval'}</button>))}@@ -200,7 +208,7 @@ export default function ScheduleEditor({ node, allNodes, timezone, onClose, onSa<inputtype="time"value={parseSimpleCron(form.recheckCron)?.time ?? ''}- onChange={event => set('recheckCron', buildWeeklyCron([], event.target.value))}+ onChange={event => set('recheckCron', buildWeeklyCron(parseSimpleCron(form.recheckCron)?.days ?? [], 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)} 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" />