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 (opencode): keep saved schedule summary truthful

[._.]/ Adam Eivyeb9d3bed0570
diff --git a/client/src/components/settings/BackupTab.jsx b/client/src/components/settings/BackupTab.jsx
index 3005d159d0..364c7617c0 100644
--- a/client/src/components/settings/BackupTab.jsx
+++ b/client/src/components/settings/BackupTab.jsx
@@ -212,8 +212,8 @@ export function BackupTab() {
...defaultExcludeRows.filter(d => d.defaultActive).map(d => d.path),
...anchorUserExcludes(excludePaths),
])];
- const scheduleSummary = enabled
- ? (describeCron(cronExpression) || cronExpression)
+ const scheduleSummary = savedEnabled
+ ? (describeCron(savedCronExpression) || savedCronExpression)
: 'Scheduled backups are off';
const snapshotSummary = snapshots.length > 0
? `${snapshots.length} ${snapshots.length === 1 ? 'snapshot' : 'snapshots'}`
diff --git a/client/src/components/settings/BackupTab.test.jsx b/client/src/components/settings/BackupTab.test.jsx
index 75f137dbdc..cd5bd19969 100644
--- a/client/src/components/settings/BackupTab.test.jsx
+++ b/client/src/components/settings/BackupTab.test.jsx
@@ -1,5 +1,5 @@
import { describe, it, expect, vi, beforeEach } from 'vitest';
-import { render, cleanup, screen, fireEvent, waitFor, act } from '@testing-library/react';
+import { render, cleanup, screen, fireEvent, waitFor, act, within } from '@testing-library/react';
vi.mock('../../services/api', () => ({
getSettings: vi.fn(),
@@ -60,6 +60,17 @@ const renderTab = async ({ openExclusions = true, openSnapshots = true } = {}) =
describe('BackupTab', () => {
describe('task-first workspace', () => {
+ it('keeps the saved schedule summary separate from an unsaved draft', async () => {
+ await renderTab({ openExclusions: false, openSnapshots: false });
+
+ const savedSchedule = screen.getByRole('heading', { name: 'Saved schedule' }).parentElement;
+ expect(within(savedSchedule).getByText('Scheduled backups are off')).toBeInTheDocument();
+
+ fireEvent.click(screen.getByRole('switch', { name: 'Scheduled backups' }));
+
+ expect(within(savedSchedule).getByText('Scheduled backups are off')).toBeInTheDocument();
+ });
+
it('keeps exclusions and snapshot history behind named disclosures', async () => {
getBackupSnapshots.mockResolvedValue([{ id: 'snap-hidden' }]);
await renderTab({ openExclusions: false, openSnapshots: false });