From 0fb412d3a54d81220d3ef9ff3d89f9543bd5cae5 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 9 Oct 2026 09:34:13 +0000 Subject: [PATCH 1/4] Ask the bin audit's no-lip row for more plates than fit, so its reason check can fail The row only asked for counts at or under what fits, and Checks gives a reason only for a count put down, so a dividersWhy that asked the wrong bin passed it. With one more than fits each way and 40 by 40 it catches that (80 wrong); main passes. The SF-C comment now says the 2.5 x 0.5 row's holes give way to its front slot as well. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY --- test/bin-audit.js | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/test/bin-audit.js b/test/bin-audit.js index dce7ac9..057833c 100644 --- a/test/bin-audit.js +++ b/test/bin-audit.js @@ -3596,13 +3596,13 @@ console.log('\nfinger slots'); if (shelved >= built.divY) faults.push(`fixture: ${shelved} plates along in front of the shelf, no fewer`); /* No lip, so counted as the bin with none, and Checks puts the count down to something it has: never to the lip's notches. With its lip, the same bin is counted by their - rule. The rows asking for holes build none, as their holes give way to the back slot, - so each is the bin with no lip and no holes as well. Counted as asking for holes with - no lip, as before #58-SF-C was fixed, such a bin laid them out with more room than it - gives them: a row fitted, held the back wall too low for a slot and kept a plate in - front of a shelf that is not built. Held to itself counted without the lip's rule - (lipTaken), these two rows were held to what dividersBuilt asks of itself, and could - not fail. */ + rule. The rows asking for holes build none, as their holes give way to the back slot + (and on the 2.5 x 0.5 to the front one too), so each is the bin with no lip and no + holes as well. Counted as asking for holes with no lip, as before #58-SF-C was fixed, + such a bin laid them out with more room than it gives them: a row fitted, held the + back wall too low for a slot and kept a plate in front of a shelf that is not built. + Held to itself counted without the lip's rule (lipTaken), these two rows were held to + what dividersBuilt asks of itself, and could not fail. */ const lipless = dividersBuilt(Object.assign({}, cs, { lip: false, insert: 0 })); if (built.divX !== lipless.divX || built.divY !== lipless.divY) faults.push(`${built.divX} across and ${built.divY} along, where ${lipless.divX} and ${lipless.divY} fit with no lip`); @@ -3630,10 +3630,12 @@ console.log('\nfinger slots'); it, and dividersBuilt builds those. Checks had a reason of its own for a bin that broke this, 'slot', which no bin reached, and which is gone; were one to break it, Checks would put its plates down to the lip it does not have, and so this asks that too. Thin - walls and thin plates, where the lip binds, both counts at what fits without it and - one of them at less, slots on one wall, two and all four, plain and with a scoop and a - note raised on a shelf; and a hundred or more where the lip would hold the plates, or - the grid has stopped aiming at it. */ + walls and thin plates, where the lip binds, both counts at what fits without it, one + of them at less, one of them at one more, and 40 each way: Checks gives a reason only + for a count put down, so without the counts past what fits, a reason asked of the + wrong bin passed here. Slots on one wall, two and all four, plain and with a scoop and + a note raised on a shelf; and a hundred or more where the lip would hold the plates, + or the grid has stopped aiming at it. */ { let n = 0, marked = 0, bound = 0; const off = []; @@ -3644,7 +3646,7 @@ console.log('\nfinger slots'); fingerSlots: Object.fromEntries([...s].map((k) => [k, true])) }, extra); const fit = (axis) => railedLimit(Object.assign({ lipTaken: true }, base), axis).most; const fx = fit('x'), fy = fit('y'); - for (const [divX, divY] of [[fx, fy], [fx, 1], [1, fy], [fx, 0], [0, fy]]) { + for (const [divX, divY] of [[fx, fy], [fx, 1], [1, fy], [fx, 0], [0, fy], [fx + 1, 0], [0, fy + 1], [40, 40]]) { const cfg = Object.assign({}, base, { divX, divY }), by = countedAs(cfg); n++; if (!by.lipTaken) continue; From a9a5003bc8a14a05c9513f67c46e42333ee23470 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 9 Oct 2026 09:34:13 +0000 Subject: [PATCH 2/4] Reload the saved price over HTTP, as the next test does It failed once from file:// under load and passed when run again; from file:// the browser has now and then lost what a page stored before it (see serveRoot). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY --- test/ui/estimate.spec.js | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/test/ui/estimate.spec.js b/test/ui/estimate.spec.js index a5e6024..9657052 100644 --- a/test/ui/estimate.spec.js +++ b/test/ui/estimate.spec.js @@ -27,9 +27,10 @@ test.afterEach(async ({ page }) => { }); /* A bins layout small enough to be quick and big enough to need several plates: a - 4 × 4 drawer of 1×1 bins on a 120 mm bed, which takes four bins a plate. */ -async function binsJob(page) { - page.__errors = await H.openBins(page); + 4 × 4 drawer of 1×1 bins on a 120 mm bed, which takes four bins a plate. `url` for + the page served rather than opened from disk. */ +async function binsJob(page, url) { + page.__errors = await H.openBins(page, url); await H.setField(page, 'drawerW', 168); await H.setField(page, 'drawerD', 168); await H.setField(page, 'bedPreset', 'custom'); @@ -129,18 +130,26 @@ test.describe('the price', () => { expect(t, 'money left behind after the price was cleared').not.toMatch(MONEY); }); + /* Over HTTP, as the next test is. From file:// this failed once under load and passed + when run again; the likeliest cause is the one serveRoot describes, the browser now + and then losing from file:// what a page stored before it. */ test('a price survives a reload, and is kept under one key as JSON', async ({ page }) => { - await binsJob(page); - await H.setField(page, 'filPrice', '18.99'); - await H.setField(page, 'filSym', '€'); - expect(JSON.parse(await page.evaluate((k) => localStorage.getItem(k), KEY))) - .toEqual({ price: 18.99, sym: '€', speed: 'auto' }); - await page.reload(); - await page.waitForFunction(() => !!document.getElementById('fillmap')); - await page.waitForTimeout(400); - await expect(page.locator('#filPrice')).toHaveValue('18.99'); - await expect(page.locator('#filSym')).toHaveValue('€'); - await expect(page.locator('#totals')).toContainText(/about €\d+\.\d\d/); + const srv = await H.serveRoot(); + try { + await binsJob(page, srv.base + 'bins/'); + await H.setField(page, 'filPrice', '18.99'); + await H.setField(page, 'filSym', '€'); + expect(JSON.parse(await page.evaluate((k) => localStorage.getItem(k), KEY))) + .toEqual({ price: 18.99, sym: '€', speed: 'auto' }); + await page.reload(); + await page.waitForFunction(() => !!document.getElementById('fillmap')); + await page.waitForTimeout(400); + await expect(page.locator('#filPrice')).toHaveValue('18.99'); + await expect(page.locator('#filSym')).toHaveValue('€'); + await expect(page.locator('#totals')).toContainText(/about €\d+\.\d\d/); + } finally { + await srv.close(); + } }); /* One key, both tools: a price typed on the baseplates page is the bins page's price From 3174a2a6883f1c90f6373db20b1e291f03e6e722 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 9 Oct 2026 09:34:30 +0000 Subject: [PATCH 3/4] Say a refresh asks a bin for its dividers about fifteen times, as measured Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY --- src/bins/ui.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bins/ui.js b/src/bins/ui.js index 59b08e2..e061703 100644 --- a/src/bins/ui.js +++ b/src/bins/ui.js @@ -195,8 +195,8 @@ const binCfg = (b) => ({ u: b.u, v: b.v, hUnits: b.hUnits, wall: b.wall, (binDividers, which asks the holes as holesIn does), with the new-bin settings at a 1x1 as these are. A bin with finger slots ticked asks the holes of its kept plan (insertPlanOf), as binDividers would ask them of the slots all over again. - Kept by the settings that asked, as fingerPlan is: a refresh asks this of each bin ten - times over, for its key, its name, Checks and its compartments, and 63 bins with + Kept by the settings that asked, as fingerPlan is: a refresh asks this of each bin about + fifteen times over, for its key, its name, Checks and its compartments, and 63 bins with removable plates spent 60 to 150 ms of an 85 to 180 ms refresh in dividersBuilt with finger slots ticked, about three quarters of it, and 20 to 45 of 35 to 85 without; kept, the whole refresh takes 12 to 50. Everything it goes by is binCfg's, and whether From ed1c0470040a89468949eff2839ef28cd24e3241 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 9 Oct 2026 09:34:30 +0000 Subject: [PATCH 4/4] Rebuild the pages Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY --- bins/index.html | 4 ++-- sw.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bins/index.html b/bins/index.html index 6b0c824..33912ea 100644 --- a/bins/index.html +++ b/bins/index.html @@ -12546,8 +12546,8 @@

Your drawers

(binDividers, which asks the holes as holesIn does), with the new-bin settings at a 1x1 as these are. A bin with finger slots ticked asks the holes of its kept plan (insertPlanOf), as binDividers would ask them of the slots all over again. - Kept by the settings that asked, as fingerPlan is: a refresh asks this of each bin ten - times over, for its key, its name, Checks and its compartments, and 63 bins with + Kept by the settings that asked, as fingerPlan is: a refresh asks this of each bin about + fifteen times over, for its key, its name, Checks and its compartments, and 63 bins with removable plates spent 60 to 150 ms of an 85 to 180 ms refresh in dividersBuilt with finger slots ticked, about three quarters of it, and 20 to 45 of 35 to 85 without; kept, the whole refresh takes 12 to 50. Everything it goes by is binCfg's, and whether diff --git a/sw.js b/sw.js index 2a47a53..5eab1c9 100644 --- a/sw.js +++ b/sw.js @@ -52,7 +52,7 @@ load from this site, and the app's icons and manifest, as paths from the root. VERSION is a hash of all of those files, names and bytes, and of this script as it is served, FILES filled in and everything else but VERSION itself. */ -const VERSION = "f14226fad998"; +const VERSION = "adc911090779"; const FILES = [ "./", "bins/",