Skip to content

Catalog: retire the last holding dropdowns, and take the published packages - #5

Merged
JustinSGray merged 10 commits into
mainfrom
paul/tool_catalog
Sep 11, 2026
Merged

JustinSGray merged 10 commits into
mainfrom
paul/tool_catalog

Conversation

@JustinSGray

@JustinSGray JustinSGray commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Addresses APP-224.

Brings paul/tool_catalog up to date with main and closes out the tool
assembly tree's last loose end. The branch also stops depending on a local
checkout, so it installs in CI for the first time.

The last two dropdowns

The assembly tree took over filling a holder or collet slot on 2026-09-08, and
main removed the dropdowns from the tool table and the panel on 2026-09-10.
What neither took out was the machinery on the route that had fed them, which
outlived them because nothing on screen was drawn from it any more.

picked — a map of holder and collet guids keyed by tool — had no writer left,
so it could only ever be empty, and an empty map still read like an unsaved
answer at three call sites. Gone, and with it:

  • pick and saveAssembly, whose only caller was the panel, and the per-tool
    optionsFor cache behind them.
  • panelActions's assemblyChanged, which compared picked against the
    ordered line to offer Update. Reading the empty pick as a change would have
    offered Update on every tool ordered with a holder. It is now false.

The Tool / Tool + holder switch goes too, for the reason the dropdowns did:
it was a second answer to a question the tree settles, and it let the one
picture on the page draw a bare cutter beside a stack the tree had fully
assembled. What a reader wanted from the Tool half was the working end drawn
bigger, so the press is now a zoom — @toolpath/tool-drawing's zoom prop,
which cuts the sheet just above the holder nose rather than dropping the holder
out of the picture. LBH reads the stack's stickout under both framings.

Two debug modules

Both pure, both tested, both behind import.meta.env.DEV:

  • clearance-debug.ts dumps everything the clearance wall was drawn from as a
    paste-able case. A wall that collapses against the cut looks identical whether
    the curve arrived in inches, the sheet reserved no room on the +r flank, or
    the staircase has no rise in it — three unrelated causes, one picture.
  • holder-debug.ts reports which of five gates emptied a holder rack. "Why are
    there no shrink-fit holders for this feature" is a question the page cannot
    answer and this can.

Published packages, and no more link: overrides

The branch carried two pnpm.overrides link: entries onto a sibling
ui-packages checkout. Both are now obsolete:

  • @toolpath/tool-drawing 0.3.2 → 1.0.0 (apps/catalog). This is what the
    branch was blocked on — Zoom, the zoom prop, DrawingContext.extent and
    Frame.reserve are all in 1.0.0; against 0.3.2 the catalog failed tsc with
    five errors naming them.
  • @toolpath/tool-scraper 2.5.0 → 3.0.0 (packages/catalog-data).

Both are major bumps and neither needed a source change here. pnpm install
now resolves entirely off the registry, so --frozen-lockfile works on a clean
clone.

Checks

pnpm check is green — check-style, lint, build, check-types and
all 1344 tests, locally and in CI.

CI also gets through pnpm install --frozen-lockfile for the first time on this
branch. That step failed before, because the link: overrides pointed at a
checkout no runner has.

The materialRoom workaround, retired

tool-drawing 1.0.0 deliberately retired caller-supplied padding as a margin.
padding is now a reservation, granted out of room the drawing itself
cannot use — asking for more than the panel has costs the drawing nothing, and a
narrow sheet grants what it has. The guidance is to ask for as much as the
widest sheet could use.

That is one number rather than a per-caller one, so the workaround this
application carried for it comes off:

  • materialRoom off CatalogDrawing, which now asks for MATERIAL_ROOM always.
  • PANEL_MATERIAL_ROOM off tool-details.tsx. It existed only to dodge the 0.6
    clamp that crushed the assembly into the top third of the panel on 2026-09-03,
    and there is no clamp to dodge now.

