Skip to content

chore(homepage): graduate nfs /alpha exports to main entry point - #4191

Open
divyanshiGupta wants to merge 1 commit into
redhat-developer:mainfrom
divyanshiGupta:graduate-homepage
Open

chore(homepage): graduate nfs /alpha exports to main entry point#4191
divyanshiGupta wants to merge 1 commit into
redhat-developer:mainfrom
divyanshiGupta:graduate-homepage

Conversation

@divyanshiGupta

@divyanshiGupta divyanshiGupta commented Aug 6, 2026

Copy link
Copy Markdown
Member

Hey, I just made a Pull Request!

https://redhat.atlassian.net/browse/RHIDP-14519

This PR graduates NFS homepage exports from /alpha to the primary package entry point, and moved OFS exports to ./legacy.

Moved all files from alpha to src and OFS only file to legacy sub-folder.

✔️ 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

rhdh-gh-app Bot commented Aug 6, 2026

Copy link
Copy Markdown

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-legacy workspaces/homepage/packages/app-legacy none v0.0.0
app workspaces/homepage/packages/app none v0.0.0
@red-hat-developer-hub/backstage-plugin-homepage workspaces/homepage/plugins/homepage major v1.17.1

@sonarqubecloud

sonarqubecloud Bot commented Aug 6, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
12.6% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@rhdh-qodo-merge

Copy link
Copy Markdown

PR Summary by Qodo

Graduate homepage NFS exports to root; move OFS exports to /legacy

✨ Enhancement 📝 Documentation ⚙️ Configuration changes 🧪 Tests 🕐 40+ Minutes

Grey Divider

AI Description

• Promote NFS homepage modules from /alpha to the package root (breaking change).
• Move Scalprum/OFS exports to ./legacy and require module: Legacy in dynamic plugin config.
• Update docs, example apps, and API reports/tests to reflect new entry points.
Diagram

graph TD
  nfsApp["NFS app"] --> root[["homepage root export"]]
  ofsApp["OFS/Scalprum consumer"] --> legacy[["/legacy export"]] --> i18n["i18n resources"]
  root --> transMod[["translations module export"]] --> i18n
  alpha[["/alpha export"]] --> i18n
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Keep temporary root-level OFS re-exports (deprecate before removal)
  • ➕ Reduces immediate breakage for OFS consumers importing from the package root
  • ➕ Enables a softer migration window with deprecation messaging
  • ➖ Keeps the public surface ambiguous (NFS vs OFS)
  • ➖ Prolongs maintenance and increases risk of accidentally relying on deprecated paths
2. Create separate package for legacy/OFS (e.g. -legacy)
  • ➕ Hard separation of concerns; clearer dependency boundaries
  • ➕ Allows independent versioning and eventual retirement of legacy code
  • ➖ Heavier repo/release management change
  • ➖ More migration work for consumers than a simple subpath import
3. Provide a codemod + explicit migration validator
  • ➕ Faster, less error-prone upgrades for downstreams
  • ➕ Can catch missing module: Legacy or incorrect import paths early
  • ➖ Additional tooling to maintain
  • ➖ May not be worth it if downstream count is small

Recommendation: The chosen approach (root = NFS, ./legacy = OFS, ./alpha = translations-only) is the clearest long-term API split and matches the breaking major bump. If downstream churn is a concern, consider a short-lived deprecation bridge (root re-exporting legacy) in a minor release, but otherwise keeping a clean separation is preferable.

Files changed (73) +777 / -393 · 12 not counted

Enhancement (2) +104 / -2
index.tsGraduate NFS module exports to package root and define public module surface +69/-2

Graduate NFS module exports to package root and define public module surface

• Moves the NFS 'FrontendModule' definitions into the root entry point, making 'homePageModule' the default export and exposing 'homepageTranslationsModule' plus translation refs/resources. Updates package documentation to reflect NFS-first intent.

workspaces/homepage/plugins/homepage/src/index.ts

legacy.tsAdd /legacy entry point for OFS API surface + translations +35/-0

Add /legacy entry point for OFS API surface + translations

• Creates a dedicated legacy entry point that configures MUI class name prefixing for v5 compatibility, re-exports the legacy plugin API, and re-exports translations.

workspaces/homepage/plugins/homepage/src/legacy.ts

