Skip to content

fix(scorecard): updated entities table header Metric to Status - #2650

Merged
christoph-jerolimov merged 1 commit into
redhat-developer:mainfrom
Eswaraiahsapram:fix/scorecard-12909
Mar 30, 2026
Merged

fix(scorecard): updated entities table header Metric to Status#2650
christoph-jerolimov merged 1 commit into
redhat-developer:mainfrom
Eswaraiahsapram:fix/scorecard-12909

Conversation

@Eswaraiahsapram

@Eswaraiahsapram Eswaraiahsapram commented Mar 30, 2026

Copy link
Copy Markdown
Member

Hey, I just made a Pull Request!

Fix

Description

  • Updated Scorecard entities table Header Metrics to Status

Screenshots

image image 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-qodo-merge

Copy link
Copy Markdown

Review Summary by Qodo

Update scorecard entities table header from Metric to Status

🐞 Bug fix

Grey Divider

Walkthroughs

Description
• Updated scorecard entities table header from "Metric" to "Status"
• Changed translation key across all language files (de, es, fr, it, ja)
• Updated constants and test references to use new translation key
• Updated API documentation to reflect translation key change
Diagram
flowchart LR
  A["Translation Files<br/>de, es, fr, it, ja"] -- "Change key to<br/>header.status" --> B["Constants<br/>SCORECARD_ENTITIES_TABLE_HEADERS"]
  B -- "Update label<br/>reference" --> C["Table Header<br/>Display"]
  D["Test Files"] -- "Update assertions<br/>to new key" --> C
  E["API Documentation"] -- "Reflect key<br/>change" --> F["report.api.md<br/>report-alpha.api.md"]
Loading

Grey Divider

File Changes

1. workspaces/scorecard/plugins/scorecard/src/translations/de.ts Localization +1/-1

Updated German translation for table header

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


2. workspaces/scorecard/plugins/scorecard/src/translations/es.ts Localization +1/-1

Updated Spanish translation for table header

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


3. workspaces/scorecard/plugins/scorecard/src/translations/fr.ts Localization +1/-1

Updated French translation for table header

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


View more (8)
4. workspaces/scorecard/plugins/scorecard/src/translations/it.ts Localization +1/-1

Updated Italian translation for table header

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


5. workspaces/scorecard/plugins/scorecard/src/translations/ja.ts Localization +1/-1

Updated Japanese translation for table header

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


6. workspaces/scorecard/plugins/scorecard/src/translations/ref.ts Localization +1/-1

Updated reference translation key to status

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


7. workspaces/scorecard/plugins/scorecard/src/utils/constants.ts ⚙️ Configuration changes +1/-1

Updated table header constant label reference

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


8. workspaces/scorecard/.changeset/large-grapes-appear.md 📝 Documentation +5/-0

Added changeset for patch release

workspaces/scorecard/.changeset/large-grapes-appear.md


9. workspaces/scorecard/plugins/scorecard/report-alpha.api.md 📝 Documentation +1/-1

Updated API documentation for translation key

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


10. workspaces/scorecard/plugins/scorecard/report.api.md 📝 Documentation +1/-1

Updated API documentation for translation key

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


11. workspaces/scorecard/plugins/scorecard/src/components/ScorecardPage/EntitiesTable/__tests__/EntitiesTableHeader.test.tsx 🧪 Tests +3/-3

Updated test assertions for new translation key

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


Grey Divider

Qodo Logo

@rhdh-qodo-merge

rhdh-qodo-merge Bot commented Mar 30, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Patch includes breaking API 🐞 Bug ⚙ Maintainability
Description
This PR removes the public translation key entitiesPage.entitiesTable.header.metric from the
exported scorecardTranslationRef and replaces it with ...header.status, which is a breaking
change for downstream TypeScript consumers. The changeset marks this as a patch release, which can
cause unexpected compile failures for consumers upgrading within 2.x.
Code

workspaces/scorecard/plugins/scorecard/report.api.md[R84-87]

    readonly 'entitiesPage.entitiesTable.header.owner': string;
-    readonly 'entitiesPage.entitiesTable.header.metric': string;
    readonly 'entitiesPage.entitiesTable.header.lastUpdated': string;
+    readonly 'entitiesPage.entitiesTable.header.status': string;
    readonly 'entitiesPage.entitiesTable.header.value': string;
Evidence
scorecardTranslationRef is a public API surface (API report + package exports). The API report now
includes ...header.status and no longer includes ...header.metric, so any downstream code or
translation bundles referencing the old key will break type-checking. Repo contributing docs state
releases follow semantic versioning via changesets, but this PR’s changeset marks the change as
patch.

workspaces/scorecard/plugins/scorecard/report.api.md[84-90]
workspaces/scorecard/plugins/scorecard/src/index.ts[30-32]
workspaces/scorecard/plugins/scorecard/package.json[1-6]
workspaces/scorecard/.changeset/large-grapes-appear.md[1-5]
CONTRIBUTING.md[75-78]

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 PR renames a `@public` translation key (`entitiesPage.entitiesTable.header.metric` -> `entitiesPage.entitiesTable.header.status`) on the exported `scorecardTranslationRef`, which is a breaking public API change. The accompanying changeset marks the release as `patch`, which violates semver expectations for a 2.x published package.

