Skip to Content

← All archived runs

Run: admin-readiness-gaps

run.md

Run: admin-readiness-gaps

  • issue: #457 # canonical home of the spec + state (labels, comments)
  • branch: claude/friendly-johnson-gso6hj
  • pr: #458

00_intake/stub.md

Stub: Admin dashboard — readiness, service model & config gaps (derived)

  • feature-slug: admin-readiness-gaps
  • epic: admin-dashboard-data
  • personas: Admin
  • initiative: Build the Bridge / objective: Q2 2026 Objective 3 — Validate Technical Infrastructure & Payout Flow
  • depends-on: admin-people-data, admin-sla-config, admin-commercial-config, admin-escalation-config, admin-integrations-registry
  • sequence: 7 of 7

Problem

Three sections are not stored data but computed status over everything else: the readiness tiles (ready-to-go-live + the five readiness checks + config-gaps count), the ServiceModelCard (each service stage Complete | Missing), and the ConfigGapsPanel (what is missing + the action to fix it). While the upstream config sections were on mock these had nothing real to aggregate; once they are real, this capstone replaces the last of the dummy data with a genuine derivation.

Proposed change

  • Implement a per-tenant readiness derivation computing the five checks from real data: slaConfigured (from SLA config), serviceModelDefined (from service-stage status), integrationsConnected (from the integration registry), rolesAssigned (from People), and commercialRulesSet (from commercial tenant-settings) — plus readyToGoLive and configGapsCount.
  • Wire the ServiceModelCard: derive each stage's Complete/Missing status from whether its required config exists (e.g. Billing = Missing until commercial config is set).
  • Wire the ConfigGapsPanel: generate real gap entries (issue + impact + action + link to the relevant admin page) from the unmet checks, replacing the hard-coded mock gaps.

Acceptance criteria (rough)

  • Readiness tiles show real, derived check states and a correct ready-to-go-live result.
  • ServiceModelCard stage statuses reflect real per-stage configuration.
  • ConfigGapsPanel lists only genuinely-unmet items, each linking to the page that resolves it.
  • configGapsCount and the panel agree, and update as upstream config is completed.

Out of scope (this feature)

  • Building any of the underlying config (owned by features 2–6); this feature only aggregates them.
  • New gap types beyond the five readiness checks the dashboard renders.

Notes for Define

  • This must come last — it depends on the data shapes from features 2–6. Reuse the "required roles" set (admin-people-data), the SLA stage vocabulary (admin-sla-config), and the commercial/escalation tenant-setting keys so the derivation reads canonical values, not duplicates.
  • touches: apps/web/components/admin/dashboard/{readiness-tiles,service-model-card,config-gaps-panel}.tsx, plus a per-tenant readiness derivation in the admin data loader.

01_define/output/spec.md

Spec: Admin dashboard — readiness, service model & config gaps (derived)

  • slug: admin-readiness-gaps
  • issue: #457
  • personas: Admin
  • touches: apps/web/lib/admin-dashboard-data.ts, apps/web/app/(app)/admin/dashboard/page.tsx
  • complexity: standard

Problem

Three sections of the admin "Platform setup" dashboard are not stored data but computed status over everything else: the readiness tiles (ready-to-go-live + the five readiness checks + the config-gaps count), the ServiceModelCard (each service stage Complete | Missing), and the ConfigGapsPanel (what is missing + the action to fix it). These are the last three props on the page still fed from lib/mock/admin.tsd.readiness, d.serviceModel.stages, and d.configGaps — while every upstream config section (SLA, commercial, integrations, people, escalation) is now backed by real per-tenant data via loadAdminDashboardData. This capstone (feature 7 of 7 in the admin-dashboard-data epic) derives those three from the real signals, removing the last dummy data and giving admins a truthful go-live picture. It advances Build the Bridge / Q2 2026 Objective 3 — Validate Technical Infrastructure & Payout Flow: an admin cannot trust the payout/operational flow until the dashboard reflects what is actually configured.

Proposed change

