Skip to content

feat(scorecard): add entities page for drilling down aggregated KPIs#2509

Open
Eswaraiahsapram wants to merge 9 commits intoredhat-developer:mainfrom
Eswaraiahsapram:feat/scorecard-entities-page-ui
Open

feat(scorecard): add entities page for drilling down aggregated KPIs#2509
Eswaraiahsapram wants to merge 9 commits intoredhat-developer:mainfrom
Eswaraiahsapram:feat/scorecard-entities-page-ui

Conversation

@Eswaraiahsapram
Copy link
Member

@Eswaraiahsapram Eswaraiahsapram commented Mar 11, 2026

Hey, I just made a Pull Request!

Fixes:

Description

This PR introduces the Scorecard Entities page and enhances the homepage scorecard to support drilling down from aggregated KPIs to the underlying entities contributing to those metrics.

The goal is to provide better visibility into aggregated scorecard data so that Engineering Managers and Platform Engineers can identify specific services impacting metrics and investigate issues at the entity level.

What’s Included

Aggregated Scorecard Enhancements

  • Added an info icon on each scorecard card to display the timestamp of when metrics were last synchronized.
  • Enabled navigation from aggregated scorecard cards to the Entities page
  • Disabled card links when an error state is present

Scorecard Entities Page

Introduces a new page that displays entity-level details for a selected scorecard metric.

  • A table view of entities contributing to the aggregated score
  • A status chart displayed alongside the table
  • Pagination, Sorting, and Row visibility control

Screenshots

  • Info icon with tooltip in aggregated metric card
image
  • Link to Aggregated scorecard entities page with tooltip
image
  • Aggregated metric entities table
image image image image
  • Missing permission
image
  • Metric ID not found
image
  • Zero Entities
image

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or Updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)

@rhdh-gh-app
Copy link

rhdh-gh-app bot commented Mar 11, 2026

Important

This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior.

Changed Packages

Package Name Package Path Changeset Bump Current Version
app workspaces/scorecard/packages/app none v0.0.0
@red-hat-developer-hub/backstage-plugin-scorecard workspaces/scorecard/plugins/scorecard minor v2.4.0

@rhdh-qodo-merge
Copy link

Review Summary by Qodo

Add Scorecard Entities page with drill-down capability from aggregated KPIs

✨ Enhancement 🧪 Tests 📝 Documentation

Grey Divider

Walkthroughs

Description
• Introduces a new Scorecard Entities page enabling drilling down from aggregated KPIs to underlying
  entities
• Adds API methods getMetrics() and getAggregatedScorecardEntities() for fetching metric and
  entity-level data with pagination and sorting
• Implements comprehensive entities table component with pagination controls, sortable columns, and
  row visibility management
• Adds info icon on scorecard cards displaying metric last-updated timestamps with navigation to
  entities page
• Creates specialized cell components for entity name (with catalog links), owner (with entity
  linking), and metric status display
• Adds custom hooks for fetching metrics, aggregated entities, entity metadata caching, and user
  ownership refs
• Includes extensive test coverage with 15+ test suites covering table components, pagination, state
  management, and utility functions
• Adds translations for 6 languages (Japanese, German, Spanish, Italian, French, and reference
  translations) with 30-40+ keys per language
• Registers new route /scorecard/metrics/:metricId for entities page navigation
• Updates API documentation and adds changeset for feature release
Diagram
flowchart LR
  A["Scorecard Homepage Card"] -->|"click info icon"| B["Entities Page"]
  A -->|"click card"| B
  B -->|"displays"| C["Entities Table"]
  C -->|"shows"| D["Entity Details"]
  C -->|"with"| E["Pagination & Sorting"]
  B -->|"displays"| F["Metric Status Chart"]
  D -->|"links to"| G["Catalog Entity"]
  D -->|"shows"| H["Owner Info"]
Loading

Grey Divider

File Changes

1. workspaces/scorecard/plugins/scorecard/src/api/index.ts ✨ Enhancement +138/-0

Add API methods for metrics and aggregated entities

• Added getMetrics() method to fetch metrics by IDs with proper error handling and response
 validation
• Added getAggregatedScorecardEntities() method to retrieve paginated, sortable entity-level
 details for scorecard metrics
• Imported new types Metric and EntityMetricDetailResponse from common package

workspaces/scorecard/plugins/scorecard/src/api/index.ts


2. workspaces/scorecard/plugins/scorecard/src/translations/ja.ts 📝 Documentation +37/-0

Add Japanese translations for entities page

• Added 30+ new translation keys for entities page, metric metadata, and error messages
• Organized translations with section comments (Empty state, Permission required, Error messages,
 Metric, Threshold, Entities page)
• Included translations for table headers, pagination, and entity-related UI elements

workspaces/scorecard/plugins/scorecard/src/translations/ja.ts


3. workspaces/scorecard/plugins/scorecard/src/translations/de.ts 📝 Documentation +60/-0

Add German translations for entities page

• Added 40+ new German translation keys for entities page and metric-related content
• Completed missing translations for empty state button and permission required button
• Added comprehensive translations for table headers, pagination, and error messages

workspaces/scorecard/plugins/scorecard/src/translations/de.ts


View more (49)
4. workspaces/scorecard/plugins/scorecard/src/translations/es.ts 📝 Documentation +59/-0

Add Spanish translations for entities page

• Added 40+ new Spanish translation keys for entities page functionality
• Completed missing translations for empty state and permission required sections
• Added translations for metric metadata, thresholds, and table UI elements

workspaces/scorecard/plugins/scorecard/src/translations/es.ts


5. workspaces/scorecard/plugins/scorecard/src/translations/it.ts 📝 Documentation +37/-0

