Add toolbox spaces and recover from stale asset bundles
All checks were successful
Deploy Sokko G / deploy (push) Successful in 18s

This commit is contained in:
Shinuwa 2026-09-29 21:31:49 +02:00
parent 0959c6740b
commit 0acf5ecf21
30 changed files with 1252 additions and 179 deletions

View file

@ -137,6 +137,32 @@ test("global imports started from the same render both survive", async () => {
assert.deepEqual(queue.getCurrent(), disk);
});
test("v2 imports reject more than five spaces before writing", async () => {
let writes = 0;
let errorMessage = "";
const actions = useToolboxActions({
store: {
ready: true,
persistToolboxSnapshot: () => { writes += 1; return Promise.resolve(true); }
},
notify() {},
setConfirmModal: (value) => { errorMessage = value.message; }
});
const result = await actions.importToolbox({ text: async () => JSON.stringify({
version: 2,
toolbox: {
id: "overflow",
name: "Overflow",
modules: [],
spaces: Array.from({ length: 6 }, (_, index) => ({ id: `space-${index}`, name: `Space ${index}`, moduleOrder: { one: [], two: [[], []] } }))
},
modules: {}
}) });
assert.equal(result, null);
assert.equal(writes, 0);
assert.match(errorMessage, /plus de 5 espaces/);
});
test("failed toolbox deletion preserves registry links and modules together", async () => {
const initial = {
toolboxes: [{ id: "existing", modules: [{ id: "note", type: "notepad" }] }],