fix(sync): surface attachment/folder restore failures (audit 2.3)
applyRemoteSnapshot swallowed attachment + folder restore errors in silent catch blocks. Count them (attFailed/folderFailed) and warn in a toast after the sync summary. These don't abort the push (the entry synced, only its attachment/folder didn't) unlike a failed entry import. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -268,7 +268,7 @@ test('merge: empty/invalid remote snapshot is a no-op', async () => {
|
||||
const { T, db } = await freshMerge();
|
||||
db.seedEntry({ uuid: 'u1' });
|
||||
const res = await T.applyRemoteSnapshot(null);
|
||||
assert.deepEqual({ ...res }, { added: 0, updated: 0, deleted: 0, failed: 0 });
|
||||
assert.deepEqual({ ...res }, { added: 0, updated: 0, deleted: 0, failed: 0, attFailed: 0, folderFailed: 0 });
|
||||
assert.equal(db.entries.length, 1);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user