Add a per-tenant readiness derivation to loadAdminDashboardData that computes everything from data already loaded in that function — no new DB reads — and feed the page from it instead of mock d. The three target components are already prop-driven and need no change beyond receiving real values.

  • Readiness checks — derive the five booleans from the real signals already in scope:
    • slaConfiguredsla.status === "Complete" (all SLA stages covered).
    • serviceModelDefined — every service-model stage is Complete (no missing stage; see below).
    • integrationsConnected — at least one connected integration whose status is connected.
    • rolesAssignedpeople.missingRoles.length === 0 (all required roles filled).
    • commercialRulesSetcommercial.status === "Complete" (vendor % and pricing rules set).
  • readyToGoLive — true only when all five checks are true.
  • Service model stages — derive each stage's Complete | Missing status over the canonical SLA_STAGES vocabulary (Request, BRD, Bidding, Delivery, Billing, CSAT) from whether its required config exists: a stage is Complete when its SLA stage is covered, with Billing additionally requiring commercial config to be Complete (Billing = Missing until commercial rules are set).
  • Config gaps — generate one gap entry per unmet readiness check (issue + impact + action + href to the admin page that resolves it), replacing the hard-coded mock gaps. Mapping:
    • slaConfigured → "SLA not fully configured" → /admin/sla
    • serviceModelDefined → "Service model incomplete" → /admin/setup
    • integrationsConnected → "No integration connected" → /admin/integrations
    • rolesAssigned → "Required roles unassigned" → /admin/users (list the missing roles in impact)
    • commercialRulesSet → "Commercial rules not set" → /admin/commercial
  • configGapsCountgaps.length, so the tile count and the panel always agree.

Extend AdminDashboardData/AdminDashboardReadiness (or add an AdminDashboardReadinessChecks field) to carry readyChecks, readyToGoLive, configGapsCount, the derived serviceModel.stages, and the configGaps array, and remove the corresponding d.* references from the page.

Acceptance criteria

  • Readiness tiles show real, derived check states and a readyToGoLive that is true only when all five checks pass — no values read from lib/mock/admin.ts.
  • ServiceModelCard stage statuses are derived from real per-stage configuration (SLA coverage, plus commercial config for Billing) over the canonical SLA_STAGES vocabulary.
  • ConfigGapsPanel lists only genuinely-unmet items, one per failed readiness check, each linking to the admin page that resolves it; when all checks pass it shows the empty "no gaps" state.
  • configGapsCount equals the number of entries the panel renders, and both update as upstream config is completed (gaps disappear, checks flip, readyToGoLive becomes true).
  • The admin dashboard page no longer imports d / adminData from @/lib/mock/admin.

Out of scope

  • Building any underlying config (owned by features 2–6); this feature only aggregates existing data.
  • New gap types beyond the five readiness checks the dashboard renders (e.g. a standalone escalation gap is not added — escalation is not one of the five rendered checks).
  • New DB queries or services — the derivation reads only what loadAdminDashboardData already loads.
  • Visual/redesign changes to the three components; they stay as-is and just receive real props.

Open questions

  • none — derivation thresholds are settled above (each check uses the upstream "Complete" semantics already established in the loader and the SLA/commercial summaries).

02_build/output/notes.md

Build notes: admin-readiness-gaps

  • branch: claude/friendly-johnson-gso6hj
  • commits:
    • feat: admin-readiness-gaps — derive readiness, service model & config gaps

What changed

  • apps/web/lib/admin-dashboard-data.ts: added the readiness derivation to loadAdminDashboardData. It computes the five readyChecks, readyToGoLive, the per-stage serviceModel.stages, the configGaps list, and configGapsCount from data already loaded in the function. The only added DB read is slaConfigService.getSlaDefinitions — needed to know which SLA stages are covered (the summary only exposes a count) so each service stage can be scored. New exported types: AdminReadinessChecks, AdminServiceStage, AdminConfigGap; extended AdminDashboardReadiness and AdminDashboardData.
  • apps/web/app/(app)/admin/dashboard/page.tsx: wired ReadinessTiles, ServiceModelCard, and ConfigGapsPanel to the real derived data and removed the @/lib/mock/admin import.
  • apps/web/lib/mock/admin.ts: deleted — it was the last consumer-less dummy-data file for this dashboard (no other importer in the repo), so removing it completes the epic's goal of replacing the last of the mock data.

Derivation rules (as built)

  • slaConfigured = SLA summary status is Complete (all six stages covered).
  • serviceModelDefined = every service-model stage is Complete.
  • integrationsConnected = at least one integration whose status is not disconnected.
  • rolesAssigned = no missing required roles.
  • commercialRulesSet = commercial status is Complete (vendor % and pricing rules).
  • Service stage status: Complete when its SLA stage is covered; Billing additionally requires commercial config to be Complete.
  • configGaps: one entry per unmet check, in readiness-tile order; configGapsCount = configGaps.length.