Refactor (36) +116 / -120
App.tsxSwitch legacy app imports to /legacy entry point +2/-2

Switch legacy app imports to /legacy entry point

• Updates imports to pull legacy components and translations from '@.../backstage-plugin-homepage/legacy' instead of mixing root and '/alpha'. Aligns the legacy app with the new export partitioning.

workspaces/homepage/packages/app-legacy/src/App.tsx

DebugHomepageAvailableWidgets.tsxPoint debug widget viewer to legacy hook location +1/-1

Point debug widget viewer to legacy hook location

• Updates the relative monorepo import to use 'src/legacy/hooks/useDynamicHomePageCards' after the legacy code move.

workspaces/homepage/packages/app-legacy/src/components/homepage/DebugHomepageAvailableWidgets.tsx

DebugHomepageDefaultWidgets.tsxImport defaultWidgetsApiRef from /legacy +1/-1

Import defaultWidgetsApiRef from /legacy

• Adjusts the debug component to import 'defaultWidgetsApiRef' from the new './legacy' subpath.

workspaces/homepage/packages/app-legacy/src/components/homepage/DebugHomepageDefaultWidgets.tsx

App.tsxSwitch NFS app imports from /alpha to package root +1/-1

Switch NFS app imports from /alpha to package root

• Updates the NFS app to import 'homePageModule' and 'homepageTranslationsModule' from the package root rather than '.../alpha'.

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

index.tsxUpdate dev NFS entry to import modules from package root +1/-1

Update dev NFS entry to import modules from package root

• Switches dev setup imports from '.../alpha' to the package root for NFS module consumption.

workspaces/homepage/plugins/homepage/dev/index.tsx

legacy.tsxUpdate legacy dev entry to import plugin from src/legacy +1/-1

Update legacy dev entry to import plugin from src/legacy

• Updates the dev legacy entry point to import from '../src/legacy/plugin' after the legacy surface was moved under 'src/legacy'.

workspaces/homepage/plugins/homepage/dev/legacy.tsx

alpha.tsCreate /alpha entry that re-exports translations only +24/-0

Create /alpha entry that re-exports translations only

• Adds a new 'src/alpha.ts' entry point that documents the new contract and re-exports translations for the '/alpha' subpath.

workspaces/homepage/plugins/homepage/src/alpha.ts

CustomizableGridLayout.tsxFix NFS layout imports after moving code out of alpha folder structure +4/-6

Fix NFS layout imports after moving code out of alpha folder structure

• Updates relative imports for styles/types/hooks and switches to the extracted 'utils/nfsLayout' helper. Removes stale '@alpha' doc tags for NFS components.

workspaces/homepage/plugins/homepage/src/components/CustomizableGridLayout.tsx

index.tsStop re-exporting legacy EntitySection from NFS component index +0/-2

Stop re-exporting legacy EntitySection from NFS component index

• Removes legacy component re-exports from the NFS component index, keeping only the NFS content export.

workspaces/homepage/plugins/homepage/src/components/EntitySection/index.ts

HomePageLayout.tsxNormalize HomePageLayout imports to new src structure +3/-5

Normalize HomePageLayout imports to new src structure

• Updates relative imports for translation hook, Header component, and shared types to align with the new module layout and NFS graduation.

workspaces/homepage/plugins/homepage/src/components/HomePageLayout.tsx

index.tsStop re-exporting legacy OnboardingSection from NFS component index +0/-2

Stop re-exporting legacy OnboardingSection from NFS component index

• Removes legacy component re-exports from the NFS index, leaving only 'OnboardingSectionContent'.

workspaces/homepage/plugins/homepage/src/components/OnboardingSection/index.ts

ReadOnlyGirdLayout.tsxUpdate read-only NFS grid to use new shared paths and nfsLayout helper +3/-5

Update read-only NFS grid to use new shared paths and nfsLayout helper

• Adjusts imports for types/styles and switches 'isCardADefaultConfiguration' to 'utils/nfsLayout' after the restructure.

workspaces/homepage/plugins/homepage/src/components/ReadOnlyGirdLayout.tsx

index.tsStop re-exporting legacy TemplateSection from NFS component index +0/-2

Stop re-exporting legacy TemplateSection from NFS component index

• Removes legacy TemplateSection re-exports from the NFS index, leaving only 'TemplateSectionContent'.

