fix(properties): harden lifecycle and session fencing

- Fence Properties actions and Torrent moves by current caller sessions.
- Preserve move progress and authoritative destinations across stale events and recovery.
- Enforce immutable identity fields and transactional queued-edit rejection.
- Restore subtle theme surfaces and expand regression coverage.
This commit is contained in:
NimBold
2026-08-12 07:07:52 +03:30
parent f7bafdeb0e
commit 64a836f09f
20 changed files with 488 additions and 115 deletions
+9
View File
@@ -121,6 +121,12 @@ const startDownloadListeners = async () => {
return;
}
const status = payload.status as DownloadStatus;
// A move terminal event carries its authoritative destination. Older
// lifecycle events do not, so they must not overwrite an active move or
// clear its progress while the native relocation still owns the row.
if (current.status === 'moving' && status !== 'moving' && payload.destination == null) {
return;
}
if (status !== 'moving') {
useDownloadProgressStore.getState().clearMoveProgress(payload.id);
}
@@ -229,6 +235,9 @@ const startDownloadListeners = async () => {
current.category
);
}
if (payload.destination && payload.destination !== current.destination) {
updates.destination = payload.destination;
}
if (status !== 'downloading' && status !== 'verifying') {
updates.speed = '-';
updates.eta = '-';