The test inverted rather than being deleted. It pinned that asking for less
left the tool more of the sheet — the workaround's own symptom, and the one
assertion that failed on 1.0.0, because there is nothing left to trade. What it
pins now is the guarantee that made removing the prop safe: the only reservation
the component still varies is whether there is an overlay to reserve for at all,
and the tool has to be framed the same either way.

Verified as a sensor rather than a restatement — run against 0.3.2 it fails,
97.39 reserved against 90.55 bare. The reservation coming out of the drawing
is exactly the regression it exists to catch, and it is one this application
cannot see for itself.

Notes for review

  • The merge from main had six conflicts, all where this branch's dropdown
    removal met the same removal done independently on main. main's side won
    wherever it had already done the work, including its stronger column test.
    One of its tests needed adapting: it clicked the Tool switch to assert the
    stickout fell back to the tool's own LBH, and there is no bare-tool view to
    fall back to — it now presses the zoom and asserts the number does not move.
  • OrderDialog still carries a holder and collet pair of its own, left standing
    deliberately: it has been unreachable since before any of this (setAdding is
    only ever called with null), so removing it is a separate decision.
  • @toolpath/api (0.4.1 declared, 0.6.0 published) and @toolpath/tool-support
    (0.3.0 declared, 0.3.1 published) are still behind. Out of scope here.

The catalog served no icon, so every boot logged a "No route matches
URL /favicon.ico" stack trace: the adapter left the path to Vite, Vite
found no file, and React Router's dev handler took it as a document.
Chrome's DevTools workspace probe did the same on every DevTools open,
reaching the Hono app because nothing excluded it.

public/favicon.svg is toolpath.com's own mark, from the rel="icon" it
declares. Declaring it in root.tsx is what stops the guess at
/favicon.ico; the two new exclude patterns cover a browser that guesses
anyway and the .well-known probe, so Vite answers both instead of
React Router failing to route them.
The tool assembly tree took over filling a holder or a collet slot on
2026-09-08, but the panel's own Holder and Collet comboboxes survived in
the one state the tree does not cover: a tool read with no feature
selected. Two ways to fill one slot, and nothing reconciling them.

- `ToolDetails` loses its `holding` prop; `stack` — what the tree put in
  the slots — is now its only source for a holder or a collet.
- The route loses the `holding` memo, its `optionsFor` cache, `hasPicture`,
  the `picked` map, and the `pick` and `saveAssembly` callbacks that read
  it. The dropdowns were `picked`'s only writer.
- `panelActions`'s `assemblyChanged` is `false`: the panel holds nothing
  to differ with, and reading the empty pick as a change offered *Update*
  on every tool ordered with a holder.
- `Holding`, `HoldingCell`, `isHolding` and the Holder and Collet columns
  come off `PartToolTable` — dead since 2026-09-08, drawing an em-dash.

The Tool / Tool + holder switch goes with them, for the same reason: it
let the one picture on the page disagree with the tree. What a reader
wanted from the *Tool* half was the working end drawn bigger, so the
press over the sheet is now a zoom — `@toolpath/tool-drawing`'s `zoom`
prop, which cuts the sheet just above the holder nose rather than
dropping the holder out of the picture.

Adds two debug modules behind `import.meta.env.DEV`: `clearance-debug.ts`
dumps the clearance wall's inputs as a paste-able case, and
`holder-debug.ts` reports which of five gates emptied a holder rack.
Both are pure and carry their own tests.
Six conflicts, all where this branch's removal of the last holding
dropdowns met the same removal done independently on main.

- `part-tool-table.{tsx,test.tsx}` and `tool-columns.test.ts` — main had
  already taken the Holder and Collet columns off on 2026-09-10. Took
  main's, including its stronger test that a stored column order naming
  them cannot bring them back.
- `tool-details.tsx` — main removed the dropdowns, this branch also
  removes the Tool / Tool + holder switch, so main's now-unused
  `Combobox`, `Toggle` and `CatalogComboboxButton` imports go too.
