feat: Plan C1 data layer + Process Hub Capability tab#106
Merged
Conversation
First of three sub-plans for the production-line-glance surface-wiring design. Covers pure derivation utilities (core/stats), data hooks (hooks), B0 migration banner+modal (ui), and the new Capability tab in the Process Hub view (azure-app). Closes Plan B T3 deferred chrome-walk validation. C2 (LayeredProcessView Operations band) and C3 (FRAME workspace drawer) follow. Co-Authored-By: ruflo <ruv@ruv.net>
Pure derivation: enumerates the distinct values present in a column across rows (excludes null/empty, sorted lexicographically, capped at 50). Used by useProductionLineGlanceData to populate the filter strip's per-column chip options. Also adds back-link from surface-wiring spec to the C1 plan file so the doc-health orphan check passes. See spec docs/superpowers/specs/2026-04-28-production-line-glance-surface-wiring-design.md section "Data layer". Co-Authored-By: ruflo <ruv@ruv.net>
Walks per-member investigation rows, applies nodeMappings, counts non-pass values from the configured defect columns per canonical-map node. Honors contextFilter for hub-level / tributary-attached context dimensions and skips investigations from a different hub (via metadata.processHubId). Returns one result per canonical-map node (errorCount=0 for nodes with no mapped data). Consumed by useProductionLineGlanceData (T3) to populate the bottom-right Pareto slot. See spec docs/superpowers/specs/2026-04-28-production-line-glance-surface-wiring-design.md section "Data layer". Co-Authored-By: ruflo <ruv@ruv.net>
Composes the four slot inputs (cpkTrend, cpkGapTrend, capabilityNodes, errorSteps) plus availableContext and contextValueOptions for ProductionLineGlanceDashboard. Pure given inputs — no fetching, no I/O. Filter context narrows row population per slot. cpkTrend / cpkGapTrend derivation in C1 plots per-node Cpk as a sequence; full snapshot-time-series wiring belongs to C2. See spec docs/superpowers/specs/2026-04-28-production-line-glance-surface-wiring-design.md section "Data layer". Co-Authored-By: ruflo <ruv@ruv.net>
URL-search-param state synchronizer for the production-line-glance dashboard's filter strip. Reads on mount, writes via replaceState (not push — filter changes are incremental, not navigation events). Preserves reserved params (e.g. ops=full for C2 progressive reveal) on write-back. See spec docs/superpowers/specs/2026-04-28-production-line-glance-surface-wiring-design.md section "Filter strip semantics". Co-Authored-By: ruflo <ruv@ruv.net>
Enumerates hub-member investigations that are not yet mapped to canonical map nodes AND have not been dismissed. Drives the migration banner count. Also adds `migrationDeclinedAt?: string` to `ProcessHubInvestigationMetadata` in @variscout/core — the ISO 8601 timestamp persisted when an analyst dismisses the B0 migration banner for a specific investigation. See spec docs/superpowers/specs/2026-04-28-production-line-glance-surface-wiring-design.md section "B0 migration UX". Co-Authored-By: ruflo <ruv@ruv.net>
Pure presentational banner for the B0 migration flow. Surfaces unmapped investigations that won't appear in capability views until mapped. Primary action opens the mapping modal (consumer-owned state). See spec docs/superpowers/specs/2026-04-28-production-line-glance-surface-wiring-design.md section "B0 migration UX". Co-Authored-By: ruflo <ruv@ruv.net>
Accordion-style B0 mapping modal. Lists each unmapped investigation with its measurement column and suggested node mappings (highest-confidence preselected). Per-row Save / Skip / Decline. Pure presentational; the consumer owns persistence. See spec docs/superpowers/specs/2026-04-28-production-line-glance-surface-wiring-design.md section "B0 migration UX". Co-Authored-By: ruflo <ruv@ruv.net>
App-side selector: projects ProcessHubRollup into hub + members + rowsByInvestigation. Bridge between azure-app data layer (Dexie + Blob) and the data-derivation hooks in @variscout/hooks. V1 reads rows from ProcessHubInvestigation directly. Future iterations may wire useLiveQuery for streaming Dexie updates. See spec docs/superpowers/specs/2026-04-28-production-line-glance-surface-wiring-design.md section "Fetching boundary — apps". Co-Authored-By: ruflo <ruv@ruv.net>
Adds ProcessHubView with two tabs — Status (default, existing flat layout) and Capability (placeholder for the production-line-glance dashboard). Dashboard.tsx now mounts ProcessHubView in place of direct ProcessHubReviewPanel mounts. Capability tab content is a placeholder; T10 wires the real dashboard. See spec docs/superpowers/specs/2026-04-28-production-line-glance-surface-wiring-design.md section "Three surfaces / 2. Process Hub view (Capability tab)". Co-Authored-By: ruflo <ruv@ruv.net>
…bility tab Composes the full 2x2 dashboard with its filter strip, scoped to the hub's data via useHubProvision + useProductionLineGlanceData + useProductionLineGlanceFilter. URL-persisted filter state. Also adds ResizeObserver mock to ProcessHubView.test.tsx via a ProcessHubCapabilityTab vi.mock so the tab-switching tests don't hit @visx/responsive's withParentSize constructor — an expected consequence of T9 wiring the real capability tab component. Migration banner + modal wiring lands in T11 at hub-page level. See spec docs/superpowers/specs/2026-04-28-production-line-glance-surface-wiring-design.md section "Three surfaces / 2. Process Hub view (Capability tab)". Co-Authored-By: ruflo <ruv@ruv.net>
useHubMigrationState glues the @variscout/hooks B0 enumerator to the modal entries (with suggestNodeMappings suggestions) and to persistence callbacks for save / decline. ProcessHubView renders the banner above the tablist and the modal as overlay (gated by isOpen). Dashboard.tsx forwards a persistInvestigation callback that loads the full project via loadProject, merges nodeMappings / migrationDeclinedAt onto the project metadata, saves via saveProject, and refreshes the list. See spec docs/superpowers/specs/2026-04-28-production-line-glance-surface-wiring-design.md section "B0 migration UX". Co-Authored-By: ruflo <ruv@ruv.net>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Bundle five fixes per feedback_bundle_followups_pre_merge.md: Critical: - Empty cpkTrend/cpkGapTrend slot inputs in C1; computing them via calculateStats over per-node Cpks aggregated Cp/Cpk across heterogeneous local processes (Watson violation; feedback_aggregation_heterogeneous_specs.md). The dashboard renders empty slots gracefully; the temporal row populates in a future PR once the engine exposes a per-snapshot line-level Cp/Cpk source. The spatial row (CapabilityBoxplot + StepErrorPareto) is methodologically safe because each node's Cpk is its own distribution. Important: - Make ProcessHubView.persistInvestigation required (no NOOP fallback) per feedback_no_backcompat_clean_architecture.md. - Memoize modalEntries in useHubMigrationState; prevents the modal's useEffect from resetting the user's manual radio selection on unrelated parent re-renders. Minor: - Extract DEFAULT_CPK_TARGET constant (1.33) in useProductionLineGlanceData. - Drop "(100% match)" suffix from migration modal labels (engine returns binary matches; hardcoding 1.0 confidence was misleading UX). Co-Authored-By: ruflo <ruv@ruv.net>
jukka-matti
added a commit
that referenced
this pull request
May 4, 2026
…g) (#121) * docs: mark layered-process-view-v1 plan delivered V1 component, FrameView swaps (PWA + Azure), and doc updates (ADR-070, methodology.md, mental-model-hierarchy.md, llms.txt) all shipped via production-line-glance C2 (merged 2026-04-29). Plan frontmatter was never promoted; flipping deferred → delivered. Co-Authored-By: ruflo <ruv@ruv.net> * docs: consolidate product vision into one canonical spec Adds docs/superpowers/specs/2026-05-03-variscout-vision-design.md as the canonical product vision. Supersedes the 2026-04-27 operating-model and product-method-roadmap specs (moved to docs/archive/specs/ with status: superseded + forward pointer). methodology.md gets a forward-pointer banner and survives as longer-form companion. All inbound + outbound cross-refs updated; specs/index.md rows show status: Superseded. Vision thesis: "the map is the product" — Process Hub IS its logic map; one continuous canvas (DAG with branch + join + two-level nesting + context propagation) replaces the FRAME river-SIPOC + LayeredProcessView + LayeredProcessViewWithCapability stack; cards-with-mini-charts per step + drill-down panel + mode lenses replace the separate Analysis tab; "tributary" / "CTS" jargon retired. Engine and data model survive. 10 canvas commitments in spec section 3.3 are load-bearing. 11 open questions in section 8 carry brainstorm defaults that need explicit confirmation before implementation plans are written. Decision-log pinned under Replayed Decisions (2026-05-03). In-flight plan reconciliation (frontmatter status flips): - delivered: production-line-glance C1/C2/charts (PRs #105/#106/#107), actionable-current-process-state-panel (PR #98), phase-3 H1/H2 (PRs #100/#101/#102) - in-progress (corrected): coscout-intelligence-architecture, question-driven-eda-2-handoff, multi-level-scout-v1 - unchanged: phase-6-implementation-plan (deferred), investigation-wall (in-progress) Brainstorm transcript: ~/.claude/plans/i-would-like-to-composed-rose.md. Co-Authored-By: ruflo <ruv@ruv.net> * docs: lock vision §8 decisions; canvas replaces Frame+Analysis tabs Walk-through resolved 11 brainstorm-default markers in the 2026-05-03 vision spec §8, plus a new Q0 ("tab vs canvas scaffold") that emerged during journey mapping. Headlines: - Q0: Canvas eats Frame + Analysis tabs. Investigation / Improvement / Report keep their own surfaces. Wall is dual-home (destination + canvas overlay). JourneyPhase retires as a top-level nav primitive. - Q1: Drill-down is a modern floating overlay anchored to the clicked card with blurred-canvas backdrop (overrides spec's "side-panel slides from right" default — that conflicted with the locked C3 supersession of CoScout's right-rail claim). - Q5: No CoScout map drafting in V1; manual click/drag/connect canvas authoring is the path (overrides spec default). - Q7: Hard cutover, no migration window — no users yet to preserve. - Q8: PWA gets local Hub-of-one with IndexedDB persistence; Azure adds cloud sync + multi-Hub + cadence + CoScout + team features. - Q4 + Q11: Wall is dual-home; promoted hypotheses render as node markers, drafts as faint arrows. Vision spec: §3.4, §5.2, §5.3, §5.4, §5.6, §5.7, §6, §7, §8 rewritten in place; §8 replaced "open questions" with a "resolved decisions" table; frontmatter status promoted draft → accepted. ADR-070 (FRAME workspace): added 2026-05-03 supersession amendment explicitly retiring FRAME as a top-level route; lists what survives inside the Canvas vs what gets deleted in the same PR that ships it. Decision-log: appended 2026-05-03 entry summarizing all 12 decisions + pointer to the §8 walkthrough plan. Full rationale + spec/code follow-ups in ~/.claude/plans/lets-do-this-next-rustling-simon.md. Co-Authored-By: ruflo <ruv@ruv.net> * docs: §8 follow-ups — glossary, ADR amendments, roadmap re-tag Smaller doc follow-ups triggered by the 2026-05-03 vision §8 resolution (see commit f12e8b1 for the headline changes). - docs/glossary.md (Q10): canonicalized as the single home for VariScout terminology. New "Process methodology terms" section (step / sub-step / column / input / output / outcome / branch & join / Process Hub) and a "Retired terms" table (tributary → factor; CTS → outcome; FRAME workspace → Canvas; Analysis tab → Canvas + lenses; Layered Process View → Canvas with lenses; etc) with replacements + retirement reasons. - docs/01-vision/methodology.md (Q10): added forward pointer to glossary.md as the canonical terminology home; methodology stays as the longer narrative companion but stops re-defining terms. - ADR-068 (Q3): added 2026-05-03 amendment formalizing modes and levels as orthogonal axes. Modes = which lens; levels = which slice (canvas pan/zoom). Level inferred from canvas state, not a separate picker. Refines (does not replace) the 2026-04-28 level-aware coaching amendment. - ADR-059 (Q8): added 2026-05-03 amendment specifying PWA local Hub-of-one with IndexedDB persistence. Browser-tenant-only — Constitution P1 (browser-only processing) and P8 (no AI in free tier) preserved. Schema scope listed for the FRAME canvas detail spec to inherit. - product-method-roadmap-design.md (Q6): added explicit "this is sequencing, not destination" header. Status was already superseded; the new framing tells stakeholders to read the vision spec first and consult this doc only for delivery-order intent. docs:check green. No broken cross-refs, no orphans, frontmatter valid. Co-Authored-By: ruflo <ruv@ruv.net> * docs: add framing-layer design spec (Spec 1 of canvas-detail decomposition) First of five canvas-detail specs decomposed from the 2026-05-03 vision §8 walkthrough. Covers everything BEFORE canvas authoring proper — Hub creation, data ingestion, investigation entry, multi-source join, defect anchoring, Pareto integration, and the three composable canvas filter states. Two-layer model: - Hub-level (durable): process goal narrative + outcome measure(s) + specs + primary scope dimensions - Investigation-level (episodic): Issue → Question → CTP→CTQ Hypothesis → Evidence → Finding Mode B (first-time Hub creation): - Stage 1: free-text goal + scaffold chips (Purpose / Customer / What matters) - Stage 2: paste/upload (existing UX) - Stage 3: outcome confirmation with inline distribution + data quality + per-candidate inline specs (no σ-based suggestions — specs are customer-driven) + primary scope dimensions sub-step - Stage 5: investigation entry as floating modal with skip-path → observation-triggered EDA Mode A (reopening existing Hub): - A.1: reopen, no new data → straight to canvas - A.2-paste: match-summary card with timeline preview + 2-axis classifier (source × temporal); blocks on overlap and different-grain - A.2-evidence-source: background ingestion with "X new snapshots ↑" indicator (Azure only — PWA Hub-of-one has no cloud sync per Q8) Multi-source via shared keys: Hub spine = process line; multiple sources joined via lot_id / batch_id / part_id; per-source provenance; per-source independent timelines (V1). Defect data + Pareto: multi-anchor (per-step rejects + outcome); canvas-attached Pareto with two pickers (group-by × weighted-by); Y-axis adapts to active mode lens (count / cost / time / Cpk gap / %OOS / ...); Pareto-bar selection becomes canvas-wide scope filter with "Make this the investigation scope" promote-to-investigation. Three composable canvas filter states (time-window / scope / Pareto-grouped) compose declaratively without new aggregation primitives. ADR-073 holds: per-(node × context-tuple × scope) buckets stay heterogeneity-aware. Engine reuse: detectColumns() + inferMode() + validateData() + suggestNodeMappings + TimelineWindow + ParetoChart + StepErrorPareto + statusForCpk + investigation entities all already shipped. Almost no new infrastructure required. Spec is 638 lines, 16 sections including verification criteria. Indexed at docs/superpowers/specs/index.md. Inherits Q0 + Q1–Q11 anchors from §8 walkthrough at ~/.claude/plans/lets-do-this-next-rustling-simon.md. Sibling specs (deferred): Spec 2 manual canvas authoring, Spec 3 cards / drill-down / mode lenses, Spec 4 canvas overlays + Wall sync, Spec 5 IndexedDB persistence schema. Co-Authored-By: ruflo <ruv@ruv.net> * docs: revise Q8 — PWA persistence opt-in; .vrs files = shareable training scenarios Walking back the original Q8 wording ("PWA = local Hub-of-one with IndexedDB persistence" — auto-on) to Option 4 hybrid: session-only by default; opt-in via "Save to this browser" → IndexedDB-backed Hub-of-one; .vrs file export/import always available. Strategic reframe: PWA serves four personas (LSSGB students, demos, casual analysts, AND trainers authoring scenarios). Trainers package datasets + Hub state + sample investigations into a .vrs bundle and share via LMS / email; students import to start from a prepared training state. .vrs becomes the scenario-distribution format, positioning PWA as the methodology-teaching surface. Persistence is now explicit consent per persona — training students opt in once and auto-save; demo users skip; privacy-conscious users export to file; trainers export+share. Constitution P1 (browser-only processing) and P8 (no AI in free tier) preserved. Companies still use Azure tier for centralized + secure persistence per ADR-059. Updates: - vision spec §7 tier paragraph rewritten + §8 Q8 row updated - framing-layer spec §15 V1 scope adds opt-in Save-to-browser + .vrs export/import + IndexedDB-loaded-post-opt-in; §14 anchors table Q8 row revised - decision-log §1 entry added: "Q8 revised — PWA persistence opt-in" with strategic rationale (training scenarios; trainer persona; no surprise persistence on shared computers) - apps/pwa/CLAUDE.md hard rule updated from "no persistence" to "session-only by default; opt-in IndexedDB allowed; .vrs import/export for trainer-shared scenarios" docs:check green. Co-Authored-By: ruflo <ruv@ruv.net> * plan: Framing Layer V1 Slice 1 — Foundation (16 tasks, TDD bite-sized) First implementation plan from the framing-layer spec. Slice 1 scope (smallest end-to-end): - Mode B Stages 1–3 + canvas first paint (PWA + Azure) - Mode A.1 reopen (Azure always; PWA only if opted in) - PWA opt-in IndexedDB persistence (Q8-revised Option 4) - PWA .vrs file export/import (round-trip; trainer scenarios) - ProcessHub schema extension (processGoal, outcomes, primaryScopeDimensions) - Goal-context biased outcome detection - Multi-outcome validateData refactor - Inline per-candidate spec editor (no σ-based suggestions) - Characteristic-type-aware spec defaults - Primary scope dimensions auto-suggest + multi-select - Graceful degradation banner (no goal-keyword match) 16 tasks, TDD bite-sized (failing test → run + fail → implement → run + pass → commit). Task 0 locks 5 load-bearing decisions in a companion file. Subagent-driven default execution per feedback_subagent_driven_default; Sonnet workhorse. Out of scope (later slices): - Slice 2: Stage 5 modal + Mode A.2-paste + A.2-evidence-source - Slice 3: Multi-source via shared keys - Slice 4: Defect anchoring + Pareto on canvas Plan referenced from: - docs/decision-log.md §4 Session Backlog (queued row added) - docs/superpowers/specs/2026-05-03-framing-layer-design.md (Implementation plans section added — lists all 4 V1 slices) docs:check green; 471 docs frontmatter-valid. Co-Authored-By: ruflo <ruv@ruv.net> * plan: expand Tasks 6–15 to full TDD step-by-step Per writing-plans skill 'no placeholders' rule: each task in a plan must be self-contained because subagent-driven execution reads tasks out of order in fresh subagents per task. Original slice-1 plan had Tasks 1–5 fully step-by-step but Tasks 6–15 sketched ('follow the same TDD shape') — violated the rule. Expanded all 10 sketched tasks to the same TDD pattern as Tasks 1–5: failing test code → run + fail expected output → implementation code → run + pass expected output → commit message. Plan grew 1135 → 3272 lines. Tasks now self-contained: - 6: OutcomeCandidateRow (6 RTL tests) - 7: characteristicTypeDefaults (7 tests) - 8: suggestPrimaryDimensions + selector UI (9 tests) - 9: OutcomeNoMatchBanner (3 RTL tests) - 10: GoalBanner + OutcomePin (8 RTL tests) - 11: .vrs file format + export/import (5 tests) - 12: PWA Dexie hubRepository (7 tests) - 13: SaveToBrowserButton + VrsExport/Import (6 tests) - 14: PWA Mode B E2E + Mode A.1 RTL (3 tests) - 15: Azure HubCreationFlow + ProcessHubView GoalBanner (2 tests) Plan ready for superpowers:subagent-driven-development. docs:check green. Co-Authored-By: ruflo <ruv@ruv.net> * plan: lock 5 decisions for framing-layer V1 slice 1 D1: AnalysisBrief unchanged; new OutcomeSpec type D2: PWA persistence opt-in via 'Save to this browser' D3: validateData multi-outcome refactor D4: Goal-context biasing is deterministic keyword extraction D5: Mode A.1 reopen gated by IndexedDB opt-in flag (no PWA Hub list) * feat(core): add framing-layer fields to ProcessHub processGoal: string narrative (Hub-level durable) outcomes: OutcomeSpec[] (CTQs in plain language) primaryScopeDimensions: string[] (prominent picker dimensions) OutcomeSpec includes characteristicType (nominalIsBest / smallerIsBetter / largerIsBetter) — drives spec-input UI per framing-layer spec §5.3. Specs are customer-driven; no σ-based suggestions per Q8 / spec §3.3. * feat(core): extractHubName utility Extracts a short Hub name (≤50 chars, word-boundary truncated) from the first sentence of a goal narrative. Used by Stage 1 HubGoalForm to auto-populate the Hub name field on goal-narrative confirm. * fixup! feat(core): extractHubName utility Remove unnecessary .trimEnd() — plan's slice + lastIndexOf + final trim already handles the space-at-boundary case correctly without dropping an extra word. Co-Authored-By: ruflo <ruv@ruv.net> * feat(core): goal-context biasing in detectColumns Optional DetectColumnsOptions.goalContext threads the user's goal narrative through to outcome ranking. Tokenizes the narrative (lowercased, stopwords removed), computes per-column keyword overlap with the goal, adds a 0.5-weight bonus on top of existing scoring. Implements framing-layer spec §3.1: goal narrative biases deterministic detection at Stage 3. Deterministic — no AI (per Q5). Backward-compatible (option is optional). * feat(parser): refactor validateData to accept string[] outcomeColumns Signature changed from `(data, outcomeColumn: string | null)` to `(data, outcomeColumns: string[])`. A row is excluded when ANY listed outcome column is invalid. New `perOutcome: Record<string, PerOutcomeQuality>` field on DataQualityReport exposes per-column valid/invalid/missing counts. All six existing call sites updated; existing tests migrated to array API; no backward-compat overload (D3, feedback_no_backcompat_clean_architecture). Co-Authored-By: ruflo <ruv@ruv.net> * feat(ui): HubGoalForm component (framing layer Stage 1) Free-text textarea with three scaffold chips ('+ Purpose', '+ Customer', '+ What matters') that insert labeled prompt chunks into the narrative on click. Optional 'See examples' link surfaces three anonymized goal narratives. Skip-framing path supported. Implements framing-layer spec §5.1 — Option C 'free-text + scaffold chips' shape locked during brainstorm. * feat(ui): OutcomeCandidateRow with inline per-candidate specs Stage 3 horizontal candidate row layout: radio + name + sparkline + (when selected) inline spec inputs + quality stack + match confidence. LSL/USL placeholders say 'from customer spec' (no σ-based suggestions per Q8/Q2). LSL disabled for smallerIsBetter; USL disabled for largerIsBetter. Adds @variscout/core/processHub sub-path export so consumers can reach the new CharacteristicType / OutcomeSpec types without colliding with the unrelated CharacteristicType in core/types.ts. Implements framing-layer spec §5.3.1. Co-Authored-By: ruflo <ruv@ruv.net> * feat(core): characteristic-type-aware spec defaults inferOutcomeCharacteristicType: case-insensitive name-keyword detection (defect/reject/scrap/fail/error/fault → smallerIsBetter; yield/uptime/throughput/recovery/efficiency → largerIsBetter; default nominalIsBest). Renamed from the plan's inferCharacteristicType to avoid collision with the existing spec-limit-based inferCharacteristicType in core/types.ts. defaultSpecsFor: returns target=mean for nominalIsBest; target=0 for smallerIsBetter; no target for largerIsBetter. cpkTarget=1.33 (literature default) across the board. No LSL/USL suggestions — those are customer-driven (per Q8/Q2). 7 tests in packages/core/src/specs/__tests__/characteristicTypeDefaults.test.ts. Re-exported at root barrel as inferOutcomeCharacteristicType, defaultSpecsFor, DataStats. Co-Authored-By: ruflo <ruv@ruv.net> * feat: PrimaryScopeDimensions auto-suggest + selector UI suggestPrimaryDimensions filters columns by cardinality (3-50) + name keyword (id/lot/batch/product/customer/shift/operator/ machine/supplier/sku/plant/line/station). High-cardinality columns (>50 levels) flagged as 'join key, not Pareto candidate'. PrimaryScopeDimensionsSelector pre-checks suggested columns; user confirms or overrides; skippable. Implements framing- layer spec §3.4 and §5.3.2. Co-Authored-By: ruflo <ruv@ruv.net> * feat(ui): OutcomeNoMatchBanner graceful degradation Renders when max(candidate.matchScore) < 0.30 (cryptic columns or vague goal). Surfaces rename affordance, free-text 'I expected the outcome to be' note, and skip-outcome path. Hub records the user's pick for future detection (slice 1 stub; full learning loop in Spec 5). Implements framing-layer spec §5.3.3. * feat(ui): GoalBanner + OutcomePin canvas first-paint components GoalBanner renders Hub.processGoal at top of canvas; click-to-edit opens textarea with Save / Cancel; onChange callback to parent. Hides itself when goal is empty. OutcomePin shows Cpk badge when specs are set + n>=10; falls back to 'mean ± σ + n' + '+ Add specs' chip when specs absent; shows 'Trust pending' when specs set but n<10. Per Q2 fallback rule (framing-layer spec §5.2) and sample-size honesty (vision §2.3). * feat(core): .vrs file format + export/import (round-trip tested) VRS_VERSION='1.0'. VrsFile shape: version, exportedAt, hub, optional rawData, optional metadata (exportSource pwa|azure + appVersion). vrsExport(hub, rawData?, metadata?) → JSON string (pretty, indent 2). vrsImport(json) → VrsFile with version validation + clear error messages on mismatch. Hub-only export supported (rawData optional, useful for canvas-without-data sharing). Round-trip preserves Hub + rawData via JSON serialization. .vrs files double as shareable training scenarios per Q8-revised. Co-Authored-By: ruflo <ruv@ruv.net> * feat(pwa): Dexie hubRepository for opt-in Hub-of-one persistence New PwaDatabase (Dexie v1) with two tables: hubs (single-row Hub-of-one constraint) + meta (opt-in flag). hubRepository API: getOptInFlag / setOptInFlag (auto-clears Hub on false) / saveHub (overwrites single row) / loadHub (returns null if absent) / clearHub. Per Q8-revised: Dexie loaded only after explicit opt-in via 'Save to this browser' affordance (Task 13). Default behavior unchanged from today (session-only). dexie + fake-indexeddb added as dependencies. Co-Authored-By: ruflo <ruv@ruv.net> * feat(pwa): Save-to-browser opt-in + .vrs export/import buttons SaveToBrowserButton: shows 'Save to this browser' when not opted in; clicking opts in + persists Hub. Once opted in, auto-saves on Hub change. Button switches to 'Saved · Forget' — click + confirm clears persistence (calls setOptInFlag(false) which auto-clears Hub). VrsExportButton: serializes current Hub + data via vrsExport, downloads as <hub-name>.vrs (sanitized). VrsImportButton: file picker; reads file → vrsImport → emits onImport({ hub, rawData }) for parent to consume. Per Q8-revised hybrid persistence (Option 4). * feat(pwa): Mode A.1 reopen wiring + SessionProvider scaffold SessionProvider holds current Hub + rawData in React Context (in-memory; persistence via opt-in hubRepository). App.tsx: on mount, getOptInFlag → if true, loadHub() and seed sessionHub. GoalBanner renders above main content when sessionHub.processGoal is set, so a Mode A.1 reopen surfaces the saved Hub goal immediately. RTL test verifies both branches: opt-in false → HomeScreen; opt-in true + saved Hub → canvas with goal banner restored from IndexedDB. Mode B end-to-end (paste → goal → mapping → canvas first paint with OutcomePin per outcome) requires the ColumnMapping refactor that is out of scope for slice 1; the Playwright spec is checked in as .skip to be re-enabled when Stage 1/3 routing lands inside App.tsx. * feat(pwa): inject HubGoalForm Stage 1 into Mode B paste flow After paste analyze, before ColumnMapping, render HubGoalForm so the user states the process goal. On confirm, store narrative in sessionStore. On skip, sentinel '' marks the Stage 1 step done without a narrative. ColumnMapping now waits for goalNarrative !== null. ColumnMapping internals unchanged — Stage 3 refactor (using OutcomeCandidateRow / PrimaryScopeDimensionsSelector / OutcomeNoMatchBanner) ships in slice 2. Hub.processGoal is set at ColumnMapping confirm if narrative was provided; outcomes[] and primaryScopeDimensions are left for slice 2 (TODO marker in handleMappingConfirmWithGoal). Co-Authored-By: ruflo <ruv@ruv.net> * feat(azure): mount GoalBanner above Hub tabs + Dexie v7 no-op ProcessHubView renders <GoalBanner goal={hub.processGoal}> above the existing tab container — Mode A.1 reopen surfaces the saved process goal immediately on Hub load (Azure tier persists Hub-level state via Dexie always; no opt-in needed). Dexie schema bumped 6 -> 7 as a no-op version; the new ProcessHub fields (processGoal, outcomes, primaryScopeDimensions) added in Task 1 are optional TypeScript additions that Dexie stores without schema migration. (Plan said v4 -> v5; the actual Azure schema was already at v6, so the bump lands at v7.) GoalBanner is mounted read-only for slice 1 because ProcessHubView does not currently receive a Hub-update callback in its props; wiring onChange is deferred to slice 2 alongside HubCreationFlow. HubCreationFlow component (Stage 1 -> Stage 2 -> Stage 3 -> built Hub) and the Dashboard "+ New Hub" button are deferred to slice 2 — the plan's Stage3Mapping implementation is sketch-only and the full ColumnMapping refactor required to wire OutcomeCandidateRow / PrimaryScopeDimensionsSelector / OutcomeNoMatchBanner is out of scope for slice 1 (mirrors the slice-1 PWA Task 14 follow-up). Co-Authored-By: ruflo <ruv@ruv.net> * docs: framing-layer spec status draft -> active Spec is the active working design. Slice 1 implements its foundation; Stage 3 ColumnMapping refactor + multi-source + defect anchoring continue across slices 2-4. Decision-log session-backlog row already reflects in-flight status (commit d49cbfe). * docs: update slice-1 row with delivery state + slice-2 deferrals Slice 1 row → in-flight with the foundation enumeration and explicit slice-2 deferrals (Stage 3 ColumnMapping refactor, canvas first-paint OutcomePin, button mounting in PWA UI, Azure HubCreationFlow, Mode B E2E). Per final-reviewer finding (Important #2): Save-to-browser + .vrs Export/Import buttons are tested + scaffolded but currently unmounted — slice 2 will surface them in the PWA chrome. --------- Co-authored-by: ruflo <ruv@ruv.net>
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.
Summary
First of three sub-plans for the production-line-glance surface-wiring design (
docs/superpowers/specs/2026-04-28-production-line-glance-surface-wiring-design.md). Lands the shared data layer and the first user-visible surface.@variscout/core/stats:distinctContextValues,rollupStepErrors.@variscout/hooks:useProductionLineGlanceData,useProductionLineGlanceFilter(URL-persisted),useB0InvestigationsInHub.@variscout/ui:ProductionLineGlanceMigrationBanner,ProductionLineGlanceMigrationModal.C2 (LayeredProcessView Operations band with progressive reveal) and C3 (FRAME workspace right-hand drawer) follow as separate PRs.
Test plan
pnpm --filter @variscout/core test— 2916/2916 pass (was 2903; +13 acrossdistinctContextValues+rollupStepErrors)pnpm --filter @variscout/hooks test— 1002/1002 pass (was 992; +10 across the three new hooks)pnpm --filter @variscout/ui test— 1266/1266 pass (was 1256; +10 across the banner + modal)pnpm --filter @variscout/azure-app test— 970/970 pass (was 955; +15 acrossuseHubProvision,ProcessHubView,ProcessHubCapabilityTab,useHubMigrationState)pnpm test— 9/9 turbo tasks greenbash scripts/pr-ready-check.sh— greenpnpm build— 4/5 succeed;@variscout/docsbuild fails on a pre-existing main-branch frontmatter issue (not introduced by this PR; same as Plan B PR feat: production-line-glance charts (Plan B) #105)feedback_verify_before_push.md, requiresclaude --chrometo:Notable mid-stream adaptations
T3 useProductionLineGlanceData:targetCpkpopulated fromspecs.target(sinceSpecLimitshas notargetCpkfield). The chart will draw target ticks at process-target Y-coords, not Cpk-target. Chrome walk will likely surface this as a visual issue worth a follow-up commit (default to undefined / 1.33 industry standard instead).T11 useHubMigrationState:suggestNodeMappingsreal signature is(canonicalMap, datasetColumns) → { nodeId, measurementColumn }[]; the modal entries hydratelabelfrom canonical-map node names and useconfidence: 1.0(the engine heuristic is binary).T11 persistInvestigation: wired through Dashboard's existingloadProject/saveProjectpath (same pattern ashandleSaveNote).Out of scope (deferred)
Spec
docs/superpowers/specs/2026-04-28-production-line-glance-surface-wiring-design.md— sections "Data layer", "Three surfaces / 2. Process Hub view (Capability tab)", "B0 migration UX".🤖 Generated with ruflo