Skip to content

feat(health): lead with one score, and let the reader choose what it counts - #2164

Merged
swati510 merged 1 commit into
mainfrom
feat/health-lede-single-figure
Sep 8, 2026
Merged

feat(health): lead with one score, and let the reader choose what it counts#2164
swati510 merged 1 commit into
mainfrom
feat/health-lede-single-figure

Conversation

@RaghavChamadiya

Copy link
Copy Markdown
Member

Based on #2161.

The page led with Code health and Maintainability side by side, both
out of ten and both largely about code shape, so the first screen answered
"which number do I steer by?" twice, with two different numbers. It carries one
figure now. Maintainability moves to the ribbon beside the other cuts of the
same scoring, and Open findings leaves it, since the tab row already counts
them.

One score, and the reader chooses what it counts

A Counts control in the page header answers the question the second figure
was there for. everything is the calibrated score; code_shape removes the
git-derived half — churn, co-change, ownership, prior fixes — which rises as a
file is worked on and so reports what a repository has been through rather than
what its code is like. On this repo that is 7.1 against 8.5, and hotspot health
4.6 against 7.6.

It is a projection, not a second scoring pass. Both halves are already stored
per file and a score is clamp(10 - structure - history), so leaving one out is
a subtraction. The metric rows a route holds are live ORM objects, so the
projection wraps them rather than assigning to them; writing a projected score
onto one would flush it back to the store. A file with no recorded split is
reported as unscored rather than counted as a confident ten.

The reading reaches every surface that could otherwise contradict the headline:
the distribution, the file list and its ranking, the map's colours, the work
queue, the findings list, and the drawer that opens from a row. When change
history is excluded its findings go with it, so what is listed finally sums to
the figure above it.

The trend keeps the full score. Snapshots recorded that, and deriving a series
from mean deductions would disagree with the headline wherever a file sits at
the score floor; its two colliding figures say so rather than printing the
other reading.

Two claims are withdrawn under the projection rather than restated: the band
word, whose thresholds were fitted against the calibrated score and would call
almost any repository healthy here, and the bug-prediction accuracy, which only
the calibrated score earns.

Explaining the figures

Every figure carries an explainer. A number a reader cannot define is a number
they cannot act on, and "Performance risk 942" beside "Hotspot health 4.5"
reads as two scores when one is a count that only goes up. The stat ribbon's
hints were a native title attribute — invisible, unreachable by keyboard and
absent on touch — and are a tooltip now.

Quieter chrome

The band is a dot and a word rather than a filled badge; a description of where
a number sits is not news. In the hotspot table the per-row "Hot" tag labelled
nothing, every churn bar was red because every row of that table is high-churn
by definition, the bus factor wore a tinted pill on ordinary counts, and three
link icons per row competed with the row's own click.

PageShell's actions block wraps instead of refusing to shrink: it sized itself
to its contents and ran off the side of a phone, taking the whole page's
horizontal scroll with it. The two view controls are named dropdowns rather than
four choices spelled out in full.

Verification

  • packages/ui 1,671 passed / 193 files; packages/web 84; packages/vscode
    webview 45; root npm run type-check green; ruff check clean.
  • Python health and health-route suites green apart from the pre-existing
    grammar families and the generated-contract drift, verified unchanged.
  • Both readings checked end to end against a real index across the overview,
    files, findings and map routes, and read out of the rendered page in light and
    dark; horizontal overflow measured at 390px before and after.

@repowise-bot

repowise-bot Bot commented Sep 8, 2026

Copy link
Copy Markdown

