Skip to content

Dashboard PostureCard and PriorityActionsCard#7659

Merged
kruulik merged 21 commits intomainfrom
dashboard-posture-actions
Mar 17, 2026
Merged

Dashboard PostureCard and PriorityActionsCard#7659
kruulik merged 21 commits intomainfrom
dashboard-posture-actions

Conversation

@kruulik
Copy link
Copy Markdown
Contributor

@kruulik kruulik commented Mar 16, 2026

Ticket ENG-2775

Description Of Changes

Add the core dashboard card components on top of the infrastructure from #7628. This PR introduces:

  • PostureCard — privacy posture score with animated count-up, radar chart visualization, dimension click-through filtering, and agent annotation alert
  • PriorityActionsCard — tabbed list (Act Now / This Week / When Ready) with per-action routing via ACTION_CTA config, urgency grouping by severity, and dimension filter support
  • RadarChart/ChartText enhancements in fidesui for tooltip content and dimension click handling
  • Shared hooks: useCountUp, useDashboardDrawer, useDimensionFilter

CommandBar and DashboardDrawer follow in a separate PR on top of this branch.

image image

All behind the alphaDashboard feature flag (dev-only).

Code Changes

  • clients/admin-ui/src/home/PostureCard.tsx — Posture score card with RadarChart, animated score, dimension click-to-filter
  • clients/admin-ui/src/home/PostureCard.module.scss — PostureCard styles
  • clients/admin-ui/src/home/PostureBreakdownContent.tsx — Drawer content for posture dimension breakdown
  • clients/admin-ui/src/home/PriorityActionsCard.tsx — Tabbed priority actions with per-action-type routing and icons
  • clients/admin-ui/src/home/PriorityActionsCard.module.scss — PriorityActionsCard styles
  • clients/admin-ui/src/home/HomeDashboard.tsx — Wire up PostureCard + PriorityActionsCard in grid layout
  • clients/admin-ui/src/home/posture-constants.ts — Band config, dimension labels, shared constants
  • clients/admin-ui/src/home/useCountUp.ts — Animated number count-up hook
  • clients/admin-ui/src/home/useDashboardDrawer.ts — Global drawer state via useSyncExternalStore
  • clients/admin-ui/src/home/useDimensionFilter.ts — URL-param-based dimension filter state
  • clients/fidesui/src/components/charts/RadarChart.tsx — Add onDimensionClick and tooltipContent props
  • clients/fidesui/src/components/charts/ChartText.tsx — Refinements for radar chart labels

Steps to Confirm

  1. Enable alphaDashboard flag in dev
  2. Navigate to Home — should see PostureCard (left, 8-col) with radar chart and PriorityActionsCard (right, 16-col) with tabbed actions
  3. Click a radar chart dimension — PriorityActionsCard filters to related action types
  4. Click a dimension filter tag's close button — filter clears
  5. Switch between Act Now / This Week / When Ready tabs — actions re-group by urgency
  6. Click an action's CTA button — navigates to the correct route for that action type

Pre-Merge Checklist

  • Issue requirements met
  • All CI pipelines succeeded
  • CHANGELOG.md updated
    • Updates unreleased work already in Changelog, no new entry necessary
  • UX feedback:
    • All UX related changes have been reviewed by a designer
  • Followup issues:
    • Followup PR for CommandBar and DashboardDrawer (dashboard-command-bar-pr)
  • Database migrations:
    • No migrations
  • Documentation:
    • No documentation updates required

… data

Add the plumbing for the new Ant Design dashboard behind the
alphaDashboard feature flag. Includes RTK Query API slice with all
dashboard endpoints, MSW mock handlers with seed data, RadarChart
and ChartText fidesui enhancements, and the HomeContainer flag gate.

The actual Posture and Priority Actions cards will be added in a
follow-up PR on top of this branch.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
fides-plus-nightly Ignored Ignored Preview Mar 17, 2026 6:52pm
fides-privacy-center Ignored Ignored Mar 17, 2026 6:52pm

Request Review

kruulik added a commit that referenced this pull request Mar 16, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kruulik kruulik force-pushed the dashboard-posture-actions branch from 53a6fc8 to dc2710e Compare March 16, 2026 15:26
@kruulik kruulik changed the title Dashboard PostureCard, PriorityActionsCard, and CommandBar Dashboard PostureCard and PriorityActionsCard Mar 16, 2026
kruulik and others added 4 commits March 16, 2026 11:38
Move all type definitions from dashboard.slice.ts to a dedicated
types.ts file per frontend guidelines. Convert union types (PostureBand,
DiffDirection, ActionType, ActionSeverity, ActionStatus) to TypeScript
enums. Update mock data and handlers to use enum values.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add the Posture score card with animated count-up, radar chart with
dimension click-through, and agent annotation alert. Add the Priority
Actions card with per-action routing, urgency grouping, and dimension
filter support. Includes shared hooks and fidesui chart enhancements.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…, and RadarChart

