Distinguish absent and unreadable remote settings during setup

Use typed Commonlib outcomes to guide Fetch and Rebuild without treating a new remote as a failed read. Preserve automatic synchronisation choices when scheduled initialisation is cancelled.
This commit is contained in:
vorotamoroz
2026-08-06 08:34:41 +00:00
parent 6a46966957
commit b42df389fb
19 changed files with 489 additions and 155 deletions
+11 -5
View File
@@ -254,17 +254,23 @@ export async function confirmRebuild(port: number, captures: SetupCaptureNames):
return screenshot;
}
export async function skipMissingRemoteConfiguration(port: number, captures: SetupCaptureNames): Promise<string> {
const title = "Fetch Remote Configuration Failed";
export async function continueWithoutRemoteSettings(port: number, captures: SetupCaptureNames): Promise<string> {
const title = "No Synchronisation Settings Found";
const screenshot = await captureGuideDialogue(
port,
`guide-${captures.guide}-missing-remote-configuration.png`,
title
);
await withObsidianPage(port, async (page) => {
await modalByTitle(page, title)
.getByRole("button", { name: "Skip and proceed" })
.click({ timeout: uiTimeoutMs });
const modal = modalByTitle(page, title);
await modal
.getByText("This is normal for a new remote.", { exact: false })
.waitFor({ state: "visible", timeout: uiTimeoutMs });
await modal.getByRole("button", { name: "Cancel", exact: true }).waitFor({
state: "visible",
timeout: uiTimeoutMs,
});
await modal.getByRole("button", { name: "Use this device's settings" }).click({ timeout: uiTimeoutMs });
});
return screenshot;
}