From 86505483bf3dec735963c41e0ad7bed7fe7a80fb Mon Sep 17 00:00:00 2001 From: ahmido Date: Mon, 27 Apr 2026 08:30:01 +0000 Subject: [PATCH] feat(customer-health): add decision card to tenant/workspace detail (spec 245) (#283) Add Customer Health decision card to tenant & workspace detail pages (spec 245). What I changed: - Render a decision-first Customer Health card on tenant and workspace detail pages. - Reuse `WorkspaceHealthSummaryQuery` and preserve `window` query param. - Update attention widget link text to "Review health details" and include `?window=`. - Add/adjust tests to cover new behavior and explainability. - Run Pint formatting. Compare URL: https://git.cloudarix.de/ahmido/TenantAtlas/compare/dev...245-customer-health-score Co-authored-by: Ahmed Darrazi Reviewed-on: https://git.cloudarix.de/ahmido/TenantAtlas/pulls/283 --- .specify/memory/constitution.md | 220 ++++- .specify/templates/checklist-template.md | 8 + .specify/templates/plan-template.md | 15 + .specify/templates/spec-template.md | 20 + .specify/templates/tasks-template.md | 18 + .../app/Filament/System/Pages/Dashboard.php | 8 + .../BuildsCustomerHealthDecisionData.php | 144 ++++ .../System/Pages/Directory/ViewTenant.php | 27 + .../System/Pages/Directory/ViewWorkspace.php | 27 + .../System/Widgets/CustomerHealthKpis.php | 46 ++ .../Widgets/CustomerHealthTopWorkspaces.php | 137 ++++ .../CustomerHealthDimensionCatalog.php | 112 +++ .../WorkspaceHealthSummaryQuery.php | 766 ++++++++++++++++++ .../customer-health-decision-card.blade.php | 59 ++ .../pages/directory/view-tenant.blade.php | 11 +- .../pages/directory/view-workspace.blade.php | 5 + .../customer-health-top-workspaces.blade.php | 53 ++ .../CustomerHealthAuthorizationTest.php | 171 ++++ .../CustomerHealthDashboardWidgetsTest.php | 186 +++++ .../CustomerHealthDetailDecisionTest.php | 158 ++++ .../CustomerHealthExplainabilityTest.php | 177 ++++ .../Spec114/ControlTowerDashboardTest.php | 20 +- .../SystemDirectoryResidualSurfaceTest.php | 3 +- .../CustomerHealthDimensionCatalogTest.php | 46 ++ .../WorkspaceHealthSummaryQueryTest.php | 414 ++++++++++ docs/product/spec-candidates.md | 200 ++++- docs/product/standards/README.md | 4 +- .../checklists/requirements.md | 46 ++ specs/245-customer-health-score/plan.md | 227 ++++++ specs/245-customer-health-score/spec.md | 339 ++++++++ specs/245-customer-health-score/tasks.md | 151 ++++ 31 files changed, 3772 insertions(+), 46 deletions(-) create mode 100644 apps/platform/app/Filament/System/Pages/Directory/Concerns/BuildsCustomerHealthDecisionData.php create mode 100644 apps/platform/app/Filament/System/Widgets/CustomerHealthKpis.php create mode 100644 apps/platform/app/Filament/System/Widgets/CustomerHealthTopWorkspaces.php create mode 100644 apps/platform/app/Support/CustomerHealth/CustomerHealthDimensionCatalog.php create mode 100644 apps/platform/app/Support/CustomerHealth/WorkspaceHealthSummaryQuery.php create mode 100644 apps/platform/resources/views/filament/system/pages/directory/partials/customer-health-decision-card.blade.php create mode 100644 apps/platform/resources/views/filament/system/widgets/customer-health-top-workspaces.blade.php create mode 100644 apps/platform/tests/Feature/System/CustomerHealth/CustomerHealthAuthorizationTest.php create mode 100644 apps/platform/tests/Feature/System/CustomerHealth/CustomerHealthDashboardWidgetsTest.php create mode 100644 apps/platform/tests/Feature/System/CustomerHealth/CustomerHealthDetailDecisionTest.php create mode 100644 apps/platform/tests/Feature/System/CustomerHealth/CustomerHealthExplainabilityTest.php create mode 100644 apps/platform/tests/Unit/Support/CustomerHealth/CustomerHealthDimensionCatalogTest.php create mode 100644 apps/platform/tests/Unit/Support/CustomerHealth/WorkspaceHealthSummaryQueryTest.php create mode 100644 specs/245-customer-health-score/checklists/requirements.md create mode 100644 specs/245-customer-health-score/plan.md create mode 100644 specs/245-customer-health-score/spec.md create mode 100644 specs/245-customer-health-score/tasks.md diff --git a/.specify/memory/constitution.md b/.specify/memory/constitution.md index d584fe80..ed48625f 100644 --- a/.specify/memory/constitution.md +++ b/.specify/memory/constitution.md @@ -1,30 +1,34 @@