- Consolidate posture-constants.ts into features/dashboard/constants.ts
- Replace router.push() with NextLink for proper a11y and prefetching
- Add Spin loading wrapper to PostureCard
- Move inline styles to SCSS modules (PostureBreakdownContent, PostureCard tooltip)
- Extract RadarTooltipContent to its own exported component with themed bg
- Use classNames package instead of manual class joining in RadarChart
- Extract magic numbers as named constants in RadarChart
- Add named export alongside default in HomeDashboard
- Rename "this_week" urgency group to "scheduled"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
kruulik and others added 2 commits March 16, 2026 13:30
Remove openPostureDrawer, PostureBreakdownContent import, and clickable
score wrapper from PostureCard — these are re-added in the subsequent
dashboard-command-bar-pr branch where DashboardDrawer is rendered.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Moved to dashboard-command-bar-pr where the drawer is introduced.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kruulik kruulik marked this pull request as ready for review March 16, 2026 18:01
@kruulik kruulik requested a review from a team as a code owner March 16, 2026 18:01
@kruulik kruulik requested review from jpople and removed request for a team March 16, 2026 18:01
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 16, 2026

Greptile Summary

This PR adds PostureCard and PriorityActionsCard components to the new alpha dashboard, along with supporting infrastructure: an animated count-up hook, a cross-component dimension filter via useSyncExternalStore, and radar chart interactivity enhancements in fidesui (click-through, tooltips, configurable outer radius).

  • Several ACTION_CTA route functions access action_data properties (system_id, request_id) without fallbacks, which will produce invalid navigation paths (e.g., /systems/configure/undefined) if the data is missing — unlike STEWARD_ASSIGNMENT which already handles this correctly
  • The fixed Row height in HomeDashboard (h-[420px]) will clip content on mobile breakpoints where both columns stack vertically at xs={24}
  • ACTION_TYPE_ICON_NAME in constants.ts is defined but never used — PriorityActionsCard has its own inline ACTION_TYPE_ICON mapping with JSX elements
  • The PR is at 752 lines changed across 15 files, which is at the boundary of the 500-line / 15-file guideline — acceptable given it's all behind the alphaDashboard feature flag

Confidence Score: 3/5

  • Behind a dev-only feature flag, but the missing route fallbacks will cause broken navigation for certain action types.
  • The core component architecture is clean and well-structured. However, 3 of 7 ACTION_CTA route functions lack fallbacks for missing action_data properties, which will produce invalid URLs at runtime. The mobile layout issue with fixed Row height is also a concern. These are real bugs, but the feature-flag scope limits blast radius.
  • Pay close attention to clients/admin-ui/src/features/dashboard/constants.ts (missing route fallbacks) and clients/admin-ui/src/home/HomeDashboard.tsx (mobile layout).

Important Files Changed

Filename Overview
clients/admin-ui/src/features/dashboard/constants.ts New dashboard constants with route configs, urgency grouping, and icon mappings. Missing fallbacks for system_id/request_id in ACTION_CTA routes could cause navigation to invalid URLs. Unused ACTION_TYPE_ICON_NAME constant.
clients/admin-ui/src/home/HomeDashboard.tsx Grid layout with PostureCard and PriorityActionsCard. Fixed row height may clip content on mobile breakpoints where columns stack vertically.
clients/admin-ui/src/home/PostureCard.tsx Posture card component with radar chart, animated score, and dimension click-to-filter. Well-structured with proper memoization.
clients/admin-ui/src/home/PriorityActionsCard.tsx Tabbed priority actions card with urgency grouping, dimension filtering, and per-action CTA routing. Clean component structure.
clients/admin-ui/src/home/useCountUp.ts Clean animation hook using requestAnimationFrame with proper cleanup. Ease-out animation for count-up effect.
clients/admin-ui/src/home/useDimensionFilter.ts Lightweight external store for cross-component dimension filter state using useSyncExternalStore. Clean implementation.
clients/fidesui/src/components/charts/RadarChart.tsx Extended RadarChart with click-through interaction, tooltip support, and configurable outer radius. Hit areas added for tick and dot elements. Well-structured enhancement.

Last reviewed commit: 228c403

- Add fallback routes for POLICY_VIOLATION, PIA_UPDATE, and DSR_ACTION when IDs are missing
- Remove unused ACTION_TYPE_ICON_NAME constant

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kruulik kruulik requested review from lucanovera and removed request for jpople March 17, 2026 14:25
Base automatically changed from dashboard-infrastructure to main March 17, 2026 17:42
Copy link
Copy Markdown
Contributor

@gilluminate gilluminate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kruulik kruulik added this pull request to the merge queue Mar 17, 2026
Merged via the queue into main with commit 98b093a Mar 17, 2026
46 of 49 checks passed
@kruulik kruulik deleted the dashboard-posture-actions branch March 17, 2026 20:23
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