Skip to content

feat(projects): PR-PT-5 Sustainment + Handoff stages — Plan 1 complete#176

Merged
jukka-matti merged 6 commits into
mainfrom
projects-tab-pt5
May 14, 2026
Merged

feat(projects): PR-PT-5 Sustainment + Handoff stages — Plan 1 complete#176
jukka-matti merged 6 commits into
mainfrom
projects-tab-pt5

Conversation

@jukka-matti
Copy link
Copy Markdown
Owner

Summary

Plan 1 PR-PT-5 of 5 — Sustainment + Handoff stages of the IP detail page per spec §3.3 + §3.4. Closes Plan 1 (Projects tab + IP detail foundation).

Built in @variscout/ui:

  • SustainmentOverview — sustained-vs-drifted banner + cadence tick pills (Wk 1 ✓ · Wk 2 ✓ …) + per-cause in-control rows + "→ Start Handoff" CTA (disabled when consecutiveOnTargetTicks < 4 or status === 'drifted')
  • SustainmentSections — V1 shim linking to legacy Sustainment activeView panel
  • HandoffOverview — operationalization checklist (control plan / training / cadence / owner ack) + "Nudge" CTA when ack pending + Report jump-out + PDF export slot
  • HandoffSections — V1 shim linking to legacy Handoff activeView panel
  • IPDetailPage extended: all 4 stages (Charter / Approach / Sustainment / Handoff) × 2 modes (Overview / Sections) wired; "Start Handoff" uses internal setActiveStage('handoff'); placeholder fallbacks for un-linked Sustainment/Handoff records

Wired in apps:

  • PWA + Azure ProjectsTabView accepts sustainmentRecord, controlHandoff, handoffInputs, onOpenLegacySustainment, onOpenLegacyHandoff, onNudgeProcessOwner props
  • PWA App.tsx + Azure Editor.tsx source records from sessionHub.sustainmentRecords / .controlHandoffs (filtered by improvementProjectId + deletedAt === null)
  • Legacy panel handoff: panels.showSustainment(investigationId) / panels.showHandoff(investigationId) opens the existing V1 forms
  • "Nudge" hook stub logs to console; Plan 3 (team workspace) will emit EngagementEvent webhook

ControlHandoff type discovery (informed V1 mapping):

  • Actual fields: status: 'pending' | 'acknowledged' | 'operational', referenceUri?, signoff? — no controlPlanText or trainingRef directly
  • V1 maps trainingDelivered from signoff?.approvedBy, processOwnerAcknowledged from status !== 'pending'; controlPlanDocumented set to false placeholder (Plan 4 will hook in the real control plan reference)

Test plan

  • pnpm --filter @variscout/ui test — IPDetail 10 files, 38 tests green
  • pnpm --filter @variscout/pwa test — 344 passed, 1 skipped
  • pnpm --filter @variscout/azure-app test — 1307 passed (9 pre-existing IndexedDB rejections unrelated)
  • pnpm --filter @variscout/pwa tsc --noEmit — clean
  • pnpm --filter @variscout/azure-app tsc --noEmit — clean
  • Manual chrome walk — pending; see verification matrix below

Plan 1 verification matrix

Verification Status
Tab nav reads [Home] [Process] [Analyze] [Investigation] [Improve] [Projects] [Report] in PWA + Azure ✅ shipped in PR #172
0-IP hub shows empty-state CTA ✅ shipped in PR #172
Hub with N IPs shows list of cards ✅ shipped in PR #172
Click IP card → IPDetailPage with stage tabs + Overview/Sections toggle + team rail skeleton ✅ shipped in PR #173
Stage tabs show ✓ done / current (indigo underline) / ○ not-started / ⏸ locked per deriveStageState ✅ shipped in PR #173
Charter Overview renders KPI strip + jump-outs; Charter Sections wraps existing form ✅ shipped in PR #174
Approach Overview renders per-SuspectedCause cards; "Open in Improve workbench" jumps to Improve tab ✅ shipped in PR #175
Sustainment Overview renders cadence ticks; "Start Handoff" disables until 4 on-target ticks ✅ this PR
Handoff Overview renders operationalization checklist; "Nudge" triggers handler ✅ this PR
ImprovementProject.reflection? field type-checks + round-trips through .vrs ✅ shipped in PR #172
All new tests pass; existing suite green
bash scripts/pr-ready-check.sh — non-flake steps green

Spec coverage (Plan 1 complete)

  • ✅ D1 7-tab nav
  • ✅ D2 Tab names (Improve verb + Projects noun)
  • ✅ D3 Legacy Improve unchanged
  • ✅ D6 IP detail page anatomy
  • ✅ D7 Stage tabs map to lifecycle
  • ✅ D8 Overview/Sections mode-shaped
  • ✅ D9 SuspectedCause-anchored Approach
  • ✅ D10 Cross-tab wiring (Approach → Improve workbench)
  • ✅ D14 reflection field

Deferred to Plans 2-4 (per the parent spec):

  • D4/D5 Home active-IP launchpad + IP-context cascade — Plan 2
  • D11 V1 team workspace right rail (full impl) — Plan 3
  • D12/D13 Report tab Overview/Technical with QC-Story arc — Plan 4

jukka-matti and others added 6 commits May 15, 2026 01:33
4 vitest cases: tick count, enabled/disabled handoff threshold, click handler.
Threshold is 4 consecutive on-target ticks; drifted status also disables CTA.

Co-Authored-By: ruflo <ruv@ruv.net>
Renders record title + explanatory note; links out to legacy Sustainment
panel via onOpenLegacy callback. Inline form embedding deferred to follow-up plan.

Co-Authored-By: ruflo <ruv@ruv.net>
PR-PT-5.6: source SustainmentRecord + ControlHandoff from activeHub blob,
derive HandoffChecklistInputs, and forward all 6 new props through
ProjectsTabView → IPDetailPage in both PWA and Azure. Export
HandoffChecklistInputs from @variscout/ui/ipDetail barrel.

Co-Authored-By: ruflo <ruv@ruv.net>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mean-beoynd-lite-pwa Building Building Preview, Comment May 14, 2026 10:50pm
variscout_website Building Building Preview, Comment May 14, 2026 10:50pm

@jukka-matti jukka-matti merged commit 9a01f90 into main May 14, 2026
1 of 3 checks passed
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.

1 participant