workspaces/homepage/plugins/homepage/src/components/TemplateSection/index.ts

TranslatedUpstreamHomePageCards.tsxFix TranslatedUpstreamHomePageCards utility import path +1/-1

Fix TranslatedUpstreamHomePageCards utility import path

• Updates the import path for 'useHomePageCardTitle' after utilities were reorganized under 'src/utils'.

workspaces/homepage/plugins/homepage/src/components/TranslatedUpstreamHomePageCards.tsx

apis.tsUpdate NFS API blueprints to import from new api location +1/-3

Update NFS API blueprints to import from new api location

• Adjusts relative imports so NFS API blueprints source API refs/clients from 'src/api' via the new path structure. Removes stale '@alpha' doc tags.

workspaces/homepage/plugins/homepage/src/extensions/apis.ts

homePageCards.tsxUpdate NFS widget extensions to import components from new locations +21/-41

Update NFS widget extensions to import components from new locations

• Rewrites dynamic 'import()' paths for NFS widgets to point at the new component locations. Removes stale '@alpha' annotations and updates translated upstream card imports.

workspaces/homepage/plugins/homepage/src/extensions/homePageCards.tsx

homePageLayoutExtension.tsxUpdate NFS layout extension to use relocated HomePageCardConfig type +1/-2

Update NFS layout extension to use relocated HomePageCardConfig type

• Fixes the type import path for 'HomePageCardConfig' after types were moved/normalized during the export graduation.

workspaces/homepage/plugins/homepage/src/extensions/homePageLayoutExtension.tsx

CustomizableGrid.tsxRepoint legacy grid component to shared hooks/types after restructure +4/-4

Repoint legacy grid component to shared hooks/types after restructure

• Updates legacy component imports to reference shared types and hooks from the non-legacy locations while keeping legacy behavior unchanged.

workspaces/homepage/plugins/homepage/src/legacy/components/CustomizableGrid.tsx

DefaultWidgetsCustomizableGrid.tsxUpdate legacy default-widgets grids to use shared api/types/translations utils +9/-6

Update legacy default-widgets grids to use shared api/types/translations utils

• Adjusts imports for 'VisibleDefaultWidget', mount point types, hooks, and translation utilities to match the new directory split.

workspaces/homepage/plugins/homepage/src/legacy/components/DefaultWidgetsCustomizableGrid.tsx

DefaultWidgetsReadOnlyGrid.tsxUpdate legacy default-widgets read-only grid imports +2/-2

Update legacy default-widgets read-only grid imports

• Repoints imports for 'VisibleDefaultWidget' and mount point types to the new shared locations after the reorganization.

workspaces/homepage/plugins/homepage/src/legacy/components/DefaultWidgetsReadOnlyGrid.tsx

DynamicCustomizableHomePage.tsxImport LocalClock type from shared component location +1/-1

Import LocalClock type from shared component location

• Switches 'LocalClockProps' type import to the shared 'components/LocalClock' location to avoid legacy-local duplication.

workspaces/homepage/plugins/homepage/src/legacy/components/DynamicCustomizableHomePage.tsx

DynamicHomePage.tsxImport LocalClock type from shared component location +1/-1

Import LocalClock type from shared component location

• Updates 'LocalClockProps' import to the shared component location consistent with the new split.

workspaces/homepage/plugins/homepage/src/legacy/components/DynamicHomePage.tsx

Headline.tsxLegacy Headline component aligned to new shared structure not counted

Legacy Headline component aligned to new shared structure

• Adapts legacy Headline component imports/structure to the new 'legacy' split while preserving runtime behavior.

workspaces/homepage/plugins/homepage/src/legacy/components/Headline.tsx

HomePage.tsxUpdate legacy HomePage to use shared Header/types/translation hook +3/-3

Update legacy HomePage to use shared Header/types/translation hook

• Moves legacy HomePage dependencies (Header, translation hook, mount point types) to the shared locations after the export restructure.

workspaces/homepage/plugins/homepage/src/legacy/components/HomePage.tsx

HomePageLegacyCards.tsxConsume NFS card content components from shared locations +3/-3

Consume NFS card content components from shared locations

• Updates legacy card wrappers to import the underlying content components (Onboarding/Entity/Template) from the shared 'components/' paths.

