Skip to content

feat: add health score coverage report scaffold - #2164

Merged
gaspergrom merged 3 commits into
release/IN-1276-health-score-coveragefrom
feat/IN-1285
Sep 9, 2026
Merged

feat: add health score coverage report scaffold#2164
gaspergrom merged 3 commits into
release/IN-1276-health-score-coveragefrom
feat/IN-1285

Conversation

@gaspergrom

@gaspergrom gaspergrom commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Scaffolds the new /report/health-score-coverage page (IN-1276 epic): header, freshness/version badges, 5-value KPI row, and two empty section headers for later widget tickets. Mirrors the report/agentic-ai-momentum page/module/service/API-route/types structure.

Also fixes a client-side hydration bug in the shared vue-query.ts plugin surfaced while building this page: TanStack Query's default retryOnMount: true was silently re-fetching (and discarding) any SSR-hydrated error-status query the instant a component subscribed on mount, so a genuine server-side fetch failure rendered as a permanent loading skeleton instead of the intended empty state. Fixed with retryOnMount: false on the client query defaults, plus isError empty-state branches added to this page's KPI row and to the three organization/overview components already using the same query pattern.

Base branch is release/IN-1276-health-score-coverage (IN-1276 epic release branch), not main. Merge into the release branch once approved; do not merge into main directly.

Tinybird pipe health_score_report_kpis must be live in production before this PR is QA'd or merged. (Already deployed — see linuxfoundation/crowd.dev#4578.)

No footer/nav link — this report is unannounced.

Test plan

  • Lint, tsc-check, vitest all green
  • Page renders at /report/health-score-coverage with header, badges, and KPI values matching a direct Tinybird query
  • Skeleton renders while loading; empty state (not crash) renders on a failing API call, including after client-side hydration
  • SEO meta set via useSeoMeta
  • Checked at 375px mobile viewport
  • Vitest unit test for the data mapper (server/data/tinybird/report/health-score-coverage.ts)
  • Independent browser verification + fresh spec-audit re-run of the hydration fix (isolated dev-server repro with invalid Tinybird token)
  • release/IN-1276-health-score-coverage - ⚠️ No PR associated with branch
    • feat: add health score coverage report scaffold 👈

Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
Client QueryClient defaults lacked retryOnMount:false, so TanStack
Query's default retryOnMount:true immediately re-fetched (and
discarded) any hydrated error-status query the instant a component
subscribed to it on mount, flipping the UI back to its loading
skeleton. Adds isError empty-state branches to the affected
organization-overview components and the health-score-coverage KPI
row/config scaffold that surfaced the bug.

Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
Copilot AI balanced review requested due to automatic review settings September 8, 2026 18:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the Health Score Coverage report scaffold and improves error-state handling for SSR-hydrated queries.

Changes:

  • Adds the report page, KPI API/data layer, configuration, caching, and public access.
  • Adds loading and error states for report and organization widgets.
  • Changes global TanStack Query SSR dehydration and retry behavior.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
frontend/types/report/health-score-coverage.types.ts Defines KPI data types.
frontend/setup/caching.ts Adds report caching rules.
frontend/server/middleware/jwt-auth.ts Makes the report API public.
frontend/server/data/tinybird/report/health-score-coverage.ts Maps Tinybird KPI data.
frontend/server/data/tinybird/report/health-score-coverage.test.ts Tests KPI mapping and empty results.
frontend/server/api/report/health-score-coverage/glance.get.ts Exposes the KPI endpoint.
frontend/app/plugins/vue-query.ts Changes SSR query dehydration and retries.
frontend/app/pages/report/health-score-coverage.vue Registers the report page and SEO metadata.
frontend/app/components/shared/types/tanstack.ts Adds the report query key.
frontend/app/components/modules/report/health-score-coverage/views/health-score-coverage-report.vue Builds the report layout.
frontend/app/components/modules/report/health-score-coverage/services/health-score-coverage.api.service.ts Adds KPI query service.
frontend/app/components/modules/report/health-score-coverage/config/signals.ts Defines health-score signals.
frontend/app/components/modules/report/health-score-coverage/config/lifecycle.ts Defines lifecycle labels.
frontend/app/components/modules/report/health-score-coverage/config/bands.ts Defines score bands.
frontend/app/components/modules/report/health-score-coverage/components/kpi-row.vue Renders KPI loading/error states.
frontend/app/components/modules/organization/components/overview/kpi-row.vue Adds KPI error handling.
frontend/app/components/modules/organization/components/overview/contributors-chart.vue Adds contributor error handling.
frontend/app/components/modules/organization/components/overview/activity-chart.vue Adds activity error handling.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

// silently re-fetches any error query with no data the instant a component
// subscribes to it on mount, discarding the hydrated error and flipping the
// UI back to its loading skeleton.
retryOnMount: false,
Comment on lines +63 to +67
await Promise.race([
Promise.allSettled(
queryClient
.getQueryCache()
.getAll()
@gaspergrom
gaspergrom merged commit e9bbb56 into release/IN-1276-health-score-coverage Sep 9, 2026
6 checks passed
@gaspergrom
gaspergrom deleted the feat/IN-1285 branch September 9, 2026 08:22
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.

3 participants