fix(history): remove selections atomically

This commit is contained in:
Sucukdeluxe
2026-08-21 00:59:45 +02:00
parent 3a95136ef1
commit 869dbc25be
11 changed files with 107 additions and 20 deletions
+5
View File
@@ -388,6 +388,11 @@ export function createVisualElectronApi(
fixture.history.splice(index, 1);
}
},
removeHistoryEntries: async (entryIds) => {
const removed = new Set(entryIds);
const retained = fixture.history.filter((entry) => !removed.has(entry.id));
fixture.history.splice(0, fixture.history.length, ...retained);
},
revealHistoryEntry: async (entryId) => fixture.history.some((entry) => entry.id === entryId)
? { ok: true }
: { ok: false, reason: "entry-not-found" },