Skip to content

feat(securescore): points to gain per control, sort, 2-decimal percentages, %/points chart toggle - #945

Merged
KelvinTegelaar merged 1 commit into
CyberDrain:devfrom
kris6673:feat/securescore-points-to-gain
Oct 20, 2026
Merged

KelvinTegelaar merged 1 commit into
CyberDrain:devfrom
kris6673:feat/securescore-points-to-gain

Conversation

@kris6673

Copy link
Copy Markdown
Contributor

What

The Secure Score page showed how complete each recommendation is, but not what completing it is worth. This PR adds that, plus a sort on it and a few display improvements.

Secure Score page (single tenant)

  • Each recommendation card gets a second chip, e.g. +6 pts (+2.21% total): the points still available on the control (control-profile maxScore minus achieved score) and how much the tenant's overall score would rise. Completed controls show +0. Controls with no published maxScore get no chip. If the tenant max score is missing, the % part is left out.
  • New Sort menu: Points to gain (default) / Implementation %.
  • New filter: Not Completed (Started + Not Started).
  • The Secure Score chart gets a % / Points toggle, defaulting to %.

Dashboard Secure Score card

  • Same % / Points toggle. In % mode the axis runs 0-100% and the reference line reads "Max: 100%".

Percentages shown with 2 decimals

  • Current Score and both comparison tiles (Tenant Overview and Table tabs), the dashboard card's Latest %, the AllTenants average / best / worst / per-tenant rows, and the portfolio trend.
  • Get-CIPPSecureScoreReport now rounds PercentageScore to 2 decimals (was 1), so AllTenants values match the single-tenant view. The value is calculated when the report is requested, so no cache resync is needed.

No new API calls: maxScore comes from the secureScoreControlProfiles request the page already makes.

Docs: the Secure Score page (ordering, sorting, new filter, gain chip, chart toggle) and the dashboard card entry.

Testing

  • vitest: use-securescore hook tests cover the gain values and the missing-maxScore case; useAllTenantsDashboard and SecureScoreCard suites still pass (20/20).
  • Pester: Get-CIPPSecureScoreReport.Tests.ps1 6/6.
  • Checked against the local stack with a live tenant:
    • The gains add up to maxScore - currentScore (45.45 = 272 - 226.55).
    • Filter counts: Completed 56 + Not Started 11 + In Progress 3; Not Completed shows 14.
    • Default sort is in descending order.
    • The toggles switch the chart axes on both the Secure Score page and the dashboard.
    • AllTenants values show 2 decimals.
    • With the tenant maxScore forced to 0, the page still renders with points-only chips.

…tages, %/points chart toggle

Secure Score page (single tenant):
- each recommendation card shows what completing it is worth, e.g.
  "+6 pts (+2.21% total)": profile maxScore minus achieved score, and that
  gain as a share of the tenant's max score. Completed controls show +0;
  controls with no published maxScore get no chip, and the % part is
  dropped when the tenant max score is missing
- new Sort menu (Points to gain, default / Implementation %)
- new "Not Completed (Started + Not Started)" filter
- the Secure Score chart gets a % / Points toggle, defaulting to %

Dashboard Secure Score card: same % / Points toggle (0-100% axis in %
mode), Latest % shown with 2 decimals.

Percentages to 2 decimals: Current Score and both comparison tiles
(Tenant Overview + Table tabs), AllTenants average / best / worst /
per-tenant rows, and the portfolio trend. Get-CIPPSecureScoreReport now
rounds PercentageScore to 2 decimals (was 1) so AllTenants values agree
with the single-tenant view; it is computed at read time, no cache resync
needed.

Docs: Secure Score page (ordering, sorting, filter, gain chip, chart
toggle) and the dashboard card entry.
@KelvinTegelaar
KelvinTegelaar merged commit 28185bb into CyberDrain:dev Oct 20, 2026
17 of 18 checks passed
@kris6673
kris6673 deleted the feat/securescore-points-to-gain branch October 20, 2026 13: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