Add Italian translations for entities page

• Added 25+ new Italian translation keys for entities page and metrics
• Organized translations with section comments for clarity
• Included translations for table headers, pagination, and error handling

workspaces/scorecard/plugins/scorecard/src/translations/it.ts


6. workspaces/scorecard/plugins/scorecard/src/translations/fr.ts 📝 Documentation +36/-0

Add French translations for entities page

• Added 30+ new French translation keys for entities page and metric functionality
• Completed missing translations for empty state and permission sections
• Added comprehensive translations for table headers, pagination, and error messages

workspaces/scorecard/plugins/scorecard/src/translations/fr.ts


7. workspaces/scorecard/plugins/scorecard/src/hooks/useEntityMetadataMap.ts ✨ Enhancement +124/-0

Add hook for entity metadata caching

• New hook to fetch and cache entity metadata (title, description, kind) from catalog API
• Deduplicates entity refs and handles parsing errors gracefully
• Returns a map of entity refs to their metadata for efficient lookups

workspaces/scorecard/plugins/scorecard/src/hooks/useEntityMetadataMap.ts


8. workspaces/scorecard/plugins/scorecard/src/translations/ref.ts 📝 Documentation +35/-0

Add translation references for entities page

• Added 30+ new translation message definitions for entities page
• Added metric-related translations for last updated timestamp and reporting status
• Added comprehensive table header, footer, and error message translations

workspaces/scorecard/plugins/scorecard/src/translations/ref.ts


9. workspaces/scorecard/plugins/scorecard/src/utils/constants.ts ✨ Enhancement +46/-0

Add entities table header configuration

• Added SCORECARD_ENTITIES_TABLE_HEADERS constant defining 6 table columns with IDs, labels,
 widths, and sortability
• Columns include status, metric value, entity name, owner, kind, and last updated timestamp

workspaces/scorecard/plugins/scorecard/src/utils/constants.ts


10. workspaces/scorecard/plugins/scorecard/src/utils/entityTableUtils.ts ✨ Enhancement +34/-0

Add timestamp formatting utility

• New utility function getLastUpdatedLabel() to format timestamps as relative dates
• Returns "Today" for current date, "X days ago" for recent dates, or formatted date for older
 entries

workspaces/scorecard/plugins/scorecard/src/utils/entityTableUtils.ts


11. workspaces/scorecard/plugins/scorecard/src/hooks/useOwnershipEntityRefs.ts ✨ Enhancement +31/-0

Add hook for user ownership entity refs

• New hook to retrieve current user's ownership entity refs from identity API
• Initializes state on component mount and returns empty array as default

workspaces/scorecard/plugins/scorecard/src/hooks/useOwnershipEntityRefs.ts


12. workspaces/scorecard/plugins/scorecard/src/components/ScorecardHomepageSection/index.ts ✨ Enhancement +1/-0

Export entities page component

• Exported ScorecardEntitiesPage component from the index file

workspaces/scorecard/plugins/scorecard/src/components/ScorecardHomepageSection/index.ts


13. workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/index.ts ✨ Enhancement +17/-0

Create entities page component index

• New index file exporting ScorecardEntitiesPage component

workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/index.ts


14. workspaces/scorecard/plugins/scorecard/src/plugin.ts ✨ Enhancement +15/-0

Register entities page as plugin extension

• Added ScorecardEntitiesPage as a routable extension to the scorecard plugin
• Configured with lazy loading and mounted at root route ref

workspaces/scorecard/plugins/scorecard/src/plugin.ts


15. workspaces/scorecard/plugins/scorecard/src/utils/index.ts ✨ Enhancement +5/-1

Export new utilities

• Exported SCORECARD_ENTITIES_TABLE_HEADERS constant
• Exported getLastUpdatedLabel utility function

workspaces/scorecard/plugins/scorecard/src/utils/index.ts


16. workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/__tests__/EntitiesTable.test.tsx 🧪 Tests +303/-0

Add entities table component tests

• Comprehensive test suite for EntitiesTable component with 10+ test cases
• Tests cover rendering, pagination, sorting, loading states, error handling, and data display
• Includes mocking of hooks and child components

workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/tests/EntitiesTable.test.tsx


17. workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/EntitiesTable.tsx ✨ Enhancement +181/-0

Add entities table component

• Main table component displaying paginated entity data with sorting and filtering
• Manages pagination state, sort state, and row visibility
• Integrates with hooks for ownership refs, aggregated data, and entity metadata

workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/EntitiesTable.tsx


18. workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/__tests__/EntitiesTablePagination.test.tsx 🧪 Tests +178/-0

Add pagination component tests

• Test suite for pagination component with 10+ test cases
• Tests cover range display, navigation button interactions, and disabled states

workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/tests/EntitiesTablePagination.test.tsx


19. workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/__tests__/ScorecardEntitiesPage.test.tsx 🧪 Tests +159/-0

Add entities page component tests

• Test suite for main entities page component with 6 test cases
• Tests cover page structure, header title updates, and component prop passing

workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/tests/ScorecardEntitiesPage.test.tsx


20. workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/__tests__/EntitiesTableStateRow.test.tsx 🧪 Tests +158/-0

Add state row component tests

• Test suite for state row component with 6 test cases
• Tests cover loading, error, and no-entities states with appropriate UI rendering

workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/tests/EntitiesTableStateRow.test.tsx


21. workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/__tests__/EntitiesRow.test.tsx 🧪 Tests +150/-0

Add entity row component tests

• Test suite for individual entity row component with 5 test cases
• Tests cover cell rendering, null value handling, and metadata display

workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/tests/EntitiesRow.test.tsx


22. workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/EntitiesTableFooter.tsx ✨ Enhancement +148/-0

