Prepare v2.0.74 sidepanel reliability release

Restore and persist the package-based link collector with progressive metadata, bounded high-volume updates, safe hydration, visible selection, and complete localization.

Harden download controls, snapshot ordering, history pagination, statistics recovery, settings saves, backup imports, notification persistence, and Windows storage races with regression coverage.
This commit is contained in:
Sucukdeluxe
2026-08-26 20:35:06 +02:00
parent bdcf9e3754
commit 2ea494cd5c
69 changed files with 7660 additions and 883 deletions
+45
View File
@@ -0,0 +1,45 @@
import { describe, expect, it } from "vitest";
import { paginateHistoryRows, type HistoryViewEntry } from "../src/renderer/views/history/history-model";
import * as historyViewModule from "../src/renderer/views/history/HistoryView";
function historyEntry(id: string): HistoryViewEntry {
return {
id,
name: id,
totalBytes: 1,
downloadedBytes: 1,
fileCount: 1,
provider: "realdebrid",
completedAt: 1,
durationSeconds: 1,
status: "completed",
outputDir: "",
urls: []
};
}
describe("history page reporting", () => {
it("reports the exact current page ids and count for App integration", () => {
const reportHistoryVisiblePage = (historyViewModule as unknown as {
reportHistoryVisiblePage?: (
actions: {
onVisiblePageChange?: (ids: string[]) => void;
onVisiblePageCountChange?: (count: number) => void;
},
page: ReturnType<typeof paginateHistoryRows>
) => void;
}).reportHistoryVisiblePage;
expect(reportHistoryVisiblePage).toBeTypeOf("function");
if (!reportHistoryVisiblePage) return;
const ids: string[][] = [];
const counts: number[] = [];
reportHistoryVisiblePage({
onVisiblePageChange: (value) => ids.push(value),
onVisiblePageCountChange: (value) => counts.push(value)
}, paginateHistoryRows([historyEntry("page-101"), historyEntry("page-102")], 1));
expect(ids).toEqual([["page-101", "page-102"]]);
expect(counts).toEqual([2]);
});
});