- `tool-details.test.tsx` — kept main's stickout lockstep test and
  adapted its second half: it clicked the `Tool` switch to assert the
  number fell back to the tool's own `LBH`, and there is no bare-tool
  view to fall back to. It now presses the zoom and asserts the number
  does not move, which is the same rule under the new press.
- `routes/part.tsx` — main still read `picked` for `assemblyChanged`;
  this branch removes the map and hardcodes it `false`.
- `docs/TOOL-ASSEMBLY-TREE.md` — took main's account of the 2026-09-10
  removals and rewrote this branch's § to cover only what it adds on
  top: the route machinery the dropdowns left behind, and the zoom.
- `catalog-drawing.tsx` carried an `eslint-disable-next-line
  react-hooks/exhaustive-deps`. No `react-hooks` plugin is configured in
  this repository and no other file disables that rule, so the directive
  named a rule that does not exist and `pnpm lint` failed on it. The
  reason for the single-dependency array is kept as a comment.
- `clearance-debug.test.ts` reached the sheet-clip branch with a wider
  curve, which does not reach it: `lastRise` is where the staircase's
  final step starts, so widening the curve moves the last corner without
  moving what the wall asks for — 13 mm against a 36.6 mm sheet edge.
  Narrowed the sheet instead, which is the case the branch is for: a
  flank that reserved no room.
Every `@toolpath` package the template needs is on npm as of today, and
the `ui-packages` working tree is clean for all of them — so the two
`link:` overrides onto the sibling checkout have nothing left to serve.
They were the reason `pnpm install --frozen-lockfile` could not run
anywhere but one machine.

- `@toolpath/tool-drawing` 0.3.2 → 1.0.0 in `apps/catalog`. This is what
  the branch was blocked on: `Zoom`, the `zoom` prop,
  `DrawingContext.extent` and `Frame.reserve` are all in 1.0.0, and
  against 0.3.2 the catalog failed `tsc` with five errors naming them.
- `@toolpath/tool-scraper` 2.5.0 → 3.0.0 in `packages/catalog-data`.
- The root `pnpm.overrides` block, and the lockfile `overrides:` entry it
  wrote.

Both are major bumps and neither needed a source change here.
`check-style`, `lint`, `build` and `check-types` all pass off the
registry.

**One test is knowingly red**: `catalog-drawing.test.tsx` § *draws the
tool larger when the caller keeps less of the sheet for the material*.
`materialRoom` no longer changes the framing — both viewBox widths come
back 96.1094. It passes on 0.3.2 and fails on 1.0.0, so the change came
in with that release rather than from this repo. Left failing rather
than deleted: that test is why `materialRoom` exists, and whether 1.0.0
retired the caller's padding deliberately is a question for the drawing
package.
`@toolpath/tool-drawing` 1.0.0 retired caller-supplied padding as a
margin. `padding` is now a reservation, granted out of room the drawing
itself cannot use: asking for more than the panel has costs the drawing
nothing, and a narrow sheet grants what it has. The package's guidance is
to ask for as much as the widest sheet could use.

That is one number rather than a per-caller one, so the workaround this
application carried for it comes off:

- `materialRoom` off `CatalogDrawing`, which now asks for `MATERIAL_ROOM`
  always.
- `PANEL_MATERIAL_ROOM` off `tool-details.tsx`. It existed only to dodge
  the 0.6 clamp that crushed the assembly into the top third of the panel
  on 2026-09-03, and there is no clamp to dodge now.

The test inverted rather than being deleted. It pinned that asking for
less left the tool more of the sheet — the workaround's own symptom, and
the one assertion failing on 1.0.0, because there is nothing left to
trade. What it pins now is the guarantee that made removing the prop
safe: the only reservation the component still varies is whether there is
an overlay to reserve for at all, and the tool has to be framed the same
either way.

Verified as a sensor rather than a restatement: run against 0.3.2 it
fails, 97.39 reserved against 90.55 bare — the reservation coming out of
the drawing is exactly the regression it is there to catch.

`pnpm check` is green.
@JustinSGray
JustinSGray merged commit 2053266 into main Sep 11, 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.

2 participants