Add table footer with pagination

• Footer component with pagination controls and rows-per-page selector
• Dynamically generates rows-per-page options based on total count
• Styled with Material-UI Paper and custom pagination component

workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/EntitiesTableFooter.tsx


23. workspaces/scorecard/plugins/scorecard/src/components/ScorecardHomepageSection/ScorecardHomepageCardComponent.tsx ✨ Enhancement +69/-1

Add info icon and entities page navigation

• Added InfoComponent to display metric last-updated timestamp in tooltip
• Added showSubheader and showInfo optional props to control UI elements
• Enhanced subheader with link to entities page and tooltip for reporting status

workspaces/scorecard/plugins/scorecard/src/components/ScorecardHomepageSection/ScorecardHomepageCardComponent.tsx


24. workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/cells/__tests__/EntityNameCell.test.tsx 🧪 Tests +120/-0

Add entity name cell tests

• Test suite for entity name cell with 5 test cases
• Tests cover entity ref parsing, metadata title preference, and link generation

workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/cells/tests/EntityNameCell.test.tsx


25. workspaces/scorecard/plugins/scorecard/src/hooks/__tests__/useMetric.test.tsx 🧪 Tests +128/-0

Add metric hook tests

• Test suite for useMetric hook with 5 test cases
• Tests cover loading, success, error states and API call verification

workspaces/scorecard/plugins/scorecard/src/hooks/tests/useMetric.test.tsx


26. workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/EntitiesTablePagination.tsx ✨ Enhancement +98/-0

Add custom pagination component

• Custom pagination component with first, previous, next, and last page buttons
• Displays current range and total count with RTL support

workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/EntitiesTablePagination.tsx


27. workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/cells/__tests__/OwnerCell.test.tsx 🧪 Tests +105/-0

Add owner cell tests

• Test suite for owner cell with 5 test cases
• Tests cover empty state, entity presentation, and ref resolution

workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/cells/tests/OwnerCell.test.tsx


28. workspaces/scorecard/plugins/scorecard/src/hooks/__tests__/useMetricDisplayLabels.test.tsx 🧪 Tests +98/-0

Add metric display labels hook tests

• Test suite for useMetricDisplayLabels hook with 5 test cases
• Tests cover translation fallback behavior and undefined metric handling

workspaces/scorecard/plugins/scorecard/src/hooks/tests/useMetricDisplayLabels.test.tsx


29. workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/__tests__/EntitiesTableHeader.test.tsx 🧪 Tests +93/-0

Add table header component tests

• Test suite for table header component with 3 test cases
• Tests cover header rendering, sort request handling, and sort state display

workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/tests/EntitiesTableHeader.test.tsx


30. workspaces/scorecard/plugins/scorecard/src/hooks/useAggregatedScorecardEntities.tsx ✨ Enhancement +99/-0

Add hook for aggregated scorecard entities

• New hook to fetch paginated, sortable aggregated scorecard entities
• Handles API calls with error handling and response validation
• Returns entities data, loading state, and error information

workspaces/scorecard/plugins/scorecard/src/hooks/useAggregatedScorecardEntities.tsx


31. workspaces/scorecard/plugins/scorecard/report.api.md 📝 Documentation +29/-2

Update API report with new exports

• Added ScorecardEntitiesPage to public API exports
• Added showSubheader and showInfo optional parameters to ScorecardHomepageCard
• Added 30+ new translation keys for entities page functionality

workspaces/scorecard/plugins/scorecard/report.api.md


32. workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/EntitiesTableStateRow.tsx ✨ Enhancement +86/-0

Add table state row component

• Component to display loading, error, or no-data states in table
• Handles missing permission, metric not found, and no entities scenarios
• Integrates with metric hooks to resolve and display metric titles

workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/EntitiesTableStateRow.tsx


33. workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/__tests__/EntitiesTableFooter.test.tsx 🧪 Tests +78/-0

Add table footer component tests

• Test suite for table footer component with 2 test cases
• Tests cover pagination component rendering and prop passing

workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/tests/EntitiesTableFooter.test.tsx


34. workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/ScorecardEntitiesPage.tsx ✨ Enhancement +79/-0

Add main entities page component

• Main entities page component with two-column layout
• Left column displays entities table with pagination and sorting
• Right column displays scorecard card for visual metric representation

workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/ScorecardEntitiesPage.tsx


35. workspaces/scorecard/plugins/scorecard/src/components/ScorecardHomepageSection/ScorecardHomepageCard.tsx ✨ Enhancement +11/-1

Add optional display parameters

• Added showSubheader and showInfo optional parameters (default true)
• Passes these parameters to ScorecardHomepageCardComponent for conditional rendering

workspaces/scorecard/plugins/scorecard/src/components/ScorecardHomepageSection/ScorecardHomepageCard.tsx


36. workspaces/scorecard/plugins/scorecard/src/utils/__tests__/entityTableUtils.test.tsx 🧪 Tests +64/-0

Add unit tests for entity table date formatting utility

• New test file for getLastUpdatedLabel utility function
• Tests cover various date scenarios: today, yesterday, within 6 days, and older dates
• Validates handling of different input types: ISO strings, Date objects, and timestamps

workspaces/scorecard/plugins/scorecard/src/utils/tests/entityTableUtils.test.tsx


37. workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/EntitiesRow.tsx ✨ Enhancement +73/-0

Create table row component for entity metric display

• New component rendering a single table row for entity metric data
• Displays status indicator, metric value, entity name, owner, kind, and last updated timestamp
• Uses specialized cell components for status, entity name, and owner rendering

workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/EntitiesRow.tsx


38. workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/cells/__tests__/MetricStatusCell.test.tsx 🧪 Tests +73/-0

