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: stop the Perpetual toggle attaching .catch() to a bare await (#5829)

Adam Eivy5d5d2baba1be
diff --git a/client/src/components/cos/tabs/schedule/GlobalConfigControls.jsx b/client/src/components/cos/tabs/schedule/GlobalConfigControls.jsx
index 7e756a76a9..afaae9d64a 100644
--- a/client/src/components/cos/tabs/schedule/GlobalConfigControls.jsx
+++ b/client/src/components/cos/tabs/schedule/GlobalConfigControls.jsx
@@ -124,9 +124,11 @@ export default function GlobalConfigControls({ taskType, config, onUpdate, onTri
// Perpetual is orthogonal to the cadence — toggling it never touches `type`,
// so a Scheduled task keeps its expression and an On-Demand one stays manual.
+ // No local optimistic state to roll back, so this awaits bare like
+ // handleToggleEnabled rather than attaching its own rejection handler.
const handlePerpetualToggle = async () => {
setUpdating(true);
- await onUpdate(taskType, { perpetual: !config.perpetual }).catch(() => {});
+ await onUpdate(taskType, { perpetual: !config.perpetual });
setUpdating(false);
};
diff --git a/client/src/components/cos/tabs/schedule/GlobalConfigControls.test.jsx b/client/src/components/cos/tabs/schedule/GlobalConfigControls.test.jsx
index 2f26b557b9..0ece7f2585 100644
--- a/client/src/components/cos/tabs/schedule/GlobalConfigControls.test.jsx
+++ b/client/src/components/cos/tabs/schedule/GlobalConfigControls.test.jsx
@@ -33,7 +33,10 @@ const BASE_CONFIG = {
status: {},
};
-function renderControls({ taskMetadata, onUpdate = vi.fn(), taskType = 'feature-ideas', config: extraConfig = {}, setUpdating = () => {} } = {}) {
+// The real `onUpdate` (ScheduleTab's handleUpdateTask) is async, and several
+// handlers here attach a rejection handler to what it returns — so the default
+// mock must resolve a promise, not `undefined`.
+function renderControls({ taskMetadata, onUpdate = vi.fn(async () => {}), taskType = 'feature-ideas', config: extraConfig = {}, setUpdating = () => {} } = {}) {
render(
<GlobalConfigControls
taskType={taskType}