Skip to content

Commit 46f76ea

Browse files
feat(update): add 15-minute auto-check interval for app updates (#66)
Reuses same checkForUpdates flow as manual button - all guards and UI state transitions apply automatically. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent c4cbdfa commit 46f76ea

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/hooks/use-app-update.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,15 @@ export function useAppUpdate(): UseAppUpdateReturn {
103103
useEffect(() => {
104104
mountedRef.current = true
105105
void checkForUpdates()
106+
107+
// Check every 15 minutes
108+
const intervalId = setInterval(() => {
109+
void checkForUpdates()
110+
}, 15 * 60 * 1000)
111+
106112
return () => {
107113
mountedRef.current = false
114+
clearInterval(intervalId)
108115
if (upToDateTimeoutRef.current !== null) {
109116
clearTimeout(upToDateTimeoutRef.current)
110117
}

0 commit comments

Comments
 (0)