workspaces/homepage/plugins/homepage/src/legacy/components/HomePageLegacyCards.tsx

Markdown.tsxLegacy Markdown component aligned to new shared structure not counted

Legacy Markdown component aligned to new shared structure

• Adapts the legacy Markdown component’s imports/structure to the new 'legacy' split while preserving behavior.

workspaces/homepage/plugins/homepage/src/legacy/components/Markdown.tsx

MarkdownCard.tsxLegacy MarkdownCard component aligned to new shared structure not counted

Legacy MarkdownCard component aligned to new shared structure

• Updates the legacy MarkdownCard component to follow the new directory and import layout.

workspaces/homepage/plugins/homepage/src/legacy/components/MarkdownCard.tsx

Placeholder.tsxLegacy Placeholder component aligned to new shared structure not counted

Legacy Placeholder component aligned to new shared structure

• Adjusts the legacy Placeholder component to match the new import paths and module split.

workspaces/homepage/plugins/homepage/src/legacy/components/Placeholder.tsx

QuickAccessCardLegacy.tsxImport QuickAccessCard types/content from shared component +1/-1

Import QuickAccessCard types/content from shared component

• Updates the legacy QuickAccessCard wrapper to source content and prop types from the shared 'components/QuickAccessCard' location.

workspaces/homepage/plugins/homepage/src/legacy/components/QuickAccessCardLegacy.tsx

ReadOnlyGrid.tsxUpdate legacy ReadOnlyGrid imports to shared types/utils +2/-2

Update legacy ReadOnlyGrid imports to shared types/utils

• Repoints mount point type and configuration helper imports to the shared locations after the restructure.

workspaces/homepage/plugins/homepage/src/legacy/components/ReadOnlyGrid.tsx

VisitListener.tsxLegacy VisitListener aligned to new shared structure not counted

Legacy VisitListener aligned to new shared structure

• Updates legacy VisitListener implementation to remain consistent with the reorganized module layout.

workspaces/homepage/plugins/homepage/src/legacy/components/VisitListener.tsx

WorldClock.tsxLegacy WorldClock aligned to new shared structure not counted

Legacy WorldClock aligned to new shared structure

• Updates legacy WorldClock component to remain consistent with the reorganized module layout.

workspaces/homepage/plugins/homepage/src/legacy/components/WorldClock.tsx

useDefaultWidgets.tsRepoint legacy hook to shared DefaultWidgetsApiClient path +1/-1

Repoint legacy hook to shared DefaultWidgetsApiClient path

• Updates legacy 'useDefaultWidgets' to import API refs/types from the shared 'api/DefaultWidgetsApiClient'.

workspaces/homepage/plugins/homepage/src/legacy/hooks/useDefaultWidgets.ts

useDynamicHomePageCards.tsUpdate useDynamicHomePageCards to use shared HomePageCardMountPoint type +1/-1

Update useDynamicHomePageCards to use shared HomePageCardMountPoint type

• Adjusts the hook’s type import to the shared 'types' path while retaining the Scalprum integration behavior.

workspaces/homepage/plugins/homepage/src/legacy/hooks/useDynamicHomePageCards.ts

plugin.tsRefactor legacy plugin surface to depend on shared routes/api/types and new lazy imports +23/-19

Refactor legacy plugin surface to depend on shared routes/api/types and new lazy imports

• Moves legacy plugin dependencies (routes, API exports, and shared component types) to their new locations, and updates lazy component loaders to import from shared components where appropriate. Ensures 'defaultWidgetsApiRef' and associated types are re-exported from the shared API module rather than legacy-local paths.

workspaces/homepage/plugins/homepage/src/legacy/plugin.ts

nfsLayout.tsExtract NFS layout helper for default-layout detection not counted

Extract NFS layout helper for default-layout detection

• Introduces/updates a dedicated NFS layout utility ('isCardADefaultConfiguration') used by NFS grid components after the restructure.

workspaces/homepage/plugins/homepage/src/utils/nfsLayout.ts

Tests (8) +62 / -2
EntitySection.test.tsxUpdate EntitySection test imports for new legacy component paths +1/-1

Update EntitySection test imports for new legacy component paths

• Adjusts the test to import 'EntitySection' from the new 'legacy/components' location while keeping hook mocking intact.

workspaces/homepage/plugins/homepage/src/components/EntitySection/EntitySection.test.tsx

Headline.test.tsxLegacy Headline tests updated for moved shared dependencies not counted

Legacy Headline tests updated for moved shared dependencies

• Updates tests in the legacy Headline area to remain compatible with the new file layout and import paths.

workspaces/homepage/plugins/homepage/src/legacy/components/Headline.test.tsx

Markdown.test.tsxLegacy Markdown tests updated for moved shared dependencies not counted

Legacy Markdown tests updated for moved shared dependencies

• Updates tests in the legacy Markdown area to remain compatible with the new file layout and import paths.

workspaces/homepage/plugins/homepage/src/legacy/components/Markdown.test.tsx

MarkdownCard.test.tsxLegacy MarkdownCard tests updated for moved shared dependencies not counted

Legacy MarkdownCard tests updated for moved shared dependencies

• Updates tests in the legacy MarkdownCard area to remain compatible with the new file layout and import paths.

workspaces/homepage/plugins/homepage/src/legacy/components/MarkdownCard.test.tsx

Placeholder.test.tsxLegacy Placeholder tests updated for moved shared dependencies not counted

Legacy Placeholder tests updated for moved shared dependencies

• Updates tests in the legacy Placeholder area to remain compatible with the new file layout and import paths.

workspaces/homepage/plugins/homepage/src/legacy/components/Placeholder.test.tsx

useDynamicHomePageCards.test.tsxUpdate useDynamicHomePageCards tests to use shared HomePageCardMountPoint type +1/-1

Update useDynamicHomePageCards tests to use shared HomePageCardMountPoint type

• Repoints the test’s type import to the shared 'types' module after the legacy split.

workspaces/homepage/plugins/homepage/src/legacy/hooks/useDynamicHomePageCards.test.tsx

plugin.test.tsLegacy plugin tests updated for new split entry points not counted

Legacy plugin tests updated for new split entry points

• Updates legacy plugin tests to remain compatible with the new module layout and entry-point changes.

workspaces/homepage/plugins/homepage/src/legacy/plugin.test.ts

nfsExports.test.tsAdd NFS exports test to validate root module surface +60/-0

Add NFS exports test to validate root module surface

• Adds a focused test suite verifying that the root entry exports 'homePageModule' (as default and named), exports the translations module correctly, and continues to export translation refs/resources.

workspaces/homepage/plugins/homepage/src/nfsExports.test.ts

Documentation (23) +458 / -265
catalog-starred.mdUpdate Catalog Starred docs to use Legacy module in dynamic config +2/-0

Update Catalog Starred docs to use Legacy module in dynamic config

• Adjusts dynamic plugin mount point examples to include 'module: Legacy' for OFS consumption after the export move.

workspaces/homepage/docs/cards/catalog-starred.md

entity-section.mdUpdate Entity Section docs to use Legacy module in dynamic config +1/-0

Update Entity Section docs to use Legacy module in dynamic config

• Adds 'module: Legacy' to the documented mount point example to reflect the new OFS entry point expectations.

workspaces/homepage/docs/cards/entity-section.md

featured-docs.mdUpdate Featured Docs docs to use Legacy module in dynamic config +1/-0

Update Featured Docs docs to use Legacy module in dynamic config

• Updates the dynamic plugin example configuration to specify 'module: Legacy' for the FeaturedDocs card import.

workspaces/homepage/docs/cards/featured-docs.md

headline.mdUpdate Headline docs to use Legacy module in dynamic config +1/-0

Update Headline docs to use Legacy module in dynamic config

• Adds 'module: Legacy' to the Headline mount point documentation to align with the new legacy export location.

workspaces/homepage/docs/cards/headline.md

markdown.mdUpdate Markdown docs to use Legacy module in dynamic config +2/-0

Update Markdown docs to use Legacy module in dynamic config

• Updates both MarkdownCard and Markdown examples to include 'module: Legacy' in mount point configuration.

workspaces/homepage/docs/cards/markdown.md

onboarding-section.mdUpdate Onboarding Section docs to use Legacy module in dynamic config +1/-0

Update Onboarding Section docs to use Legacy module in dynamic config

• Adds 'module: Legacy' in the mount point example for OnboardingSection to reflect './legacy' usage for OFS.

workspaces/homepage/docs/cards/onboarding-section.md