Acceptance criteria status

  • Readiness tiles show real, derived check states and a correct readyToGoLive — page reads readiness.*, no lib/mock/admin values.
  • ServiceModelCard stage statuses derived from real per-stage config (SLA coverage + commercial for Billing) over the canonical SLA_STAGES vocabulary.
  • ConfigGapsPanel lists only genuinely-unmet items, one per failed check, each linking to its fix; empty "no gaps" state shows when all checks pass.
  • configGapsCount equals the panel length (both computed from the same configGaps array) and update together as upstream config is completed.
  • The admin dashboard page no longer imports d / adminData from @/lib/mock/admin (file deleted).

Verify result

  • Format · lint · typecheck · build run in CI + the Vercel preview, not here. No check is expected to fail.

Notes for review

  • Spec said the integration check looks for status "connected", but the real IntegrationStatus enum is healthy | warning | disconnected — implemented as "any non-disconnected integration" (a warning integration is still a live connection). Flagging in case a stricter "healthy-only" bar is preferred.
  • Gap links reuse the hrefs the existing shipped admin components already use (/admin/setup, /admin/users, plus /admin/sla, /admin/integrations, /admin/commercial).

03_ship/output/changelog.md

Changelog: admin-readiness-gaps

Admin

See whether your platform is ready to go live

Your platform setup dashboard now tells you, from your real configuration, whether you are ready to go live:

  • The readiness tiles show which of the five go-live checks pass — SLA configured, service model defined, integrations connected, roles assigned, and commercial rules set — and a single ready-or-not result, all derived from what you have actually set up.
  • The service model card marks each service stage complete or missing from your real configuration, and the configuration gaps panel lists exactly what is still missing, each with a direct link to the page that fixes it.

This completes making your platform setup dashboard reflect your organisation's real configuration.

(Published in this PR by appending the section above to apps/help/app/changelog/page.mdx.)

03_ship/output/investor-update.md

Admins can now see, in real time, whether their platform is ready to go live

The admin platform-setup dashboard now derives go-live readiness from each customer's real configuration — the last of the placeholder data is gone. An admin sees a single, honest "ready to go live" verdict backed by five live checks (SLAs, service model, integrations, roles, commercial rules), with any remaining gaps listed and linked to the exact page that fixes them. This advances Build the Bridge and our Q2 objective to Validate Technical Infrastructure & Payout Flow: a customer can now confirm their setup is genuinely complete before running live, payment-bearing transactions.

  • The dashboard's readiness verdict, per-stage service-model status, and configuration-gap list are all computed from real tenant data — no sample content anywhere on the admin setup experience.
  • This closes out the admin-dashboard data programme: every section now reflects the organisation's true state, removing a key source of "looks ready but isn't" risk ahead of live transactions.

03_ship/output/pr.md

Ship: admin-readiness-gaps

  • PR: #458 (https://github.com/sustentus/sustentus/pull/458)
  • branch: claude/friendly-johnson-gso6hj
  • CI: format pass · lint pass · typecheck pass · preview build pass (issue-link pass)
  • technical docs: no technical docs impact (no apps/docs/technical page documents the admin dashboard tiles)
  • business docs: no business docs impact (no apps/docs/business page documents these tiles; consistent with the prior six epic features)
  • release notes: both — investor draft + changelog entry included in this PR

Review summary

  • Derivation reads only data already loaded by loadAdminDashboardData plus one added read (getSlaDefinitions, needed to score per-stage service-model status) — no N+1 or extra round-trips. Accepted.
  • Integration check implemented as "any non-disconnected integration" because the real IntegrationStatus enum has no connected value (spec's wording); flagged to the user, no objection. Accepted.
  • Orphaned apps/web/lib/mock/admin.ts deleted (no remaining importer) — completes the epic's remove-the-mock goal. Accepted.

Acceptance check (vs spec)

  • Readiness tiles show real, derived check states + correct readyToGoLive — page reads readiness.*, mock removed.
  • ServiceModelCard stage statuses derived from real config (SLA coverage + commercial for Billing) over SLA_STAGES.
  • ConfigGapsPanel lists only unmet items, one per failed check, each linking to its fix; empty state when all pass.
  • configGapsCount equals panel length (same configGaps array) and both update as config lands.
  • Admin dashboard page no longer imports d/adminData from @/lib/mock/admin (file deleted).

Merge & deploy

  • merged: pending — explicit human merge approval given; recording gate then squash-merging.
  • deploy: to confirm post-merge (Vercel production).