Skip to content

Bins: the leftovers from the finger-slot and raised-letter reviews, and "1 unit" - #68

Merged
Oliver-Johnson merged 9 commits into
mainfrom
claude/bins-leftovers
Oct 9, 2026
Merged

Oliver-Johnson merged 9 commits into
mainfrom
claude/bins-leftovers

Conversation

@Oliver-Johnson

Copy link
Copy Markdown
Owner

Requested by Oliver · project thread

Part of #21

The Bins optionals left from the reviews of #58 (finger slots) and #62 (four small Bins fixes).

What this changes

Before:

  • Bins: a finger slot in the top of any wall #58 nit 1. The bin audit's "counted as with no lip" check gave the two slotted rows that ask for holes the bin counted without the lip's rule (lipTaken). That is what dividersBuilt asks itself, so those two rows could not fail it.
  • Bins: a finger slot in the top of any wall #58 nit 2. The comments on lipNotched, dividersBuilt and countedAs, and docs/ENGINE.md, said only the lip's rule reads lipTaken. dividersWhy and the page's setDividerLimit read it too.
  • Bins: a finger slot in the top of any wall #58 O4. dividersWhy had a 'slot' reason, with its own Checks wording, for a slotted bin built with the count its lip allows. No bin swept had reached it.
  • Bins: a finger slot in the top of any wall #58 O5. A refresh asks builtDivs of each bin about ten times (its key, its name, Checks, its compartments). With 63 bins with removable plates and finger slots ticked, 60 to 150 ms of an 85 to 180 ms refresh went on dividersBuilt, about three quarters of it; with no slots, 20 to 45 ms of 35 to 85. Checks asks dividersWhy of every bin built with fewer plates than it asks for: 21 such bins spent 1 to 9 ms, and with all 63 short it took 20 to 45 ms more of a 130 to 220 ms refresh.
  • Bins: raised letters a slicer can't weld together, and no negative room above a tall baseplate #62 nits. Two bin-audit comments said the note's shells are kept "closer than a slicer's weld joins" apart, and called 15 µm "the figure noteShells gives".
  • "1 units". With room for one unit and no more, the grid summary said "tallest single bin 1 units". A 1-unit bin's tooltip on the map, its tooltip in the preview and the preview's label in focus said "1 units" too.

After:

  • Nit 1. Every slotted removable row is held to the same bin with no lip and no holes. The two rows with holes build none (their holes give way to the back slot), so that is a real check on them now. It passes here (dividersBuilt is as on main), and on eb32f00's engine it fails on exactly the two Bins: a finger slot in the top of any wall #58-SF-C rows ("0 and 2 fit with no lip", "0 and 4 fit with no lip"). The old form said nothing about them there; they failed only on the shelf and fixture checks.
  • Nit 2. Each of those comments, and ENGINE.md, says what each reader does: lipNotched drops the lip's rule and its corners (in the count, and in dividersWhy's reasons, which asks railedLimit and plateLayout of the marked bin), and setDividerLimit holds the field for plates across to dividersBuilt's count.
  • O4. No bin can reach 'slot', so the branch and its Checks wording are gone, and dividersWhy's comment and ENGINE.md say why. A new audit row holds slotted bins aimed at the lip to being built with the count without their lip and never put down to the lip.
  • O5. The page keeps each bin's builtDivs answer, and each dividersWhy answer Checks asks for, by the settings that asked it, as it keeps fingerPlan (39cbcc8), and clears each past 500. The same layouts now refresh in 12 to 50 ms, and in 30 to 85 ms with all 63 short.
  • Bins: raised letters a slicer can't weld together, and no negative room above a tall baseplate #62 nits. The comments say what the code does: shells kept 0.02 mm clear in x or y wherever a move allows (NOTE_APART), and 15 µm is a figure of the audit's own.
  • "1 unit". All four say "1 unit".

