Skip to content

Catalog: holder clearance calculator, a draggable column, and three matching-rule fixes - #7

Merged
dementive merged 22 commits into
mainfrom
paul-tool-catalog-v2
Sep 12, 2026
Merged

dementive merged 22 commits into
mainfrom
paul-tool-catalog-v2

Conversation

@pclauss123

Copy link
Copy Markdown
Contributor

Release candidate for catalog.toolpath.com. Seven commits on top of main,
all in apps/catalog and its docs — no change to packages/, to apps/dfm, or
to any server or API-key path.

The holder clearance calculator

A shop can now state the three numbers a stack has to clear, in three boxes
under the drawing, and see the verdict against the assembly it is looking at.

  • app/shared/clearance-entry.ts — which of the three numbers a shop stated,
    and what each box takes besides a number.
  • app/components/clearance-entry.tsx — the three boxes themselves.
  • app/shared/assembly-gaps.ts — the room a stack leaves, measured once for
    every reader instead of separately inside the drawing. This is an extraction
    out of catalog-drawing.tsx, which drops from its own measurement to wiring
    the package up.

cuttingRadiusOf now returns number | null. !== undefined was true of both
shapes a silent vendor leaves — a DC of null and a DC of 0 — so a wall
was measured from r = 0 and drawn through the tool. The guard #6 put on the
drawing moved with the measurement into assembly-gaps, and
shared/tool-marks.test.ts pins both cases: reverting to (DC ?? 0) / 2 fails
them, and nothing else in the suite notices.

The column over the part is draggable

"I should have the ability to make the order list (and feature/group/tool
assembly) wider by clicking the edge and expanding to the right" — Paul,
2026-09-11

One column carries all four, so one drag widens all of them. Double-click
forgets the stated width; the arrow keys move it by 16px, because a drag target
only a mouse can reach is one half the room cannot use. Held between 256px and
seven tenths of the viewer.

app/shared/column-width.ts is every number, app/components/column-resizer.tsx
the handle, and tests/on-the-part.spec.ts § widening the column over the part
the drag — including that the edge takes the press so it never orbits the part
underneath, and that a dozen pixels off it the canvas still does.

Three matching rules corrected

  • A near miss may be outside the one bound it missed on, and no other. A
    group capped at ⌀0.286 in was listing ⌀0.438 in to ⌀0.750 in cutters: they
    were removed for reach, so the diameter question was never put to them —
    judging stops at the first feature that rules a tool out — and they came back
    as "the closest" under a filter no part of them was near. nearEnough in
    app/shared/tool-fit.ts is the rule, applied a tool at a time in the worker
    before the fifty nearest are taken.
  • The end mill's helix row is a should. A ⌀0.125 in mill under a ⌀0.136 in
    hole is listed with a caution saying the room it leaves (0.006 in a side to helix in) rather than refused in red — it can still plunge or bore the hole
    out. The refusal is the bore itself, which row 2 already holds. One line of
    rules.csv.
  • The tap list narrows by Vendor and Family. Where the rows come from is a
    fact about the sweep; what a row says is a fact about the tool, so the page
    narrows the swept pool on the two term axes itself against the same
    query.terms the drill list reads. A vendor holding no tap for this thread is
    a nought behind the … row rather than a question the header refuses to ask.
    tests/threaded-hole.spec.ts § narrows the taps by vendor / § by family
    are the sensors, over the sample catalog's one tap vendor and the one that
    holds none.

Typography and UI

app/shared/type.ts grows from the heading face and the small-capitals label to
a dialog's whole voice, with app/type-scale.test.ts as its sensor. Filter
panel, column filter, assembly tree panel, selection panel, tool details and the
group editor all take it, and app/styles.css carries the roles.

Verification

  • pnpm check — pass (check-style, lint, build, check-types, test).
  • pnpm format:check — pass.
  • pnpm test:e2e:catalog — pass, 132 tests in 1.5m.

Note on the deploy

Nothing in this repository names catalog.toolpath.com — .github/workflows/
holds ci.yml only. Merging this PR does not itself publish anything; whatever
drives that host is configured outside the repo.

pclauss123 and others added 18 commits September 11, 2026 13:12
Takes the 1.0.0 migration, the group reach curve and #6's material-wall
fix onto the clearance work. Three conflicts, all in the drawing seam:

- catalog-drawing.tsx: keeps this branch's extraction of the measurement
  into shared/assembly-gaps, and takes main's reservation semantics with
  it — MATERIAL_ROOM rather than the retired materialRoom prop. main's
  DEV ClearanceProbe is kept; its `outline !== null` guard goes, because
  gapsFor already returns null where the package draws no outline.

- tool-details.tsx: main's ratio rule for the sheet box, which its own
  e2e test pins — the sheet is as wide as the room or three quarters of
  its height, whichever is less. This branch's 22 rem floor under an
  18 rem cap was the flat cap that rule replaced.

- catalog-drawing.test.tsx: keeps main's new zoom sensor and this
  branch's comment on the test below it.

#6 fixed the cutting radius in catalog-drawing.tsx, which this branch
had already moved to shared/assembly-gaps, so the merge resolved it in
a file nothing reads any more and the defect would have survived it.
cuttingRadiusOf now returns `number | null` under main's guard, where
the three clearance boxes read it as well as the drawing — a fix applied
to the drawing alone would leave a box reading a gap taken from r = 0
while the picture beside it had stopped drawing one.
The guard #6 put on the drawing, as a sensor on the module that now owns
it. `!== undefined` was true of both shapes a silent vendor leaves — a
`DC` of `null` and a `DC` of `0` — so the wall was measured from `r = 0`
and drawn through the tool. Reverting cuttingRadiusOf to `(DC ?? 0) / 2`
fails both cases; nothing else in the suite notices.

@BradEstey BradEstey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you rename column-width to panel-width so it doesn't conflict with the table column naming? Resizable sections are called panels everywhere else.

Brad, PR #7: the resizable section over the part is a panel everywhere
else in this application, and "column" is what a table column is called.
column-width.ts becomes panel-width.ts, column-resizer.tsx becomes
panel-resizer.tsx, and their exports, the route's locals and the docs
follow. The stored key is tool-catalog.panel-width, so a width dragged
before this gets the defaults back once.
The conflict resolutions are in the merge under this. What is here is the
three tests that had to move with them, changed rather than dropped:

- column-filter.test.tsx and filter-panel.test.tsx pinned `fixed z-50`,
  which was this branch's own positioning for the menus. Brad's branch
  moved both to the kit's `Menu.Popover`, so the placing is the kit's
  now. They pin the bound the application still owns — the menu scrolls
  inside the room the screen left — and the anti-clip invariant they
  exist for is unchanged and still passing. jsdom does no layout, so
  `toBeVisible` cannot answer for the kit's popover; the browser is
  asked instead, in `tests/on-the-part.spec.ts`.

- Brad's `the columns divide the panel` sampled `boundingBox()` straight
  after a viewport change. This branch's panel is resizable, so the table
  is laid out twice and the handle can be asked in the gap between — the
  resizers are all there, the first just has no box yet. It waits for the
  handle now; nothing it asserts has changed.

Table resizing follows brad/table exactly: use-fitted-columns.ts,
column-width.ts, column-layout.ts, component-table.tsx and
part-tool-table.tsx are byte-identical to his. `panel-width.ts` is this
branch's and sizes the details panel, which is why the rename off
`column-width` in 9af3738 left his name free.
@dementive
dementive merged commit 85dde31 into main Sep 12, 2026
1 check passed
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.

3 participants