### Issue Context
Because `scorecardTranslationRef` is exported from the package entrypoint and its keys are part of the generated public API report, removing an existing key can break downstream TypeScript builds (custom translations / consumers referencing the old key).

### Fix options
Choose **one**:
1) **Preferred (keep patch + avoid breaking):** keep the old key for compatibility (either keep using it, or add it back as an alias).
  - Add back `entitiesPage.entitiesTable.header.metric` (mapped to "Status") in `ref.ts` and in each locale file (de/es/fr/it/ja) so both keys exist.
  - Optionally keep the UI using the new `...header.status` key.
2) **If you intend to break consumers:** change the changeset bump to **major** (since package is 2.x) to reflect the breaking API change.

### Fix Focus Areas
- workspaces/scorecard/plugins/scorecard/src/translations/ref.ts[104-133]
- workspaces/scorecard/plugins/scorecard/src/translations/de.ts[95-115]
- workspaces/scorecard/plugins/scorecard/src/translations/es.ts[95-115]
- workspaces/scorecard/plugins/scorecard/src/translations/fr.ts[95-115]
- workspaces/scorecard/plugins/scorecard/src/translations/it.ts[95-115]
- workspaces/scorecard/plugins/scorecard/src/translations/ja.ts[95-115]
- workspaces/scorecard/.changeset/large-grapes-appear.md[1-5]
- workspaces/scorecard/plugins/scorecard/report.api.md[80-90]
- workspaces/scorecard/plugins/scorecard/report-alpha.api.md[188-195]

ⓘ 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

@rhdh-gh-app

rhdh-gh-app Bot commented Mar 30, 2026

Copy link
Copy Markdown

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/backstage-plugin-scorecard workspaces/scorecard/plugins/scorecard patch v2.4.0

@sonarqubecloud

Copy link
Copy Markdown

Comment on lines 84 to 87
readonly 'entitiesPage.entitiesTable.header.owner': string;
readonly 'entitiesPage.entitiesTable.header.metric': string;
readonly 'entitiesPage.entitiesTable.header.lastUpdated': string;
readonly 'entitiesPage.entitiesTable.header.status': string;
readonly 'entitiesPage.entitiesTable.header.value': string;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. Patch includes breaking api 🐞 Bug ⚙ Maintainability

This PR removes the public translation key entitiesPage.entitiesTable.header.metric from the
exported scorecardTranslationRef and replaces it with ...header.status, which is a breaking
change for downstream TypeScript consumers. The changeset marks this as a patch release, which can
cause unexpected compile failures for consumers upgrading within 2.x.
Agent Prompt
### Issue description
The PR renames a `@public` translation key (`entitiesPage.entitiesTable.header.metric` -> `entitiesPage.entitiesTable.header.status`) on the exported `scorecardTranslationRef`, which is a breaking public API change. The accompanying changeset marks the release as `patch`, which violates semver expectations for a 2.x published package.

### Issue Context
Because `scorecardTranslationRef` is exported from the package entrypoint and its keys are part of the generated public API report, removing an existing key can break downstream TypeScript builds (custom translations / consumers referencing the old key).

### Fix options
Choose **one**:
1) **Preferred (keep patch + avoid breaking):** keep the old key for compatibility (either keep using it, or add it back as an alias).
   - Add back `entitiesPage.entitiesTable.header.metric` (mapped to "Status") in `ref.ts` and in each locale file (de/es/fr/it/ja) so both keys exist.
   - Optionally keep the UI using the new `...header.status` key.
2) **If you intend to break consumers:** change the changeset bump to **major** (since package is 2.x) to reflect the breaking API change.

### Fix Focus Areas
- workspaces/scorecard/plugins/scorecard/src/translations/ref.ts[104-133]
- workspaces/scorecard/plugins/scorecard/src/translations/de.ts[95-115]
- workspaces/scorecard/plugins/scorecard/src/translations/es.ts[95-115]
- workspaces/scorecard/plugins/scorecard/src/translations/fr.ts[95-115]
- workspaces/scorecard/plugins/scorecard/src/translations/it.ts[95-115]
- workspaces/scorecard/plugins/scorecard/src/translations/ja.ts[95-115]
- workspaces/scorecard/.changeset/large-grapes-appear.md[1-5]
- workspaces/scorecard/plugins/scorecard/report.api.md[80-90]
- workspaces/scorecard/plugins/scorecard/report-alpha.api.md[188-195]

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

@christoph-jerolimov christoph-jerolimov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Lgtm! Thanks @Eswaraiahsapram

@christoph-jerolimov
christoph-jerolimov merged commit 2667f70 into redhat-developer:main Mar 30, 2026
10 checks passed
@dzemanov dzemanov mentioned this pull request Mar 31, 2026
4 tasks
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