How:

  • O4, why no bin reaches 'slot'. It needs a slot between the plates the lip allows and none between the plates without it. The lip stops only plates that would stand under 6 mm apart (its rule and its corners bind only where the last plate is within half a plate, its clearance and 3.4 mm of the wall, and the rails let plates stand that close only where half a plate and its clearance are under 2.2 mm), so the plates it keeps stand under 9 mm apart. A finger slot needs 15 mm between two plates' rails, so the walls those plates meet have no slot with either count. All else a slot is settled by is the same with either count: the plates the other way (unless the lip stopped those too), the scoop, and the shelf, as no note prints between plates that close.
    • 900,000 random bins (35,019 counted differently with and without the lip, 6,064 of those with a slot between the lip's plates) and an aimed grid of 1,020,600 (62,526 and 16,896): none has a slot between the lip's plates and none between the others, and dividersWhy never gives 'slot'. The widest the lip's plates stood was 4.93 mm.
    • 57,024 raised notes (every printable character and a few short notes, on shelves 6 to 30 mm, across 576 bins where the lip binds across): none prints between the plates the lip keeps.
  • O4, the audit row "counted with no lip". 3,240 slotted bins with thin walls and thin plates, counts at and below what fits without the lip, slots on one, two and four walls, plain and with a scoop and a raised note. Of them, 1,296 are counted without their lip, 160 where the lip would hold their plates. Each must be built with that count, and dividersWhy must not name the lip. With dividersBuilt changed to keep the lip's count where the count without leaves a single slot, it reports 112 wrong.
  • O5. keptDivs and keptWhys in src/bins/ui.js, keyed like fingerPlans by binCfg (and, for keptDivs, whether the bin has a size of its own). Checks asks divsWhy, which keeps dividersWhy's answers. In the page, 2,400 bins changed in place (and the plate, clearance, hole fit and smoothness changed under them) gave the same dividers and the same reasons kept as worked out afresh. Timed with 63 bins in five layouts, at a load average of 3 to 11, so the ranges are wide.
  • "1 unit". plural(n, 'unit') in the grid summary, the map's tooltip, the preview's tooltip and the preview's label.
  • New top-level names: keptDivs, keptWhys, divsWhy. Removed: none. No clash with main or Keep a pasted link over a waiting save, and a size the drawer could not take #65 (c149524).
  • Contains main ef885cf (Run CI on Node 22 #66 and Move CI's actions to their Node 24 releases #67, workflow lines only), merged in b448ac8.
  • One commit doesn't stand alone: at 017b222 test/bin-audit.js doesn't load, because the new row landed inside a comment. The next commit, c9a0437, moves it. Every later commit loads and passes.

Checks

  • I edited the sources in src/, not the generated index.html / bins/index.html
  • I ran node build.js and committed the regenerated pages alongside the sources. node build.js --check is clean on the head.
  • npm test passes on the head (bin audit "all cases clean", plate audit "all plates watertight and every shell facing outwards", "all checks pass", and the rest), and node test/ci-sim.js says "CI will pass."
    • The Bins UI specs finger-slots, bins (with the new test), bins-robustness, estimate, hints and raised-note: 123 passed, none failed or flaky (-c .pw-local.config.js --workers=2). The rest of test:all was not run here.

If this touches geometry

  • Bins: node test/bin-audit.js reports all cases clean.
    • 33,000 random bins (seeds 1001 and 2002, and 3,000 more at seed 3003 against the committed head), built by main's engine and this one, are the same to the byte: the bin's STL and meta, its weight, every plate's STL, and dividersBuilt, binDividers, railedLimit both ways, countedAs and dividersWhy. The first 30,000 include 15,454 asking for finger slots, 12,174 asking for removable plates, 5,972 with holes, 13,527 with a label shelf, 8,079 with a raised note and 3,712 counted without their lip. dividersWhy, and so Checks, changes for none of them under O4. The engine's code differs from main only in dividersWhy's two lines.
  • Baseplates: not touched.
  • I added a case covering the new shape: no new shape; the new audit row covers the counting.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY


Generated by Claude Code

claude added 9 commits October 9, 2026 07:45
The bin audit's "counted as with no lip" check gave the two slotted rows
that ask for holes the bin counted without the lip's rule (lipTaken),
which is what dividersBuilt asks itself, so it could not fail on them.
Every row is now held to the same bin with no lip and no holes: those
two build no holes, as theirs give way to the back slot. It passes here,
and on eb32f00 it fails on exactly those two rows, the #58-SF-C bins
(1 plate along where 2 fit, and 1 where 4 do), where the old form passed.
(#58 nit 1)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
dividersWhy had 'slot', with its own wording in Checks, for a bin with a
finger slot between the plates its lip allows but none between the
plates without it, built with the lip's count all the same. No bin can
be: the lip stops only plates that would stand under 6 mm apart, and
keeps them under 9, where a finger slot needs 15 mm between two plates'
rails, so the walls those plates meet have no slot with either count;
and all else a slot is settled by is the same with either. None of
900,000 random bins nor 1,020,600 aimed at the lip reached it. The
branch and its wording go, dividersWhy's comment and ENGINE.md say why,
and a new audit row, "counted with no lip", holds 1,296 slotted bins
counted without their lip (160 where the lip would hold their plates) to
being built with that count and never put down to the lip; with
dividersBuilt made to keep the lip's count where the other leaves a
single slot, it finds 112 wrong. (#58 O4)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
The last commit set "counted with no lip" two lines into the comment
over the opt-in rows, which left the audit unable to load. It now
stands between the rows before and that comment, which is whole again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
The comments on lipNotched, dividersBuilt and countedAs, and ENGINE.md,
said only the lip's rule reads lipTaken. lipNotched does, which drops
the lip's rule and its corners from the count and from the reasons
dividersWhy gives, as it asks railedLimit and plateLayout of the marked
bin; and the page's setDividerLimit reads it to hold the field for the
plates across to dividersBuilt's count. Each now says so. Comments
only. (#58 nit 2)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
Since #62 a note's shells are kept 0.02 mm clear of each other's corners
in x or y wherever a move allows (NOTE_APART), not "closer than a
slicer's weld joins"; and the 15 µm the random notes are held to is the
audit's own figure, as noteShells holds its fallback to none. Comments
only. (#62 nits)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
Where one unit is the tallest bin that fits, the grid summary said
"tallest single bin 1 units", and a 1-unit bin's tooltips on the map
and in the preview, and the preview's label in focus, said "1 units"
too. All four count with plural() now. A new bins.spec test, an 18 mm
drawer over a 4.25 mm plate, checks all four; it fails on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
…asks again

A refresh asks a bin's dividers (builtDivs) ten times over, for its key,
its name, Checks and its compartments, and Checks asks dividersWhy of
every bin with removable plates. With 63 such bins with finger slots
ticked, dividersBuilt took 60 to 150 ms of an 85 to 180 ms refresh,
about three quarters of it, and 20 to 45 of 35 to 85 with no slots;
with all 63 asking for more plates than fit, dividersWhy took 20 to 45
more. Both are pure, so the page keeps each answer by the settings that
asked it, as it keeps fingerPlan's, and clears the lot past 500. The
same refreshes now take 12 to 50 ms, or 30 to 85 with all 63 short.
2,400 bins built at random on the page get the same answer kept as
asked fresh. (#58 O5)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
@Oliver-Johnson Oliver-Johnson self-assigned this Oct 9, 2026
@Oliver-Johnson
Oliver-Johnson merged commit e0b67e9 into main Oct 9, 2026
3 checks passed
@Oliver-Johnson
Oliver-Johnson deleted the claude/bins-leftovers branch October 9, 2026 09:17
Oliver-Johnson pushed a commit that referenced this pull request Oct 9, 2026
Only sw.js conflicted; the pages are rebuilt from the merged sources.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uqqb1cvhXxrpb3P6y6ykBY
Oliver-Johnson pushed a commit that referenced this pull request Oct 9, 2026
Only sw.js conflicted, on its VERSION line: took main's and rebuilt the pages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XjNf7SQF9o4ZVeWiSbWQmk
Oliver-Johnson added a commit that referenced this pull request Oct 9, 2026
Bins review follow-ups from #68, and the reload test over HTTP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants