Skip to content

Frontend dev#210

Merged
touchthesun merged 11 commits into
mainfrom
frontend-dev
Jul 3, 2026
Merged

Frontend dev#210
touchthesun merged 11 commits into
mainfrom
frontend-dev

Conversation

@touchthesun

Copy link
Copy Markdown
Contributor

No description provided.

MakerNetwork and others added 11 commits July 2, 2026 16:20
…nt, state primitives)

First vertical slice of the v1 frontend (PRD #184, slice #197), establishing the
patterns every later slice copies:

- Typed API client (module 1): openapi-fetch over the generated OpenAPI types
  (src/api/ohm/*). Path/param/envelope are type-checked against the real
  contract; items narrowed to the OkhManifest view type. fetch() is resolved
  per-call so test interceptors (MSW) are honored.
- State primitives (module 6): shadcn-based LoadingState / EmptyState /
  ErrorState with role=status / role=alert, component-tested.
- OKH design catalog list rebuilt on the typed client + primitives, preserving
  search / sort / pagination and the renderable-item filter; explicit
  loading / empty / error states.

Tests: unit (typed OKH wrapper via MSW — happy path, query params, ApiError),
component (state primitives), mocked-lane E2E (browse / empty / error) +
real-api lane (route loads against live API) + /okh screenshot.

`make frontend-ready` green; real-api lane green against the live backend.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…okh-catalog

Slice 1: Foundation + OKH design catalog (HITL — design review)
Replaces the simple OKH list with a Newegg-style left-nav faceted browse
(PRD #184 catalog IA pivot, slice #200), built on slice-1's typed client +
state primitives.

- Facet deep module (pure, unit-tested): derive facet groups with drill-down
  counts, filter (AND across groups, OR within). Facets chosen from fields
  actually populated in the real corpus: manufacturing process, license,
  material (dropped development_stage — no variance; keywords — too sparse).
- FacetPanel component (checkbox groups + counts + clear-all), component-tested.
- Faceted catalog hook with URL-synced facet + search state (deep-linkable),
  drill-down counts, pagination; responsive (facet drawer on mobile).
- E2E (mocked): loads, fixture designs, facet narrows results + URL reflects
  selection, empty, error. Real-api lane validated against the live 27-manifest
  oshwa corpus. Screenshots.

`make frontend-ready` green; real-api lane green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…alog

Adds the primary category drill-down facet to the faceted catalog (PRD #184,
slice #201), composing with A1's orthogonal facets. Variant grouping deferred
(variant_of is 0/27 in the corpus) per decision on #201.

- Provisional category derivation (pure, unit-tested): a keyword→category
  dictionary over function/title/keywords; multi-valued (a device can belong to
  several categories); Uncategorized fallback. Honest placeholder for the
  service-backed Device Category Taxonomy (Epic #199) — swaps with no UX change.
- Category wired as the PRIMARY facet (rendered first, marked "provisional").
- E2E: category facet present as the spine + narrows results + URL reflects it.

Sanity over the real 27-manifest corpus: Computing 13, Lab & Bio 9, Fluid 8,
Optics 8, Thermal 7, Test 3, Medical 3, Uncategorized 1 (multi-membership works).

`make frontend-ready` green; real-api lane green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Migrates the OKH detail view onto the typed client + state primitives and adds
a validate action (the view previously had none).

- Typed client: fetchOkhDetail(id) and validateOkh(content, {qualityLevel,
  strictMode}) → ValidationResult (reuses the generated schema type).
- Detail view rebuilt on LoadingState/ErrorState + shadcn Button; Validate
  action surfaces a ValidationPanel (is_valid badge, score bar, errors,
  warnings, suggestions). Dropped the package-build action (packages are
  deferred v1 scope).
- Unit tests (new okh-detail.test.ts): detail fetch + ApiError; validate result
  + body/query params. Mocked E2E: detail loads, validate surfaces a result.
  Detail route added to the screenshot set.

`make frontend-ready` green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Greenfield read-only OKW facility catalog on the typed client + state
primitives, at /facilities (new "Facilities" nav tab).

- Typed searchOkw wrapper ({results,total,page,page_size} envelope, narrowed to
  OkwFacility view type).
- List: search (name/location/process) + access_type/facility_status filter
  chips + pagination + loading/empty/error states + facility cards.
- Process display humanized (Wikipedia URIs -> readable labels; pure,
  unit-tested). Underlying data normalization tracked in #207.
- Unit tests (searchOkw wrapper, humanizeProcess); mocked E2E (loads, fixtures +
  humanized processes, filter narrows, empty, error); real-api lane loads
  against the live 79-facility corpus; /facilities screenshot.

`make frontend-ready` green; real-api lane green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…okw-catalog

Slice #188: OKW facility catalog (read-only)
…2-category-spine

Slice A2: OKH provisional category spine
…1-faceted-catalog

Slice A1: Faceted OKH catalog browse (orthogonal facets)
Resolves union conflicts in shared harness files after A1/A2/OKW merged:
- harness.config.json: routesToScreenshot union (/okh/okh-0001 + /facilities)
- test/fixtures: keep OKH detail/validation + OKW search fixtures
- test/msw/handlers: union OKH detail/validate + OKW search handlers

make frontend-ready green on the merged state.
…okh-detail

Slice 2 (#187): OKH design detail + validate
@touchthesun touchthesun merged commit 55bd086 into main Jul 3, 2026
2 checks passed
@touchthesun touchthesun deleted the frontend-dev branch July 3, 2026 07:49
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