feat(P7): IHF Phase 7 complete — advanced observability and operational integration
T01 schema: friction_scores, bottleneck_records, hub_health_snapshots,
cross_hub_propagations + migration 1743552000.
T02 Widget Pain Heatmap: computeFrictionScore (formula documented), RecomputeFriction
action, colour-coded grid view (green/yellow/amber/red).
T03 Workflow Bottleneck Analysis: detectBottlenecks across 4 pipeline stages
(candidate 30d, requirement 60d, decision 30d, observation 14d), idempotent,
severity from age ratio, resolve action.
T04 Hub Health Correlation: computeHubHealth (deduction table documented),
append-only HubHealthSnapshot, health history view, badge on hub Show page.
T05 Cross-Hub Propagation: annotation_cluster + widget_type_friction heuristics,
idempotent detection, acknowledge/resolve lifecycle.
T06 Operational Review Board: 4-panel AutoRefresh global dashboard — health matrix,
top-10 friction, bottleneck stage counts, open propagations.
T07 gate: 5 describe blocks in Test/Integration.hs; SCOPE.md updated Phase 7
complete; docs/phase7-summary.md written.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 21:49:22 +00:00
|
|
|
|
module Web.View.Hubs.OperationalReviewBoard where
|
|
|
|
|
|
|
|
|
|
|
|
import Web.Types
|
|
|
|
|
|
import Generated.Types
|
|
|
|
|
|
import IHP.Prelude
|
|
|
|
|
|
import IHP.ViewPrelude
|
2026-04-04 09:55:12 +00:00
|
|
|
|
import Web.Routes ()
|
feat(P7): IHF Phase 7 complete — advanced observability and operational integration
T01 schema: friction_scores, bottleneck_records, hub_health_snapshots,
cross_hub_propagations + migration 1743552000.
T02 Widget Pain Heatmap: computeFrictionScore (formula documented), RecomputeFriction
action, colour-coded grid view (green/yellow/amber/red).
T03 Workflow Bottleneck Analysis: detectBottlenecks across 4 pipeline stages
(candidate 30d, requirement 60d, decision 30d, observation 14d), idempotent,
severity from age ratio, resolve action.
T04 Hub Health Correlation: computeHubHealth (deduction table documented),
append-only HubHealthSnapshot, health history view, badge on hub Show page.
T05 Cross-Hub Propagation: annotation_cluster + widget_type_friction heuristics,
idempotent detection, acknowledge/resolve lifecycle.
T06 Operational Review Board: 4-panel AutoRefresh global dashboard — health matrix,
top-10 friction, bottleneck stage counts, open propagations.
T07 gate: 5 describe blocks in Test/Integration.hs; SCOPE.md updated Phase 7
complete; docs/phase7-summary.md written.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 21:49:22 +00:00
|
|
|
|
import Application.Helper.HubHealth (healthScoreBadge)
|
|
|
|
|
|
import Application.Helper.FrictionScore (scoreBand)
|
|
|
|
|
|
import Web.View.Hubs.BottleneckDashboard (severityBadge)
|
|
|
|
|
|
|
|
|
|
|
|
data OperationalReviewBoardView = OperationalReviewBoardView
|
|
|
|
|
|
{ hubs :: ![Hub]
|
|
|
|
|
|
, allSnapshots :: ![HubHealthSnapshot]
|
|
|
|
|
|
, topFrictionScores :: ![FrictionScore]
|
|
|
|
|
|
, topWidgets :: ![Widget]
|
|
|
|
|
|
, bottlenecks :: ![BottleneckRecord]
|
|
|
|
|
|
, openPropagations :: ![CrossHubPropagation]
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
instance View OperationalReviewBoardView where
|
|
|
|
|
|
html OperationalReviewBoardView { .. } = [hsx|
|
|
|
|
|
|
<div class="flex items-center justify-between mb-6">
|
|
|
|
|
|
<h1 class="text-2xl font-semibold">Operational Review Board</h1>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Panel 1: Hub health matrix -->
|
|
|
|
|
|
<div class="bg-white rounded-lg border border-gray-200 p-5 mb-4">
|
|
|
|
|
|
<h2 class="text-sm font-semibold text-gray-700 mb-3">Hub Health Matrix</h2>
|
2026-04-04 09:55:12 +00:00
|
|
|
|
{renderHubHealthTable hubs}
|
feat(P7): IHF Phase 7 complete — advanced observability and operational integration
T01 schema: friction_scores, bottleneck_records, hub_health_snapshots,
cross_hub_propagations + migration 1743552000.
T02 Widget Pain Heatmap: computeFrictionScore (formula documented), RecomputeFriction
action, colour-coded grid view (green/yellow/amber/red).
T03 Workflow Bottleneck Analysis: detectBottlenecks across 4 pipeline stages
(candidate 30d, requirement 60d, decision 30d, observation 14d), idempotent,
severity from age ratio, resolve action.
T04 Hub Health Correlation: computeHubHealth (deduction table documented),
append-only HubHealthSnapshot, health history view, badge on hub Show page.
T05 Cross-Hub Propagation: annotation_cluster + widget_type_friction heuristics,
idempotent detection, acknowledge/resolve lifecycle.
T06 Operational Review Board: 4-panel AutoRefresh global dashboard — health matrix,
top-10 friction, bottleneck stage counts, open propagations.
T07 gate: 5 describe blocks in Test/Integration.hs; SCOPE.md updated Phase 7
complete; docs/phase7-summary.md written.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 21:49:22 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Panel 2: Top friction widgets -->
|
|
|
|
|
|
<div class="bg-white rounded-lg border border-gray-200 p-5 mb-4">
|
|
|
|
|
|
<h2 class="text-sm font-semibold text-gray-700 mb-3">Top Friction Widgets</h2>
|
2026-04-04 09:55:12 +00:00
|
|
|
|
{renderFrictionTable topFrictionScores topWidgets}
|
feat(P7): IHF Phase 7 complete — advanced observability and operational integration
T01 schema: friction_scores, bottleneck_records, hub_health_snapshots,
cross_hub_propagations + migration 1743552000.
T02 Widget Pain Heatmap: computeFrictionScore (formula documented), RecomputeFriction
action, colour-coded grid view (green/yellow/amber/red).
T03 Workflow Bottleneck Analysis: detectBottlenecks across 4 pipeline stages
(candidate 30d, requirement 60d, decision 30d, observation 14d), idempotent,
severity from age ratio, resolve action.
T04 Hub Health Correlation: computeHubHealth (deduction table documented),
append-only HubHealthSnapshot, health history view, badge on hub Show page.
T05 Cross-Hub Propagation: annotation_cluster + widget_type_friction heuristics,
idempotent detection, acknowledge/resolve lifecycle.
T06 Operational Review Board: 4-panel AutoRefresh global dashboard — health matrix,
top-10 friction, bottleneck stage counts, open propagations.
T07 gate: 5 describe blocks in Test/Integration.hs; SCOPE.md updated Phase 7
complete; docs/phase7-summary.md written.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 21:49:22 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Panel 3: Active bottlenecks by stage -->
|
|
|
|
|
|
<div class="bg-white rounded-lg border border-gray-200 p-5 mb-4">
|
|
|
|
|
|
<h2 class="text-sm font-semibold text-gray-700 mb-3">Active Bottlenecks by Stage</h2>
|
2026-04-04 09:55:12 +00:00
|
|
|
|
{renderBottlenecksPanel bottlenecks}
|
feat(P7): IHF Phase 7 complete — advanced observability and operational integration
T01 schema: friction_scores, bottleneck_records, hub_health_snapshots,
cross_hub_propagations + migration 1743552000.
T02 Widget Pain Heatmap: computeFrictionScore (formula documented), RecomputeFriction
action, colour-coded grid view (green/yellow/amber/red).
T03 Workflow Bottleneck Analysis: detectBottlenecks across 4 pipeline stages
(candidate 30d, requirement 60d, decision 30d, observation 14d), idempotent,
severity from age ratio, resolve action.
T04 Hub Health Correlation: computeHubHealth (deduction table documented),
append-only HubHealthSnapshot, health history view, badge on hub Show page.
T05 Cross-Hub Propagation: annotation_cluster + widget_type_friction heuristics,
idempotent detection, acknowledge/resolve lifecycle.
T06 Operational Review Board: 4-panel AutoRefresh global dashboard — health matrix,
top-10 friction, bottleneck stage counts, open propagations.
T07 gate: 5 describe blocks in Test/Integration.hs; SCOPE.md updated Phase 7
complete; docs/phase7-summary.md written.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 21:49:22 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Panel 4: Open cross-hub propagations -->
|
|
|
|
|
|
<div class="bg-white rounded-lg border border-gray-200 p-5">
|
|
|
|
|
|
<h2 class="text-sm font-semibold text-gray-700 mb-3">Open Cross-Hub Propagations</h2>
|
2026-04-04 09:55:12 +00:00
|
|
|
|
{renderPropagationsPanel openPropagations}
|
feat(P7): IHF Phase 7 complete — advanced observability and operational integration
T01 schema: friction_scores, bottleneck_records, hub_health_snapshots,
cross_hub_propagations + migration 1743552000.
T02 Widget Pain Heatmap: computeFrictionScore (formula documented), RecomputeFriction
action, colour-coded grid view (green/yellow/amber/red).
T03 Workflow Bottleneck Analysis: detectBottlenecks across 4 pipeline stages
(candidate 30d, requirement 60d, decision 30d, observation 14d), idempotent,
severity from age ratio, resolve action.
T04 Hub Health Correlation: computeHubHealth (deduction table documented),
append-only HubHealthSnapshot, health history view, badge on hub Show page.
T05 Cross-Hub Propagation: annotation_cluster + widget_type_friction heuristics,
idempotent detection, acknowledge/resolve lifecycle.
T06 Operational Review Board: 4-panel AutoRefresh global dashboard — health matrix,
top-10 friction, bottleneck stage counts, open propagations.
T07 gate: 5 describe blocks in Test/Integration.hs; SCOPE.md updated Phase 7
complete; docs/phase7-summary.md written.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 21:49:22 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
|]
|
|
|
|
|
|
where
|
|
|
|
|
|
stages = ["candidate", "requirement", "decision", "observation"] :: [Text]
|
|
|
|
|
|
stageLabel s = case s of
|
|
|
|
|
|
"candidate" -> "Candidate"
|
|
|
|
|
|
"requirement" -> "Requirement"
|
|
|
|
|
|
"decision" -> "Decision"
|
|
|
|
|
|
"observation" -> "Observation"
|
|
|
|
|
|
_ -> s
|
|
|
|
|
|
|
|
|
|
|
|
latestSnapshotFor hub =
|
|
|
|
|
|
find (\s -> s.hubId == hub.id) allSnapshots
|
|
|
|
|
|
|
|
|
|
|
|
renderHubRow :: Hub -> Html
|
|
|
|
|
|
renderHubRow h =
|
|
|
|
|
|
let mSnap = latestSnapshotFor h
|
|
|
|
|
|
in [hsx|
|
|
|
|
|
|
<tr class="hover:bg-gray-50">
|
|
|
|
|
|
<td class="px-3 py-2">
|
2026-04-04 09:55:12 +00:00
|
|
|
|
<a href={ShowHubAction (h.id)}
|
feat(P7): IHF Phase 7 complete — advanced observability and operational integration
T01 schema: friction_scores, bottleneck_records, hub_health_snapshots,
cross_hub_propagations + migration 1743552000.
T02 Widget Pain Heatmap: computeFrictionScore (formula documented), RecomputeFriction
action, colour-coded grid view (green/yellow/amber/red).
T03 Workflow Bottleneck Analysis: detectBottlenecks across 4 pipeline stages
(candidate 30d, requirement 60d, decision 30d, observation 14d), idempotent,
severity from age ratio, resolve action.
T04 Hub Health Correlation: computeHubHealth (deduction table documented),
append-only HubHealthSnapshot, health history view, badge on hub Show page.
T05 Cross-Hub Propagation: annotation_cluster + widget_type_friction heuristics,
idempotent detection, acknowledge/resolve lifecycle.
T06 Operational Review Board: 4-panel AutoRefresh global dashboard — health matrix,
top-10 friction, bottleneck stage counts, open propagations.
T07 gate: 5 describe blocks in Test/Integration.hs; SCOPE.md updated Phase 7
complete; docs/phase7-summary.md written.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 21:49:22 +00:00
|
|
|
|
class="text-indigo-600 hover:underline">{h.name}</a>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="px-3 py-2">
|
2026-04-04 09:55:12 +00:00
|
|
|
|
{renderHealthScore mSnap}
|
feat(P7): IHF Phase 7 complete — advanced observability and operational integration
T01 schema: friction_scores, bottleneck_records, hub_health_snapshots,
cross_hub_propagations + migration 1743552000.
T02 Widget Pain Heatmap: computeFrictionScore (formula documented), RecomputeFriction
action, colour-coded grid view (green/yellow/amber/red).
T03 Workflow Bottleneck Analysis: detectBottlenecks across 4 pipeline stages
(candidate 30d, requirement 60d, decision 30d, observation 14d), idempotent,
severity from age ratio, resolve action.
T04 Hub Health Correlation: computeHubHealth (deduction table documented),
append-only HubHealthSnapshot, health history view, badge on hub Show page.
T05 Cross-Hub Propagation: annotation_cluster + widget_type_friction heuristics,
idempotent detection, acknowledge/resolve lifecycle.
T06 Operational Review Board: 4-panel AutoRefresh global dashboard — health matrix,
top-10 friction, bottleneck stage counts, open propagations.
T07 gate: 5 describe blocks in Test/Integration.hs; SCOPE.md updated Phase 7
complete; docs/phase7-summary.md written.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 21:49:22 +00:00
|
|
|
|
</td>
|
|
|
|
|
|
<td class="px-3 py-2 text-xs text-gray-400">
|
|
|
|
|
|
{maybe "never" (\s -> show s.computedAt) mSnap}
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="px-3 py-2 text-right">
|
2026-04-04 09:55:12 +00:00
|
|
|
|
<a href={HubHealthHistoryAction (h.id)}
|
feat(P7): IHF Phase 7 complete — advanced observability and operational integration
T01 schema: friction_scores, bottleneck_records, hub_health_snapshots,
cross_hub_propagations + migration 1743552000.
T02 Widget Pain Heatmap: computeFrictionScore (formula documented), RecomputeFriction
action, colour-coded grid view (green/yellow/amber/red).
T03 Workflow Bottleneck Analysis: detectBottlenecks across 4 pipeline stages
(candidate 30d, requirement 60d, decision 30d, observation 14d), idempotent,
severity from age ratio, resolve action.
T04 Hub Health Correlation: computeHubHealth (deduction table documented),
append-only HubHealthSnapshot, health history view, badge on hub Show page.
T05 Cross-Hub Propagation: annotation_cluster + widget_type_friction heuristics,
idempotent detection, acknowledge/resolve lifecycle.
T06 Operational Review Board: 4-panel AutoRefresh global dashboard — health matrix,
top-10 friction, bottleneck stage counts, open propagations.
T07 gate: 5 describe blocks in Test/Integration.hs; SCOPE.md updated Phase 7
complete; docs/phase7-summary.md written.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 21:49:22 +00:00
|
|
|
|
class="text-xs text-indigo-600 hover:underline">History</a>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|]
|
|
|
|
|
|
|
|
|
|
|
|
renderFrictionRow :: (FrictionScore, Widget) -> Html
|
|
|
|
|
|
renderFrictionRow (fs, w) = [hsx|
|
|
|
|
|
|
<tr class="hover:bg-gray-50">
|
|
|
|
|
|
<td class="px-3 py-2">
|
2026-04-04 09:55:12 +00:00
|
|
|
|
<a href={ShowWidgetAction (w.id)}
|
feat(P7): IHF Phase 7 complete — advanced observability and operational integration
T01 schema: friction_scores, bottleneck_records, hub_health_snapshots,
cross_hub_propagations + migration 1743552000.
T02 Widget Pain Heatmap: computeFrictionScore (formula documented), RecomputeFriction
action, colour-coded grid view (green/yellow/amber/red).
T03 Workflow Bottleneck Analysis: detectBottlenecks across 4 pipeline stages
(candidate 30d, requirement 60d, decision 30d, observation 14d), idempotent,
severity from age ratio, resolve action.
T04 Hub Health Correlation: computeHubHealth (deduction table documented),
append-only HubHealthSnapshot, health history view, badge on hub Show page.
T05 Cross-Hub Propagation: annotation_cluster + widget_type_friction heuristics,
idempotent detection, acknowledge/resolve lifecycle.
T06 Operational Review Board: 4-panel AutoRefresh global dashboard — health matrix,
top-10 friction, bottleneck stage counts, open propagations.
T07 gate: 5 describe blocks in Test/Integration.hs; SCOPE.md updated Phase 7
complete; docs/phase7-summary.md written.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 21:49:22 +00:00
|
|
|
|
class="text-indigo-600 hover:underline">{w.name}</a>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="px-3 py-2">
|
|
|
|
|
|
<span class={"px-2 py-0.5 rounded text-xs font-semibold " <> scoreBand fs.score}>
|
|
|
|
|
|
{show fs.score}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="px-3 py-2 text-gray-500 text-xs">{w.widgetType}</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|]
|
|
|
|
|
|
|
|
|
|
|
|
renderBottleneckStage :: Text -> Html
|
|
|
|
|
|
renderBottleneckStage stage =
|
|
|
|
|
|
let stageBNs = filter (\b -> b.stage == stage) bottlenecks
|
|
|
|
|
|
cnt = length stageBNs
|
|
|
|
|
|
hasCrit = any (\b -> b.severity == "critical") stageBNs
|
2026-04-12 13:11:32 +00:00
|
|
|
|
colourCls = (if cnt == 0 then "bg-gray-50 text-gray-400"
|
|
|
|
|
|
else if hasCrit then "bg-red-50 text-red-700"
|
|
|
|
|
|
else "bg-orange-50 text-orange-700") :: Text
|
feat(P7): IHF Phase 7 complete — advanced observability and operational integration
T01 schema: friction_scores, bottleneck_records, hub_health_snapshots,
cross_hub_propagations + migration 1743552000.
T02 Widget Pain Heatmap: computeFrictionScore (formula documented), RecomputeFriction
action, colour-coded grid view (green/yellow/amber/red).
T03 Workflow Bottleneck Analysis: detectBottlenecks across 4 pipeline stages
(candidate 30d, requirement 60d, decision 30d, observation 14d), idempotent,
severity from age ratio, resolve action.
T04 Hub Health Correlation: computeHubHealth (deduction table documented),
append-only HubHealthSnapshot, health history view, badge on hub Show page.
T05 Cross-Hub Propagation: annotation_cluster + widget_type_friction heuristics,
idempotent detection, acknowledge/resolve lifecycle.
T06 Operational Review Board: 4-panel AutoRefresh global dashboard — health matrix,
top-10 friction, bottleneck stage counts, open propagations.
T07 gate: 5 describe blocks in Test/Integration.hs; SCOPE.md updated Phase 7
complete; docs/phase7-summary.md written.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 21:49:22 +00:00
|
|
|
|
in [hsx|
|
|
|
|
|
|
<div class={"rounded-lg p-4 text-center " <> colourCls}>
|
|
|
|
|
|
<div class="text-2xl font-bold">{show cnt}</div>
|
|
|
|
|
|
<div class="text-xs mt-1">{stageLabel stage}</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|]
|
|
|
|
|
|
|
|
|
|
|
|
renderPropagationRow :: CrossHubPropagation -> Html
|
|
|
|
|
|
renderPropagationRow p = [hsx|
|
|
|
|
|
|
<div class="flex items-start justify-between p-3 bg-gray-50 rounded border border-gray-200">
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<span class="text-xs bg-purple-100 text-purple-700 px-1.5 py-0.5 rounded mr-2">{p.patternType}</span>
|
|
|
|
|
|
<span class="text-sm text-gray-700">{p.summary}</span>
|
|
|
|
|
|
<p class="text-xs text-gray-400 mt-0.5">{show p.detectedAt}</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="flex gap-2 ml-4">
|
2026-04-04 09:55:12 +00:00
|
|
|
|
<a href={AcknowledgePropagationAction (p.id)}
|
feat(P7): IHF Phase 7 complete — advanced observability and operational integration
T01 schema: friction_scores, bottleneck_records, hub_health_snapshots,
cross_hub_propagations + migration 1743552000.
T02 Widget Pain Heatmap: computeFrictionScore (formula documented), RecomputeFriction
action, colour-coded grid view (green/yellow/amber/red).
T03 Workflow Bottleneck Analysis: detectBottlenecks across 4 pipeline stages
(candidate 30d, requirement 60d, decision 30d, observation 14d), idempotent,
severity from age ratio, resolve action.
T04 Hub Health Correlation: computeHubHealth (deduction table documented),
append-only HubHealthSnapshot, health history view, badge on hub Show page.
T05 Cross-Hub Propagation: annotation_cluster + widget_type_friction heuristics,
idempotent detection, acknowledge/resolve lifecycle.
T06 Operational Review Board: 4-panel AutoRefresh global dashboard — health matrix,
top-10 friction, bottleneck stage counts, open propagations.
T07 gate: 5 describe blocks in Test/Integration.hs; SCOPE.md updated Phase 7
complete; docs/phase7-summary.md written.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 21:49:22 +00:00
|
|
|
|
class="text-xs text-yellow-600 hover:underline whitespace-nowrap">Acknowledge</a>
|
2026-04-04 09:55:12 +00:00
|
|
|
|
<a href={ResolvePropagationAction (p.id)}
|
feat(P7): IHF Phase 7 complete — advanced observability and operational integration
T01 schema: friction_scores, bottleneck_records, hub_health_snapshots,
cross_hub_propagations + migration 1743552000.
T02 Widget Pain Heatmap: computeFrictionScore (formula documented), RecomputeFriction
action, colour-coded grid view (green/yellow/amber/red).
T03 Workflow Bottleneck Analysis: detectBottlenecks across 4 pipeline stages
(candidate 30d, requirement 60d, decision 30d, observation 14d), idempotent,
severity from age ratio, resolve action.
T04 Hub Health Correlation: computeHubHealth (deduction table documented),
append-only HubHealthSnapshot, health history view, badge on hub Show page.
T05 Cross-Hub Propagation: annotation_cluster + widget_type_friction heuristics,
idempotent detection, acknowledge/resolve lifecycle.
T06 Operational Review Board: 4-panel AutoRefresh global dashboard — health matrix,
top-10 friction, bottleneck stage counts, open propagations.
T07 gate: 5 describe blocks in Test/Integration.hs; SCOPE.md updated Phase 7
complete; docs/phase7-summary.md written.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 21:49:22 +00:00
|
|
|
|
class="text-xs text-green-600 hover:underline">Resolve</a>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|]
|
2026-04-04 09:55:12 +00:00
|
|
|
|
|
|
|
|
|
|
renderHubHealthTable :: [Hub] -> Html
|
|
|
|
|
|
renderHubHealthTable [] = [hsx|<p class="text-sm text-gray-400">No hubs registered.</p>|]
|
|
|
|
|
|
renderHubHealthTable hs = [hsx|
|
|
|
|
|
|
<table class="w-full text-sm">
|
|
|
|
|
|
<thead class="bg-gray-50">
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<th class="text-left px-3 py-2 font-medium text-gray-600">Hub</th>
|
|
|
|
|
|
<th class="text-left px-3 py-2 font-medium text-gray-600">Health</th>
|
|
|
|
|
|
<th class="text-left px-3 py-2 font-medium text-gray-600">Snapshot</th>
|
|
|
|
|
|
<th class="px-3 py-2"></th>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</thead>
|
|
|
|
|
|
<tbody class="divide-y divide-gray-100">
|
|
|
|
|
|
{forEach hs renderHubRow}
|
|
|
|
|
|
</tbody>
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|]
|
|
|
|
|
|
|
|
|
|
|
|
renderFrictionTable :: [FrictionScore] -> [Widget] -> Html
|
|
|
|
|
|
renderFrictionTable [] _ = [hsx|<p class="text-sm text-gray-400">No friction scores computed yet.</p>|]
|
|
|
|
|
|
renderFrictionTable scores ws = [hsx|
|
|
|
|
|
|
<table class="w-full text-sm">
|
|
|
|
|
|
<thead class="bg-gray-50">
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<th class="text-left px-3 py-2 font-medium text-gray-600">Widget</th>
|
|
|
|
|
|
<th class="text-left px-3 py-2 font-medium text-gray-600">Score</th>
|
|
|
|
|
|
<th class="text-left px-3 py-2 font-medium text-gray-600">Type</th>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</thead>
|
|
|
|
|
|
<tbody class="divide-y divide-gray-100">
|
|
|
|
|
|
{forEach (zip scores ws) renderFrictionRow}
|
|
|
|
|
|
</tbody>
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|]
|
|
|
|
|
|
|
|
|
|
|
|
renderBottlenecksPanel :: [BottleneckRecord] -> Html
|
|
|
|
|
|
renderBottlenecksPanel [] = [hsx|<p class="text-sm text-gray-400">No active bottlenecks.</p>|]
|
|
|
|
|
|
renderBottlenecksPanel _ = [hsx|
|
|
|
|
|
|
<div class="grid grid-cols-4 gap-3">
|
|
|
|
|
|
{forEach stages renderBottleneckStage}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|]
|
|
|
|
|
|
|
|
|
|
|
|
renderPropagationsPanel :: [CrossHubPropagation] -> Html
|
|
|
|
|
|
renderPropagationsPanel [] = [hsx|<p class="text-sm text-gray-400">No open propagation events.</p>|]
|
|
|
|
|
|
renderPropagationsPanel ps = [hsx|
|
|
|
|
|
|
<div class="space-y-2">
|
|
|
|
|
|
{forEach ps renderPropagationRow}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|]
|
|
|
|
|
|
|
|
|
|
|
|
renderHealthScore :: Maybe HubHealthSnapshot -> Html
|
|
|
|
|
|
renderHealthScore Nothing = [hsx|<span class="text-xs text-gray-400">–</span>|]
|
|
|
|
|
|
renderHealthScore (Just s) = [hsx|
|
|
|
|
|
|
<span class={"px-2 py-0.5 rounded text-xs font-semibold " <> healthScoreBadge s.healthScore}>
|
|
|
|
|
|
{show s.healthScore}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|]
|