feat: add standalone health score bands widget - #2165
Merged
Merged
Conversation
Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a standalone health-score band distribution widget ahead of its later report integration.
Changes:
- Adds grouped full/partial score visualization with scope filtering.
- Adds TanStack Query, API proxy, Tinybird mapping, types, and tests.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Review |
|---|---|
frontend/types/report/health-score-coverage-bands.types.ts |
Defines standalone widget types. No issues identified. |
frontend/server/data/tinybird/report/health-score-coverage-bands.ts |
Fetches and maps Tinybird band data. No issues identified. |
frontend/server/data/tinybird/report/health-score-coverage-bands.test.ts |
Tests mapping and fetching behavior. No issues identified. |
frontend/server/api/report/health-score-coverage/bands.get.ts |
Validates scope and proxies Tinybird data. No issues identified. |
frontend/app/components/modules/report/health-score-coverage/services/band-distribution.query.ts |
Adds the scoped TanStack query. No issues identified. |
frontend/app/components/modules/report/health-score-coverage/components/band-distribution.vue |
Moderate (2 votes): Reserve space for the bottom legend. Nit (1 vote): Render the project-count description only when query data exists. Moderate (1 vote): Make chart data accessible to screen-reader and keyboard-only users. Moderate (1 vote): Use a partial-score color meeting the 3:1 graphical-object contrast requirement. |
Suppressed comments (1)
frontend/app/components/modules/report/health-score-coverage/components/band-distribution.vue:28
- The description is rendered before the query settles, so the loading skeleton (and a failed request) is accompanied by the inaccurate claim that “0 projects have a health score.” Render it only once query data exists; the mapper still returns a truthy data object for a legitimate all-zero response.
<p class="text-body-2 text-neutral-500">{{ descriptionText }}</p>
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+51
to
+54
| <lfx-chart | ||
| :config="chartConfig" | ||
| :animation="true" | ||
| /> |
Comment on lines
+135
to
+138
| legend: { | ||
| bottom: 0, | ||
| data: [fullLegendLabel, partialLegendLabel], | ||
| }, |
| type: 'bar', | ||
| barMaxWidth: 8, | ||
| data: bands.map((band) => percentOf(band.partial, partialTotal)), | ||
| itemStyle: { color: lfxColors.neutral[400], borderRadius: [10, 10, 10, 10] }, |
This was referenced Sep 9, 2026
epipav
approved these changes
Sep 9, 2026
gaspergrom
merged commit Sep 9, 2026
02eca44
into
release/IN-1276-health-score-coverage
6 checks passed
gaspergrom
added a commit
that referenced
this pull request
Sep 10, 2026
Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
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
Standalone widget code only — NOT yet wired into the shared report view/service/types/data files. Wiring happens in a follow-up once IN-1285 (#2164) merges into this release branch and it's IN-1286's turn in the sequential merge order.
crowd.dev pipe
health_score_report_bandsis already deployed to production (crowd.dev PR #4579).Implements the non-shared parts of IN-1286 ("Health Score Coverage widget 01: health score bands by full and partial score"), authorized to build ahead of the sequential merge order since none of these files are touched by any other in-flight widget PR:
band-distribution.vue— horizontal grouped bar chart (full vs. partial score, 5 fixed bands), scope toggle (all/lf/other), skeleton loading state, empty stateband-distribution.query.ts— TanStack Query wrapper calling the new API route; written as a plain function, to become a method on the shared API service class once it's IN-1286's turnbands.get.ts— API route proxying thehealth_score_report_bandsTinybird pipe, withscopeparam validationhealth-score-coverage-bands.ts— mapper + fetcher for the pipe response, with a Vitest unit test for the mapperhealth-score-coverage-bands.types.ts— this widget's own types, kept separate from the shared report types fileTest plan
pnpm tsc-check— passespnpm lint— passes (0 errors)pnpm test --run— 256/256 tests pass, including the new mapper unit testshealth-score-coverage-report.vueand the shared service/types once IN-1285 mergesrelease/IN-1276-health-score-coverage-