Promote frontend v1 (frontend-dev → main)#229
Merged
Conversation
The headline flow: run a domain-aware match for a design and see ranked facility solutions, on the typed client + deep modules. - Typed runMatch wrapper (POST /api/match; minimal body cast — schema over-specifies server-defaulted fields). - Deep modules (pure, unit-tested): matchViewModel (toMatchView — rank by confidence then rank, extract plain-language summary + coverage gaps + total); confidence mappers (confidenceToken/confidencePct). - MatchView rebuilt: design selector + Run Match (+ ?okh_id autorun from card/detail hand-off), summary + coverage-gaps + ranked result cards with confidence badges + "View supply tree →" hand-off; loading/no-match/error. - Removed legacy match sub-components (useMatch, MatchTrigger, MatchHumanSummary, matchSessionKeys, solutionRowId) — replaced by the view-model. - Unit (runMatch, matchViewModel, confidence); mocked E2E (results + summary + coverage gaps + hand-off); real-api lane loads. make frontend-ready green; real-api lane green. Verified real match returns ranked solutions against 27 designs x 79 facilities. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…matching Slice #191: Matching — run match + ranked results
Adds minimal/standard/strict System Mode to the match flow. - Match-request builder (pure, unit-tested): buildMatchRequest(okhId, mode) maps each preset to params — the API has no single "mode" field, so a mode is expressed via quality_level + strict_mode (minimal→hobby/relaxed, standard→professional, strict→medical/strict). SYSTEM_MODES carries the plain-language tradeoff copy. - MatchView: segmented mode selector + description; runMatch carries the mode. - Unit (buildMatchRequest mapping); mocked E2E asserts Strict → quality_level "medical" + strict_mode true end-to-end. make frontend-ready green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…system-mode Slice #192: Matching — System Mode selector
…d-off
Rebuilds the visualization on the typed client + a pure supply-tree adapter,
and fixes the match→viz hand-off end-to-end.
- Typed fetchVisualization(solutionId); removed legacy api/supply-tree +
useVisualization.
- Supply-tree adapter (pure, unit-tested): deriveKpis (Trees/Stages/
Dependencies/Score + cost/time when present) + isSolutionEmpty. KpiCards
rewired to the adapter output.
- VisualizationView rebuilt on typed fetch + adapter + state primitives,
reusing the cytoscape SupplyTreeGraph + echarts FacilityChart + ArtifactLinks.
- Hand-off fix: matching now saves the solution (save_solution) and the response's
solution_id is surfaced in the match view-model; the match results link to
/visualization/{solution_id} (the per-card tree.id link 404'd — removed).
- Unit (supplyTreeAdapter); mocked E2E (explorer renders); viz screenshot.
make frontend-ready green; verified real viz bundle loads for a saved solution.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…supply-tree Slice #193: Supply-tree explorer (+ working match hand-off)
Extends the supply-tree explorer with two views, driven by the adapter. - Adapter additions (pure, unit-tested): toProductionSequence (ordered stages of readable node labels) + toDependencies (per-node dependency list, labelled, skips nodes with none). - VisualizationView: numbered Production Sequence + Dependencies sections (graceful empty states), from supply_tree.production_sequence / dependency_graph. - Unit (sequence ordering, dependency labelling, empty); mocked E2E. make frontend-ready green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…sequence-deps Slice #194: Production sequence + dependency views
Solution lifecycle: matching already saves (save_solution); this adds the list + load. (Save = via match; load = open in the explorer #193.) - Typed listSolutions() (GET /api/supply-tree/solutions → data.result[], narrowed to SolutionSummary; query uses limit). - SolutionsListView at /solutions: cards (design title, score badge, facility/tree counts, date) linking to /visualization/:id; loading/empty/error. - Nav: replaced the id-less "Visualization" entry with "Solutions" (the browsable entry into the explorer). - Unit (listSolutions); mocked E2E (list, load→explorer, empty); real-api lane. make frontend-ready green; real-api lane green (lists live saved solutions). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…solutions Slice #195: Saved solutions list + load
Rebuilds the static legacy landing as a real dashboard. - Typed utility client: fetchDomains (data.domains → Domain[]) + fetchMetrics (flattens error_summary.total_errors + request counts). - HomePage dashboard: hero, four journey entry cards (Designs/Facilities/Match/ Solutions), recent solutions (reuses listSolutions, links into the explorer), and a System panel (online status, error/request counts, domain badges). - Unit (fetchDomains/fetchMetrics); mocked E2E (journeys, recent solutions, health) + a11y; real-api lane; updated Phase 0 smoke heading. make frontend-ready green; real-api lane green. Completes the v1 in-scope journeys from PRD #184. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…-dashboard Slice #196: Dashboard / home (final v1 slice)
…nav cleanup From the post-v1 self-audit: - a11y coverage: new e2e/a11y-journeys spec scans all 8 key routes with axe (previously only home). Surfaced + fixed real color-contrast failures: legacy text-slate-400 on light (~2.6:1) → slate-500; slate-500 on light-gray (slate-100) in the viz → slate-600; the OKH "provisional" badge; and the cytoscape container aria-label needed a role (role="img"). - Dead code: deleted orphaned api/match.ts + types/api.ts (0 importers). - Scope: removed RFQ + Packages from the nav (deferred to v1.1; pages kept dormant — routes still resolve by URL, their legacy deps retained). - Bare /visualization route now redirects to /solutions; VisualizationPage simplified (no legacy empty-state branch). make frontend-ready green (a11y clean across all journeys). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ixes-1 Self-audit batch 1: a11y scans, contrast fixes, dead-code + nav cleanup
The Solutions list now renders each saved solution's primary facility beneath the design title (e.g. "Open Ventilator → FabLab Drome") instead of showing a bare UUID, completing web-ui review note #2. The backend that populates facility_name in the solution summary lands in PR #219. - SolutionSummary gains facility_name; the card shows it when present and degrades gracefully to just the title when null. - Bumped the card's metadata row slate-500 -> slate-600 for AA contrast. - Fixtures carry facility_name (one populated, one null) so the mocked E2E and client unit test exercise both paths. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…n-friendly-names feat(frontend): show design + facility name on saved solutions
Adds an optional facility filter to the Match page (web-ui review #4): a collapsible, searchable checklist of OKW facilities with select-all / clear. The chosen ids ride the match request as okw_ids; an empty selection omits the field so matching still runs against all facilities (no default change). - FacilityFilter — controlled, accessible (fieldset/legend, labelled checkboxes), with a per-name search and a summary chip ("Matching against all" / "Limited to N facilities"). - MatchView fetches the OKW list and owns the selection; okwIds thread through buildMatchRequest -> runMatch, which sends okw_ids only when set. - Component tests (toggle, search, select-all/clear) and two mocked E2E cases asserting okw_ids is sent for a subset and omitted for "all". Depends on the backend okw_ids filter (PR #221). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…acility-filter feat(frontend): pre-filter facilities before matching
Adds a "Designs this facility can make" section to the OKW detail page (web-ui review #7, reverse matching): it runs the design catalog against the facility and lists the producible designs ranked by confidence, each linking into the design detail. Full loading/empty/error states. - fetchDesignsForFacility(okwId) posts /api/match/facility and narrows the data envelope. Uses a raw globalThis.fetch (still MSW-interceptable) because the endpoint is newer than the committed OpenAPI schema; apiBaseUrl is now exported from the client for this kind of escape hatch. Swap to the typed client once the schema is regenerated post-deploy. - FacilityDesigns section component; wired into OkwDetailView. - Fixtures + MSW handler + Playwright path for /api/match/facility (populated and empty variants); client unit tests + a mocked E2E asserting the list renders and links to /okh/:id. Depends on the backend reverse-match endpoint (PR #223). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…y-designs feat(frontend): show designs a facility can make on OKW detail
…Making) Rebuilds the dashboard around the network map (web-ui review #1), replacing the journey cards that just duplicated the top nav. - NetworkMap: react-leaflet + OSM tiles with react-leaflet-cluster (essential for MoM's ~3,200 points); colored div-icon markers by source (avoids Leaflet's broken default-icon asset paths and is clusterable); fits bounds to the data; markers carry a title for an accessible name. - Consumes GET /api/okw/map via fetchMapPoints (raw fetch — endpoint newer than the committed OpenAPI schema). MoM default-on; degrades gracefully. - buildMapSummary (pure, unit-tested) renders the text equivalent of the map, including both fallbacks: "N without coordinates not shown" and "Maps of Making unavailable — showing local only". Source legend + stat strip. - GettingStarted: a 3-step onboarding path (find design → match → supply tree), the actual guidance the nav-duplicate cards weren't. - Kept recent-solutions + system/domains health. - Fixtures + MSW + Playwright for /api/okw/map; unit tests (summary, client) + E2E (map hero, summary, MoM-unavailable fallback, a11y across all routes). Depends on the backend map endpoint (PR #227, merged to main). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…rd-network-map feat(frontend): dashboard rework — network map hero (local ∪ Maps of Making)
8 tasks
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.
What
Promotes the frontend v1 rebuild from the long-lived
frontend-devintegration branch intomain, and reunites it with the backend halves that landed onmainin parallel.Why now
frontend-devandmainevolved on disjoint file trees:mainchanged backend only (10 commits — the backend halves of friendly-names,okw_ids, reverse-matching, the coordinate accessor, and the network-map endpoint).frontend-devchangedfrontend/only (22 commits — the entire v1 UI: faceted catalogs, matching + System Mode, supply-tree explorer, solutions, and the dashboard network map).A trial merge is conflict-free, and merging completes the features currently split across the two branches (backend + frontend halves reunite). Keeping one branch simplifies the working tree for the upcoming filtering + visualization work.
Consequence (intended)
This installs the v1 frontend and removes the old demo/reference frontend. Demo-only flows never rebuilt in v1 — RFQ generation, match session-persistence, human-summary display — leave
mainand are deferred to v1.1 (revisit/port if wanted).Verification
On the locally-merged tree, both gates pass:
make ready— 563 passed, parity 4/4, docs ✓.make frontend-ready— 74 unit, 48 E2E, build, axe, screenshots.Deploy impact
None: the release CD builds/deploys only the Docker API image; there is no frontend deployment job. Wiring a frontend deploy is a separate later task.
After merge
frontend-dev; resumemain+ feature branches.main(the running:8001is the stale v0.8.5 image, which predates the map endpoint).🤖 Generated with Claude Code