placeholder.mdUpdate Placeholder docs to use Legacy module in dynamic config +6/-0

Update Placeholder docs to use Legacy module in dynamic config

• Adds 'module: Legacy' across multiple Placeholder mount point examples to match the new legacy module requirement.

workspaces/homepage/docs/cards/placeholder.md

quick-access.mdUpdate Quick Access docs to use Legacy module in dynamic config +1/-0

Update Quick Access docs to use Legacy module in dynamic config

• Adds 'module: Legacy' to the QuickAccessCard mount point example for OFS consumers.

workspaces/homepage/docs/cards/quick-access.md

recently-visited.mdUpdate Recently Visited docs to use Legacy module in dynamic config +1/-0

Update Recently Visited docs to use Legacy module in dynamic config

• Adds 'module: Legacy' to the RecentlyVisitedCard mount point example to reflect the legacy entry point.

workspaces/homepage/docs/cards/recently-visited.md

search.mdUpdate Search docs to use Legacy module in dynamic config +1/-0

Update Search docs to use Legacy module in dynamic config

• Adds 'module: Legacy' to the SearchBar mount point example to align with './legacy' exports.

workspaces/homepage/docs/cards/search.md

template-section.mdUpdate Template Section docs to use Legacy module in dynamic config +1/-0

Update Template Section docs to use Legacy module in dynamic config

• Adds 'module: Legacy' to the TemplateSection mount point example to reflect the new legacy export split.

workspaces/homepage/docs/cards/template-section.md

top-visited.mdUpdate Top Visited docs to use Legacy module in dynamic config +1/-0

Update Top Visited docs to use Legacy module in dynamic config

• Adds 'module: Legacy' to the TopVisitedCard mount point example after the OFS exports move.

workspaces/homepage/docs/cards/top-visited.md

worldclock.mdUpdate World Clock docs to use Legacy module in dynamic config +1/-0

Update World Clock docs to use Legacy module in dynamic config

• Adds 'module: Legacy' to the WorldClock mount point example to reflect legacy/OFS configuration changes.

workspaces/homepage/docs/cards/worldclock.md

create-a-new-card.mdUpdate new-card guide to include module selection for legacy configs +1/-0

Update new-card guide to include module selection for legacy configs

• Updates the sample mount point configuration to specify 'module: Legacy' in dynamic plugin examples.

workspaces/homepage/docs/create-a-new-card.md

defaults.mdUpdate default config docs to require module: Legacy for legacy examples +11/-0

Update default config docs to require module: Legacy for legacy examples

• Adds 'module: Legacy' to documented dynamicRoutes and mountPoints in the defaults examples, including optional widgets.

workspaces/homepage/docs/defaults.md

header.mdUpdate header docs to set module: Legacy in dynamicRoutes examples +9/-0

Update header docs to set module: Legacy in dynamicRoutes examples

• Adds 'module: Legacy' to multiple dynamicRoutes examples for legacy dynamic plugin usage.

workspaces/homepage/docs/header.md

layout-options.mdUpdate layout options docs to include module: Legacy +7/-0

Update layout options docs to include module: Legacy

• Adds 'module: Legacy' to multiple placeholder layout examples to align with new legacy module exposure.

workspaces/homepage/docs/layout-options.md

user-customization.mdUpdate customization docs to include module: Legacy in dynamicRoutes +1/-0

Update customization docs to include module: Legacy in dynamicRoutes

• Adds 'module: Legacy' to the dynamic route example for DynamicCustomizableHomePage.

workspaces/homepage/docs/user-customization.md

README.mdDocument new entry points and migration steps (root vs legacy vs alpha) +26/-8

Document new entry points and migration steps (root vs legacy vs alpha)

• Updates usage docs to declare root as the primary NFS entry point, './legacy' for OFS, and './alpha' for translations. Adds explicit migration guidance and an example legacy import snippet.

workspaces/homepage/plugins/homepage/README.md

report-alpha.api.mdTrim alpha API report to translations-only +0/-11

Trim alpha API report to translations-only

• Updates the API Extractor report for '/alpha' to remove NFS module exports, leaving only translation refs/resources as intended.

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

report-homepage-translations-module.api.mdMark translations module API as public +1/-1

Mark translations module API as public

• Updates the API report to reflect the translations module export becoming '@public' (rather than '@alpha').

