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: fix weekly job cron synthesis, a11y on toggle rows, error toast on task save

Adam Eivyf398fd7ad2a9
diff --git a/client/src/components/cos/tabs/ScheduleTab.jsx b/client/src/components/cos/tabs/ScheduleTab.jsx
index f5ca5c7fdc..0f073ac673 100644
--- a/client/src/components/cos/tabs/ScheduleTab.jsx
+++ b/client/src/components/cos/tabs/ScheduleTab.jsx
@@ -461,8 +461,11 @@ function GlobalConfigControls({ taskType, config, onUpdate, onTrigger, onReset,
return (
<div
key={field}
+ role="button"
+ tabIndex={0}
className="flex items-center justify-between gap-3 min-h-[44px] cursor-pointer rounded px-2 -mx-2 hover:bg-port-card/30 active:bg-port-card/50"
onClick={handleToggle}
+ onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); handleToggle(); } }}
>
<div className="min-w-0 flex-1">
<span className="text-sm text-white">{label}</span>
diff --git a/client/src/components/cos/tabs/TaskItem.jsx b/client/src/components/cos/tabs/TaskItem.jsx
index e20ff2fb50..78a4ac9149 100644
--- a/client/src/components/cos/tabs/TaskItem.jsx
+++ b/client/src/components/cos/tabs/TaskItem.jsx
@@ -176,8 +176,12 @@ export default function TaskItem({ task, isSystem, awaitingApproval, onRefresh,
};
const handleSave = async () => {
- const result = await api.updateCosTask(task.id, editData).catch(() => null);
- if (result) toast.success('Task updated');
+ const result = await api.updateCosTask(task.id, editData).catch(err => {
+ toast.error(err.message);
+ return null;
+ });
+ if (!result) return;
+ toast.success('Task updated');
setEditing(false);
onRefresh();
};
diff --git a/server/services/cos.js b/server/services/cos.js
index 349afe7cbc..1e3756293a 100644
--- a/server/services/cos.js
+++ b/server/services/cos.js
@@ -2629,9 +2629,13 @@ export async function approveTask(taskId) {
function computeNextJobFireTime(job, timezone) {
// Convert scheduledTime (HH:MM) + interval to a cron expression so parseCronToNextRun
// handles all "next occurrence after lastRun" logic without drift issues.
+ // Only synthesize a cron for daily/weekday jobs (intervalMs <= 1 day).
+ // Weekly+ jobs with scheduledTime fall through to the interval path, which correctly
+ // computes lastRun + intervalMs and avoids scheduling them every day.
// e.g. { interval: 'daily', scheduledTime: '04:30' } → '30 4 * * *'
+ const DAY_MS = 24 * 60 * 60 * 1000;
let cronExpr = job.cronExpression;
- if (!cronExpr && job.scheduledTime) {
+ if (!cronExpr && job.scheduledTime && (!job.intervalMs || job.intervalMs <= DAY_MS)) {
const match = String(job.scheduledTime).match(/^([01]\d|2[0-3]):([0-5]\d)$/);
if (match) {
const dayField = job.weekdaysOnly ? '1-5' : '*';