Protect toolbox data after IndexedDB startup failures
All checks were successful
Deploy Sokko G / deploy (push) Successful in 18s

This commit is contained in:
Shinuwa 2026-09-12 23:05:16 +02:00
parent b53c7c17c8
commit 09a2d4b71a
13 changed files with 242 additions and 5 deletions

View file

@ -116,6 +116,12 @@ export function validateSiteContent(site) {
"about.contribute.promptIntro",
"about.contribute.promptText",
"toolboxes.eyebrow",
"toolboxes.storageStatus.loadingTitle",
"toolboxes.storageStatus.loadingMessage",
"toolboxes.storageStatus.errorTitle",
"toolboxes.storageStatus.errorMessage",
"toolboxes.storageStatus.retryLabel",
"toolboxes.storageStatus.writeErrorTitle",
"toolboxes.title",
"toolboxes.newButton",
"toolboxes.libraryLink",

View file

@ -69,6 +69,7 @@ test("imports merge after file reading and preserve edits queued during the tran
const notices = [];
const actions = useToolboxActions({
store: {
ready: true,
...initial,
persistToolboxSnapshot: (apply) => queue.enqueue(apply, async (next) => {
await transaction.promise;
@ -115,6 +116,7 @@ test("global imports started from the same render both survive", async () => {
const queue = createPersistenceQueue(initial, () => {});
const actions = useToolboxActions({
store: {
ready: true,
...initial,
persistToolboxSnapshot: (apply) => queue.enqueue(apply, async (next) => { disk = next; })
},
@ -144,6 +146,7 @@ test("failed toolbox deletion preserves registry links and modules together", as
const queue = createPersistenceQueue(initial, () => {});
const actions = useToolboxActions({
store: {
ready: true,
...initial,
persistToolboxSnapshot: (apply) => queue.enqueue(apply, async () => { throw new Error("abort"); })
}