Frontend dev#210
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.