Closed general

Search: type filter emits legacy component spelling; no kind sub-filter within hardware

Colby Knox · 1mo ago ·closed by Colby Knox

Two related problems with the type filter on /search, seen on a live query for rp2040.

1. The filter emits the legacy component spelling

The chip row correctly labels the filter hardware (12), but clicking it navigates to:

/search?q=rp2040&type=component

Since the hardware rename (the launch spelling), the search UI should emit type=hardware. component should stay accepted forever as the legacy alias on inbound URLs, but nothing we render should generate it anymore.

2. No kind sub-filtering within hardware

Once the hardware filter is active there is no way to narrow further, even though hardware pages carry a kind axis (component / molecule / board / project / equipment).

The rp2040 results show why this matters: the 12 hardware hits mix a purchasable part (the RP2040 chip page), a board (RP2040 Test Board), and molecules (RP2040 Breakout pipeline demo, RP2040 + BME680 Molecule). There is no way to ask for "just the molecules" or "just the purchasable parts".

Proposal:

  • When type=hardware is selected, show a second row of kind chips (with per-kind counts, same pattern as the type row): all / component / molecule / board / project / equipment.
  • URL shape: /search?q=rp2040&type=hardware&kind=molecule, so filtered searches stay linkable.
  • Kinds with zero hits for the query can be hidden or disabled.
  • discover search in the CLI should grow the matching --kind filter so the API and UI stay in step.

2 Replies

Colby Knox · 1mo ago

Both halves are live on prod already (they shipped in an earlier commit against this issue):

  1. The type chips emit the launch spelling: the hardware chip links to /search?q=...&type=hardware (verified on staging just now); component stays accepted inbound.
  2. With the hardware filter active, a second row of kind chips renders from the kinds the query's hardware hits actually carry, with per-kind counts, linking to /search?q=...&type=hardware&kind=<kind>; kinds with zero hits are not shown. The API honors kind= alongside type=hardware (kind=component matches plain parts too), so discover search can pass it.

Closing; reopen if the rp2040 case still shows a gap.

Colby Knox · 1mo ago

Shipped in adom-wiki 1.7.27: discover search and pkg search both take --kind <component|molecule|board|project|equipment>, validated client-side and passed through as kind= alongside type. Staging: discover search -q ztest --kind molecule returns the molecule fixtures. Per #182, kind=component also matching NULL-kind parts means no special-casing was needed client-side.

Log in to reply.