Conversation
Contributor
|
✅ All necessary |
Contributor
|
✅ Conflict Markers Resolved All conflict markers have been successfully resolved in this pull request. |
Contributor
🔒 Container Security ScanImage: 📊 Vulnerability Summary
2 package(s) affected
|
…iew-missing-categories-broken-navigation-and-chart-issues-ui
Contributor
|
Hey, pushed a few small follow-ups on top of your branch, feel free to keep, tweak or revert any of them:
Nice work! |
…iew-missing-categories-broken-navigation-and-chart-issues-ui
Alan-TheGentleman
previously approved these changes
May 5, 2026
…ategories-broken-navigation-and-chart-issues-ui' of https://github.com/prowler-cloud/prowler into PROWLER-1477-bug-threat-score-compliance-view-missing-categories-broken-navigation-and-chart-issues-ui
jfagoagas
reviewed
May 5, 2026
…iew-missing-categories-broken-navigation-and-chart-issues-ui
…iew-missing-categories-broken-navigation-and-chart-issues-ui
Track the last scrolled-to key in a ref so the inline callback ref no longer re-fires scrollIntoView on every re-render. Without this, any state change (Expand all, row toggle, parent re-render) would snap the page back to the original ?section= target. Also nest the animation frame so scrollIntoView reads a stable offset after the HeroUI framer-motion expand has begun to settle.
Remove the trailing (PROWLER-1477) from the renderActiveShape comment. Ticket numbers belong in PR and issue history, not in source comments where they rot as the code evolves.
alejandrobailo
previously approved these changes
May 8, 2026
alejandrobailo
approved these changes
May 11, 2026
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
Fixes four UX issues across the ThreatScore compliance views reported.
missing entirely) across the badge, breakdown card, donut legend and
accordion list.
/compliancedid nothing instead of jumping to theThreatScore detail page filtered to that pillar.
were passing, producing a useless visualization.
slice because tiny fail/manual segments were impossible to hover.
Changes
Canonical pillar ordering (issue 1)
lib/compliance/threatscore-pillars.tsexposesTHREATSCORE_PILLARS,getOrderedPillars()andcompareSectionsByCanonicalOrder(). Every ThreatScore view now consumesthe same canonical list (
1. IAM → 2. Attack Surface → 3. Logging and Monitoring → 4. Encryption); future pillars (e.g.5. Data Protection)are appended in natural-numeric order.
threatscore-badge.tsxandthreatscore-breakdown-card.tsxalwaysrender the full pillar set, with
—/ 0 % when the API omits a pillar.lib/compliance/threat.tsxsorts categories canonically before countersare computed so the accordion mirrors the chart order.
getOrderedPillars()defensively rejectsNaN/null/ non-numericvalues so a future API regression cannot crash
score.toFixed(...).Pillar click → detail navigation (issue 2)
threatscore-badge.tsx: each pillar is now a<button>that navigatesto
/compliance/ProwlerThreatScore?...§ion=<pillar>. Pillars withoutdata are
disabled/aria-disabledand no-op.[compliancetitle]/page.tsxreads?section=and resolves the accordionkey by exact match (
${framework.name}-${section}) — no suffixcollisions across frameworks or category names.
client-accordion-wrapper.tsxacceptsscrollToKeyand usesrequestAnimationFrame+[data-accordion-key]to scroll the sectioninto view after the HeroUI accordion finishes expanding.
Accordion.tsxnow stampsdata-accordion-key={item.key}on eachAccordionItemto provide a stable selector contract.Top Failed Sections redesign (issue 3)
getTopFailedSections(inlib/compliance/threat-helpers.ts, kept as a pure module so it can beunit-tested without dragging in the next-auth chain) returns every
canonical pillar with zero-fill.
top-failed-sections-card.tsxpassesuseSeverityEmptyState={false}toHorizontalBarChartwhen the caller pre-populated the categories, sozero-failure scans render four real bars at 0 instead of falling back to
generic
Critical / High / Medium / Low / Informationalplaceholders.Donut tooltip on every segment (issue 4)
donut-chart.tsxswitched from per-<Cell>mouse handlers to theRecharts-idiomatic
activeIndex+activeShapepattern. The hoveredslice is rendered through
<Sector>enlarged byACTIVE_GROW(4 px) sotiny 1-2 % slices are easy to see and target.
outerRadiusis reduced byACTIVE_GROWso the enlargedactive sector lands inside the original SVG viewport (consumers like
RequirementsStatusCarduse a fixed 172 × 172 wrapper).Tooltip cursor={false}prevents the default cursor overlay fromswallowing pointer events on small slices.
Checklist
Community Checklist
SDK/CLI
UI
API
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.