workspaces/homepage/plugins/homepage/report-homepage-translations-module.api.md

report-legacy.api.mdAdd API report for new /legacy entry point +322/-0

Add API report for new /legacy entry point

• Introduces a new API Extractor report describing the legacy/OFS public surface now exposed via '@.../homepage/legacy'.

workspaces/homepage/plugins/homepage/report-legacy.api.md

report.api.mdUpdate root API report to NFS module + translations only +60/-245

Update root API report to NFS module + translations only

• Rewrites the root API report to represent the NFS-first package surface (FrontendModule exports plus translations), removing legacy component exports from the root path.

workspaces/homepage/plugins/homepage/report.api.md

Other (4) +37 / -4
graduate-homepage-nfs.mdAdd major changeset documenting NFS/OFS export graduation +8/-0

Add major changeset documenting NFS/OFS export graduation

• Introduces a major-version changeset describing the breaking move of NFS exports to the package root and OFS exports to './legacy'. Notes that '/alpha' remains for translations and dynamic-plugin configs must specify 'module: Legacy'.

workspaces/homepage/.changeset/graduate-homepage-nfs.md

app-config.dynamic.yamlUpdate sample dynamic plugin config to use module: Legacy and translationResources +13/-1

Update sample dynamic plugin config to use module: Legacy and translationResources

• Aligns the example Scalprum configuration with the new 'Legacy' exposed module, including translationResources and 'module: Legacy' on routes/mountPoints.

workspaces/homepage/plugins/homepage/app-config.dynamic.yaml

package.jsonRewire package exports: root=NFS, /legacy=OFS, /alpha=translations; update Scalprum exposes +15/-2

Rewire package exports: root=NFS, /legacy=OFS, /alpha=translations; update Scalprum exposes

• Changes 'exports' to map './alpha' to 'src/alpha.ts' and adds './legacy' to 'src/legacy.ts'. Adds a 'scalprum.exposedModules' map including 'Legacy', updates 'typesVersions' accordingly, and keeps the translations module export.

workspaces/homepage/plugins/homepage/package.json

homepageTranslationsModuleExport.tsChange translations module federation default export to come from root entry +1/-1

Change translations module federation default export to come from root entry

• Updates the translations module federation default export to reference './index' rather than './alpha', matching the new root graduation of NFS modules.

workspaces/homepage/plugins/homepage/src/homepageTranslationsModuleExport.ts

