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

feat(cos): default new scheduled task types to disabled per-app

Adam Eivyb4c21c68dcbb
diff --git a/client/src/components/apps/tabs/AutomationTab.jsx b/client/src/components/apps/tabs/AutomationTab.jsx
index 253a7f81cf..487912ec9c 100644
--- a/client/src/components/apps/tabs/AutomationTab.jsx
+++ b/client/src/components/apps/tabs/AutomationTab.jsx
@@ -34,8 +34,8 @@ export default function AutomationTab({ appId, appName }) {
fetchData();
}, [fetchData]);
- const handleToggle = async (taskType, currentEnabled) => {
- const newEnabled = currentEnabled === false;
+ const handleToggle = async (taskType, isEnabled) => {
+ const newEnabled = !isEnabled;
await api.updateAppTaskTypeOverride(appId, taskType, { enabled: newEnabled }).catch(err => {
toast.error(err.message);
return null;
@@ -124,7 +124,7 @@ export default function AutomationTab({ appId, appName }) {
{taskTypes.map(taskType => {
const override = overrides[taskType] || {};
const globalConfig = schedule.tasks[taskType] || {};
- const isEnabled = override.enabled !== false;
+ const isEnabled = override.enabled === true;
const overrideInterval = override.interval || null;
return (
@@ -137,7 +137,7 @@ export default function AutomationTab({ appId, appName }) {
</td>
<td className="px-4 py-3 text-center">
<button
- onClick={() => handleToggle(taskType, override.enabled)}
+ onClick={() => handleToggle(taskType, isEnabled)}
className={`w-10 h-5 rounded-full transition-colors relative ${
isEnabled ? 'bg-port-success' : 'bg-gray-600'
}`}
diff --git a/client/src/components/cos/tabs/ScheduleTab.jsx b/client/src/components/cos/tabs/ScheduleTab.jsx
index a538b98cd3..203a3290d6 100644
--- a/client/src/components/cos/tabs/ScheduleTab.jsx
+++ b/client/src/components/cos/tabs/ScheduleTab.jsx
@@ -345,7 +345,7 @@ function GlobalConfigControls({ taskType, config, onUpdate, onTrigger, onReset,
function AppOverrideRow({ app, taskType, globalIntervalType, globalTaskMetadata, override, onUpdate }) {
const [updating, setUpdating] = useState(false);
- const isEnabled = override?.enabled !== false;
+ const isEnabled = override?.enabled === true;
const currentInterval = override?.interval || null;
const handleToggle = async () => {
@@ -434,8 +434,8 @@ function PerAppOverrideList({ taskType, config, apps, onUpdateOverride, onBulkTo
if (activeApps.length === 0) return null;
- const allEnabled = activeApps.every(app => appOverrides[app.id]?.enabled !== false);
- const allDisabled = activeApps.every(app => appOverrides[app.id]?.enabled === false);
+ const allEnabled = activeApps.every(app => appOverrides[app.id]?.enabled === true);
+ const allDisabled = activeApps.every(app => appOverrides[app.id]?.enabled !== true);
const handleBulkToggle = async () => {
setBulkUpdating(true);
diff --git a/server/services/apps.js b/server/services/apps.js
index 78a1c2aa6a..97487ce82c 100644
--- a/server/services/apps.js
+++ b/server/services/apps.js
@@ -308,7 +308,7 @@ export async function getAppTaskTypeOverrides(id) {
*/
export async function isTaskTypeEnabledForApp(id, taskType) {
const overrides = await getAppTaskTypeOverrides(id);
- return overrides[taskType]?.enabled !== false;
+ return overrides[taskType]?.enabled === true;
}
/**
@@ -344,8 +344,8 @@ export async function updateAppTaskTypeOverride(id, taskType, { enabled, interva
}
}
- // If override matches "inherit everything" defaults, remove the entry
- if (updated.enabled !== false && !updated.interval && !updated.taskMetadata) {
+ // If override matches defaults (disabled, no interval, no metadata), remove the entry
+ if (!updated.enabled && !updated.interval && !updated.taskMetadata) {
delete overrides[taskType];
} else {
overrides[taskType] = updated;
@@ -374,7 +374,7 @@ export async function bulkUpdateAppTaskTypeOverride(taskType, { enabled } = {})
const existing = overrides[taskType] || {};
const updated = { ...existing, enabled };
- if (updated.enabled !== false && !updated.interval && !updated.taskMetadata) {
+ if (!updated.enabled && !updated.interval && !updated.taskMetadata) {
delete overrides[taskType];
} else {
overrides[taskType] = updated;
diff --git a/server/services/taskSchedule.js b/server/services/taskSchedule.js
index 929f35061e..0d9c9eec6e 100644
--- a/server/services/taskSchedule.js
+++ b/server/services/taskSchedule.js
@@ -873,7 +873,7 @@ const DEFAULT_TASK_INTERVALS = {
'typing': { type: INTERVAL_TYPES.ONCE, enabled: false, providerId: null, model: null, prompt: null },
'release-check': { type: INTERVAL_TYPES.ON_DEMAND, enabled: false, providerId: null, model: null, prompt: null },
'pr-reviewer': { type: INTERVAL_TYPES.CUSTOM, intervalMs: 7200000, enabled: false, weekdaysOnly: true, providerId: null, model: null, prompt: null },
- 'jira-sprint-manager': { type: INTERVAL_TYPES.DAILY, enabled: false, weekdaysOnly: true, optIn: true, providerId: null, model: null, prompt: null, taskMetadata: { useWorktree: true, simplify: true } }
+ 'jira-sprint-manager': { type: INTERVAL_TYPES.DAILY, enabled: false, weekdaysOnly: true, providerId: null, model: null, prompt: null, taskMetadata: { useWorktree: true, simplify: true } }
};
/**
@@ -1189,19 +1189,10 @@ export async function shouldRunTask(taskType, appId = null) {
}
}
- // Check per-app override
if (appId) {
- if (interval.optIn) {
- // Opt-in tasks require explicit per-app enablement (default: disabled)
- const overrides = await getAppTaskTypeOverrides(appId);
- if (overrides[taskType]?.enabled !== true) {
- return { shouldRun: false, reason: 'opt-in-not-enabled' };
- }
- } else {
- const enabledForApp = await isTaskTypeEnabledForApp(appId, taskType);
- if (!enabledForApp) {
- return { shouldRun: false, reason: 'disabled-for-app' };
- }
+ const enabledForApp = await isTaskTypeEnabledForApp(appId, taskType);
+ if (!enabledForApp) {
+ return { shouldRun: false, reason: 'disabled-for-app' };
}
}
@@ -1478,11 +1469,7 @@ export async function getScheduleStatus() {
// Check global shouldRun status
const check = await shouldRunTask(taskType);
- // Build per-app overrides map and count enabled apps
- // Opt-in tasks default to disabled; standard tasks default to enabled
- const isEnabledForApp = interval.optIn
- ? (override) => override?.enabled === true
- : (override) => !override || override.enabled !== false;
+ const isEnabledForApp = (override) => override?.enabled === true;
const appOverrides = {};
let enabledAppCount = 0;
const allOverrides = await Promise.all(activeApps.map(app => getAppTaskTypeOverrides(app.id)));