feat(collector): rebuild link preview as package workspace

Inspect pasted links, text files and DLC containers before queue insertion and resolve supported hoster metadata without starting downloads. Group multipart files into expandable packages with size, status, availability, timestamps, filtering and stable selection. Add selected or complete transfer to Downloads while retaining entries on failed or partial handoff. Keep collector toolbar spacing consistent and show the full 1Fichier identity with its provider icon in Downloads.
This commit is contained in:
Sucukdeluxe
2026-08-22 02:22:42 +02:00
parent 5f391a35d6
commit 40428a69b4
27 changed files with 1265 additions and 1229 deletions
+13
View File
@@ -109,4 +109,17 @@ describe("account preload contract", () => {
expect(electron.invoke).toHaveBeenCalledWith(IPC_CHANNELS.GET_ARCHIVE_PASSWORD_LIST);
expect(result).toEqual({ passwords });
});
it("forwards collector text and container inspection without adding downloads", async () => {
const result = { packages: [], invalidCount: 0, duplicateCount: 0 };
electron.invoke.mockResolvedValue(result);
await electron.api?.inspectCollectorText({ rawText: "https://1fichier.com/?abc12345", addedAt: 1234 });
await electron.api?.inspectCollectorContainers(["C:\\Imports\\sample.dlc"], 5678);
expect(electron.invoke.mock.calls).toEqual([
[IPC_CHANNELS.INSPECT_COLLECTOR_TEXT, { rawText: "https://1fichier.com/?abc12345", addedAt: 1234 }],
[IPC_CHANNELS.INSPECT_COLLECTOR_CONTAINERS, ["C:\\Imports\\sample.dlc"], 5678]
]);
});
});