Retire orphaned WebApp tests and classify regression guards

This commit is contained in:
vorotamoroz
2026-07-23 17:21:16 +00:00
parent 24b941f594
commit bf0fc0aea8
20 changed files with 38 additions and 1006 deletions
+8 -8
View File
@@ -14,7 +14,7 @@ import { adjustSettingToRemoteIfNeeded, processVaultInitialisation } from "./red
export const SIMPLE_FETCH_STAGE1_REMOTE_WINS = "Overwrite all with remote files";
export const SIMPLE_FETCH_STAGE1_NEWER_WINS = "Compare time and take newer";
export const SIMPLE_FETCH_STAGE1_LEGACY = "Use the detailed flow";
export const SIMPLE_FETCH_STAGE1_DETAILED = "Use the detailed flow";
export const SIMPLE_FETCH_STAGE1_CANCEL = "Cancel";
export const SIMPLE_FETCH_STAGE2_REMOTE_DELETE_NONE = "Keep local files even if not on remote";
@@ -27,8 +27,8 @@ export const STAGE2_ABORT = "Cancel all and reboot";
const SIMPLE_FETCH_MODE_KEY = "simple-fetch-mode";
function buildSimpleFetchResult(stage1: string, stage2?: string) {
if (stage1 === SIMPLE_FETCH_STAGE1_LEGACY) {
return { mode: "legacy", options: {} };
if (stage1 === SIMPLE_FETCH_STAGE1_DETAILED) {
return { mode: "detailed", options: {} };
}
if (stage1 === SIMPLE_FETCH_STAGE1_REMOTE_WINS && stage2) {
if (![SIMPLE_FETCH_STAGE2_REMOTE_DELETE_ALL, SIMPLE_FETCH_STAGE2_REMOTE_DELETE_NONE].includes(stage2)) {
@@ -100,7 +100,7 @@ Firstly, how shall we handle the data retrieved from this remote source?
- **${SIMPLE_FETCH_STAGE1_REMOTE_WINS}**: Remote data is the source of truth.
If you are new to using Self-hosted LiveSync. This option may be easiest to understand and get started with.
It will overwrite all your local files with the remote data, so please make sure you have a backup if there is any important data in your vault.
- **${SIMPLE_FETCH_STAGE1_LEGACY}**: Opens the detailed setup wizard.
- **${SIMPLE_FETCH_STAGE1_DETAILED}**: Opens the detailed setup wizard.
If you want to have more control over the synchronisation process, or want to review the changes before applying, you can choose this option to use the detailed flow.
`;
const stage1 = await host.services.UI.confirm.confirmWithMessage(
@@ -109,7 +109,7 @@ Firstly, how shall we handle the data retrieved from this remote source?
[
SIMPLE_FETCH_STAGE1_NEWER_WINS,
SIMPLE_FETCH_STAGE1_REMOTE_WINS,
SIMPLE_FETCH_STAGE1_LEGACY,
SIMPLE_FETCH_STAGE1_DETAILED,
SIMPLE_FETCH_STAGE1_CANCEL,
],
SIMPLE_FETCH_STAGE1_NEWER_WINS,
@@ -118,7 +118,7 @@ Firstly, how shall we handle the data retrieved from this remote source?
if (!stage1 || stage1 === SIMPLE_FETCH_STAGE1_CANCEL) return "cancelled";
if (stage1 === SIMPLE_FETCH_STAGE1_LEGACY) {
if (stage1 === SIMPLE_FETCH_STAGE1_DETAILED) {
return buildSimpleFetchResult(stage1)!;
}
@@ -204,8 +204,8 @@ export async function askAndPerformFastSetupOnScheduledFetchAll(
host.services.appLifecycle.performRestart();
return false;
}
if (result.mode === "legacy") {
return undefined; // Let the legacy flow handle it.
if (result.mode === "detailed") {
return undefined; // Let the detailed setup flow handle it.
}
return await processVaultInitialisation(host, log, async () => {