From 843e957757709c5e2484a697b78ab8533c949c90 Mon Sep 17 00:00:00 2001 From: Matiss Janis Aboltins Date: Mon, 12 Jan 2026 09:39:04 +0100 Subject: [PATCH] Remove force reload feature (#6626) * Remove force reload feature flag and related code Co-authored-by: matiss * Add release notes for PR #6626 --------- Co-authored-by: Cursor Agent Co-authored-by: github-actions[bot] --- .../src/components/settings/Experimental.tsx | 3 -- .../src/components/settings/Reset.tsx | 44 ------------------- .../src/components/settings/index.tsx | 4 +- .../src/hooks/useFeatureFlag.ts | 1 - packages/loot-core/src/types/prefs.ts | 3 +- upcoming-release-notes/6626.md | 6 +++ 6 files changed, 8 insertions(+), 53 deletions(-) create mode 100644 upcoming-release-notes/6626.md diff --git a/packages/desktop-client/src/components/settings/Experimental.tsx b/packages/desktop-client/src/components/settings/Experimental.tsx index 34b8955499..810154fedc 100644 --- a/packages/desktop-client/src/components/settings/Experimental.tsx +++ b/packages/desktop-client/src/components/settings/Experimental.tsx @@ -202,9 +202,6 @@ export function ExperimentalFeatures() { > Crossover Report - - Force reload app button - {showServerPrefs && ( ); } - -export function ForceReload() { - const [reloading, setReloading] = useState(false); - - async function onForceReload() { - setReloading(true); - try { - if (!isElectron()) { - const registration = - await window.navigator.serviceWorker.getRegistration('/'); - if (registration) { - await registration.update(); - if (registration.waiting) { - registration.waiting.postMessage({ type: 'SKIP_WAITING' }); - } - } - } - } catch { - // Do nothing - } finally { - window.location.reload(); - } - } - - return ( - - Force reload app - - } - > - - - Force reload app will clear the cached version of the - app and load a fresh one. This is useful if you're experiencing - issues with the app after an update or if cached files are causing - problems. The app will reload automatically after clearing the cache. - - - - ); -} diff --git a/packages/desktop-client/src/components/settings/index.tsx b/packages/desktop-client/src/components/settings/index.tsx index b536e7b517..04704445e5 100644 --- a/packages/desktop-client/src/components/settings/index.tsx +++ b/packages/desktop-client/src/components/settings/index.tsx @@ -23,7 +23,7 @@ import { ExportBudget } from './Export'; import { FormatSettings } from './Format'; import { LanguageSettings } from './LanguageSettings'; import { RepairTransactions } from './RepairTransactions'; -import { ForceReload, ResetCache, ResetSync } from './Reset'; +import { ResetCache, ResetSync } from './Reset'; import { ThemeSettings } from './Themes'; import { AdvancedToggle, Setting } from './UI'; @@ -176,7 +176,6 @@ export function Settings() { const [budgetName] = useMetadataPref('budgetName'); const dispatch = useDispatch(); const isCurrencyExperimentalEnabled = useFeatureFlag('currency'); - const isForceReloadEnabled = useFeatureFlag('forceReload'); const [_, setDefaultCurrencyCodePref] = useSyncedPref('defaultCurrencyCode'); const onCloseBudget = () => { @@ -253,7 +252,6 @@ export function Settings() { - {isForceReloadEnabled && } diff --git a/packages/desktop-client/src/hooks/useFeatureFlag.ts b/packages/desktop-client/src/hooks/useFeatureFlag.ts index 99248c579c..5599586755 100644 --- a/packages/desktop-client/src/hooks/useFeatureFlag.ts +++ b/packages/desktop-client/src/hooks/useFeatureFlag.ts @@ -9,7 +9,6 @@ const DEFAULT_FEATURE_FLAG_STATE: Record = { formulaMode: false, currency: false, crossoverReport: false, - forceReload: false, }; export function useFeatureFlag(name: FeatureFlag): boolean { diff --git a/packages/loot-core/src/types/prefs.ts b/packages/loot-core/src/types/prefs.ts index a2ef67cf49..48de342102 100644 --- a/packages/loot-core/src/types/prefs.ts +++ b/packages/loot-core/src/types/prefs.ts @@ -4,8 +4,7 @@ export type FeatureFlag = | 'actionTemplating' | 'formulaMode' | 'currency' - | 'crossoverReport' - | 'forceReload'; + | 'crossoverReport'; /** * Cross-device preferences. These sync across devices when they are changed. diff --git a/upcoming-release-notes/6626.md b/upcoming-release-notes/6626.md new file mode 100644 index 0000000000..55c3c6655c --- /dev/null +++ b/upcoming-release-notes/6626.md @@ -0,0 +1,6 @@ +--- +category: Maintenance +authors: [MatissJanis] +--- + +Remove the force reload feature from the application settings.