Skip to content

Build your personal knowledge base with Trilium Notes

chore(standalone): drop setupResuming in favor of main's syncInProgress

Elian Doran772b8da8da97
diff --git a/apps/client/src/setup.tsx b/apps/client/src/setup.tsx
index 69b09b33cc..e24353e50e 100644
--- a/apps/client/src/setup.tsx
+++ b/apps/client/src/setup.tsx
@@ -52,12 +52,7 @@ function renderState(state: State, setState: (state: State) => void) {
}
function App() {
- // If the bootstrap signals that a previous setup left a partial sync, jump
- // straight to the sync-in-progress screen. The worker auto-restarts sync,
- // and we don't want the user re-entering host/password or seeing the
- // language picker again — they're effectively resuming.
- const initialState: State = glob.setupResuming ? "syncFromServerInProgress" : "selectLanguage";
- const [state, setState] = useState<State>(initialState);
+ const [state, setState] = useState<State>("selectLanguage");
const [prevState, setPrevState] = useState<State | null>(null);
const [transitioning, setTransitioning] = useState(false);
const prevStateRef = useRef<State>(state);
diff --git a/apps/standalone/src/lightweight/browser_routes.ts b/apps/standalone/src/lightweight/browser_routes.ts
index 4d0647686a..98e18e56c8 100644
--- a/apps/standalone/src/lightweight/browser_routes.ts
+++ b/apps/standalone/src/lightweight/browser_routes.ts
@@ -4,7 +4,7 @@
*/
import { BootstrapDefinition } from '@triliumnext/commons';
-import { entity_changes, getContext, getPlatform, getSharedBootstrapItems, getSql, options, routes, sql_init } from '@triliumnext/core';
+import { entity_changes, getContext, getPlatform, getSharedBootstrapItems, getSql, routes, sql_init } from '@triliumnext/core';
import packageJson from '../../package.json' with { type: 'json' };
import { type BrowserRequest, BrowserRouter } from './browser_router';
@@ -315,19 +315,10 @@ function bootstrapRoute(): BootstrapDefinition {
};
if (!isDbInitialized) {
- // Resume case: schema is already present from a previous setup attempt
- // that was interrupted before sync completed. Tell the client to skip
- // the language/sync-from-server forms and go straight to the
- // sync-in-progress UI — sync itself is auto-restarted by the worker.
- const setupResuming = sql_init.schemaExists()
- && parseInt(options.getOptionOrNull("lastSyncedPull") ?? "0") > 0
- && !!options.getOptionOrNull("syncServerHost");
-
return {
...commonItems,
baseApiUrl: "../api/",
isProtectedSessionAvailable: false,
- setupResuming,
};
}
diff --git a/packages/commons/src/lib/server_api.ts b/packages/commons/src/lib/server_api.ts
index 0234a8f01b..7d1be2f4af 100644
--- a/packages/commons/src/lib/server_api.ts
+++ b/packages/commons/src/lib/server_api.ts
@@ -392,14 +392,6 @@ export type BootstrapDefinition = {
isRtl: boolean;
TRILIUM_SAFE_MODE: boolean;
componentId?: string;
- /**
- * Set when the DB has a partial sync (schema exists, sync server is
- * configured, lastSyncedPull > 0, but `options.initialized` is not "true").
- * The standalone client uses this to skip the language/sync-from-server
- * forms and jump straight to the sync-in-progress UI, since the user
- * already entered those values in a previous (interrupted) session.
- */
- setupResuming?: boolean;
};
/**