refactor(ui): move ProcessHubCurrentStatePanel to @variscout/ui#97
Merged
Conversation
Lift the Azure-only ProcessHubCurrentStatePanel into @variscout/ui so Phase 2 snapshot-mode work in LayeredProcessView can compose with it from a shared home. Component is fully props-based — takes CurrentProcessState in, renders JSX out — no Azure-specific deps (Blob Storage, EasyAuth, app stores). The two formatter dependencies (formatMetric, formatChangeSignals) that previously lived in Azure's ProcessHubFormat helper are inlined here using the canonical formatStatistic + formatPlural from @variscout/core/i18n. Adds 8 unit tests covering: heading + severity badge, lens count cards, empty state, +N indicator at >6 items, Cpk-vs-target detail, change-signal pluralization, detail fallback, response-path label. PWA does not get this panel — Process Hub is an Azure-only feature (multi-investigation aggregation requiring persistence per ADR-072); PWA is session-only by ADR-012. Confirmed during planning. Phase 2 PR #2 of N. Co-Authored-By: ruflo <ruv@ruv.net>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
ProcessHubCurrentStatePanelfromapps/azure/src/components/intopackages/ui/src/components/ProcessHubCurrentStatePanel/so Phase 2's snapshot-mode work inLayeredProcessViewcan compose with it from a shared home.state: CurrentProcessStatein, JSX out. Zero Azure-specific dependencies (no Blob Storage, no EasyAuth, no app stores).ProcessHubFormat(formatMetric,formatChangeSignals) are inlined, calling the canonicalformatStatistic+formatPluralfrom@variscout/core/i18n.Why
PR #95 (V1) shipped
ProcessHubCurrentStatePanelin the Azure app only. Phase 2 PR #3 adds snapshot-mode rendering toLayeredProcessView(which lives in@variscout/ui); to keep the panel and the snapshot-mode bands sharing types and helpers cleanly, the panel needs to live in the same package.PWA does not receive this panel. Process Hub is an Azure-only product surface — it's a multi-investigation aggregation feature requiring persistence (ADR-072), and PWA is session-only by ADR-012. The "PWA parity" question was confirmed during planning: the panel moves for code-sharing hygiene only, not for PWA wiring.
Plan reference:
~/.claude/plans/lets-create-a-plan-proud-island.md(PR #2 section).Changes
packages/ui/src/components/ProcessHubCurrentStatePanel/ProcessHubCurrentStatePanel.tsx(new): the moved panel with inlined formatters.packages/ui/src/components/ProcessHubCurrentStatePanel/index.ts(new): barrel + type export.packages/ui/src/components/ProcessHubCurrentStatePanel/__tests__/ProcessHubCurrentStatePanel.test.tsx(new): 8 tests.packages/ui/src/index.ts: exportProcessHubCurrentStatePanel+ProcessHubCurrentStatePanelPropsnext toLayeredProcessView.apps/azure/src/components/ProcessHubReviewPanel.tsx: import from@variscout/ui, drop the local default-import.apps/azure/src/components/ProcessHubCurrentStatePanel.tsx: deleted.Verification
pnpm --filter @variscout/ui exec vitest run src/components/ProcessHubCurrentStatePanel— 8/8 pass.pnpm --filter @variscout/ui build— clean tsc + vite build (no cross-package type gaps).pnpm --filter @variscout/azure-app exec vitest run— 64 files / 924 tests pass (Azure consumer untouched in behavior).bash scripts/pr-ready-check.sh— all checks green.Test plan
Out of scope
LENS_LABELS,RESPONSE_LABELS,SEVERITY_LABELS, "Current Process State", placeholder copy). Existing Azure behavior preserved verbatim; i18n catalog work is a separate concern (ADR-025).🤖 Generated with Claude Code