feat(torrent): complete lifecycle controls and diagnostics

- add durable Torrent telemetry, availability, sharing, relocation, and web-seed workflows\n- fence queue ownership, lifecycle recovery, persistence, and native control races\n- add localized UI, generated bindings, regression coverage, and smoke validation
This commit is contained in:
NimBold
2026-08-04 01:18:24 +03:30
parent 55a905df14
commit 579a8f7f80
33 changed files with 3505 additions and 139 deletions
+18
View File
@@ -938,6 +938,24 @@ describe('useDownloadStore', () => {
expect(normalized.torrentEncryptionPolicy).toBeUndefined();
});
it('recovers an interrupted Torrent move without discarding the native destination marker', () => {
const normalized = normalizePersistedDownloadProgress({
id: 'interrupted-torrent-move',
url: 'magnet:?xt=urn:btih:bad',
fileName: 'payload',
status: 'moving',
category: 'Other',
dateAdded: '',
destination: '/downloads/new',
torrentMoveDestination: '/downloads/new',
torrentMoveRestoreStatus: 'paused'
});
expect(normalized.status).toBe('paused');
expect(normalized.torrentMoveDestination).toBe('/downloads/new');
expect(normalized.torrentMoveRestoreStatus).toBe('paused');
});
it('normalizes proxy settings for download dispatch', async () => {
expect(normalizeCustomProxy('127.0.0.1', 8080)).toBe('http://127.0.0.1:8080');
expect(normalizeCustomProxy('http://proxy.local:9000', 8080)).toBe('http://proxy.local:9000');