release: ship v2.0.23 queue and account reliability fixes

Normalize RapidGator aliases, stabilize active queue ordering, preserve user-controlled package expansion, and align compact queue status presentation.

Separate Mega-Debrid API and Web credential pools, migrate legacy credentials and disabled states safely, refresh live account availability without restart, honor disabled credential persistence, and invalidate Web sessions without allowing stale in-flight, retry, or queued logins to restore old cookies.

Expand regression coverage for account isolation, legacy migration, session races, live scheduler refresh, update notes, and responsive queue behavior.
This commit is contained in:
Sucukdeluxe
2026-08-11 18:31:01 +02:00
parent b5b1ff88e5
commit a6e6d2d439
36 changed files with 2343 additions and 1376 deletions
+51 -6
View File
@@ -1,6 +1,8 @@
import { describe, expect, it } from "vitest";
import { applyAccountDialogToSettings, AccountDialogState } from "../src/renderer/App";
import { defaultSettings } from "../src/main/constants";
import { applyAccountDialogToSettings, createAccountDialogState, AccountDialogState } from "../src/renderer/App";
import { defaultSettings } from "../src/main/constants";
import { getMegaDebridAccountId } from "../src/shared/mega-debrid-accounts";
import { isMegaDebridAccountDisabled } from "../src/shared/provider-daily-limits";
function megaDialog(kind: "megadebrid-api" | "megadebrid-web"): AccountDialogState {
return {
@@ -27,10 +29,53 @@ describe("applyAccountDialogToSettings — keeps the user's Mega preferApi choic
expect(next.megaDebridPreferApi).toBe(false);
});
it("does not flip megaDebridPreferApi to false when editing the Web account", () => {
it("does not flip megaDebridPreferApi to false when editing the Web account", () => {
const settings = { ...defaultSettings(), megaDebridApiEnabled: true, megaDebridWebEnabled: true, megaDebridPreferApi: true };
const next = applyAccountDialogToSettings(settings, megaDialog("megadebrid-web"));
expect(next.megaDebridWebEnabled).toBe(true);
expect(next.megaDebridPreferApi).toBe(true);
});
});
expect(next.megaDebridPreferApi).toBe(true);
});
it("adds a Web account without copying it into the API account pool", () => {
const settings = {
...defaultSettings(),
megaCredentials: "api@example.test:api-pass",
megaDebridApiCredentials: "api@example.test:api-pass",
megaDebridWebCredentials: "",
megaDebridApiEnabled: true,
megaDebridWebEnabled: false
};
const dialog = createAccountDialogState("create", "megadebrid-web", settings);
expect(dialog.megaAccounts).toEqual([]);
const next = applyAccountDialogToSettings(settings, {
...dialog,
megaAccounts: [{ login: "web@example.test", password: "web-pass" }]
});
expect(next.megaDebridApiCredentials).toBe("api@example.test:api-pass");
expect(next.megaDebridWebCredentials).toBe("web@example.test:web-pass");
expect(next.megaDebridApiEnabled).toBe(true);
expect(next.megaDebridWebEnabled).toBe(true);
});
it("disables an API account without disabling the matching Web account", () => {
const accountId = getMegaDebridAccountId("shared@example.test");
const settings = {
...defaultSettings(),
megaCredentials: "shared@example.test:api-pass",
megaDebridApiCredentials: "shared@example.test:api-pass",
megaDebridWebCredentials: "shared@example.test:web-pass",
megaDebridApiEnabled: true,
megaDebridWebEnabled: true
};
const next = applyAccountDialogToSettings(settings, {
...createAccountDialogState("edit", "megadebrid-api", settings),
megaDisabledIds: [accountId]
});
expect(isMegaDebridAccountDisabled(next, accountId, "api")).toBe(true);
expect(isMegaDebridAccountDisabled(next, accountId, "web")).toBe(false);
});
});