Skip to content

Commit ab540a5

Browse files
amoscickiclaude
andcommitted
fix: sync autoUpdate settings to server
- Add autoUpdate to syncSettingsToServer list - Make setAutoUpdate call syncSettingsToServer after state change 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 2ef4d24 commit ab540a5

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

apps/ui/src/hooks/use-settings-migration.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ export async function syncSettingsToServer(): Promise<boolean> {
231231
projectHistory: state.projectHistory,
232232
projectHistoryIndex: state.projectHistoryIndex,
233233
lastSelectedSessionByProject: state.lastSelectedSessionByProject,
234+
autoUpdate: state.autoUpdate,
234235
};
235236

236237
const result = await api.settings.updateGlobal(updates);

apps/ui/src/store/app-store.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1572,10 +1572,13 @@ export const useAppStore = create<AppState & AppActions>()(
15721572
},
15731573

15741574
// Auto-Update Settings actions
1575-
setAutoUpdate: (settings) => {
1575+
setAutoUpdate: async (settings) => {
15761576
set((state) => ({
15771577
autoUpdate: { ...state.autoUpdate, ...settings },
15781578
}));
1579+
// Sync to server settings file
1580+
const { syncSettingsToServer } = await import('@/hooks/use-settings-migration');
1581+
await syncSettingsToServer();
15791582
},
15801583

15811584
// AI Profile actions

0 commit comments

Comments
 (0)