fix(operational-dashboard): remove stray unused widget catalog entries - #280
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Amber reviewStatus: Complete |
9ffb64e to
c6f1b7c
Compare
|
Note: I ran |
Update OP-DASH-21 and PI-07 so specs match the removed standalone managed-clusters, managed-cluster-status, and managed-databases widgets and record the layout persistence key v29 bump. Co-authored-by: Cursor <cursoragent@cursor.com>
amber-review-bot
left a comment
There was a problem hiding this comment.
Verdict
Re-verified at head 7574215: this remains a clean, symmetric removal of three catalog-only operational-dashboard widgets (managed-clusters, managed-cluster-status, managed-databases), and the new docs: commit brings the specs back in line with the code. The remaining open item is not a defect in this PR but a cross-PR merge-order/renumbering decision it shares with the other in-flight dashboard change.
Amber Analysis
The removal is functionally complete and internally consistent. The five removed messages.ts descriptors match the five removed locales/en.json entries one-for-one, ManagedClusterStatusCard and its import are gone with no remaining references, and the inventory-status branch in createWidgetMapping now unconditionally returns ManagedDatabaseStatusCard (correct, since managed-database-status is the only surviving inventory-status widget). The managed-clusters / managed-databases metric IDs are still consumed by the surviving managed-cluster-providers, managed-cluster-regions, and managed-database-status widgets plus dashboard-metric-sources.ts and the inventory-summary path, and ClusterIcon/DatabaseIcon remain in use, so nothing is orphaned. Confidence: High.
Previous concerns
- Code contradicted normative spec OP-DASH-21 (widget catalog, scenario, version history): addressed. Commit
7574215updatesspecs/web-console/operational-dashboard.spec.mdOP-DASH-21 to state the catalogSHALL NOT registerthe three standalone widget types, removes theScenario: Operator adds managed cluster status donut, and records thev29bump in the version-history line ("Removingmanaged-clusters,managed-cluster-status, andmanaged-databasesfrom the widget catalog SHALL bump the layout persistence key to...layout.v29"). The companionspecs/platform/platform-inventory.spec.mdPI-07 table drops the three rows and its suppression scenario now targetsmanaged-database-status. Code and spec now agree. - OP-DASH-21 catalog/scenario spec-consistency inline finding: addressed by the same commit; see the spec text above.
- Non-conventional PR/commit title: addressed. The PR title is now
fix(operational-dashboard): remove stray unused widget catalog entries, a valid Conventional Commit for the squash merge. (The branch nameHYERSHELL-338remains misspelled but is cosmetic.) - Confirm
i18n:checkpasses for the hand-editeden.jsondeletions: cannot verify. The 5-descriptor / 5-locale removal is symmetric by inspection, but I cannot runformatjs extracthere; this remains a CI-verify item (the author notedpnpm run i18n:extractproduced no updates).
Cross-PR coordination
PR #279 (registered-user adoption metrics) reshapes the same operational-dashboard default layout and edits the same files this PR touches (operational-dashboard-page.tsx, dashboard-layout-template.ts, messages.ts, dashboard-widget.tsx, components/web-console/locales/en.json, and both specs/web-console/operational-dashboard.spec.md and specs/platform/platform-inventory.spec.md). Both branch off the same v28 base of the strictly-ordered LAYOUT_STORAGE_KEY: this PR advances the code key and spec version history to v29, while #279 advances both straight to v30, omitting v29. The raw keys do not collide, so there is no localStorage hazard; the issue is monotonic numbering and spec consistency. More substantively, #279 retains the three widget catalog entries (managed-clusters, managed-cluster-status, managed-databases) that this PR deletes, so the two PRs disagree on the final widget catalog and combined default-layout shape. Maintainers and the shared author must pick a merge order, renumber the layout key and spec version history so they stay monotonic, and agree whether those three widgets are deprecated (this PR) or preserved (#279) in the merged result before either lands.
Findings Summary (ordered by severity, highest first)
No new findings. All prior substantive concerns are addressed; one CI-verify note remains.
- [Note] Confirm
i18n:checkis green in CI for the hand-editeden.jsondeletions - Spec Consistency
Convention Checklist
| Convention | Result |
|---|---|
| Code matches authoritative spec (desired state) | Pass |
| Conventional commit / PR title | Pass |
| No em dashes in text files | Pass |
| i18n descriptors and locale entries kept in sync | Pass |
| No orphaned imports/components after removal | Pass |
| PatternFly / canonical shared components reused | Pass |
PI-03 must cover both managed_clusters and managed_databases List RBAC to match authorization.go and PI-09. Database inventory removal belongs in a follow-on PR (openshift-online#272); widget catalog cleanup follows in openshift-online#280. HYPERSHELL-279 Co-authored-by: Cursor <cursoragent@cursor.com>
PI-03 must cover both managed_clusters and managed_databases List RBAC to match authorization.go and PI-09. Database inventory removal belongs in a follow-on PR (openshift-online#272); widget catalog cleanup follows in openshift-online#280. HYPERSHELL-279 Co-authored-by: Cursor <cursoragent@cursor.com>
PI-03 must cover both managed_clusters and managed_databases List RBAC to match authorization.go and PI-09. Database inventory removal belongs in a follow-on PR (openshift-online#272); widget catalog cleanup follows in openshift-online#280. HYPERSHELL-279 Co-authored-by: Cursor <cursoragent@cursor.com>
…PERSHELL-279] (openshift-online#279) * HYPERSHELL-279 specs * HYPERSHELL-279 Code * Add platform:admin role to dev admin user * Updated specs * Amber review fixes * perf(api-server): cache daily activity upserts per user and UTC day Skip redundant INSERT ... ON CONFLICT DO NOTHING round-trips on the authenticated request path after a user is already recorded for the current UTC day. Retries on persistence failure to preserve best-effort RU-10 semantics. HYPERSHELL-279 Co-authored-by: Cursor <cursoragent@cursor.com> * fix(api-server): wrap user DAO errors with context Wrap gorm errors in activity and adoption count DAO methods so scrape and recording failures are easier to trace. HYPERSHELL-279 Co-authored-by: Cursor <cursoragent@cursor.com> * docs(spec): narrow inventory spec overlap with controller-local openshift-online#272 Scope PI-03 dashboard-inventory authorization to managed clusters only and document the adoption layout v30 bump in OP-DASH-11 so this PR does not reaffirm database inventory contract language that openshift-online#272 removes. Co-authored-by: Cursor <cursoragent@cursor.com> * docs(spec): restore managed_databases in PI-03 dashboard inventory auth PI-03 must cover both managed_clusters and managed_databases List RBAC to match authorization.go and PI-09. Database inventory removal belongs in a follow-on PR (openshift-online#272); widget catalog cleanup follows in openshift-online#280. HYPERSHELL-279 Co-authored-by: Cursor <cursoragent@cursor.com> * fix broken test after rebase --------- Co-authored-by: Cursor <cursoragent@cursor.com>

Summary
Fixes HYPERSHELL-338 by removing three stray operational dashboard widget types that were still registered in the widget catalog but not part of the default layout. On a fresh load (cleared local storage), those entries caused the Add widgets control to appear even though every default widget was already on the grid.
managed-clusters,managed-cluster-status, andmanaged-databasesManagedClusterStatusCardcomponent and related i18n stringshypershell.operational-dashboard.layout.v29so saved layouts reset cleanlyProblem
After clearing
localStorage, the operational dashboard showed an Add widgets button with three inventory widgets that could be added back:managed-clusters)managed-cluster-status)managed-databases)These were leftover registrations from earlier platform-inventory work. They were not on the default layout and were not intended to be user-facing yet, so a clean dashboard load should not offer anything to add.
Expected behavior:
Solution
Delete the stray widget mappings, rendering logic, and message keys for the three unused types. Platform inventory coverage on the default layout is unchanged.
Changes
packages/operational-dashboard-ui/src/pages/operational-dashboard-page.tsxmanaged-clustersinventory-status routing; bump layout key tov29packages/operational-dashboard-ui/src/pages/dashboard-widget.tsxManagedClusterStatusCardpackages/operational-dashboard-ui/src/dashboard/dashboard-layout-template.tspackages/operational-dashboard-ui/src/messages.tscomponents/web-console/locales/en.jsonTest plan
localStoragefor the web console origin (or use a fresh browser profile)inventory-summary, provider/region donuts, database status)managed-cluster-regions), open Add widgets, and confirm only the removed widget is listedpnpm --filter @openshift-online/hypershell-operational-dashboard-ui check