File tree Expand file tree Collapse file tree 4 files changed +21
-7
lines changed
settings/components/sections Expand file tree Collapse file tree 4 files changed +21
-7
lines changed Original file line number Diff line number Diff line change @@ -686,21 +686,21 @@ describe("UpdatesService", () => {
686686 expect ( mockAutoUpdater . checkForUpdates ) . toHaveBeenCalled ( ) ;
687687 } ) ;
688688
689- it ( "performs check every hour " , async ( ) => {
689+ it ( "performs check every 24 hours " , async ( ) => {
690690 await initializeService ( service ) ;
691691
692692 const initialCallCount =
693693 mockAutoUpdater . checkForUpdates . mock . calls . length ;
694694
695- // Advance 1 hour
696- await vi . advanceTimersByTimeAsync ( 60 * 60 * 1000 ) ;
695+ // Advance 24 hours
696+ await vi . advanceTimersByTimeAsync ( 24 * 60 * 60 * 1000 ) ;
697697
698698 expect ( mockAutoUpdater . checkForUpdates . mock . calls . length ) . toBe (
699699 initialCallCount + 1 ,
700700 ) ;
701701
702- // Advance another hour
703- await vi . advanceTimersByTimeAsync ( 60 * 60 * 1000 ) ;
702+ // Advance another 24 hours
703+ await vi . advanceTimersByTimeAsync ( 24 * 60 * 60 * 1000 ) ;
704704
705705 expect ( mockAutoUpdater . checkForUpdates . mock . calls . length ) . toBe (
706706 initialCallCount + 2 ,
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export class UpdatesService extends TypedEventEmitter<UpdatesEvents> {
2222 private static readonly SERVER_HOST = "https://update.electronjs.org" ;
2323 private static readonly REPO_OWNER = "PostHog" ;
2424 private static readonly REPO_NAME = "code" ;
25- private static readonly CHECK_INTERVAL_MS = 60 * 60 * 1000 ; // 1 hour
25+ private static readonly CHECK_INTERVAL_MS = 24 * 60 * 60 * 1000 ; // 24 hours
2626 private static readonly CHECK_TIMEOUT_MS = 60 * 1000 ; // 1 minute timeout for checks
2727 private static readonly DISABLE_ENV_FLAG = "ELECTRON_DISABLE_AUTO_UPDATE" ;
2828 private static readonly SUPPORTED_PLATFORMS = [ "darwin" , "win32" ] ;
Original file line number Diff line number Diff line change @@ -966,7 +966,6 @@ export const useAuthStore = create<AuthState>()(
966966 needsProjectSelection : false ,
967967 needsScopeReauth : false ,
968968 hasCodeAccess : null ,
969- hasCompletedOnboarding : false ,
970969 selectedPlan : null ,
971970 selectedOrgId : null ,
972971 } ) ;
Original file line number Diff line number Diff line change 1+ import { useAuthStore } from "@features/auth/stores/authStore" ;
12import { SettingRow } from "@features/settings/components/SettingRow" ;
23import { useSettingsStore } from "@features/settings/stores/settingsStore" ;
34import { useFeatureFlag } from "@hooks/useFeatureFlag" ;
@@ -15,6 +16,20 @@ export function AdvancedSettings() {
1516
1617 return (
1718 < Flex direction = "column" >
19+ < SettingRow
20+ label = "Reset onboarding"
21+ description = "Re-run the onboarding tutorial on next app restart"
22+ >
23+ < Button
24+ variant = "soft"
25+ size = "1"
26+ onClick = { ( ) =>
27+ useAuthStore . setState ( { hasCompletedOnboarding : false } )
28+ }
29+ >
30+ Reset
31+ </ Button >
32+ </ SettingRow >
1833 < SettingRow
1934 label = "Clear application storage"
2035 description = "This will remove all locally stored application data"
You can’t perform that action at this time.
0 commit comments