Add tests for metric status cell component

• New test suite for MetricStatusCell component
• Tests rendering of status text, empty states, colored indicator boxes, and theme fallback colors
• Validates proper display of status values and visual indicators

workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/cells/tests/MetricStatusCell.test.tsx


39. workspaces/scorecard/plugins/scorecard/report-alpha.api.md 📝 Documentation +22/-2

Update API documentation with new translation keys

• Reordered translation keys for consistency in emptyState and permissionRequired sections
• Added new translation keys for entities page: error messages, table headers, and footer labels
• Added metric-related translation keys for last updated display and entities not reporting values

workspaces/scorecard/plugins/scorecard/report-alpha.api.md


40. workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/__tests__/EntitiesTableWrapper.test.tsx 🧪 Tests +68/-0

Add tests for entities table wrapper component

• New test file for EntitiesTableWrapper component
• Tests rendering of title, children content, and warning icon with tooltip
• Validates proper display of warning message for entities not reporting values

workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/tests/EntitiesTableWrapper.test.tsx


41. workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/EntitiesTableWrapper.tsx ✨ Enhancement +73/-0

Create wrapper component for entities table layout

• New wrapper component for entities table with Paper elevation styling
• Displays title with warning icon and tooltip indicating some entities may not report values
• Provides consistent layout and visual structure for table content

workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/EntitiesTableWrapper.tsx


42. workspaces/scorecard/plugins/scorecard/src/components/Common/CardWrapper.tsx ✨ Enhancement +22/-15

Add info section support to card wrapper component

• Added optional info prop to CardWrapperProps interface
• Modified CardHeader layout to use flexbox with space-between justification
• Conditionally renders info content aligned to the right of the card header

workspaces/scorecard/plugins/scorecard/src/components/Common/CardWrapper.tsx


43. workspaces/scorecard/plugins/scorecard/src/hooks/useMetric.tsx ✨ Enhancement +67/-0

Create custom hook for metric data fetching

• New custom hook for fetching metric data by ID
• Retrieves metric details from scorecard API and handles error cases
• Returns metric object, loading state, and error information

workspaces/scorecard/plugins/scorecard/src/hooks/useMetric.tsx


44. workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/cells/EntityNameCell.tsx ✨ Enhancement +66/-0

Create entity name cell with catalog link

• New cell component displaying entity name with link to entity details
• Uses entity metadata for display title and tooltip information
• Implements text truncation with ellipsis for long names

workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/cells/EntityNameCell.tsx


45. workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/EntitiesTableHeader.tsx ✨ Enhancement +59/-0

Create sortable table header component

• New table header component with sortable column support
• Renders headers based on SCORECARD_ENTITIES_TABLE_HEADERS configuration
• Implements sort labels with active state and direction indicators

workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/EntitiesTableHeader.tsx


46. workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/cells/OwnerCell.tsx ✨ Enhancement +62/-0

Create owner cell component with entity linking

• New memoized cell component for displaying entity owner information
• Resolves owner references and provides links to owner entity details
• Handles missing owner data with fallback display

workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/cells/OwnerCell.tsx


47. workspaces/scorecard/packages/app/src/App.tsx ✨ Enhancement +8/-1

Register scorecard entities page route

• Added import for ScorecardEntitiesPage component
• Registered new route /scorecard/metrics/:metricId for entities page navigation
• Enables drilling down from aggregated scorecard metrics to entity details

workspaces/scorecard/packages/app/src/App.tsx


48. workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesPageHeader.tsx ✨ Enhancement +21/-0

Create entities page header component

• New header component for entities page using Backstage Header
• Displays page title and provides navigation back to home
• Follows Backstage design patterns for page headers

workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesPageHeader.tsx


49. workspaces/scorecard/plugins/scorecard/src/hooks/useMetricDisplayLabels.tsx ✨ Enhancement +45/-0

Create hook for metric display label translation

• New custom hook for retrieving translated metric display labels
• Attempts to use translated title and description, falls back to original metric values
• Handles missing metric data gracefully

workspaces/scorecard/plugins/scorecard/src/hooks/useMetricDisplayLabels.tsx


50. workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/cells/MetricStatusCell.tsx ✨ Enhancement +38/-0

Create metric status indicator cell component

• New memoized cell component displaying metric status with colored indicator
• Renders small colored box based on status theme palette
• Falls back to success color when status has no palette mapping

workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/cells/MetricStatusCell.tsx


51. workspaces/scorecard/.changeset/modern-signs-jog.md 📝 Documentation +5/-0

Add changeset for scorecard entities page feature

• New changeset documenting the scorecard entities page feature
• Marked as minor version bump for the scorecard plugin
• Describes ability to drill down from aggregated KPIs to individual entities

workspaces/scorecard/.changeset/modern-signs-jog.md


52. workspaces/scorecard/plugins/scorecard/dev/index.tsx ✨ Enhancement +38/-0

Add mock API methods for metric and entity data

• Added imports for Metric and EntityMetricDetailResponse types
• Implemented getMetrics method in MockScorecardApi returning metric data
• Implemented getAggregatedScorecardEntities method with pagination and sorting support

workspaces/scorecard/plugins/scorecard/dev/index.tsx


Grey Divider

Qodo Logo

@rhdh-qodo-merge
Copy link

rhdh-qodo-merge bot commented Mar 11, 2026

Code Review by Qodo

🐞 Bugs (4) 📘 Rule violations (0) 📎 Requirement gaps (0) 📐 Spec deviations (0)

Grey Divider


Action required

1. Invalid sortBy sent🐞 Bug ✓ Correctness
Description
The Entities table marks the "status" column as sortable and sends sortBy=status to the backend. The
backend drill-down endpoint rejects this value (not in the allowed sortBy enum), so clicking the
sortable header will produce an error response and break sorting.
Code

workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/EntitiesTableHeader.tsx[R41-48]

+        {SCORECARD_ENTITIES_TABLE_HEADERS.map(header => (
+          <TableCell key={header.id} align="left" sx={{ width: header.width }}>
+            {header.sortable ? (
+              <TableSortLabel
+                active={orderBy === header.id}
+                direction={orderBy === header.id ? order : 'asc'}
+                onClick={() => onSortRequest(header.id)}
+              >
Evidence
The header config exposes a sortable column with id 'status', the UI passes that id directly as the
sort key, and the API client forwards it as sortBy. The backend validates sortBy against a fixed
enum that does not include 'status', causing 400 Invalid query parameters on sort attempts.

workspaces/scorecard/plugins/scorecard/src/utils/constants.ts[29-35]
workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/EntitiesTableHeader.tsx[41-48]
workspaces/scorecard/plugins/scorecard/src/api/index.ts[258-270]
workspaces/scorecard/plugins/scorecard-backend/src/validation/validateDrillDownMetricsSchema.ts[24-37]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Entities table sorting is wired to send `sortBy=status`, but the backend drill-down endpoint rejects any `sortBy` value not in its enum, so sorting fails.
### Issue Context
Frontend uses header `id` as the sort key and forwards it to the backend as `sortBy`.
### Fix Focus Areas
- workspaces/scorecard/plugins/scorecard/src/utils/constants.ts[22-66]
- workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/EntitiesTableHeader.tsx[38-55]
- workspaces/scorecard/plugins/scorecard-backend/src/validation/validateDrillDownMetricsSchema.ts[24-38]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Timestamp can crash UI 🐞 Bug ⛯ Reliability
Description
Entity drill-down rows call getLastUpdatedLabel(entity.timestamp) even though timestamp is optional
in the API type. If timestamp is undefined/invalid, date formatting can throw and crash the Entities
page render.
Code

workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/EntitiesRow.tsx[R68-71]

+      <TableCell width="12%">{entity.entityKind}</TableCell>
+
+      <TableCell width="20%">{getLastUpdatedLabel(entity.timestamp)}</TableCell>
+    </TableRow>
Evidence
The entity drill-down type explicitly allows an undefined timestamp, but the UI always formats it.
getLastUpdatedLabel does not guard against invalid dates and will call date-fns format() on an
Invalid Date, which throws at runtime.

workspaces/scorecard/plugins/scorecard-common/src/types/Metric.ts[104-113]
workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/EntitiesRow.tsx[68-71]
workspaces/scorecard/plugins/scorecard/src/utils/entityTableUtils.ts[19-34]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`entity.timestamp` is optional but is always formatted; invalid timestamps can throw during render.
### Issue Context
The crash happens when a row has no timestamp (common for entities that are not reporting values).
### Fix Focus Areas
- workspaces/scorecard/plugins/scorecard/src/utils/entityTableUtils.ts[17-34]
- workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/EntitiesRow.tsx[47-71]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

3. Page not reset 🐞 Bug ✓ Correctness
Description
Changing rows-per-page or sort order does not reset the current page. This can request out-of-range
pages after a page-size or sort change, producing empty/misleading results until the user manually
navigates back.
Code

workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/EntitiesTable.tsx[R46-94]

+  const [page, setPage] = useState<number>(1);
+  const [rowsPerPage, setRowsPerPage] = useState<number>(3);
+  const { t } = useTranslation();
+
+  const [sortState, setSortState] = useState<{
+    orderBy: string | null;
+    order: 'asc' | 'desc';
+  }>({
+    orderBy: null,
+    order: 'asc',
+  });
+
+  const { orderBy, order } = sortState;
+
+  const ownershipEntityRefs = useOwnershipEntityRefs();
+
+  const {
+    aggregatedScorecardEntities,
+    loadingData: loadingDataEntities,
+    error: entitiesError,
+  } = useAggregatedScorecardEntities({
+    metricId: metricId as string,
+    page,
+    pageSize: rowsPerPage,
+    ownershipEntityRefs,
+    orderBy,
+    order,
+  });
+
+  // const isMissingPermission = entitiesError?.message?.includes('NotAllowedError');
+
+  useEffect(() => {
+    setMetricTitle(aggregatedScorecardEntities?.metricMetadata?.title ?? '');
+  }, [aggregatedScorecardEntities?.metricMetadata?.title, setMetricTitle]);
+
+  const handleChangeRowsPerPage = useCallback(
+    (event: ChangeEvent<HTMLInputElement>) => {
+      setRowsPerPage(Number(event.target.value));
+    },
+    [],
+  );
+
+  const handleSortRequest = useCallback((columnId: string) => {
+    setSortState(prev =>
+      prev.orderBy !== columnId
+        ? { orderBy: columnId, order: 'asc' }
+        : { ...prev, order: prev.order === 'asc' ? 'desc' : 'asc' },
+    );
+  }, []);
Evidence
The table maintains page in state and passes it directly to the backend (which is 1-based), but
neither the page-size change handler nor the sort change handler resets page to 1. This is a common
pagination bug that can lead to blank pages after changing page size/sort.

workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/EntitiesTable.tsx[46-56]
workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/EntitiesTable.tsx[81-86]
workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/EntitiesTable.tsx[88-94]
workspaces/scorecard/plugins/scorecard-backend/src/validation/validateDrillDownMetricsSchema.ts[24-26]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Pagination state can become invalid after changing page size or sorting because the current page is not reset.
### Issue Context
Backend pagination is 1-based; requesting a too-high page after page-size changes will often return empty results.
### Fix Focus Areas
- workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/EntitiesTable.tsx[46-95]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


4. Unsafe metricId casts 🐞 Bug ⛯ Reliability
Description
The entities table casts an optional metricId to string and calls the drill-down API even when
metricId is missing. While the API client throws on empty metricId, this still triggers avoidable
requests and confusing UI states; the component should guard and render a clear empty/error state
when metricId is absent.
Code

workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/EntitiesTable.tsx[R62-73]

+  const {
+    aggregatedScorecardEntities,
+    loadingData: loadingDataEntities,
+    error: entitiesError,
+  } = useAggregatedScorecardEntities({
+    metricId: metricId as string,
+    page,
+    pageSize: rowsPerPage,
+    ownershipEntityRefs,
+    orderBy,
+    order,
+  });
Evidence
metricId is optional at the component boundary and is passed through via as string. The API client
explicitly throws when metricId is falsy, so guarding earlier would avoid unnecessary async work and
provide a clearer user experience.

workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/ScorecardEntitiesPage.tsx[30-47]
workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/EntitiesTable.tsx[62-73]
workspaces/scorecard/plugins/scorecard/src/api/index.ts[254-256]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Optional `metricId` is forced to `string` and used to call APIs, leading to avoidable errors/requests.
### Issue Context
The API client already throws for missing metricId; the UI should handle this before making calls.
### Fix Focus Areas
- workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/ScorecardEntitiesPage.tsx[30-73]
- workspaces/scorecard/plugins/scorecard/src/components/ScorecardEntitiesPage/EntitiesTable/EntitiesTable.tsx[37-74]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


5. Ownership hook leaks 🐞 Bug ⛯ Reliability
Description
useOwnershipEntityRefs does not handle promise rejection or component unmount. This can cause
unhandled promise rejections and React warnings about setting state on an unmounted component.
Code

workspaces/scorecard/plugins/scorecard/src/hooks/useOwnershipEntityRefs.ts[R20-28]

+export const useOwnershipEntityRefs = () => {
+  const identityApi = useApi(identityApiRef);
+  const [ownershipEntityRefs, setOwnershipEntityRefs] = useState<string[]>([]);
+
+  useEffect(() => {
+    identityApi.getBackstageIdentity().then(identity => {
+      setOwnershipEntityRefs(identity?.ownershipEntityRefs ?? []);
+    });
+  }, [identityApi]);
Evidence
The hook calls getBackstageIdentity() without catch handling and always sets state when the promise
resolves, regardless of whether the component is still mounted.

workspaces/scorecard/plugins/scorecard/src/hooks/useOwnershipEntityRefs.ts[20-28]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The identity fetch promise is not cancelled/guarded and has no rejection handling.
### Issue Context
This hook is used by the entities drill-down to filter by ownership; failures/no-identity should not produce unhandled rejections.
### Fix Focus Areas
- workspaces/scorecard/plugins/scorecard/src/hooks/useOwnershipEntityRefs.ts[17-28]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@ShiranHi
Copy link

@Eswaraiahsapram looks great to me! The only thing is that we need to fix the "Metric ID not found" screen, maybe we can use this UI?

Copy link
Contributor

@HusneShabbir HusneShabbir left a comment

Choose a reason for hiding this comment

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

@Eswaraiahsapram UI scaling issues have been observed when the resolution changes.

Screen.Recording.2026-03-12.at.4.47.32.PM.mov

Copy link
Contributor

@HusneShabbir HusneShabbir left a comment

Choose a reason for hiding this comment

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

The entity names in the aggregated scorecard drill-down change after a few seconds. Is this expected behavior?

Also, the API response initially shows "entityName": "red-hat-developer-hub", but changes to "Red Hat Developer Hub" shortly after. See the attached recording and screenshots.

Screen.Recording.2026-03-12.at.11.21.39.PM.mov
Image Image

@Eswaraiahsapram
Copy link
Member Author

The entity names in the aggregated scorecard drill-down change after a few seconds. Is this expected behavior?

Also, the API response initially shows "entityName": "red-hat-developer-hub", but changes to "Red Hat Developer Hub" shortly after. See the attached recording and screenshots.

Hi @HusneShabbir , this is expected. Initially, we receive the entity names. And then we fetch the entity titles using Catalog API (similar to what we did in Adoption insights #2311).

@Eswaraiahsapram Eswaraiahsapram force-pushed the feat/scorecard-entities-page-ui branch 3 times, most recently from 170e861 to 873419d Compare March 17, 2026 10:47
@imykhno
Copy link
Contributor

imykhno commented Mar 17, 2026

Thank you for implementation new logic and applying changes after review.

I would like to ask you to check sonarqubecloud report and try to fix issues and code duplication if it's possible.

Point regarding displaying entities which have failed status

Following the Figma design, the status should be displayed in grey; however, in our current implementation, it appears as green.
image

Question about warning icon

Should this icon be hidden when all entities are displayed without errors, or should it always be visible?
image

Question about "Last updated" value

For my opinion displaying Today for last updated may confuse user as it's not clear to understand when actually this happened. Can we display something like Less than a minute ago, {n} minute(s) ago, {n} hour(s) ago?
image

Question about success synced metrics versus total number metrics

The Figma design displays a ratio between successfully synced entity metrics and the total number of scorecard-supported entities (e.g., 37/45 entities). Are we expected to implement this logic in this PR, or will it be handled in a separate one?

@Eswaraiahsapram
Copy link
Member Author

Thanks, @imykhno, for pointing out these items

Point regarding displaying entities which have failed status

Following the Figma design, the status should be displayed in grey; however, in our current implementation, it appears as green.

For this one, we have a Jira - https://redhat.atlassian.net/browse/RHIDP-12633. I'm planning to work on it as separate PR. I'm also integrating react-query in that PR

Question about warning icon

Should this icon be hidden when all entities are displayed without errors, or should it always be visible?

We are currently using pagination in this table. Because of that, it’s not possible to determine whether all entities have values or a valid status across the full dataset. While filtering could help, it only applies to the current page. This may lead to cases where the first page looks fine, but missing data on subsequent pages causes the warning icon to toggle inconsistently.

Question about "Last updated" value

For my opinion displaying Today for last updated may confuse user as it's not clear to understand when actually this happened. Can we display something like Less than a minute ago, {n} minute(s) ago, {n} hour(s) ago?

I have created a story for this - https://redhat.atlassian.net/browse/RHIDP-12712

Question about success synced metrics versus total number metrics

The Figma design displays a ratio between successfully synced entity metrics and the total number of scorecard-supported entities (e.g., 37/45 entities). Are we expected to implement this logic in this PR, or will it be handled in a separate one?

Once the backend changes are ready, I’ll update this. If needed, I’ll create a separate task for it.

@dzemanov
Copy link
Member

We are currently using pagination in this table. Because of that, it’s not possible to determine whether all entities have values or a valid status across the full dataset. While filtering could help, it only applies to the current page. This may lead to cases where the first page looks fine, but missing data on subsequent pages causes the warning icon to toggle inconsistently.

Definitely agree on consistent display. I'm just not convinced the warning icon should always be visible. Maybe @PatAKnight could have the backend send back this information when it fetches all that entities anyway.

Once the backend changes are ready, I’ll update this. If needed, I’ll create a separate task for it.

cc @PatAKnight
About displaying success_entities/all_entities total, not sure we have any task for this.

@Eswaraiahsapram Eswaraiahsapram force-pushed the feat/scorecard-entities-page-ui branch from 47f632c to e86b10f Compare March 18, 2026 09:17
@Eswaraiahsapram Eswaraiahsapram force-pushed the feat/scorecard-entities-page-ui branch from e86b10f to cda6f67 Compare March 18, 2026 09:41
Copy link
Contributor

@imykhno imykhno left a comment

Choose a reason for hiding this comment

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

Thank you @Eswaraiahsapram for this PR. I have tested it locally, and it works as expected. All the questions I raised have been addressed, and we have agreed that the remaining items will be fixed or implemented in separate PRs (tasks).
/lgtm

@openshift-ci openshift-ci bot added lgtm and removed lgtm labels Mar 18, 2026
Copy link
Contributor

@imykhno imykhno left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Mar 18, 2026
Copy link
Contributor

@HusneShabbir HusneShabbir left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Member

@dzemanov dzemanov left a comment

Choose a reason for hiding this comment

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

Thank you!

Copy link
Member

@christoph-jerolimov christoph-jerolimov left a comment

Choose a reason for hiding this comment

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

Some more or less small change requests. Please take a look and I will try to review it tomorrow evening again.

Comment on lines +34 to +37
// Ignore button-name for icon-only buttons that have a tooltip (e.g. scorecard "Last updated" info icon)
const filteredViolations = accessibilityScanResults.violations.filter(
v => v.id !== 'button-name',
);

Choose a reason for hiding this comment

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

What a11y issue is here ignored? @HusneShabbir


test('Verify threshold tooltips', async () => {
test('Verify threshold and last updated tooltips', async () => {
const lastUpdatedFormatted = '24 Jan 2026';

Choose a reason for hiding this comment

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

Are we running the tests with different languages? Shouldn't this string be depending on that language?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point 👍
Currently, lastupdated is not localized, and we're using a fixed format in English. As part of this task https://redhat.atlassian.net/browse/RHIDP-12712 we can address localization and update the tests.

Comment on lines +140 to +148
sx={{
width: 520,
height: 480,
'& > *': {
height: '100%',
minHeight: 0,
display: 'flex',
flexDirection: 'column',
},

Choose a reason for hiding this comment

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

Why do we need this "magic code" here? Magic means for me that numbers comes from "somewhere" that I coudln't understand without more information.

width: 420, height: 480? 🤷‍♂️

Can you explain it here or maybe better add a comment that this is aligned with a common box in the homepage? When that's the reason? But shouldn't this card work anyway on different layouts?

Maybe its worth to have here multiple ScorecardHomepageCards with different sizes so that its easy to verify how they look look like in different cases?

Copy link
Member Author

Choose a reason for hiding this comment

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

I can add multiple ScorecardHomepageCard variants with different sizes so it's easier to verify how it behaves across layouts. Ideally, the card should adapt to the parent’s width and height. That’s the intention behind these styles.

I'll also add a comment

Comment on lines +57 to +64
getAggregatedScorecardEntities(options: {
metricId: string;
page: number;
pageSize: number;
ownershipEntityRefs?: string[];
orderBy?: string | null;
order?: 'asc' | 'desc';
}): Promise<EntityMetricDetailResponse>;

Choose a reason for hiding this comment

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

Can you please extract the options type as GetAggregatedScorecardEntitiesOptions (with or without prefix Get) so that the same typedefinition isn't needed in the implementation?

Comment on lines +48 to +53
* @param metricId - The ID of the metric to get aggregated entities for
* @param page - The page number to retrieve
* @param pageSize - The number of entities per page
* @param ownershipEntityRefs - Optional array of ownership entity refs to filter entities by
* @param orderBy - Optional column to sort by
* @param order - Optional sort order

Choose a reason for hiding this comment

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

That documentation isn't right. The param is called options and its an object. The documentation says there are 6 params. Please move that documentation to a new type for the options.


import Box from '@mui/material/Box';
import { useTheme } from '@mui/material/styles';
import MuiTooltip from '@mui/material/Tooltip';

Choose a reason for hiding this comment

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

Suggested change
import MuiTooltip from '@mui/material/Tooltip';
import Tooltip from '@mui/material/Tooltip';

Comment on lines +51 to +102
const [page, setPage] = useState<number>(1);
const [rowsPerPage, setRowsPerPage] = useState<number>(5);
const { t } = useTranslation();

const [sortState, setSortState] = useState<{
orderBy: string | null;
order: 'asc' | 'desc';
}>({
orderBy: null,
order: 'asc',
});

const { orderBy, order } = sortState;

const ownershipEntityRefs = useOwnershipEntityRefs();

const {
aggregatedScorecardEntities,
loadingData: loadingDataEntities,
error: entitiesError,
} = useAggregatedScorecardEntities({
metricId: metricId as string,
page,
pageSize: rowsPerPage,
ownershipEntityRefs,
orderBy,
order,
});

const isNotFound = entitiesError?.message?.includes('NotFoundError');
if (isNotFound) {
setMetricNotFound?.(true);
}

useEffect(() => {
setMetricTitle(aggregatedScorecardEntities?.metricMetadata?.title ?? '');
}, [aggregatedScorecardEntities?.metricMetadata?.title, setMetricTitle]);

const handleChangeRowsPerPage = useCallback(
(event: ChangeEvent<HTMLInputElement>) => {
setRowsPerPage(Number(event.target.value));
},
[],
);

const handleSortRequest = useCallback((columnId: string) => {
setSortState(prev =>
prev.orderBy !== columnId
? { orderBy: columnId, order: 'asc' }
: { ...prev, order: prev.order === 'asc' ? 'desc' : 'asc' },
);
}, []);

Choose a reason for hiding this comment

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

It would be nice if we would use Backstage Core Components Table here. But as we discussed, we can keep that for now and clean it up when we migrate to Backstage UI.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, thanks a lot 😊

Comment on lines +94 to +125
return (
<Box
component={Paper}
elevation={0}
sx={{
display: 'flex',
justifyContent: 'flex-end',
padding: 1,
}}
>
<TablePagination
labelRowsPerPage={null}
count={count}
page={page}
rowsPerPageOptions={rowsPerPageOptions}
rowsPerPage={rowsPerPage}
onPageChange={handleChangePage}
onRowsPerPageChange={handleChangeRowsPerPage}
ActionsComponent={EntitiesTablePagination}
component="div"
sx={{
'& .v5-MuiTablePagination-select:focus': {
backgroundColor: 'transparent',
},
border: 'none',
'& .v5-MuiTablePagination-input': {
mr: 1,
},

'& .v5-MuiTablePagination-displayedRows': {
display: 'none',
},

Choose a reason for hiding this comment

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

The complete header wouldn't be needed with Backstage Core Components Table or Backstage UI Table.

I'm also not a fan of all these extra styles here! We should stay more on the detaults otherwise this will create a big tech debt for the future and the risk that our plugins a) looks different then others and b) doesn't look with other themes!

cc @rohitkrai03 @imykhno @redhat-developer/rhdh-ui

Choose a reason for hiding this comment

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

Btw, did you have tested these extra styles just with yarn start or also on a cluster or rhdh-local with a build version. I remember that some styles are minified in MUI and works only in development mode.

Please double check with a final build version as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've only tested it with yarn start so far. I'll verify it with a final build version as well

Comment on lines +50 to +55
sx={{
p: 3,
display: 'flex',
alignItems: 'center',
fontWeight: 'bold',
fontSize: '1.5rem',

Choose a reason for hiding this comment

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

Why is a custom font size needed here? Couldn't we go with one of the default headlines?

Comment on lines +88 to +94
export const ScorecardEntitiesPage = scorecardPlugin.provide(
createRoutableExtension({
name: 'ScorecardEntitiesPage',
component: () =>
import('./components/ScorecardHomepageSection').then(
m => m.ScorecardEntitiesPage,
),

Choose a reason for hiding this comment

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

ScorecardEntitiesPage is a named export ScorecardEntitiesPage in the file ScorecardHomepageSection. That's confusing.

Can you please please clean this up and create a dedicated components/ScorecardEntitiesPage or pages/ScorecardEntitiesPage and exports with the same name just the page.

Personally I would call the page ScorecardPage -- and when we add NFS support if can split it in subpages and call this one ScorecardEntitiesSubpage (as subpage).

So for now I would prefer pages/ScorecardPage.tsx. Wdyt?

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree the current naming is confusing. I’ll refactor this by moving it to pages/ScorecardPage.tsx and keep the export aligned with the file name.

Eswaraiahsapram and others added 7 commits March 19, 2026 21:47
…, a11y (#4)

- Use homePage.getCard() for ARIA snapshot assertions (scope to scorecard article)
- Add getThresholdsSnapshot link with /url for drill-down; keep getMissingPermissionSnapshot without link
- Add getLastUpdatedLabel and verifyLastUpdatedTooltip in HomePage (POM, translation-based)
- Rename test to 'Verify threshold and last updated tooltips'
- Filter button-name violations in accessibility helper for icon-only tooltip buttons

Made-with: Cursor

Co-authored-by: HusneShabbir <husneshabbir447@gmail.com>
@Eswaraiahsapram Eswaraiahsapram force-pushed the feat/scorecard-entities-page-ui branch from 12550e9 to 3d36564 Compare March 19, 2026 16:37
@openshift-ci
Copy link

openshift-ci bot commented Mar 19, 2026

New changes are detected. LGTM label has been removed.

@openshift-ci openshift-ci bot removed the lgtm label Mar 19, 2026
@sonarqubecloud
Copy link

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.

6 participants