🔍 3 things to check

  1. PageLede in .../shared/page-lede.tsx signature changed. Review 19 callers outside this PR: .../commits/commit-detail-card.tsx::CommitDetailCard, .../commits/commits-lede.tsx::CommitsLede, .../dead-code/dead-code-lede.tsx::DeadCodeLede (+16 more)
  2. ViewTabs in .../shared/view-tabs.tsx signature changed. Review 6 callers outside this PR: .../shared/view-tabs.test.tsx::__module__, .../decisions/decision-review-lanes.tsx::DecisionReviewLanes, .../files/file-page.tsx::FilePage (+3 more)
  3. listHealthFindings in .../src/code-health.ts signature changed. Review 3 callers outside this PR: .../core/fileSignals.ts::getFileFindings, .../code-health/coverage-tab.tsx::CoverageTab, .../code-health/performance-tab.tsx::PerformanceTab
    ...and 5 more, on the PR page

✅ Health of changed files: 5.8 → 6.2 (+0.4)
🚨 Change risk: high, riskier than 82% of this repo's commits.

✅ Health gate: passed


📊 See the full report for this PR
Your repo map with this PR's blast radius lit up, every caller of the contracts it changes, and health before and after. No sign-in. · ⭐ Star Repowise · 📥 Install bot · Silence on a single PR with [skip repowise] in the title · Per-repo toggle on repowise.dev/settings?tab=bot · Updated 2026-09-08 16:31 UTC (since the last push: health 6.3 to 6.2)

Base automatically changed from feat/health-first-screen to main September 8, 2026 16:08
…counts

The page led with Code health and Maintainability side by side, both out of
ten and both largely about code shape, so the first screen answered "which
number do I steer by?" twice with two different numbers. It carries one figure
now. Maintainability moves to the ribbon beside the other cuts of the same
scoring, and Open findings leaves it, since the tab row already counts them.

A Counts control in the page header answers the question the second figure was
there for. Everything is the calibrated score; Code shape only removes the
git-derived half — churn, co-change, ownership, prior fixes — which rises as a
file is worked on and so reports what a repository has been through rather
than what its code is like. On this repo that is 7.1 against 8.5.

It is a projection, not a second scoring pass: both halves are already stored
per file and a score is clamp(10 - structure - history), so leaving one out is
a subtraction. The rows a route holds are live ORM objects, so the projection
wraps them rather than assigning to them; writing a projected score onto one
would flush it back to the store. A file with no recorded split is reported as
unscored rather than counted as a confident ten.

The reading reaches every surface that could otherwise contradict the
headline: the distribution, the file list and its ranking, the map's colours,
the work queue, the findings list, and the drawer that opens from a row. When
change history is excluded its findings go with it, so what is listed finally
sums to the figure above it. The trend keeps the full score, because snapshots
recorded that and inventing a series from mean deductions would disagree with
the headline wherever a file sits at the floor; its two colliding figures say
so rather than printing the other reading.

Two claims are withdrawn under the projection rather than restated: the band
word, whose thresholds were fitted against the calibrated score and would call
almost any repository healthy here, and the bug-prediction accuracy, which
only the calibrated score earns.

Every figure now carries an explainer. A number a reader cannot define is a
number they cannot act on, and "Performance risk 942" beside "Hotspot health
4.5" reads as two scores when one is a count that only goes up. The ribbon's
hints were a native title attribute — invisible, unreachable by keyboard,
absent on touch — and are a tooltip now.

The chrome stops raising its voice. The band is a dot and a word rather than a
filled badge; a description of where a number sits is not news. In the hotspot
table the per-row "Hot" tag labelled nothing, every churn bar was red because
every row of that table is high-churn by definition, the bus factor wore a
tinted pill on ordinary counts, and three link icons per row competed with the
row's own click. The page header wraps instead of running off the side of a
phone and taking the page's horizontal scroll with it, and its two controls
are named dropdowns rather than four choices spelled out in full.
@RaghavChamadiya
RaghavChamadiya force-pushed the feat/health-lede-single-figure branch from 569f19e to 8158836 Compare September 8, 2026 16:31
@swati510
swati510 merged commit d019d38 into main Sep 8, 2026
9 checks passed
@swati510
swati510 deleted the feat/health-lede-single-figure branch September 8, 2026 17:01
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.

2 participants