ENG-3578: Assessment Status dashboard card#8134
Draft
kruulik wants to merge 10 commits into
Draft
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
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.
Ticket ENG-3578
Description Of Changes
Adds an Assessment Status card to the home dashboard so business users responsible for privacy assessments can see the health of their program at a glance. The card surfaces all four ticket bullets:
created_by) with the most open work, and data-use groups with the most attention signals.Each row drills through to the assessments list with the appropriate filter applied. To make those filters real, this PR also wires
?status=and?risk_level=query params on the privacy assessments index page (?risk_level=is filtered client-side post-fetch since the list endpoint does not yet accept it server-side).Code Changes
clients/admin-ui/src/home/AssessmentStatusCard.tsx— new card component; pure-functioncomputeMetricsexported for unit tests; honest 4-bucket partition (each assessment counted once);isStaleskipsGENERATINGand treats missing timestamps as not-stale.clients/admin-ui/src/home/AssessmentStatusCard.module.scss— new styles; uses Ant CSS variables for tokens.clients/admin-ui/src/home/AssessmentStatusCard.test.ts— Jest tests forcomputeMetrics(zero/empty input, segment partitioning, stale heuristic, stable-key aggregation, top-N + overflow ranking, owner aggregation rules).clients/admin-ui/src/home/HomeDashboard.tsx— slot the card into the dashboard.clients/admin-ui/src/pages/privacy-assessments/index.tsx— read & validate?status=and?risk_level=from the URL; passstatusto the slice and applyrisk_levelas a client-side filter.clients/admin-ui/src/home/AstralisPanel.tsx,AstralisPanel.module.scss— deleted; the component was orphaned and the corresponding feature flag was removed.clients/admin-ui/src/flags.json— removed the unusedalphaDashboardAstralisCardflag entry.Steps to Confirm
cd clients/admin-ui && npm run dev) and navigate to the home dashboard.<count> <label>.?status=completed.?status=generating.?status=in_progress.?status=in_progress&risk_level=highand only high-risk rows are visible.created_byvalues by open count, withN open · M stalledwhen any are stalled, plus+ K more ownersif the underlying list is longer.N risk · M stalledper row), plus+ K more groups.helponly over the icon, not the title text).cd clients/admin-ui && npx jest src/home/AssessmentStatusCard.test.ts— all 6 should pass.Known limitations (called out in the file comments):
risk_levelfilter is applied client-side post-fetch; once the backend list endpoint supports it, move the filter server-side./privacy-assessments/summaryendpoint.Pre-Merge Checklist