From 509e3007212965d428bb04e5230c82c54516b745 Mon Sep 17 00:00:00 2001 From: Microck Date: Thu, 22 Oct 2026 13:15:44 +0200 Subject: [PATCH 01/15] fix: reject surplus CLI arguments and stale profile-load responses --- src/cli.ts | 7 +++++++ test/browser-e2e.ts | 24 ++++++++++++++++++++++++ test/integration.test.ts | 5 +++++ ui/app.ts | 14 ++++++++++++-- 4 files changed, 48 insertions(+), 2 deletions(-) diff --git a/src/cli.ts b/src/cli.ts index f99f3cb..2742875 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -59,6 +59,13 @@ export async function main(args = process.argv.slice(2)) { if (["scan", "estimate"].includes(command)) argument = await readline.question("Steam profile URL or ID: "); } finally { readline.close(); } } + const commands = ["serve", "recent", "profiles", "scan", "estimate", "resume", "analyze", "profile-save", "history"]; + if (!commands.includes(command)) throw new InputError({ message: `Unknown command: ${command}. Run --help.` }); + const takesArgument = !["serve", "recent", "profiles"].includes(command); + if (parsed.positionals.length > (takesArgument ? 2 : 1)) { + throw new InputError({ message: `${command} accepts ${takesArgument ? "exactly one argument" : "no arguments"}. Run --help.` }); + } + if (takesArgument && !argument) throw new InputError({ message: `${command} requires ${command === "history" ? "a file" : command === "resume" || command === "analyze" ? "a run ID" : "a target or profile name"}. Run --help.` }); const root = parsed.values.root ?? process.cwd(); const key = Redacted.value(await Effect.runPromise(Config.Redacted("STEAM_API_KEY").pipe(Config.withDefault(Redacted.make(""))))); if (command === "serve") { diff --git a/test/browser-e2e.ts b/test/browser-e2e.ts index 5c9f2c7..73b035b 100644 --- a/test/browser-e2e.ts +++ b/test/browser-e2e.ts @@ -686,6 +686,30 @@ test("Steam UI keeps ranking fields aligned, errors inside dialogs and help cont await page.click("#open-settings"); await page.select("#profiles", ""); await page.click("#load-profile"); await page.waitForSelector("#load-dialog-error:not([hidden])"); assert.match(await visibleText(page, "#load-dialog-error"), /Choose a saved profile/); await page.select("#profiles", "ui-audit"); await page.click("#load-profile"); await page.waitForSelector("#load-dialog[open]", { hidden: true }); + // A cancelled profile load must not overwrite subsequent edits or close a reopened dialog. + await fill(page, "#maxNodes", "123"); + let captureProfile!: (request: HTTPRequest) => void; + const delayedProfile = new Promise((resolve) => { captureProfile = resolve; }); + let interceptedProfile = false; + const interceptProfile = (request: HTTPRequest) => { + if (!interceptedProfile && request.url().endsWith("/api/profiles/ui-audit")) { + interceptedProfile = true; captureProfile(request); + } else void request.continue(); + }; + await page.setRequestInterception(true); page.on("request", interceptProfile); + await page.click("#open-settings"); await page.select("#profiles", "ui-audit"); await page.click("#load-profile"); + const pendingProfile = await delayedProfile; + await page.keyboard.press("Escape"); + await fill(page, "#maxNodes", "456"); await page.click("#open-settings"); + const loadedProfile = JSON.parse(await readFile(join(root, "profiles", "ui-audit.json"), "utf8")); + const receivedProfile = page.waitForResponse((response) => response.url().endsWith("/api/profiles/ui-audit")); + await pendingProfile.respond({ status: 200, contentType: "application/json", body: JSON.stringify({ ...loadedProfile, maxNodes: 777 }) }); + await receivedProfile; + await page.evaluate(() => new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)))); + assert.equal(await page.$eval("#maxNodes", (input) => input instanceof HTMLInputElement && input.value), "456"); + assert.equal(await page.$eval("#load-dialog", (element) => element instanceof HTMLDialogElement && element.open), true); + page.off("request", interceptProfile); await page.setRequestInterception(false); + await page.keyboard.press("Escape"); await page.click("#apply-settings"); await page.waitForFunction(() => document.querySelector("#notice")?.textContent === "Saved default settings."); await page.setOfflineMode(true); diff --git a/test/integration.test.ts b/test/integration.test.ts index 4c94db6..a69e51a 100644 --- a/test/integration.test.ts +++ b/test/integration.test.ts @@ -613,6 +613,11 @@ test("CLI commands work from a fresh root and reject invalid input with a nonzer try { const cli = fileURLToPath(new URL("../src/cli.js", import.meta.url)); assert.match((await execute(process.execPath, [cli, "--help"])).stdout, /resume RUN_ID/); + const untouched = join(root, "must-not-exist"); + for (const args of [["profile-save", "extra", "unexpected"], ["recent", "unexpected"], ["profiles", "unexpected"], ["serve", "unexpected"], ["scan", seed, second]]) { + await assert.rejects(execute(process.execPath, [cli, ...args, "--root", untouched], { timeout: 5000 }), /accepts .*arguments?/); + } + await assert.rejects(readFile(join(untouched, "profiles", "extra.json")), { code: "ENOENT" }); assert.match((await execute(process.execPath, [cli, "profile-save", "tiny", "--root", root, "--max-nodes", "1", "--depth", "5", "--skip-private"])).stdout, /Saved profile tiny/); const settings = Schema.decodeUnknownSync(Schema.fromJsonString(Settings))(await readFile(join(root, "profiles", "tiny.json"), "utf8")); assert.equal(settings.depth, 5); assert.equal(settings.skipPrivate, true); diff --git a/ui/app.ts b/ui/app.ts index 192b3d6..ef96167 100644 --- a/ui/app.ts +++ b/ui/app.ts @@ -64,6 +64,7 @@ let runSignature = ""; let timer: ReturnType | undefined; let refreshing = false; let settingsVersion = 0; +let profileLoadRequest = 0; const Screen = Schema.Literals(["scan", "results", "history"]); let navigationVersion = 0; let explorer: Explorer | null = null; @@ -155,6 +156,7 @@ const readSettings = () => Schema.decodeUnknownSync(Settings)({ weights: { mutual: inputs.mutual.valueAsNumber, jaccard: inputs.jaccard.valueAsNumber, groups: inputs.groupWeight.valueAsNumber, games: inputs.gameWeight.valueAsNumber }, }); function applySettings(settings: Settings) { + settingsVersion++; get("estimate-result").textContent = ""; inputs.depth.value = String(settings.depth); inputs.nodes.value = String(settings.maxNodes); inputs.rpm.value = String(settings.requestsPerMinute); inputs.groups.checked = settings.includeGroups; inputs.games.checked = settings.includeGames; inputs.hub.value = String(settings.hubPercentile); @@ -685,10 +687,18 @@ get("profile-form").addEventListener("submit", (event) => { event.preventDefault buttons("load-profile").addEventListener("click", () => dialogTask("load-dialog", async () => { profiles.setAttribute("aria-invalid", String(!profiles.value)); if (!profiles.value) throw new Error("Choose a saved profile, then click Load."); - applySettings(await api(`/api/profiles/${encodeURIComponent(profiles.value)}`, Settings)); dialog("load-dialog").close(); + const name = profiles.value; const request = ++profileLoadRequest; const version = settingsVersion; + const current = () => request === profileLoadRequest && version === settingsVersion && dialog("load-dialog").open && profiles.value === name; + const settings = await api(`/api/profiles/${encodeURIComponent(name)}`, Settings).catch((error) => { + if (current()) throw error; + return null; + }); + if (!settings || !current()) return; + applySettings(settings); dialog("load-dialog").close(); })); inputs.name.addEventListener("input", () => inputs.name.removeAttribute("aria-invalid")); -profiles.addEventListener("change", () => profiles.removeAttribute("aria-invalid")); +profiles.addEventListener("change", () => { profileLoadRequest++; profiles.removeAttribute("aria-invalid"); }); +dialog("load-dialog").addEventListener("close", () => { profileLoadRequest++; }); for (const id of ["save-dialog", "load-dialog", "history-import-dialog"]) dialog(id).addEventListener("close", () => { get(`${id}-error`).hidden = true; get(`${id}-error`).textContent = ""; }); From eda57795df032f1eae446cbe50327e68e27b6b36 Mon Sep 17 00:00:00 2001 From: Microck Date: Thu, 22 Oct 2026 13:22:27 +0200 Subject: [PATCH 02/15] test: await profile load completion through accessible busy state --- test/browser-e2e.ts | 2 +- ui/app.ts | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/test/browser-e2e.ts b/test/browser-e2e.ts index 73b035b..4598ee3 100644 --- a/test/browser-e2e.ts +++ b/test/browser-e2e.ts @@ -705,7 +705,7 @@ test("Steam UI keeps ranking fields aligned, errors inside dialogs and help cont const receivedProfile = page.waitForResponse((response) => response.url().endsWith("/api/profiles/ui-audit")); await pendingProfile.respond({ status: 200, contentType: "application/json", body: JSON.stringify({ ...loadedProfile, maxNodes: 777 }) }); await receivedProfile; - await page.evaluate(() => new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)))); + await page.waitForFunction(() => document.querySelector("#load-dialog")?.getAttribute("aria-busy") === "false"); assert.equal(await page.$eval("#maxNodes", (input) => input instanceof HTMLInputElement && input.value), "456"); assert.equal(await page.$eval("#load-dialog", (element) => element instanceof HTMLDialogElement && element.open), true); page.off("request", interceptProfile); await page.setRequestInterception(false); diff --git a/ui/app.ts b/ui/app.ts index ef96167..6993898 100644 --- a/ui/app.ts +++ b/ui/app.ts @@ -65,6 +65,7 @@ let timer: ReturnType | undefined; let refreshing = false; let settingsVersion = 0; let profileLoadRequest = 0; +let profileLoadsPending = 0; const Screen = Schema.Literals(["scan", "results", "history"]); let navigationVersion = 0; let explorer: Explorer | null = null; @@ -689,12 +690,18 @@ buttons("load-profile").addEventListener("click", () => dialogTask("load-dialog" if (!profiles.value) throw new Error("Choose a saved profile, then click Load."); const name = profiles.value; const request = ++profileLoadRequest; const version = settingsVersion; const current = () => request === profileLoadRequest && version === settingsVersion && dialog("load-dialog").open && profiles.value === name; - const settings = await api(`/api/profiles/${encodeURIComponent(name)}`, Settings).catch((error) => { - if (current()) throw error; - return null; - }); - if (!settings || !current()) return; - applySettings(settings); dialog("load-dialog").close(); + profileLoadsPending++; dialog("load-dialog").setAttribute("aria-busy", "true"); + try { + const settings = await api(`/api/profiles/${encodeURIComponent(name)}`, Settings).catch((error) => { + if (current()) throw error; + return null; + }); + if (!settings || !current()) return; + applySettings(settings); dialog("load-dialog").close(); + } finally { + profileLoadsPending--; + dialog("load-dialog").setAttribute("aria-busy", String(profileLoadsPending > 0)); + } })); inputs.name.addEventListener("input", () => inputs.name.removeAttribute("aria-invalid")); profiles.addEventListener("change", () => { profileLoadRequest++; profiles.removeAttribute("aria-invalid"); }); From 1f9f68ef354f2eaed705e221b462a057b784e653 Mon Sep 17 00:00:00 2001 From: Microck Date: Thu, 22 Oct 2026 13:26:37 +0200 Subject: [PATCH 03/15] fix: recover startup when saved default settings are damaged --- test/browser-e2e.ts | 8 ++++++++ ui/app.ts | 8 ++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/test/browser-e2e.ts b/test/browser-e2e.ts index 4598ee3..f9a1e37 100644 --- a/test/browser-e2e.ts +++ b/test/browser-e2e.ts @@ -710,6 +710,14 @@ test("Steam UI keeps ranking fields aligned, errors inside dialogs and help cont assert.equal(await page.$eval("#load-dialog", (element) => element instanceof HTMLDialogElement && element.open), true); page.off("request", interceptProfile); await page.setRequestInterception(false); await page.keyboard.press("Escape"); + // A damaged optional default profile must not poison every startup state poll. + const damagedDefault = "{invalid default settings"; + await writeFile(join(root, "profiles", "default.json"), damagedDefault); + await page.reload(); + await page.waitForFunction(() => document.querySelector("#key-indicator")?.textContent === "Key ready" + && document.querySelector("#notice")?.textContent?.includes("Saved default settings were not loaded")); + assert.equal(await readFile(join(root, "profiles", "default.json"), "utf8"), damagedDefault); + assert.doesNotMatch(await visibleText(page, "#notice") ?? "", /Disconnected/); await page.click("#apply-settings"); await page.waitForFunction(() => document.querySelector("#notice")?.textContent === "Saved default settings."); await page.setOfflineMode(true); diff --git a/ui/app.ts b/ui/app.ts index 6993898..5cae441 100644 --- a/ui/app.ts +++ b/ui/app.ts @@ -535,8 +535,12 @@ async function refresh() { currentState = await api("/api/state", Contracts.State); if (lastJob === null && currentState.profiles.includes("default")) { const version = settingsVersion; - const settings = await api("/api/profiles/default", Settings); - if (version === settingsVersion) applySettings(settings); + try { + const settings = await api("/api/profiles/default", Settings); + if (version === settingsVersion) applySettings(settings); + } catch (error) { + notice(`Saved default settings were not loaded. ${error instanceof Error ? error.message : "Check the saved profile and try again."}`, "action-error"); + } } renderProgress(currentState); renderRecent(); renderRuns(); From eb500f6b438dbd9f2c02ec977d030fe5d0a1a79f Mon Sep 17 00:00:00 2001 From: Microck Date: Thu, 22 Oct 2026 13:31:25 +0200 Subject: [PATCH 04/15] fix: keep incomplete optional Steam observations explicitly unavailable --- src/steam.ts | 11 ++++++++--- test/integration.test.ts | 26 ++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/src/steam.ts b/src/steam.ts index 96bc14c..199d18e 100644 --- a/src/steam.ts +++ b/src/steam.ts @@ -103,7 +103,8 @@ export const layer = (options: Options) => Layer.effect(Service, Effect.gen(func return yield* unavailable(get("/ISteamUser/GetUserGroupList/v1/", { steamid: id }, Schema.Struct({ response: Schema.Struct({ success: Schema.optionalKey(Schema.Boolean), groups: Schema.optionalKey(Schema.Array(Schema.Struct({ gid: Schema.String }))), }) })).pipe(Effect.map((r) => ({ - status: r.response.success === false ? "unavailable" : "public", values: (r.response.groups ?? []).map((g) => g.gid), + status: r.response.success === false || r.response.groups === undefined ? "unavailable" : "public", + values: r.response.success === false ? [] : [...new Set((r.response.groups ?? []).map((g) => g.gid))], } satisfies Observation)), Effect.catchIf((error) => error.status === 403, () => Effect.sync(() => { groupAccessDenied = true; return { status: "unavailable", values: [] } satisfies Observation; @@ -111,8 +112,12 @@ export const layer = (options: Options) => Layer.effect(Service, Effect.gen(func }), games: Effect.fn("Steam.games")((id: SteamId) => unavailable(get("/IPlayerService/GetOwnedGames/v1/", { input_json: JSON.stringify({ steamid: id, include_appinfo: false, include_played_free_games: true }), - }, Schema.Struct({ response: Schema.Struct({ game_count: Schema.optionalKey(Schema.Number), games: Schema.optionalKey(Schema.Array(Schema.Struct({ appid: AppId }))) }) })).pipe( - Effect.map((r) => ({ status: r.response.game_count === undefined ? "private" : "public", values: (r.response.games ?? []).map((g) => g.appid) } satisfies Observation)), + }, Schema.Struct({ response: Schema.Struct({ game_count: Schema.optionalKey(Schema.Number.check(Schema.isInt(), Schema.isGreaterThanOrEqualTo(0))), games: Schema.optionalKey(Schema.Array(Schema.Struct({ appid: AppId }))) }) })).pipe( + Effect.map((r) => { + const values = [...new Set((r.response.games ?? []).map((g) => g.appid))]; + return { status: r.response.game_count === undefined ? "private" : values.length === r.response.game_count ? "public" : "unavailable", + values: r.response.game_count === undefined ? [] : values } satisfies Observation; + }), ))), }); })).pipe(Layer.provide(FetchHttpClient.layer)); diff --git a/test/integration.test.ts b/test/integration.test.ts index a69e51a..5d4d9e1 100644 --- a/test/integration.test.ts +++ b/test/integration.test.ts @@ -23,6 +23,32 @@ import { seed, second, third, fourth, fifth, key, userAgent, steamFixture, playe const friendPath = "/ISteamUser/GetFriendList/v1/"; const summaryPath = "/ISteamUser/GetPlayerSummaries/v2/"; +test("optional Steam observations distinguish incomplete payloads from public empty lists", async () => { + const fixture = await steamFixture(); + const runtime = ManagedRuntime.make(Steam.layer({ key, requestsPerMinute: 0, baseUrl: fixture.url })); + const groupsPath = "/ISteamUser/GetUserGroupList/v1/"; + const gamesPath = "/IPlayerService/GetOwnedGames/v1/"; + const groups = () => runtime.runPromise(Effect.gen(function* () { return yield* (yield* Steam.Service).groups(seed); })); + const games = () => runtime.runPromise(Effect.gen(function* () { return yield* (yield* Steam.Service).games(seed); })); + try { + fixture.malformed.set(groupsPath, JSON.stringify({ response: {} })); + assert.deepEqual(await groups(), { status: "unavailable", values: [] }); + fixture.malformed.set(groupsPath, JSON.stringify({ response: { success: true, groups: [] } })); + assert.deepEqual(await groups(), { status: "public", values: [] }); + fixture.malformed.set(groupsPath, JSON.stringify({ response: { success: false, groups: [{ gid: "stale" }] } })); + assert.deepEqual(await groups(), { status: "unavailable", values: [] }); + fixture.malformed.set(gamesPath, JSON.stringify({ response: { game_count: 2 } })); + assert.deepEqual(await games(), { status: "unavailable", values: [] }); + fixture.malformed.set(gamesPath, JSON.stringify({ response: { game_count: 2, games: [{ appid: 10 }] } })); + assert.deepEqual(await games(), { status: "unavailable", values: [10] }); + fixture.malformed.set(gamesPath, JSON.stringify({ response: { game_count: 0 } })); + assert.deepEqual(await games(), { status: "public", values: [] }); + fixture.malformed.set(gamesPath, JSON.stringify({ response: {} })); + assert.deepEqual(await games(), { status: "private", values: [] }); + fixture.malformed.set(gamesPath, JSON.stringify({ response: { game_count: -1 } })); + await assert.rejects(games(), /unexpected response/); + } finally { await runtime.dispose(); await fixture.close(); } +}); test("network analysis stays interruptible without blocking the server thread or losing a checkpoint", { timeout: 30000 }, async () => { const fixture = await steamFixture(); const root = await mkdtemp(join(tmpdir(), "vapora-analysis-cancel-")); const runtime = ManagedRuntime.make(Layer.mergeAll(Storage.layer(root), Steam.layer({ key, requestsPerMinute: 0, baseUrl: fixture.url }))); From 7138dc96a599781dfb739956899fe0d085bd7c87 Mon Sep 17 00:00:00 2001 From: Microck Date: Thu, 22 Oct 2026 13:50:10 +0200 Subject: [PATCH 05/15] fix(docs): align download guidance with current app version --- .github/workflows/docs.yml | 4 ++-- .../docs/getting-started/installation.mdx | 14 +++++++------- website/content/docs/index.mdx | 2 +- website/content/docs/project/releases.mdx | 4 +++- website/package.json | 5 +++-- website/scripts/check-version.mjs | 17 +++++++++++++++++ 6 files changed, 33 insertions(+), 13 deletions(-) create mode 100644 website/scripts/check-version.mjs diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 67b6fb4..1c88d18 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -2,9 +2,9 @@ name: Documentation on: push: branches: [main] - paths: ['website/**', 'docs/screenshots/**', 'assets/vapora.svg', 'assets/vapora.ico', '.github/workflows/docs.yml'] + paths: ['package.json', 'docs/releases/**', 'website/**', 'docs/screenshots/**', 'assets/vapora.svg', 'assets/vapora.ico', '.github/workflows/docs.yml'] pull_request: - paths: ['website/**', 'docs/screenshots/**', 'assets/vapora.svg', 'assets/vapora.ico', '.github/workflows/docs.yml'] + paths: ['package.json', 'docs/releases/**', 'website/**', 'docs/screenshots/**', 'assets/vapora.svg', 'assets/vapora.ico', '.github/workflows/docs.yml'] workflow_dispatch: permissions: contents: read diff --git a/website/content/docs/getting-started/installation.mdx b/website/content/docs/getting-started/installation.mdx index 6f44945..2b843be 100644 --- a/website/content/docs/getting-started/installation.mdx +++ b/website/content/docs/getting-started/installation.mdx @@ -20,18 +20,18 @@ Downloads are unsigned and not notarized. Compare the downloaded file's SHA-256 ```powershell title="PowerShell" -Get-FileHash .\vapora-2.2.3-win-x64.exe -Algorithm SHA256 +Get-FileHash .\vapora-2.2.5-win-x64.exe -Algorithm SHA256 ``` ```sh title="Terminal" -sha256sum vapora-2.2.3-linux-x86_64.AppImage -chmod +x vapora-2.2.3-linux-x86_64.AppImage -./vapora-2.2.3-linux-x86_64.AppImage +sha256sum vapora-2.2.5-linux-x86_64.AppImage +chmod +x vapora-2.2.5-linux-x86_64.AppImage +./vapora-2.2.5-linux-x86_64.AppImage # Without FUSE -./vapora-2.2.3-linux-x86_64.AppImage --appimage-extract-and-run +./vapora-2.2.5-linux-x86_64.AppImage --appimage-extract-and-run ``` @@ -39,13 +39,13 @@ chmod +x vapora-2.2.3-linux-x86_64.AppImage ```sh title="Terminal" -shasum -a 256 vapora-2.2.3-mac-arm64.dmg +shasum -a 256 vapora-2.2.5-mac-arm64.dmg ``` -Asset names above describe 2.2.3; use the filenames from your selected release. +Asset names above describe 2.2.5; use the filenames from your selected release. ## Browser and CLI from source diff --git a/website/content/docs/index.mdx b/website/content/docs/index.mdx index c5e6eb4..8ce839b 100644 --- a/website/content/docs/index.mdx +++ b/website/content/docs/index.mdx @@ -26,7 +26,7 @@ Vapora maps public Steam friend networks. Run it locally as a desktop app, brows ## Version and scope -- **Version:** 2.2.3, TypeScript + Effect. +- **Version:** 2.2.5, TypeScript + Effect. - **Desktop:** includes the history runtime. Browser and CLI use a source checkout. - **Screenshots:** local fixture profiles. - **Original Python app:** preserved on [legacy](https://github.com/Microck/vapora/tree/legacy). diff --git a/website/content/docs/project/releases.mdx b/website/content/docs/project/releases.mdx index 3b95cd4..260c99a 100644 --- a/website/content/docs/project/releases.mdx +++ b/website/content/docs/project/releases.mdx @@ -3,10 +3,12 @@ title: "Releases and verification" description: "Current downloads and preserved release evidence." --- -Download native assets from [GitHub Releases](https://github.com/Microck/vapora/releases/latest). Check `SHA256SUMS.txt` for the selected release. These docs describe 2.2.3; historical verification applies to the version and scope recorded in each report. +Download native assets from [GitHub Releases](https://github.com/Microck/vapora/releases/latest). Check `SHA256SUMS.txt` for the selected release. These docs describe 2.2.5; historical verification applies to the version and scope recorded in each report. ## Release notes +- [2.2.5](https://github.com/Microck/vapora/blob/main/docs/releases/2.2.5.md) +- [2.2.4](https://github.com/Microck/vapora/blob/main/docs/releases/2.2.4.md) - [2.2.3](https://github.com/Microck/vapora/blob/main/docs/releases/2.2.3.md) - [2.2.2](https://github.com/Microck/vapora/blob/main/docs/releases/2.2.2.md) - [2.2.0](https://github.com/Microck/vapora/blob/main/docs/releases/2.2.0.md) diff --git a/website/package.json b/website/package.json index b647604..adfcb99 100644 --- a/website/package.json +++ b/website/package.json @@ -10,11 +10,12 @@ "build": "next build", "check": "fumadocs-mdx && tsc --noEmit", "check:links": "node scripts/check-links.mjs", - "verify": "npm run check && npm run build && npm run check:links && npm run check:search", + "verify": "npm run check:version && npm run check && npm run build && npm run check:links && npm run check:search", "postinstall": "fumadocs-mdx", "predev": "node scripts/assets.mjs", "prebuild": "node scripts/assets.mjs", - "check:search": "node scripts/check-search.mjs" + "check:search": "node scripts/check-search.mjs", + "check:version": "node scripts/check-version.mjs" }, "dependencies": { "fumadocs-core": "^16.16.2", diff --git a/website/scripts/check-version.mjs b/website/scripts/check-version.mjs new file mode 100644 index 0000000..caeb93b --- /dev/null +++ b/website/scripts/check-version.mjs @@ -0,0 +1,17 @@ +import assert from 'node:assert/strict'; +import { readFile } from 'node:fs/promises'; + +const read = (path) => readFile(new URL(path, import.meta.url), 'utf8'); +const { version } = JSON.parse(await read('../../package.json')); +const index = await read('../content/docs/index.mdx'); +const releases = await read('../content/docs/project/releases.mdx'); +const installation = await read('../content/docs/getting-started/installation.mdx'); +assert(index.includes(`**Version:** ${version},`), 'Documentation overview version must match the app'); +assert(releases.includes(`These docs describe ${version};`), 'Release documentation version must match the app'); +assert(releases.includes(`/docs/releases/${version}.md)`), 'Current release notes must be linked'); +await read(`../../docs/releases/${version}.md`); +const examples = [...installation.matchAll(/vapora-(\d+\.\d+\.\d+)-/g)]; +assert(examples.length > 0, 'Installation instructions must include download filename examples'); +for (const [, exampleVersion] of examples) assert.equal(exampleVersion, version, 'Installation filename version must match the app'); +assert(installation.includes(`Asset names above describe ${version};`), 'Installation version note must match the app'); +console.log(`Documentation version and download examples match ${version}`); From 920d6a14d915482ffe79bcdfc851f33cddf53696 Mon Sep 17 00:00:00 2001 From: Microck Date: Thu, 22 Oct 2026 14:25:59 +0200 Subject: [PATCH 06/15] fix: retain partial games and prioritize explicit settings loads --- src/steam.ts | 4 ++-- test/browser-e2e.ts | 29 +++++++++++++++++++++++++++++ test/integration.test.ts | 2 ++ ui/app.ts | 5 +++-- 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/src/steam.ts b/src/steam.ts index 199d18e..7dd8b3b 100644 --- a/src/steam.ts +++ b/src/steam.ts @@ -115,8 +115,8 @@ export const layer = (options: Options) => Layer.effect(Service, Effect.gen(func }, Schema.Struct({ response: Schema.Struct({ game_count: Schema.optionalKey(Schema.Number.check(Schema.isInt(), Schema.isGreaterThanOrEqualTo(0))), games: Schema.optionalKey(Schema.Array(Schema.Struct({ appid: AppId }))) }) })).pipe( Effect.map((r) => { const values = [...new Set((r.response.games ?? []).map((g) => g.appid))]; - return { status: r.response.game_count === undefined ? "private" : values.length === r.response.game_count ? "public" : "unavailable", - values: r.response.game_count === undefined ? [] : values } satisfies Observation; + return { status: r.response.game_count === undefined ? values.length > 0 ? "unavailable" : "private" + : values.length === r.response.game_count ? "public" : "unavailable", values } satisfies Observation; }), ))), }); diff --git a/test/browser-e2e.ts b/test/browser-e2e.ts index f9a1e37..18e5674 100644 --- a/test/browser-e2e.ts +++ b/test/browser-e2e.ts @@ -710,6 +710,35 @@ test("Steam UI keeps ranking fields aligned, errors inside dialogs and help cont assert.equal(await page.$eval("#load-dialog", (element) => element instanceof HTMLDialogElement && element.open), true); page.off("request", interceptProfile); await page.setRequestInterception(false); await page.keyboard.press("Escape"); + // Force startup/default and explicit-profile response ordering independently of list rendering. + await writeFile(join(root, "profiles", "default.json"), JSON.stringify({ ...loadedProfile, maxNodes: 333 })); + let captureDefault!: (request: HTTPRequest) => void; + let captureExplicit!: (request: HTTPRequest) => void; + const delayedDefault = new Promise((resolve) => { captureDefault = resolve; }); + const delayedExplicit = new Promise((resolve) => { captureExplicit = resolve; }); + let heldDefault = false; let heldExplicit = false; + const interceptStartup = (request: HTTPRequest) => { + if (!heldDefault && request.url().endsWith("/api/profiles/default")) { heldDefault = true; captureDefault(request); } + else if (!heldExplicit && request.url().endsWith("/api/profiles/ui-audit")) { heldExplicit = true; captureExplicit(request); } + else void request.continue(); + }; + await page.setRequestInterception(true); page.on("request", interceptStartup); + await page.reload({ waitUntil: "domcontentloaded" }); + const pendingDefault = await delayedDefault; + // Seed the known saved option because startup normally populates this list after loading defaults. + await page.$eval("#profiles", (element) => { + if (!(element instanceof HTMLSelectElement)) throw new Error("Expected saved profiles select"); + element.append(new Option("ui-audit", "ui-audit")); + }); + await page.click("#open-settings"); await page.select("#profiles", "ui-audit"); await page.click("#load-profile"); + const pendingExplicit = await delayedExplicit; + await pendingDefault.respond({ status: 200, contentType: "application/json", body: JSON.stringify({ ...loadedProfile, maxNodes: 333 }) }); + await page.waitForFunction(() => document.querySelector("#key-indicator")?.textContent === "Key ready"); + await pendingExplicit.respond({ status: 200, contentType: "application/json", body: JSON.stringify({ ...loadedProfile, maxNodes: 777 }) }); + await page.waitForFunction(() => document.querySelector("#load-dialog")?.getAttribute("aria-busy") === "false"); + assert.equal(await page.$eval("#maxNodes", (input) => input instanceof HTMLInputElement && input.value), "777"); + assert.equal(await page.$eval("#load-dialog", (element) => element instanceof HTMLDialogElement && element.open), false); + page.off("request", interceptStartup); await page.setRequestInterception(false); // A damaged optional default profile must not poison every startup state poll. const damagedDefault = "{invalid default settings"; await writeFile(join(root, "profiles", "default.json"), damagedDefault); diff --git a/test/integration.test.ts b/test/integration.test.ts index 5d4d9e1..28a4c11 100644 --- a/test/integration.test.ts +++ b/test/integration.test.ts @@ -41,6 +41,8 @@ test("optional Steam observations distinguish incomplete payloads from public em assert.deepEqual(await games(), { status: "unavailable", values: [] }); fixture.malformed.set(gamesPath, JSON.stringify({ response: { game_count: 2, games: [{ appid: 10 }] } })); assert.deepEqual(await games(), { status: "unavailable", values: [10] }); + fixture.malformed.set(gamesPath, JSON.stringify({ response: { games: [{ appid: 10 }, { appid: 10 }] } })); + assert.deepEqual(await games(), { status: "unavailable", values: [10] }); fixture.malformed.set(gamesPath, JSON.stringify({ response: { game_count: 0 } })); assert.deepEqual(await games(), { status: "public", values: [] }); fixture.malformed.set(gamesPath, JSON.stringify({ response: {} })); diff --git a/ui/app.ts b/ui/app.ts index 5cae441..c4599c5 100644 --- a/ui/app.ts +++ b/ui/app.ts @@ -531,13 +531,14 @@ async function refresh() { if (refreshing) return; refreshing = true; const navigation = navigationVersion; + const settingsAtStart = settingsVersion; const profileAtStart = profileLoadRequest; + const mayApplyDefault = () => settingsAtStart === settingsVersion && profileAtStart === profileLoadRequest && profileLoadsPending === 0; try { currentState = await api("/api/state", Contracts.State); if (lastJob === null && currentState.profiles.includes("default")) { - const version = settingsVersion; try { const settings = await api("/api/profiles/default", Settings); - if (version === settingsVersion) applySettings(settings); + if (mayApplyDefault()) applySettings(settings); } catch (error) { notice(`Saved default settings were not loaded. ${error instanceof Error ? error.message : "Check the saved profile and try again."}`, "action-error"); } From dfbf865c987cb13667083d776aaf41c1e4142795 Mon Sep 17 00:00:00 2001 From: Microck Date: Thu, 22 Oct 2026 14:30:40 +0200 Subject: [PATCH 07/15] test: wait for visible history recovery before retrying --- test/browser-e2e.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/browser-e2e.ts b/test/browser-e2e.ts index 18e5674..33f78f2 100644 --- a/test/browser-e2e.ts +++ b/test/browser-e2e.ts @@ -512,7 +512,8 @@ test("history account selection, all viewer tabs, filters, original downloads an // Account metadata and actions fit one toolbar at the normal desktop width. assert.equal(await page.$eval(".history-header", (header) => header.getBoundingClientRect().height <= 36), true); if (process.env.VAPORA_BROWSER_SCREENSHOTS) await page.screenshot({ path: join(process.env.VAPORA_BROWSER_SCREENSHOTS, "history-partial-comments.png") }); - history.setStatus(403); await page.click("#history-refresh"); await page.waitForFunction(() => document.querySelector("#history-fetch-status")?.textContent?.includes("blocked")); + history.setStatus(403); await page.click("#history-refresh"); await page.waitForFunction(() => document.querySelector("#history-fetch-status")?.textContent?.includes("blocked") + && document.querySelector("#history-retry")?.checkVisibility()); assert.equal(await page.$eval("#history-result", (element) => element instanceof HTMLElement && element.hidden), false); await page.click("#history-retry"); await page.waitForFunction(() => !document.querySelector("#history-retry")?.hidden); await page.setViewport({ width: 320, height: 800 }); assert.equal(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1), true); @@ -561,7 +562,8 @@ test("history account selection, all viewer tabs, filters, original downloads an // A recovered refresh must update the open run, its attachment and its download without reopening it. await page.click('[data-screen="results"]'); await page.click("#open-history"); await page.click("#history-refresh"); - await page.waitForFunction(() => document.querySelector("#history-fetch-status")?.textContent?.includes("blocked")); + await page.waitForFunction(() => document.querySelector("#history-fetch-status")?.textContent?.includes("blocked") + && document.querySelector("#history-retry")?.checkVisibility()); history.rows.set("comments", [...history.document.historic.comments, { ID: "recovered", Commenter: second, Message: "Recovered attached comment", Timestamp: 1791360000 }]); history.counts.set("comments", 5); history.setStatus(200); await fill(page, "#history-search", ""); await page.click('[data-history="comments"]'); @@ -577,7 +579,8 @@ test("history account selection, all viewer tabs, filters, original downloads an await page.click('[data-screen="results"]'); await page.click("#open-history"); assert.match(await visibleText(page, "#history-rows") ?? "", /Recovered attached comment/); history.setStatus(403); await page.click("#history-refresh"); - await page.waitForFunction(() => document.querySelector("#history-fetch-status")?.textContent?.includes("blocked")); + await page.waitForFunction(() => document.querySelector("#history-fetch-status")?.textContent?.includes("blocked") + && document.querySelector("#history-retry")?.checkVisibility()); await page.click('[data-screen="scan"]'); history.rows.set("comments", [...history.document.historic.comments, { ID: "target-recovered", Commenter: second, Message: "Recovered from target panel", Timestamp: 1791360000 }]); history.setStatus(200); await page.click("#target-history-retry"); From 25f59c28f50cb93ea1de6575f7a8d9c5faf77215 Mon Sep 17 00:00:00 2001 From: Microck Date: Thu, 22 Oct 2026 14:42:22 +0200 Subject: [PATCH 08/15] fix: recover bundled history browser without an initial page --- .github/workflows/desktop.yml | 2 ++ scripts/history-worker.py | 12 ++++++- src/history-browser.ts | 2 +- test/history_worker_test.py | 64 +++++++++++++++++++++++++++++++++++ 4 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 test/history_worker_test.py diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 1a859ab..f238988 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -29,6 +29,8 @@ jobs: - uses: actions/setup-python@v5 with: python-version: '3.12' + - name: Test history browser startup recovery + run: python -m unittest discover -s test -p history_worker_test.py - run: npm ci - run: npm run package - name: Install the Windows download diff --git a/scripts/history-worker.py b/scripts/history-worker.py index 726976c..89e934a 100644 --- a/scripts/history-worker.py +++ b/scripts/history-worker.py @@ -8,6 +8,7 @@ import sys from pydoll import Chrome, ChromiumOptions +from pydoll.exceptions import NoValidTabFound USER_AGENT = "OpenAI File Downloader, XaiImageApiFetch/1.0" logging.basicConfig(level=logging.CRITICAL) @@ -26,6 +27,15 @@ async def evaluate(tab, script): return response["result"]["result"]["value"] +async def start_tab(browser): + try: + return await browser.start() + except NoValidTabFound: + # Chromium may answer CDP before its initial page target exists. The + # process is already running; create a blank tab, not another browser. + return await asyncio.wait_for(browser.new_tab(), 5) + + async def serve(): browser_path, profile_path, account, origin, sandbox = sys.argv[1:] if not re.fullmatch(r"[0-9]{17}", account) or not 76561197960265728 < int(account) <= 76561202255233023: @@ -54,7 +64,7 @@ async def serve(): if sandbox == "disabled": options.add_argument("--no-sandbox") async with Chrome(options=options) as browser: - tab = await browser.start() + tab = await start_tab(browser) async def navigate(): async with tab.expect_cloudflare_turnstile(time_to_wait_captcha=15): await tab.go_to(f"{origin}/id/{account}", timeout=30) diff --git a/src/history-browser.ts b/src/history-browser.ts index 73fedc4..fb1ea78 100644 --- a/src/history-browser.ts +++ b/src/history-browser.ts @@ -76,7 +76,7 @@ async function connect(id: SteamId, root: string, origin: string, sandbox: strin return Schema.decodeUnknownSync(Provider.Response)(await response); }, catch: (error) => error instanceof InputError ? error : new InputError({ message: "History's browser response could not be read. Retry the capture." }), })); - const ready = receive(0, 95000); + const ready = receive(0, 100000); return { request, close, ready }; } diff --git a/test/history_worker_test.py b/test/history_worker_test.py new file mode 100644 index 0000000..2cd311f --- /dev/null +++ b/test/history_worker_test.py @@ -0,0 +1,64 @@ +"""Startup transport unit tests; packaged E2E covers the real browser.""" +import asyncio +import importlib.util +from pathlib import Path +import sys +import types +import unittest +from unittest.mock import AsyncMock, patch + + +class NoValidTabFound(Exception): + pass + + +# The helper is frozen with Pydoll during packaging. Unit tests isolate startup +# ordering without installing or launching Chromium on the test host. +pydoll = types.ModuleType("pydoll") +pydoll.Chrome = object +pydoll.ChromiumOptions = object +exceptions = types.ModuleType("pydoll.exceptions") +exceptions.NoValidTabFound = NoValidTabFound +spec = importlib.util.spec_from_file_location( + "history_worker", Path(__file__).resolve().parents[1] / "scripts/history-worker.py") +worker = importlib.util.module_from_spec(spec) +with patch.dict(sys.modules, {"pydoll": pydoll, "pydoll.exceptions": exceptions}): + spec.loader.exec_module(worker) + + +class StartupTests(unittest.IsolatedAsyncioTestCase): + async def test_normal_start_keeps_initial_tab(self): + tab = object() + browser = types.SimpleNamespace(start=AsyncMock(return_value=tab), new_tab=AsyncMock()) + self.assertIs(await worker.start_tab(browser), tab) + browser.new_tab.assert_not_awaited() + + async def test_missing_initial_tab_creates_one_in_running_browser(self): + tab = object() + browser = types.SimpleNamespace(start=AsyncMock(side_effect=NoValidTabFound), new_tab=AsyncMock(return_value=tab)) + self.assertIs(await worker.start_tab(browser), tab) + browser.start.assert_awaited_once() + browser.new_tab.assert_awaited_once_with() + + async def test_other_startup_errors_are_not_hidden(self): + browser = types.SimpleNamespace(start=AsyncMock(side_effect=RuntimeError("launch failed")), new_tab=AsyncMock()) + with self.assertRaisesRegex(RuntimeError, "launch failed"): + await worker.start_tab(browser) + browser.new_tab.assert_not_awaited() + + async def test_recovery_errors_are_not_hidden(self): + browser = types.SimpleNamespace(start=AsyncMock(side_effect=NoValidTabFound), new_tab=AsyncMock(side_effect=RuntimeError("target failed"))) + with self.assertRaisesRegex(RuntimeError, "target failed"): + await worker.start_tab(browser) + browser.new_tab.assert_awaited_once() + + async def test_recovery_has_a_deadline(self): + async def stalled(): + await asyncio.sleep(10) + browser = types.SimpleNamespace(start=AsyncMock(side_effect=NoValidTabFound), new_tab=stalled) + with self.assertRaises(TimeoutError): + await worker.start_tab(browser) + + +if __name__ == "__main__": + unittest.main() From 5d2bb3e470593f0a561f2a5185750aedf2797771 Mon Sep 17 00:00:00 2001 From: Microck Date: Thu, 22 Oct 2026 18:48:01 +0200 Subject: [PATCH 09/15] fix: allow exported history reports to round-trip through import --- src/history.ts | 9 +++++++++ test/history.test.ts | 15 +++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/src/history.ts b/src/history.ts index ed051c9..2cc0dba 100644 --- a/src/history.ts +++ b/src/history.ts @@ -213,6 +213,15 @@ export const parse = Effect.fn("History.parse")(function* (contents: string) { const whole = Schema.decodeUnknownResult(json)(contents.trim()); if (whole._tag === "Success") lines = [whole.success]; else lines = contents.split(/\r?\n/).filter((line) => line.trim()).map((line) => Schema.decodeUnknownSync(json)(line.trim())); + const exported = lines.length === 1 ? object(lines[0]) : null; + if (exported && "sources" in exported && "profile" in exported) { + const report = Schema.decodeUnknownSync(HistoryReport)(exported); + if (!report.sources.length || report.sources.some((source) => !source.snapshots.length)) { + throw new InputError({ message: "The exported history report must retain its original snapshots." }); + } + // Recompute derived rankings from validated observations, not exported scores. + return { sources: report.sources } satisfies Bundle; + } const document = lines.length === 1 && object(lines[0])?.type === "SteamHistoryCapture" ? Schema.decodeUnknownSync(Document)(lines[0]) : null; if (document) return { sources: [{ provider: "SteamHistory", capturedAt: document.capturedAt, contents, diff --git a/test/history.test.ts b/test/history.test.ts index c7e06c9..be3c608 100644 --- a/test/history.test.ts +++ b/test/history.test.ts @@ -61,6 +61,21 @@ test("all captures, unknown fields and original UTF-8 formatting survive the rep assert.deepEqual(reopened.profile.fields.unknown, { keep: ["é", null] }); assert.equal(reopened.profile.fields.vacBanned, true); }); +test("exported history round-trips retained sources and recomputes derived results", async () => { + const first = await parse(profile(100)); + const secondCapture = await parse(profile(200, [], [{ Commenter: second, Message: "Retained comment", Timestamp: 150 }])); + const original = History.merge(first, secondCapture); + const report = History.view(original); + const imported = await Effect.runPromise(History.parse(JSON.stringify({ ...report, referenceSize: 999, comments: [] }))); + assert.deepEqual(imported, original); + assert.deepEqual(History.view(imported), report); + assert.deepEqual(History.merge(original, imported), original); + for (const invalid of [ + { ...report, sources: [] }, + { ...report, sources: report.sources.map((source) => ({ ...source, snapshots: [] })) }, + { ...report, profile: { ...report.profile, steamID64: third } }, + ]) await assert.rejects(Effect.runPromise(History.parse(JSON.stringify(invalid)))); +}); test("recognized real-name history rejects malformed records rather than hiding them", async () => { for (const invalid of [null, "not records", { Name: "Alice" }, [null]]) { await assert.rejects(parse({ ...profile(100), historic: { realName: invalid } }), /History section realName must contain records/); From 7d1c32902e5b5f371c572cd6ce594b6f5832566c Mon Sep 17 00:00:00 2001 From: Microck Date: Thu, 22 Oct 2026 19:52:00 +0200 Subject: [PATCH 10/15] chore: prepare vapora 2.2.6 release --- docs/release-runbook.md | 24 +++++++++---------- docs/releases/2.2.6.md | 14 +++++++++++ package-lock.json | 4 ++-- package.json | 2 +- .../docs/getting-started/installation.mdx | 14 +++++------ website/content/docs/index.mdx | 2 +- website/content/docs/project/releases.mdx | 3 ++- 7 files changed, 39 insertions(+), 24 deletions(-) create mode 100644 docs/releases/2.2.6.md diff --git a/docs/release-runbook.md b/docs/release-runbook.md index 937aff3..6cd8b18 100644 --- a/docs/release-runbook.md +++ b/docs/release-runbook.md @@ -4,7 +4,7 @@ This runbook covers desktop downloads and source archives on GitHub. The package ## release candidate -The candidate is **2.2.5**, with [release notes](releases/2.2.5.md). It improves graph image quality, hover stability, contextual help and Results navigation, and compacts the History toolbar. **2.2.4** remains the published release until this candidate passes review and native package checks. **2.2.1** was withdrawn; its tag remains fixed. Do not reuse either tag. +The candidate is **2.2.6**, with [release notes](releases/2.2.6.md). It fixes settings races, incomplete Steam coverage, history export/import and packaged history startup. **2.2.5** remains the published release until this candidate passes review and native package checks. **2.2.1** was withdrawn; its tag remains fixed. Do not reuse either tag. Use the existing tag convention without a `v` prefix. Desktop installers start at `2.0.1`; `2.0.0` contains source archives only, and `1.0.2` contains the legacy Python executable. Publish only after authorization, resolved review findings and green CI on the pinned main commit. @@ -27,8 +27,8 @@ Use the existing tag convention without a `v` prefix. Desktop installers start a 5. Confirm that the intended tag does not already exist locally or remotely. Never move an existing release tag. ```sh - git tag --list 2.2.5 - git ls-remote --tags origin refs/tags/2.2.5 + git tag --list 2.2.6 + git ls-remote --tags origin refs/tags/2.2.6 gh release list --repo Microck/vapora ``` @@ -43,8 +43,8 @@ For a committed candidate, create an archive from its exact commit: ```sh VAPORA_RELEASE_COMMIT=REPLACE_WITH_REVIEWED_MAIN_COMMIT -git archive --format=tar.gz --prefix=vapora-2.2.5/ \ - --output=/tmp/vapora-2.2.5-source.tar.gz "$VAPORA_RELEASE_COMMIT" +git archive --format=tar.gz --prefix=vapora-2.2.6/ \ + --output=/tmp/vapora-2.2.6-source.tar.gz "$VAPORA_RELEASE_COMMIT" ``` Extract it into a fresh directory and run: @@ -81,21 +81,21 @@ Proceed only after explicit approval of the tag and notes, all findings are reso 4. Create an annotated tag at the pinned commit. Git is used here because Jujutsu does not create annotated tags: ```sh - git -c user.name=Microck -c user.email=contact@micr.dev tag -a 2.2.5 \ - "$VAPORA_RELEASE_COMMIT" -F docs/releases/2.2.5.md - git push origin refs/tags/2.2.5 + git -c user.name=Microck -c user.email=contact@micr.dev tag -a 2.2.6 \ + "$VAPORA_RELEASE_COMMIT" -F docs/releases/2.2.6.md + git push origin refs/tags/2.2.6 ``` 5. Wait for core CI and Desktop packages CI triggered by the new tag to pass on the pinned commit. Download that tag run's verified artifacts into `/tmp/vapora-desktop-downloads`. Compute `SHA256SUMS.txt` from the exact EXE, AppImage and DMG bytes, using their basenames. Confirm there are four tested downloads: Windows x64 installer and portable EXEs, Linux x64 AppImage, and macOS ARM64 DMG. Publish a normal GitHub release with those files attached from the start: ```sh - gh release create 2.2.5 \ + gh release create 2.2.6 \ /tmp/vapora-desktop-downloads/*/*.exe \ /tmp/vapora-desktop-downloads/*/*.AppImage \ /tmp/vapora-desktop-downloads/*/*.dmg \ /tmp/vapora-desktop-downloads/SHA256SUMS.txt \ --repo Microck/vapora --verify-tag \ - --title 'vapora 2.2.5' --notes-file docs/releases/2.2.5.md --latest + --title 'vapora 2.2.6' --notes-file docs/releases/2.2.6.md --latest ``` 6. GitHub also provides the source ZIP and tar.gz. Do not publish an empty source-only release while waiting for desktop builds. Do not attach the legacy executable, replace existing public assets with `--clobber`, publish to npm or mark the release as a prerelease. @@ -105,9 +105,9 @@ Proceed only after explicit approval of the tag and notes, all findings are reso 1. Confirm the release is published, not a draft, and points to the intended tag: ```sh - gh release view 2.2.5 --repo Microck/vapora \ + gh release view 2.2.6 --repo Microck/vapora \ --json url,tagName,isDraft,isPrerelease,publishedAt,assets - git ls-remote --tags origin refs/tags/2.2.5 'refs/tags/2.2.5^{}' + git ls-remote --tags origin refs/tags/2.2.6 'refs/tags/2.2.6^{}' ``` 2. Verify the annotated tag's peeled commit equals `VAPORA_RELEASE_COMMIT`. diff --git a/docs/releases/2.2.6.md b/docs/releases/2.2.6.md new file mode 100644 index 0000000..8206cc8 --- /dev/null +++ b/docs/releases/2.2.6.md @@ -0,0 +1,14 @@ +# vapora 2.2.6 + +This patch release fixes issues found during automated and hands-on QA. + +- Exported history reports can be imported again. Original captures are retained, repeated imports are deduplicated, and rankings are recomputed from validated observations rather than trusting exported scores. Empty and cross-account reports are rejected. +- Cancelled or superseded settings loads no longer overwrite newer edits or close a reopened dialog. Explicit profile selection takes precedence over startup defaults, and stale estimates are invalidated. +- A damaged optional default profile now produces a recoverable diagnostic instead of leaving a healthy app marked disconnected. The original file is preserved. +- Incomplete Steam groups and games responses remain unavailable rather than appearing as public empty lists. Partial observed game IDs are retained without claiming complete coverage. +- The packaged history helper recovers when Chromium starts without an initial page, using a bounded five-second fallback. Other startup errors still propagate. +- CLI commands reject extra operands before storage or network side effects. Installation examples and documentation now follow the current app version. + +Native package tests use disposable local Steam and history fixtures. Fixture tests do not establish live-provider access or production-account behavior. History imports retain the documented 2 MB browser limit. + +Windows downloads include an installer and a portable EXE. The portable app keeps data in `Vapora-data` beside the EXE and needs about 1 GB free in Windows TEMP, plus space for scan data. Move the EXE and data folder together. Downloads are unsigned and not notarized; verify them against `SHA256SUMS.txt`. diff --git a/package-lock.json b/package-lock.json index ac6aaa0..39ecaf5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "vapora", - "version": "2.2.5", + "version": "2.2.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "vapora", - "version": "2.2.5", + "version": "2.2.6", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index c7fd257..49b3c26 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vapora", - "version": "2.2.5", + "version": "2.2.6", "private": true, "description": "Explore public Steam friend networks", "type": "module", diff --git a/website/content/docs/getting-started/installation.mdx b/website/content/docs/getting-started/installation.mdx index 2b843be..d9a97a5 100644 --- a/website/content/docs/getting-started/installation.mdx +++ b/website/content/docs/getting-started/installation.mdx @@ -20,18 +20,18 @@ Downloads are unsigned and not notarized. Compare the downloaded file's SHA-256 ```powershell title="PowerShell" -Get-FileHash .\vapora-2.2.5-win-x64.exe -Algorithm SHA256 +Get-FileHash .\vapora-2.2.6-win-x64.exe -Algorithm SHA256 ``` ```sh title="Terminal" -sha256sum vapora-2.2.5-linux-x86_64.AppImage -chmod +x vapora-2.2.5-linux-x86_64.AppImage -./vapora-2.2.5-linux-x86_64.AppImage +sha256sum vapora-2.2.6-linux-x86_64.AppImage +chmod +x vapora-2.2.6-linux-x86_64.AppImage +./vapora-2.2.6-linux-x86_64.AppImage # Without FUSE -./vapora-2.2.5-linux-x86_64.AppImage --appimage-extract-and-run +./vapora-2.2.6-linux-x86_64.AppImage --appimage-extract-and-run ``` @@ -39,13 +39,13 @@ chmod +x vapora-2.2.5-linux-x86_64.AppImage ```sh title="Terminal" -shasum -a 256 vapora-2.2.5-mac-arm64.dmg +shasum -a 256 vapora-2.2.6-mac-arm64.dmg ``` -Asset names above describe 2.2.5; use the filenames from your selected release. +Asset names above describe 2.2.6; use the filenames from your selected release. ## Browser and CLI from source diff --git a/website/content/docs/index.mdx b/website/content/docs/index.mdx index 8ce839b..d44919f 100644 --- a/website/content/docs/index.mdx +++ b/website/content/docs/index.mdx @@ -26,7 +26,7 @@ Vapora maps public Steam friend networks. Run it locally as a desktop app, brows ## Version and scope -- **Version:** 2.2.5, TypeScript + Effect. +- **Version:** 2.2.6, TypeScript + Effect. - **Desktop:** includes the history runtime. Browser and CLI use a source checkout. - **Screenshots:** local fixture profiles. - **Original Python app:** preserved on [legacy](https://github.com/Microck/vapora/tree/legacy). diff --git a/website/content/docs/project/releases.mdx b/website/content/docs/project/releases.mdx index 260c99a..7aac228 100644 --- a/website/content/docs/project/releases.mdx +++ b/website/content/docs/project/releases.mdx @@ -3,10 +3,11 @@ title: "Releases and verification" description: "Current downloads and preserved release evidence." --- -Download native assets from [GitHub Releases](https://github.com/Microck/vapora/releases/latest). Check `SHA256SUMS.txt` for the selected release. These docs describe 2.2.5; historical verification applies to the version and scope recorded in each report. +Download native assets from [GitHub Releases](https://github.com/Microck/vapora/releases/latest). Check `SHA256SUMS.txt` for the selected release. These docs describe 2.2.6; historical verification applies to the version and scope recorded in each report. ## Release notes +- [2.2.6](https://github.com/Microck/vapora/blob/main/docs/releases/2.2.6.md) - [2.2.5](https://github.com/Microck/vapora/blob/main/docs/releases/2.2.5.md) - [2.2.4](https://github.com/Microck/vapora/blob/main/docs/releases/2.2.4.md) - [2.2.3](https://github.com/Microck/vapora/blob/main/docs/releases/2.2.3.md) From fd82e91eb6f9102ba2fdca74b20ba906c095b0f9 Mon Sep 17 00:00:00 2001 From: Microck Date: Thu, 22 Oct 2026 20:04:15 +0200 Subject: [PATCH 11/15] fix(docs): patch Next.js security advisories --- docs/releases/2.2.6.md | 1 + website/package-lock.json | 100 ++++++++++++++++---------------------- website/package.json | 2 +- 3 files changed, 45 insertions(+), 58 deletions(-) diff --git a/docs/releases/2.2.6.md b/docs/releases/2.2.6.md index 8206cc8..a78c483 100644 --- a/docs/releases/2.2.6.md +++ b/docs/releases/2.2.6.md @@ -8,6 +8,7 @@ This patch release fixes issues found during automated and hands-on QA. - Incomplete Steam groups and games responses remain unavailable rather than appearing as public empty lists. Partial observed game IDs are retained without claiming complete coverage. - The packaged history helper recovers when Chromium starts without an initial page, using a bounded five-second fallback. Other startup errors still propagate. - CLI commands reject extra operands before storage or network side effects. Installation examples and documentation now follow the current app version. +- The documentation build uses patched Next.js 16.4.1. The published docs remain a static export without a Next.js server or image-optimization endpoint. Native package tests use disposable local Steam and history fixtures. Fixture tests do not establish live-provider access or production-account behavior. History imports retain the documented 2 MB browser limit. diff --git a/website/package-lock.json b/website/package-lock.json index d89babf..ab05661 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -11,7 +11,7 @@ "fumadocs-mdx": "^15.4.6", "fumadocs-ui": "^16.16.2", "lucide-react": "^0.468.0", - "next": "^16.0.0", + "next": "16.4.1", "react": "^19.2.0", "react-dom": "^19.2.0" }, @@ -1096,7 +1096,6 @@ "resolved": "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-3.1.1.tgz", "integrity": "sha512-f6ZO2ifpwAQIpzGWaBQT2TXxPv6z3RBzQKpVftEWN78Vl/YweF1uwussDx8ECAXVtr3Rs89fKyG9YlzUs9DyGQ==", "license": "MIT", - "peer": true, "dependencies": { "@types/estree": "^1.0.0", "@types/estree-jsx": "^1.0.0", @@ -1130,15 +1129,15 @@ } }, "node_modules/@next/env": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@next/env/-/env-16.4.0.tgz", - "integrity": "sha512-pyLlT5oafGlX8X7xjgGNXz5dNIDSxREm+qD6i9VLSZiZFopA/XWl8NM/KPmLx/8EG/++c49iid3gNWSQW1+2dQ==", + "version": "16.4.1", + "resolved": "https://registry.npmjs.org/@next/env/-/env-16.4.1.tgz", + "integrity": "sha512-5sUUrrSvs/2/2LnLoesybMGx12EtPB46fdZ6RhAw0XDGSPxU2LFyQBB7yuEiOFFJPKmBY6+q2jTr1/AMbnp0/g==", "license": "MIT" }, "node_modules/@next/swc-darwin-arm64": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-16.4.0.tgz", - "integrity": "sha512-yyZ+9MgViAKLLb5l1gPBGjRwnq3teNLb5Zx6JEw8LzNSTjlsnp+baUHFxTgl7PpjCmKf48VQfyipG1eBflb48Q==", + "version": "16.4.1", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-16.4.1.tgz", + "integrity": "sha512-U+hQ5Gj3fpzf4fveTIF3dpUFYhaSW8vHhdAnbiIomzXzg7boreYFgBqprepXFtW4sw+aTttiNmg0gew/iFNhbg==", "cpu": [ "arm64" ], @@ -1152,9 +1151,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-16.4.0.tgz", - "integrity": "sha512-RePEEejEj1Auf5s9qEcG0JbcDP3ceNUS/ofNX8AhxzgIjTVlZIHMatlp16YplcSMpsVo/ZMQHJTjbMYJznjGUg==", + "version": "16.4.1", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-16.4.1.tgz", + "integrity": "sha512-/hqC3V1XLUjhMASf/WridKdO9FXoEgN3HBWmtKbj00MPgnltutfraWJ3bYTpCRIgEIpbjJyOVLpYgAhh/BkdcQ==", "cpu": [ "x64" ], @@ -1168,9 +1167,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-16.4.0.tgz", - "integrity": "sha512-HhsyCqd+NpmvDDVY/LqkAN24f+QVvXh3ie+PfcwKinWL2Mu826JymQxJXGjAIfmJ4VlHjp4Pe/nZtXtUoEMAqw==", + "version": "16.4.1", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-16.4.1.tgz", + "integrity": "sha512-GHzncHbcaS9g95kcvTNtKQW3aCLoR+xc3Jm7qrkpk1R+D2BjMHIPyvQGRPKCdMX95BsH/421jBUK06q9tEwzjw==", "cpu": [ "arm64" ], @@ -1184,9 +1183,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-16.4.0.tgz", - "integrity": "sha512-sN9Pf+Zh+RpZAOmbR7d8KAA8T61CVhawtbEJ2Bk6QrRzx6Z/6haaF4UiwBzytM96GRRRWZh9/WALIEO3npMamA==", + "version": "16.4.1", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-16.4.1.tgz", + "integrity": "sha512-1SuJyDxW/PR9dHJat/ZRgcYLhuSZ+1psP4DlKb2tKIuXbjygqpLrJWRSq+onZQBv8LcmU67EIrmb6c3XTaJLjw==", "cpu": [ "arm64" ], @@ -1200,9 +1199,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-16.4.0.tgz", - "integrity": "sha512-D5M5xLWQVd1CvR+L7BickM1weRfmM41x3L1NWcnKY/oyJJqr1qwaCgmu3dMAhLBOMdZwSuDCRV6DJRRpiUkbDQ==", + "version": "16.4.1", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-16.4.1.tgz", + "integrity": "sha512-Istng1hMGp9TGO4lUqeKLd70MPN/OOkucVTP2Nmj+gLkwBgmPqUw8CJYBCC7nbl/B/23bBCcjCI5Hsh6hazC1A==", "cpu": [ "x64" ], @@ -1216,9 +1215,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-16.4.0.tgz", - "integrity": "sha512-8d5WLS6a9YalqpOgXdlbvonFu+sIgjA+CO6tGzetrpPVcUL56foa7B7664h41rAlbLi5fJwK4vWji3zf4QDy+w==", + "version": "16.4.1", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-16.4.1.tgz", + "integrity": "sha512-aSC9wMNiZRRFVpPkPWBzRwLQxIGm/CiQcXyFF1XNcgodb+uMxdk7aSSGGpDXCbnvZdf4itjHxpOd5h7i7zaiYw==", "cpu": [ "x64" ], @@ -1232,9 +1231,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-16.4.0.tgz", - "integrity": "sha512-sQuOIiW3snb48UwrBcDMvFA/u03qtw2LeuSIxFIQ9AJuW9UG/4Ddsfo+eV73PnZwBhyncMtsKVh7PrzMol2/fA==", + "version": "16.4.1", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-16.4.1.tgz", + "integrity": "sha512-t/myvwFDlypMUjRvbBf8qLPyuaB0iXYYdBtwMt6DM6f+60wtGr4bSYholdPqNeV5VUXZhrpMwfza829kmhS3iA==", "cpu": [ "arm64" ], @@ -1248,9 +1247,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-16.4.0.tgz", - "integrity": "sha512-6/33lCuxpdHUy27RegyGM/5uTpF7YZd3UR4D0gpkOA/tWY5YR7msbQjqPgCZmSmxrrTLGCXYA4A8vT2H5DPGTQ==", + "version": "16.4.1", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-16.4.1.tgz", + "integrity": "sha512-6ICqPo9awCkrtYNPhwkx1uU7rlFWrZRrIboDHS2LU+jv088UBYQtmJ25h6pCp27/+FZjF6BQ4Te4ErugyMeuBg==", "cpu": [ "x64" ], @@ -2411,7 +2410,6 @@ "resolved": "https://registry.npmjs.org/@types/estree-jsx/-/estree-jsx-1.0.5.tgz", "integrity": "sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==", "license": "MIT", - "peer": true, "dependencies": { "@types/estree": "*" } @@ -2438,8 +2436,7 @@ "version": "2.0.14", "resolved": "https://registry.npmjs.org/@types/mdx/-/mdx-2.0.14.tgz", "integrity": "sha512-T48PeuJtvLosNTPVhfnIp3i/n3a4g4Bad7YCq5k64D4u7NwDrAotikQ+5+sjtUvBmxCMlbo3dVL+C2dP0rWHzg==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@types/ms": { "version": "2.1.0", @@ -2463,7 +2460,6 @@ "integrity": "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==", "devOptional": true, "license": "MIT", - "peer": true, "dependencies": { "csstype": "^3.2.2" } @@ -2474,7 +2470,6 @@ "integrity": "sha512-ZI7bU42mZXXKHn/qNLEw2IrbiINU7X5+vfgdixBHkCNpYWXjKgfQ/P+uyGb5CjOLB9UcnTeg3rylQtV2hym44Q==", "devOptional": true, "license": "MIT", - "peer": true, "peerDependencies": { "@types/react": "^19.3.0" } @@ -2670,7 +2665,6 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.19.0.tgz", "integrity": "sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw==", "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -3220,7 +3214,6 @@ "resolved": "https://registry.npmjs.org/fumadocs-core/-/fumadocs-core-16.16.2.tgz", "integrity": "sha512-nC7NMDGbfgLa4NuA2X30QJt+zcE+xIiuATCrbWZD742fC6+DccgTQCBP9Ry0/OXdYrFtlsIcpO4MhzV9NkBvRw==", "license": "MIT", - "peer": true, "dependencies": { "@fumari/image-size": "^0.1.1", "estree-util-value-to-estree": "^3.5.0", @@ -4044,7 +4037,6 @@ "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.468.0.tgz", "integrity": "sha512-6koYRhnM2N0GGZIdXzSeiNwguv1gt/FAjZOiPl76roBi3xKEXa4WmfpxgQwTTL4KipXjefrnf3oV4IsYhi4JFA==", "license": "ISC", - "peer": true, "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc" } @@ -5170,13 +5162,12 @@ } }, "node_modules/next": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/next/-/next-16.4.0.tgz", - "integrity": "sha512-N2C+9q89Z/oLrsepSRS4jRMtwmUZAoZuAHU0e9T6+sAB5DdhADmrnOW+zjYijlrYFmVfmQhGVGy9eMFoB7UgKg==", + "version": "16.4.1", + "resolved": "https://registry.npmjs.org/next/-/next-16.4.1.tgz", + "integrity": "sha512-uc657V62E34fOI6W5NtG9IzwsPcms0Z60grz2MJGtglgD+pTFnNt4Yw2PzaU622tfX4vhrDgLZzicE2YlhI20Q==", "license": "MIT", - "peer": true, "dependencies": { - "@next/env": "16.4.0", + "@next/env": "16.4.1", "@swc/helpers": "0.5.23", "baseline-browser-mapping": "^2.9.19", "caniuse-lite": "^1.0.30001579", @@ -5190,15 +5181,15 @@ "node": ">=20.9.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "16.4.0", - "@next/swc-darwin-x64": "16.4.0", - "@next/swc-linux-arm64-gnu": "16.4.0", - "@next/swc-linux-arm64-musl": "16.4.0", - "@next/swc-linux-x64-gnu": "16.4.0", - "@next/swc-linux-x64-musl": "16.4.0", - "@next/swc-win32-arm64-msvc": "16.4.0", - "@next/swc-win32-x64-msvc": "16.4.0", - "sharp": "^0.35.4" + "@next/swc-darwin-arm64": "16.4.1", + "@next/swc-darwin-x64": "16.4.1", + "@next/swc-linux-arm64-gnu": "16.4.1", + "@next/swc-linux-arm64-musl": "16.4.1", + "@next/swc-linux-x64-gnu": "16.4.1", + "@next/swc-linux-x64-musl": "16.4.1", + "@next/swc-win32-arm64-msvc": "16.4.1", + "@next/swc-win32-x64-msvc": "16.4.1", + "sharp": "^0.35.5" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", @@ -5338,7 +5329,6 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -5390,7 +5380,6 @@ "resolved": "https://registry.npmjs.org/react/-/react-19.3.0.tgz", "integrity": "sha512-E8LUcbtBWt20bbl2YoHfx4ZDBdxVTfOKtCZn9cDSJ4l6/nuoApcpIBcj47t2wZoVX8g2ZHuMHbiShgCR1T5Sog==", "license": "MIT", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -5400,7 +5389,6 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.3.0.tgz", "integrity": "sha512-JDk8dgif51OjFoDE70+OT9ICyYr+69HlmihNwp1+Nsfbna3t5sIiCa9ZJktDmQ4/1b/rn26hIAR2uYXDMr5r0Q==", "license": "MIT", - "peer": true, "dependencies": { "scheduler": "^0.28.0" }, @@ -5892,8 +5880,7 @@ "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.3.tgz", "integrity": "sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ==", "devOptional": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/tapable": { "version": "2.3.3", @@ -6252,7 +6239,6 @@ "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.5.tgz", "integrity": "sha512-v5l/aFXZQeai4awLbOpSoHecE9UiMrnfx75tEXLjNonXVARxQ5mOeipTjROUchszUNCqnE+hqAMujRsRHsut2Q==", "license": "MIT", - "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } diff --git a/website/package.json b/website/package.json index adfcb99..2aa2495 100644 --- a/website/package.json +++ b/website/package.json @@ -22,7 +22,7 @@ "fumadocs-mdx": "^15.4.6", "fumadocs-ui": "^16.16.2", "lucide-react": "^0.468.0", - "next": "^16.0.0", + "next": "16.4.1", "react": "^19.2.0", "react-dom": "^19.2.0" }, From 37ed46e9568dd05cc5b67917e9ab466a5454ca5f Mon Sep 17 00:00:00 2001 From: Microck Date: Thu, 22 Oct 2026 20:11:42 +0200 Subject: [PATCH 12/15] test: reuse the Windows sharing-lock helper process --- test/storage.test.ts | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/test/storage.test.ts b/test/storage.test.ts index 5533f55..287496c 100644 --- a/test/storage.test.ts +++ b/test/storage.test.ts @@ -16,18 +16,25 @@ import { key, player, scan, seed, steamFixture } from "./fixtures.js"; // This is a real Windows sharing lock: reads remain allowed, replacement is denied. async function lockFile(path: string) { const child = spawn("powershell.exe", ["-NoProfile", "-NonInteractive", "-Command", - '$stream = [IO.File]::Open($env:VAPORA_LOCK_FILE, [IO.FileMode]::Open, [IO.FileAccess]::Read, [IO.FileShare]::Read); [Console]::WriteLine("locked"); [Console]::ReadLine() | Out-Null; $stream.Dispose()', + '$ErrorActionPreference = "Stop"; $stream = $null; try { while ($null -ne ($command = [Console]::ReadLine())) { if ($command -eq "lock") { $stream = [IO.File]::Open($env:VAPORA_LOCK_FILE, [IO.FileMode]::Open, [IO.FileAccess]::Read, [IO.FileShare]::Read); [Console]::WriteLine("locked") } elseif ($command -eq "release") { $stream.Dispose(); $stream = $null; [Console]::WriteLine("released") } else { throw "Unknown lock command" } } } finally { if ($null -ne $stream) { $stream.Dispose() } }', ], { env: { ...process.env, VAPORA_LOCK_FILE: path }, stdio: ["pipe", "pipe", "pipe"] }); const exited = once(child, "exit"); let diagnostic = ""; child.stderr.on("data", (chunk: Buffer) => { diagnostic += chunk.toString(); }); - const [ready] = await Promise.race([ - once(child.stdout, "data"), - exited.then(() => { throw new Error(`Windows lock did not start: ${diagnostic}`); }), - ]); - assert.equal(ready.toString().trim(), "locked"); - return { release: async () => { - child.stdin.end("\n"); + const command = async (value: string, expected: string) => { + const response = Promise.race([ + once(child.stdout, "data"), + exited.then(() => { throw new Error(`Windows lock helper exited: ${diagnostic}`); }), + ]); + child.stdin.write(`${value}\n`); + const [reply] = await response; + assert.equal(reply.toString().trim(), expected); + }; + // Reuse one PowerShell process: two cold starts can consume the test's fixed deadline. + // Each acknowledgement still follows acquiring or releasing the real OS sharing lock. + try { await command("lock", "locked"); } catch (error) { child.kill(); throw error; } + return { acquire: () => command("lock", "locked"), release: () => command("release", "released"), close: async () => { + child.stdin.end(); const [code] = await exited; assert.equal(code, 0, diagnostic); } }; } @@ -50,10 +57,10 @@ if (process.platform === "win32") test("Windows replacement retries a real shari await rm(probe); const saved = runtime.runPromise(store.save({ ...original, status: "cancelled" })); const releasing = delay(150).then(() => lock?.release()); - await Promise.all([saved, releasing]); lock = undefined; + await Promise.all([saved, releasing]); assert.equal((await runtime.runPromise(store.read(original.id))).status, "cancelled"); const lastGood = await readFile(checkpoint); - lock = await lockFile(checkpoint); + await lock.acquire(); const blocked = await runtime.runPromise(store.save(original).pipe(Effect.result)); assert.equal(blocked._tag, "Failure"); if (blocked._tag !== "Failure") throw new Error("The persistent lock should block replacement"); @@ -62,7 +69,7 @@ if (process.platform === "win32") test("Windows replacement retries a real shari assert.match(blocked.failure.message, /then retry/); assert.deepEqual(await readFile(checkpoint), lastGood); assert.ok(!(await readdir(join(root, "outputs", original.id))).some((name) => name.endsWith(".tmp"))); - } finally { await lock?.release(); await runtime.dispose(); await rm(root, { recursive: true, force: true }); } + } finally { await lock?.close(); await runtime.dispose(); await rm(root, { recursive: true, force: true }); } }); test("permanent filesystem errors retain their cause and leave the valid checkpoint intact", async () => { From 7b1ffd30152cdeaf3c4848028a23135d076ce502 Mon Sep 17 00:00:00 2001 From: Microck Date: Thu, 22 Oct 2026 20:14:27 +0200 Subject: [PATCH 13/15] test: frame sharing-lock acknowledgements as complete lines --- test/storage.test.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/storage.test.ts b/test/storage.test.ts index 287496c..39ba81e 100644 --- a/test/storage.test.ts +++ b/test/storage.test.ts @@ -4,6 +4,7 @@ import { once } from "node:events"; import { mkdir, mkdtemp, readFile, readdir, rename, rm, writeFile } from "node:fs/promises"; import { tmpdir } from "node:os"; import { join } from "node:path"; +import { createInterface } from "node:readline"; import { test } from "node:test"; import { setTimeout as delay } from "node:timers/promises"; import { Cause, Effect, Layer, ManagedRuntime, Schema } from "effect"; @@ -19,23 +20,24 @@ async function lockFile(path: string) { '$ErrorActionPreference = "Stop"; $stream = $null; try { while ($null -ne ($command = [Console]::ReadLine())) { if ($command -eq "lock") { $stream = [IO.File]::Open($env:VAPORA_LOCK_FILE, [IO.FileMode]::Open, [IO.FileAccess]::Read, [IO.FileShare]::Read); [Console]::WriteLine("locked") } elseif ($command -eq "release") { $stream.Dispose(); $stream = $null; [Console]::WriteLine("released") } else { throw "Unknown lock command" } } } finally { if ($null -ne $stream) { $stream.Dispose() } }', ], { env: { ...process.env, VAPORA_LOCK_FILE: path }, stdio: ["pipe", "pipe", "pipe"] }); const exited = once(child, "exit"); + const replies = createInterface({ input: child.stdout }); let diagnostic = ""; child.stderr.on("data", (chunk: Buffer) => { diagnostic += chunk.toString(); }); const command = async (value: string, expected: string) => { const response = Promise.race([ - once(child.stdout, "data"), + once(replies, "line"), exited.then(() => { throw new Error(`Windows lock helper exited: ${diagnostic}`); }), ]); child.stdin.write(`${value}\n`); const [reply] = await response; - assert.equal(reply.toString().trim(), expected); + assert.equal(reply, expected); }; // Reuse one PowerShell process: two cold starts can consume the test's fixed deadline. // Each acknowledgement still follows acquiring or releasing the real OS sharing lock. - try { await command("lock", "locked"); } catch (error) { child.kill(); throw error; } + try { await command("lock", "locked"); } catch (error) { child.kill(); replies.close(); throw error; } return { acquire: () => command("lock", "locked"), release: () => command("release", "released"), close: async () => { child.stdin.end(); - const [code] = await exited; assert.equal(code, 0, diagnostic); + const [code] = await exited; replies.close(); assert.equal(code, 0, diagnostic); } }; } From b3d7bf2011ac216a1ee94de4ea394133095ba05c Mon Sep 17 00:00:00 2001 From: Microck Date: Thu, 22 Oct 2026 20:58:01 +0200 Subject: [PATCH 14/15] test: guarantee storage fixture cleanup after helper failure --- test/storage.test.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/storage.test.ts b/test/storage.test.ts index 39ba81e..c1980ff 100644 --- a/test/storage.test.ts +++ b/test/storage.test.ts @@ -71,7 +71,13 @@ if (process.platform === "win32") test("Windows replacement retries a real shari assert.match(blocked.failure.message, /then retry/); assert.deepEqual(await readFile(checkpoint), lastGood); assert.ok(!(await readdir(join(root, "outputs", original.id))).some((name) => name.endsWith(".tmp"))); - } finally { await lock?.close(); await runtime.dispose(); await rm(root, { recursive: true, force: true }); } + } finally { + try { await lock?.close(); } + finally { + try { await runtime.dispose(); } + finally { await rm(root, { recursive: true, force: true }); } + } + } }); test("permanent filesystem errors retain their cause and leave the valid checkpoint intact", async () => { From 9b2978da2cadfc2c96bf9f624efa57fdd70f8d2b Mon Sep 17 00:00:00 2001 From: Microck Date: Thu, 22 Oct 2026 22:02:41 +0200 Subject: [PATCH 15/15] test: synchronize Windows sharing-lock retry and correct Linux docs --- test/storage.test.ts | 29 +++++++++++++++---- .../docs/getting-started/installation.mdx | 8 ++--- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/test/storage.test.ts b/test/storage.test.ts index c1980ff..012026e 100644 --- a/test/storage.test.ts +++ b/test/storage.test.ts @@ -1,7 +1,8 @@ import assert from "node:assert/strict"; import { spawn } from "node:child_process"; import { once } from "node:events"; -import { mkdir, mkdtemp, readFile, readdir, rename, rm, writeFile } from "node:fs/promises"; +import fs, { mkdir, mkdtemp, readFile, readdir, rename, rm, writeFile } from "node:fs/promises"; +import { syncBuiltinESMExports } from "node:module"; import { tmpdir } from "node:os"; import { join } from "node:path"; import { createInterface } from "node:readline"; @@ -41,7 +42,7 @@ async function lockFile(path: string) { } }; } -if (process.platform === "win32") test("Windows replacement retries a real sharing lock and preserves a checkpoint on a persistent lock", { timeout: 20000 }, async () => { +if (process.platform === "win32") test("Windows replacement retries a real sharing lock and preserves a checkpoint on a persistent lock", { timeout: 20000 }, async (t) => { const root = await mkdtemp(join(tmpdir(), "vapora windows storage-")); const runtime = ManagedRuntime.make(Storage.layer(root)); let lock: Awaited> | undefined; @@ -57,9 +58,27 @@ if (process.platform === "win32") test("Windows replacement retries a real shari console.log(`Windows sharing lock reproduces ${failure.code} on replacement`); return true; }); await rm(probe); - const saved = runtime.runPromise(store.save({ ...original, status: "cancelled" })); - const releasing = delay(150).then(() => lock?.release()); - await Promise.all([saved, releasing]); + const heldLock = lock; + const nativeRename = fs.rename; + let sharingFailures = 0; + // Observe the real OS call without synthesizing failures. Release only after + // save itself encounters the lock, never on a timer that could beat its first rename. + const observedRename = t.mock.method(fs, "rename", async (...args: Parameters) => { + try { return await nativeRename(...args); } + catch (error) { + if (args[1] === checkpoint && ++sharingFailures === 1) await heldLock.release(); + throw error; + } + }); + syncBuiltinESMExports(); + try { + await runtime.runPromise(store.save({ ...original, status: "cancelled" })); + assert.ok(sharingFailures >= 1); + assert.ok(observedRename.mock.callCount() >= 2); + } finally { + observedRename.mock.restore(); + syncBuiltinESMExports(); + } assert.equal((await runtime.runPromise(store.read(original.id))).status, "cancelled"); const lastGood = await readFile(checkpoint); await lock.acquire(); diff --git a/website/content/docs/getting-started/installation.mdx b/website/content/docs/getting-started/installation.mdx index d9a97a5..2295606 100644 --- a/website/content/docs/getting-started/installation.mdx +++ b/website/content/docs/getting-started/installation.mdx @@ -27,11 +27,11 @@ Get-FileHash .\vapora-2.2.6-win-x64.exe -Algorithm SHA256 ```sh title="Terminal" -sha256sum vapora-2.2.6-linux-x86_64.AppImage -chmod +x vapora-2.2.6-linux-x86_64.AppImage -./vapora-2.2.6-linux-x86_64.AppImage +sha256sum vapora-2.2.6-linux-x64.AppImage +chmod +x vapora-2.2.6-linux-x64.AppImage +./vapora-2.2.6-linux-x64.AppImage # Without FUSE -./vapora-2.2.6-linux-x86_64.AppImage --appimage-extract-and-run +./vapora-2.2.6-linux-x64.AppImage --appimage-extract-and-run ```