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(backup): silence dup toasts, disable Run while dirty, exclude feature-agent worktrees

[._.]/ Adam Eivy413dd44ab5b0
diff --git a/client/src/components/settings/BackupTab.jsx b/client/src/components/settings/BackupTab.jsx
index 62ca06c12b..55466170d2 100644
--- a/client/src/components/settings/BackupTab.jsx
+++ b/client/src/components/settings/BackupTab.jsx
@@ -18,7 +18,7 @@ export function BackupTab() {
const [newExclude, setNewExclude] = useState('');
useEffect(() => {
- Promise.all([getSettings(), getBackupStatus().catch(() => null)])
+ Promise.all([getSettings(), getBackupStatus({ silent: true }).catch(() => null)])
.then(([settings, status]) => {
const backup = settings?.backup || {};
const saved = backup.destPath || '';
@@ -50,7 +50,7 @@ export function BackupTab() {
};
const [handleRunNow, running] = useAsyncAction(async () => {
- const result = await triggerBackup();
+ const result = await triggerBackup({ silent: true });
if (result?.skipped) {
toast('Backup already running');
} else {
@@ -77,13 +77,13 @@ export function BackupTab() {
const excludesDirty = excludePaths.length !== savedExcludePaths.length
|| excludePaths.some((p, i) => p !== savedExcludePaths[i]);
const dirty = destPath !== savedDestPath || excludesDirty;
- const canRun = !!savedDestPath && !running && !saving;
+ const canRun = !!savedDestPath && !running && !saving && !dirty;
const runTitle = !savedDestPath
? 'Configure and save a destination path first'
: saving
? 'Waiting for save to finish…'
: dirty
- ? 'Unsaved changes — backup will use the last saved settings. Save first to apply your edits.'
+ ? 'Save your changes before running — the backup uses saved settings.'
: 'Run a backup snapshot now using saved settings';
return (
diff --git a/client/src/services/apiSystem.js b/client/src/services/apiSystem.js
index 8973e0d5ff..2885c436fc 100644
--- a/client/src/services/apiSystem.js
+++ b/client/src/services/apiSystem.js
@@ -35,7 +35,7 @@ export const resetUsage = () => request('/usage', { method: 'DELETE' });
// Backup
export const getBackupStatus = (options) => request('/backup/status', options);
-export const triggerBackup = () => request('/backup/run', { method: 'POST' });
+export const triggerBackup = (options) => request('/backup/run', { method: 'POST', ...options });
export const getBackupSnapshots = (options) => request('/backup/snapshots', options);
export const restoreBackup = (data) => request('/backup/restore', { method: 'POST', body: JSON.stringify(data) });
diff --git a/server/services/backup.js b/server/services/backup.js
index 3ab95a161b..809195bf48 100644
--- a/server/services/backup.js
+++ b/server/services/backup.js
@@ -26,7 +26,8 @@ const STATE_PATH = join(PATHS.data, 'backup', 'state.json');
// throwaway agent checkouts of the main repo.
export const DEFAULT_EXCLUDES = [
{ path: 'browser-profile/', reason: 'Browser CDP profile — cache/cookies, can be several GB' },
- { path: 'cos/worktrees/', reason: 'Ephemeral agent git worktrees — recreated on demand' }
+ { path: 'cos/worktrees/', reason: 'Ephemeral agent git worktrees — recreated on demand' },
+ { path: 'cos/feature-agents/*/worktree/', reason: 'Per-feature-agent git worktrees — recreated on demand' }
];
const DEFAULT_EXCLUDE_PATHS = DEFAULT_EXCLUDES.map(e => e.path);