@rhdh-qodo-merge

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (3) 📘 Rule violations (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Missing homePageModule export 🐞 Bug ≡ Correctness
Description
workspaces/homepage/plugins/homepage/src/index.ts default-exports an anonymous
createFrontendModule(...) result but never exports a named homePageModule, while in-repo
consumers/tests import { homePageModule }. This causes deterministic TypeScript/module-resolution
failures in nfsExports.test.ts and workspaces/homepage/packages/app/src/App.tsx.
Code

workspaces/homepage/plugins/homepage/src/index.ts[R61-64]

+export default createFrontendModule({
+  pluginId: 'home', // upstream home!
+  extensions: [
+    homePageLayoutExtension,
Relevance

●●● Strong

Named export mismatch causes in-repo TS/test failures; straightforward fix aligns with API
report/consumers.

PR-#2346

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The entry point only has a default export for the created module, but tests and app code import
homePageModule as a named export; the generated API report also documents `export { homePageModule
}`, so the current implementation cannot satisfy its own API contract.

workspaces/homepage/plugins/homepage/src/index.ts[52-98]
workspaces/homepage/plugins/homepage/src/nfsExports.test.ts[17-21]
workspaces/homepage/packages/app/src/App.tsx[20-33]
workspaces/homepage/plugins/homepage/report.api.md[10-14]

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 package root entry point (`src/index.ts`) default-exports a frontend module but does not provide the named export `homePageModule`, even though the package’s own tests, docs, and in-repo consumers import it by name.

## Issue Context
The API report (`report.api.md`) and `nfsExports.test.ts` expect both a default export and a named `homePageModule` export.

## Fix Focus Areas
- workspaces/homepage/plugins/homepage/src/index.ts[52-98]

### Suggested change
Bind the module to a constant and export it both as default and as a named export, e.g.

```ts
export const homePageModule = createFrontendModule({ ... });
export default homePageModule;
```

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


2. Alpha export breaks NFS 🐞 Bug ≡ Correctness
Description
This PR makes the /alpha entry point translation-only, but
workspaces/scorecard/packages/app/src/App.tsx still imports homePageModule and
homepageTranslationsModule from @red-hat-developer-hub/backstage-plugin-homepage/alpha. Those
named exports no longer exist on /alpha, so the Scorecard NFS app will fail to compile.
Code

workspaces/homepage/plugins/homepage/src/alpha.ts[24]

+export * from './translations';
Relevance

●●● Strong

Deterministic compile break from removed /alpha exports; repo usually fixes such breakages promptly.

PR-#2346

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
/alpha now re-exports only translations (and its API report contains no module exports), while the
scorecard NFS app still imports the removed NFS module symbols from /alpha.

workspaces/homepage/plugins/homepage/src/alpha.ts[17-24]
workspaces/homepage/plugins/homepage/report-alpha.api.md[5-12]
workspaces/scorecard/packages/app/src/App.tsx[19-24]
workspaces/homepage/plugins/homepage/README.md[111-115]

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 homepage plugin’s `/alpha` subpath no longer exports NFS modules, but the scorecard NFS app still imports `homePageModule` and `homepageTranslationsModule` from `/alpha`.

## Issue Context
`/alpha` now only re-exports translations.

## Fix Focus Areas
- workspaces/scorecard/packages/app/src/App.tsx[19-24]

### Suggested change
Update the scorecard NFS app to import:
- `homePageModule` and `homepageTranslationsModule` from `@red-hat-developer-hub/backstage-plugin-homepage`
(and keep `/alpha` only for translation resources if needed).

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


3. Root no longer exports legacy 🐞 Bug ≡ Correctness
Description
This PR moves legacy/OFS exports off the package root into the new /legacy entry point, but
workspaces/scorecard/packages/app-legacy/src/App.tsx still imports legacy symbols from
@red-hat-developer-hub/backstage-plugin-homepage. Those symbols will no longer be available at the
root, breaking the Scorecard legacy app build.
Code

workspaces/homepage/plugins/homepage/src/legacy.ts[R33-35]

+export * from './legacy/plugin';
+
+export { homepageTranslations, homepageTranslationRef } from './translations';
Relevance

●●● Strong

Breaking import path change (root -> /legacy) would fail builds; these correctness issues are
typically accepted.

PR-#2855

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The root entry point exports only NFS modules/translations, while legacy exports are now provided
via the /legacy entry point; the Scorecard legacy app still imports legacy symbols from the root,
which will not resolve.

workspaces/homepage/plugins/homepage/src/index.ts[52-98]
workspaces/homepage/plugins/homepage/src/legacy.ts[17-35]
workspaces/scorecard/packages/app-legacy/src/App.tsx[65-72]
workspaces/homepage/plugins/homepage/README.md[99-115]

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 homepage plugin’s legacy/OFS exports have been moved to `@red-hat-developer-hub/backstage-plugin-homepage/legacy`, but the scorecard legacy app still imports legacy components/types from the package root.

## Issue Context
The package root is now NFS-only; legacy API surface is exported from `src/legacy.ts`.

## Fix Focus Areas
- workspaces/scorecard/packages/app-legacy/src/App.tsx[67-72]

### Suggested change
Change the scorecard legacy app imports to:
```ts
import { DynamicCustomizableHomePage, OnboardingSection, HomePageCardMountPoint } from '@red-hat-developer-hub/backstage-plugin-homepage/legacy';
```
(and keep translations import where appropriate).

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


Grey Divider

Context used
⚠️ Tickets: not configured — ticket URL found in PR but could not be fetched — check ticket provider credentials
✅ Compliance rules (platform): 11 rules
✅ Cross-repo context
  Explored: repo: redhat-developer/rhdh (sha: 4c5a4e85)
  Explored: repo: redhat-developer/rhdh-operator (sha: 3119afc2)
  Explored: repo: redhat-developer/rhdh-local (sha: a1776caa)
  Not relevant to this PR: redhat-developer/rhdh-chart

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

@rhdh-qodo-merge rhdh-qodo-merge Bot added documentation Improvements or additions to documentation enhancement New feature or request Tests labels Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request Tests workspace/homepage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant