feat(scorecard):Added extension for scorecard homepage and metric page#2637
feat(scorecard):Added extension for scorecard homepage and metric page#2637rohitratannagar wants to merge 6 commits intoredhat-developer:mainfrom
Conversation
Signed-off-by: rohitratannagar <rohitratannagar2003@gmail.com>
Review Summary by QodoAdd scorecard homepage extensions and refactor alpha module structure
WalkthroughsDescription• Added homepage extensions with scorecard widgets for GitHub and Jira metrics • Refactored alpha exports to separate concerns into dedicated extension files • Integrated home plugin with dynamic homepage layout configuration • Added home navigation support and updated sidebar navigation ordering • Updated dependencies to include home plugin and dynamic homepage packages Diagramflowchart LR
A["Scorecard Plugin"] -->|"exports"| B["API Extension"]
A -->|"exports"| C["Entity Tab Extension"]
A -->|"exports"| D["Homepage Widgets"]
A -->|"exports"| E["Metric Page Extension"]
D -->|"includes"| F["GitHub Homepage Card"]
D -->|"includes"| G["Jira Homepage Card"]
H["App Config"] -->|"configures"| I["Homepage Layout"]
I -->|"displays"| F
I -->|"displays"| G
J["App.tsx"] -->|"registers"| K["Home Module"]
K -->|"uses"| D
File Changes1. workspaces/scorecard/plugins/scorecard/src/alpha/extensions/api.ts
|
|
Important This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior. Changed Packages
|
Code Review by Qodo
1. Scorecard API not wired
|
Signed-off-by: rohitratannagar <rohitratannagar2003@gmail.com>
| const app = createApp({ | ||
| features: [ | ||
| rhdhThemeModule, | ||
| homePageModule, | ||
| homepageTranslationsModule, | ||
| scorecardHomeModule, | ||
| scorecardCatalogModule, | ||
| scorecardTranslationsModule, | ||
| signInModule, |
There was a problem hiding this comment.
1. Scorecard api not wired 🐞 Bug ✓ Correctness
The scorecard NFS app registers Scorecard homepage widgets, but it does not register the Scorecard frontend plugin that provides the ApiBlueprint for scorecardApiRef. As a result, any widget/page/tab using useApi(scorecardApiRef) will fail at runtime due to a missing API implementation.
Agent Prompt
### Issue description
`workspaces/scorecard/packages/app/src/App.tsx` registers `scorecardHomeModule` (homepage widgets) and other scorecard modules, but it never registers the Scorecard frontend plugin default export. The Scorecard API implementation (`scorecardApiRef` -> `ScorecardApiClient`) is provided via an `ApiBlueprint` extension that is attached to the default frontend plugin; without adding that plugin to `createApp({ features: [...] })`, `useApi(scorecardApiRef)` calls will fail.
### Issue Context
- `useAggregatedScorecard` calls `useApi(scorecardApiRef)`.
- The API factory is created in `scorecardApi` and registered via the default Scorecard plugin’s `extensions`.
### Fix Focus Areas
- workspaces/scorecard/packages/app/src/App.tsx[17-45]
### Expected change
1. Import the default plugin export from `@red-hat-developer-hub/backstage-plugin-scorecard/alpha` (e.g., `import scorecardPlugin, { ... } from ...`).
2. Add `scorecardPlugin` to the `features` array (typically near other plugins), keeping the existing modules (`scorecardHomeModule`, `scorecardCatalogModule`, `scorecardTranslationsModule`).
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
9b1e00c to
b80c299
Compare
Signed-off-by: rohitratannagar <rohitratannagar2003@gmail.com>
b80c299 to
5a8f965
Compare
Signed-off-by: rohitratannagar <rohitratannagar2003@gmail.com>
| catalogPlugin, | ||
| homePlugin, | ||
| scorecardPlugin, |
There was a problem hiding this comment.
you donot need to add these explicitly.
Signed-off-by: rohitratannagar <rohitratannagar2003@gmail.com>
8dcca11 to
6d025eb
Compare
Signed-off-by: rohitratannagar <rohitratannagar2003@gmail.com>
|



description
JIRA TICKET: https://redhat.atlassian.net/browse/RHIDP-12535
legacyandnfsmodes viaAPP_MODE,Screen.Recording.2026-03-29.at.11.20.32.PM.mov
✔️ Checklist