Skip to content

chore(quickstart): remove OFS re-exports from main entry point#3943

Open
divyanshiGupta wants to merge 2 commits into
redhat-developer:mainfrom
divyanshiGupta:remove-ofs-reexports-quickstart
Open

chore(quickstart): remove OFS re-exports from main entry point#3943
divyanshiGupta wants to merge 2 commits into
redhat-developer:mainfrom
divyanshiGupta:remove-ofs-reexports-quickstart

Conversation

@divyanshiGupta

@divyanshiGupta divyanshiGupta commented Jul 23, 2026

Copy link
Copy Markdown
Member

Hey, I just made a Pull Request!

Fixes: https://redhat.atlassian.net/browse/RHIDP-15631

Legacy (OFS) component exports have been removed from the main ./ entry point and are now exclusively available at the ./legacy subpath.

✔️ 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 Jul 23, 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/quickstart/packages/app-legacy none v0.0.0
@red-hat-developer-hub/backstage-plugin-quickstart workspaces/quickstart/plugins/quickstart major v1.12.1

@rhdh-qodo-merge

Copy link
Copy Markdown

PR Summary by Qodo

quickstart: move OFS exports to /legacy entrypoint (breaking)

✨ Enhancement 📝 Documentation ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Remove OFS/legacy component re-exports from the package root entrypoint.
• Expose OFS components only via @.../quickstart/legacy and Scalprum Legacy module.
• Update legacy app imports and docs/config to use the new legacy module path.
Diagram

graph TD
  A["OFS consumer app"] -->|"imports"| B["quickstart/legacy"] --> C["legacyExports.ts"]
  D["src/index.tsx (root)"] -->|"exports new-frontend only"| E["quickstart plugin (default)"]
  F["app-config.dynamic.yaml"] -->|"module: Legacy"| G["package.json exposedModules"] --> C
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Keep root re-exports with deprecation window
  • ➕ Non-breaking for OFS consumers; migration can be gradual
  • ➕ Allows emitting deprecation warnings/docs before removal
  • ➖ Prolongs mixed API surface and maintenance burden
  • ➖ Root entrypoint remains ambiguous (new vs legacy)
2. Split legacy exports into a separate package
  • ➕ Hard boundary between new and legacy APIs
  • ➕ Independent versioning/retirement of legacy surface
  • ➖ More publishing/packaging overhead
  • ➖ More disruptive dependency updates for consumers
3. Use conditional exports map (package.json exports)
  • ➕ Can route legacy vs default via explicit subpath exports in a standard Node pattern
  • ➕ Clearer runtime resolution than ad-hoc re-exports
  • ➖ Tooling/backstage bundler compatibility risk depending on environment
  • ➖ May be overkill vs current Scalprum + typesVersions approach

Recommendation: The PR’s approach (move OFS APIs to an explicit ./legacy subpath and require Scalprum module: Legacy) is the best fit for clarity and ongoing maintainability. A deprecation window could reduce disruption, but the current change is already well-signposted via a major changeset plus README/config updates, which is typically sufficient for a deliberate breaking release.

Files changed (10) +83 / -142

Enhancement (1) +0 / -2
index.tsxStop re-exporting legacy exports from the root entrypoint +0/-2

Stop re-exporting legacy exports from the root entrypoint

• Removes 'export * from './legacyExports'' so the package root only exposes the new frontend-system plugin/module exports. This enforces the breaking change that OFS consumers must use the './legacy' subpath.

workspaces/quickstart/plugins/quickstart/src/index.tsx

Bug fix (2) +5 / -5
QuickstartSidebarItem.tsxSwitch legacy app sidebar item imports to 'quickstart/legacy' +4/-4

Switch legacy app sidebar item imports to 'quickstart/legacy'

• Updates the legacy app’s 'useQuickstartDrawerContext' and related legacy helpers/types to import from the new '@.../quickstart/legacy' subpath. No functional behavior change beyond aligning with the new export location.

workspaces/quickstart/packages/app-legacy/src/components/Root/QuickstartSidebarItem.tsx

Root.tsxUpdate legacy app root quickstart imports to legacy subpath +1/-1

Update legacy app root quickstart imports to legacy subpath

• Changes 'QuickstartDrawerProvider', 'QuickstartDrawerContent', and 'QuickstartDrawerStateExposer' imports to come from '@.../quickstart/legacy'. Keeps the legacy app wired to the OFS surface after root re-exports are removed.

workspaces/quickstart/packages/app-legacy/src/components/Root/Root.tsx

Documentation (4) +62 / -134
README.mdDocument legacy/OFS imports and dynamic plugin module requirements +20/-4

Document legacy/OFS imports and dynamic plugin module requirements

• Clarifies that legacy exports require 'module: Legacy' for dynamic plugin mount points. Adds an explicit section instructing OFS consumers to update imports to the './legacy' subpath and updates examples accordingly.

workspaces/quickstart/plugins/quickstart/README.md

report-alpha.api.mdRegenerate alpha API report for translation key typing changes +14/-14

Regenerate alpha API report for translation key typing changes

• Reorders the 'quickstartTranslationRef' key typing block, moving many keys earlier in the type definition. This appears to be an API report regeneration rather than a semantic API change.

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

report-legacy.api.mdRegenerate legacy API report for translation key typing changes +14/-14

Regenerate legacy API report for translation key typing changes

• Updates the legacy API report to reflect the current ordering/shape of 'quickstartTranslationRef' translation keys. Like the alpha report change, this is consistent with report regeneration.

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

report.api.mdRemove legacy exports from root API report output +14/-102

Remove legacy exports from root API report output

• Updates the root API report to no longer list OFS/legacy exports (drawer provider/context, button, types) as public exports from the package root. Keeps the new-frontend exports (modules and translation ref) in the root surface.

workspaces/quickstart/plugins/quickstart/report.api.md

Other (3) +16 / -1
remove-ofs-reexports.mdAdd major changeset documenting OFS export breaking change +10/-0

Add major changeset documenting OFS export breaking change

• Introduces a changeset marking a major version bump for the quickstart plugin. Documents that OFS exports are no longer available from the root entrypoint and shows the required import migration to '@.../quickstart/legacy'.

workspaces/quickstart/.changeset/remove-ofs-reexports.md

app-config.dynamic.yamlRequire 'module: Legacy' for legacy dynamic mount points +5/-0

Require 'module: Legacy' for legacy dynamic mount points

• Updates dynamic plugin configuration to explicitly mount legacy extension points from the 'Legacy' module. Adds an inline comment explaining that legacy exports are not available on the default module.

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

package.jsonExpose legacy exports as a dedicated Scalprum module +1/-1

Expose legacy exports as a dedicated Scalprum module

• Adjusts Scalprum 'exposedModules' to map 'Legacy' to './src/legacyExports.ts' instead of exposing legacy via the main entrypoint. This aligns runtime module loading with the new './legacy' export boundary.

workspaces/quickstart/plugins/quickstart/package.json

@rhdh-qodo-merge

Copy link
Copy Markdown

Code Review by Qodo

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

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: d090bd1a)
  Explored: repo: redhat-developer/rhdh-local (sha: 937edb34)
  Not relevant to this PR: redhat-developer/rhdh-chart
  Not relevant to this PR: redhat-developer/rhdh-operator

Grey Divider


Remediation recommended

1. QuickstartPlugin module removed 🐞 Bug ≡ Correctness
Description
scalprum.exposedModules no longer exposes the QuickstartPlugin module key, so any existing
dynamic-plugin configuration using module: QuickstartPlugin will fail to resolve the module at
runtime. The changeset only documents the ./legacy import-path migration and does not mention this
separate Scalprum module-name migration.
Code

workspaces/quickstart/plugins/quickstart/package.json[R111-116]

    "name": "red-hat-developer-hub.backstage-plugin-quickstart",
    "exposedModules": {
      "PluginRoot": "./src/index.tsx",
-      "QuickstartPlugin": "./src/index.tsx",
+      "Legacy": "./src/legacyExports.ts",
      "Alpha": "./src/alpha.ts"
    }
Relevance

⭐⭐⭐ High

Breaking exposedModules/module rename needs explicit migration notes; team often accepts
doc/changelog updates for API behavior changes.

PR-#3764
PR-#3698

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
package.json shows QuickstartPlugin is no longer an exposed module, while the package changelog
indicates QuickstartPlugin was previously a supported/exposed module name; the changeset only
documents switching TS imports to the ./legacy subpath and does not mention the exposed-module-key
migration for dynamic plugin configs.

workspaces/quickstart/plugins/quickstart/package.json[110-116]
workspaces/quickstart/plugins/quickstart/CHANGELOG.md[15-26]
workspaces/quickstart/.changeset/remove-ofs-reexports.md[1-10]

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 removes the Scalprum exposed module key `QuickstartPlugin` (replacing it with `Legacy`). Any dynamic-plugin consumers still configured with `module: QuickstartPlugin` will fail to load exports at runtime, and this migration is not documented in the changeset.

### Issue Context
- The README + `app-config.dynamic.yaml` now instruct using `module: Legacy` for legacy exports, but existing installations may still reference the older exposed module key.
- The changeset is the primary upgrade note for consumers; it currently only shows TypeScript import-path changes.

### Fix Focus Areas
- workspaces/quickstart/plugins/quickstart/package.json[110-116]
- workspaces/quickstart/.changeset/remove-ofs-reexports.md[1-10]

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



Informational

2. RHDH wrapper lacks Legacy module 🔗 Cross-repo conflict ≡ Correctness
Description
This PR removes legacy (OFS) exports from the package root and requires consumers to use
@…/backstage-plugin-quickstart/legacy (and module: Legacy for dynamic-plugin wiring). The
redhat-developer/rhdh quickstart dynamic-plugin wrapper still re-exports from the root path and
does not expose a Legacy module, so upgrading that wrapper to the new major quickstart will break
legacy mountPoint wiring in RHDH deployments.
Code

workspaces/quickstart/plugins/quickstart/src/index.tsx[101]

-export * from './legacyExports';
Relevance

⭐ Low

Fix requires changes in downstream RHDH wrapper/exposedModules; prior reviews rejected adding
downstream-wrapper follow-up notes.

PR-#3896

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The PR explicitly makes legacy exports available only via ./legacy/Legacy, while the RHDH
wrapper still re-exports from the root entrypoint and does not expose any Legacy module in its own
Scalprum configuration, which is what the RHDH host resolves module/importName against.

workspaces/quickstart/.changeset/remove-ofs-reexports.md[1-10]
workspaces/quickstart/plugins/quickstart/package.json[73-80]
workspaces/quickstart/plugins/quickstart/package.json[110-116]
workspaces/quickstart/plugins/quickstart/app-config.dynamic.yaml[1-24]
External repo: redhat-developer/rhdh, dynamic-plugins/wrappers/red-hat-developer-hub-backstage-plugin-quickstart/src/index.ts [1-9]
External repo: redhat-developer/rhdh, dynamic-plugins/wrappers/red-hat-developer-hub-backstage-plugin-quickstart/package.json [56-65]

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

## Issue description
`@red-hat-developer-hub/backstage-plugin-quickstart` no longer re-exports OFS/legacy symbols from the package root; they live under `./legacy` and a Scalprum exposed module named `Legacy`. The RHDH dynamic-plugin wrapper currently exposes only `PluginRoot`/`Alpha` and re-exports from the package root, so it will not provide `QuickstartDrawerProvider`, `QuickstartButton`, etc. after RHDH upgrades to this new major.

## Issue Context
- The quickstart plugin now documents and ships legacy exports via `./legacy` and requires `module: Legacy` for dynamic plugin mount points.
- RHDH’s wrapper is the derived dynamic-plugin package that controls what modules are exposed to the RHDH host via `scalprum.exposedModules`.

## Fix Focus Areas
- dynamic-plugins/wrappers/red-hat-developer-hub-backstage-plugin-quickstart/src/index.ts[1-9]
- dynamic-plugins/wrappers/red-hat-developer-hub-backstage-plugin-quickstart/package.json[56-65]
- docs/dynamic-plugins/migrating-plugins-to-new-frontend-system.md[1067-1080]
- docs/dynamic-plugins/migrating-plugins-to-new-frontend-system.md[1108-1118]

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


3. RHDH quickstart docs outdated 🔗 Cross-repo conflict ⚙ Maintainability
Description
RHDH docs show quickstart legacy mountPoints using importName: QuickstartDrawerProvider etc. with
no module, implying the symbols exist in the default exposed module. After this PR, those symbols
are only available from the Legacy module (and /legacy import path), so RHDH’s docs (and any
configs based on them) will misconfigure quickstart when consuming the new major.
Code

workspaces/quickstart/plugins/quickstart/app-config.dynamic.yaml[R3-22]

    red-hat-developer-hub.backstage-plugin-quickstart:
+      # Legacy exports require `module: Legacy` — they are not available on the default module.
      translationResources:
        - importName: quickstartTranslations
          ref: quickstartTranslationRef
      mountPoints:
        - mountPoint: application/provider
          importName: QuickstartDrawerProvider
+          module: Legacy
        - mountPoint: application/internal/drawer-state
          importName: QuickstartDrawerStateExposer
+          module: Legacy
        - mountPoint: application/internal/drawer-content
          importName: QuickstartDrawerContent
+          module: Legacy
          config:
            id: quickstart
        - mountPoint: global.header/help
          importName: QuickstartButton
+          module: Legacy
Relevance

⭐ Low

Cross-repo RHDH docs update is typically treated as out-of-scope for this repo/PR.

PR-#3896

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The quickstart plugin now requires module: Legacy for legacy mountPoints, but RHDH’s wiring
documentation still shows the legacy quickstart mountPoints without any module selector, which will
fail once consumers upgrade to this breaking-change release.

workspaces/quickstart/plugins/quickstart/app-config.dynamic.yaml[1-24]
External repo: redhat-developer/rhdh, docs/dynamic-plugins/frontend-plugin-wiring.md [531-546]

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

## Issue description
RHDH documentation for quickstart dynamic-plugin wiring omits the `module: Legacy` selector for mountPoints that reference legacy/OFS exports. With the new major quickstart release, these docs will lead users to a broken configuration.

## Issue Context
The quickstart plugin’s own `app-config.dynamic.yaml` now documents that the legacy exports are not on the default module and must be loaded from `module: Legacy`.

## Fix Focus Areas
- docs/dynamic-plugins/frontend-plugin-wiring.md[531-546]
- workspaces/quickstart/plugins/quickstart/app-config.dynamic.yaml[1-24]

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


Grey Divider

Qodo Logo

@rhdh-qodo-merge rhdh-qodo-merge Bot added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 23, 2026
@divyanshiGupta
divyanshiGupta force-pushed the remove-ofs-reexports-quickstart branch from 4cabc13 to a04e11e Compare July 23, 2026 14:03
@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.32%. Comparing base (6e61d04) to head (5f80526).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3943      +/-   ##
==========================================
- Coverage   57.34%   57.32%   -0.02%     
==========================================
  Files        2382     2382              
  Lines       95586    95562      -24     
  Branches    26682    26681       -1     
==========================================
- Hits        54811    54784      -27     
- Misses      39317    39320       +3     
  Partials     1458     1458              
Flag Coverage Δ *Carryforward flag
adoption-insights 84.54% <ø> (ø) Carriedforward from 6e61d04
ai-integrations 69.06% <ø> (ø) Carriedforward from 6e61d04
app-defaults 69.79% <ø> (ø) Carriedforward from 6e61d04
augment 46.67% <ø> (ø) Carriedforward from 6e61d04
boost 75.83% <ø> (ø) Carriedforward from 6e61d04
bulk-import 72.55% <ø> (ø) Carriedforward from 6e61d04
cost-management 13.55% <ø> (ø) Carriedforward from 6e61d04
dcm 60.72% <ø> (ø) Carriedforward from 6e61d04
extensions 56.29% <ø> (ø) Carriedforward from 6e61d04
global-floating-action-button 71.18% <ø> (ø) Carriedforward from 6e61d04
global-header 62.17% <ø> (ø) Carriedforward from 6e61d04
homepage 47.70% <ø> (ø) Carriedforward from 6e61d04
install-dynamic-plugins 56.77% <ø> (ø) Carriedforward from 6e61d04
intelligent-assistant 74.05% <ø> (ø) Carriedforward from 6e61d04
konflux 91.98% <ø> (ø) Carriedforward from 6e61d04
lightspeed 69.02% <ø> (ø) Carriedforward from 6e61d04
mcp-integrations 83.40% <ø> (ø) Carriedforward from 6e61d04
orchestrator 62.67% <ø> (ø) Carriedforward from 6e61d04
quickstart 62.72% <ø> (-2.32%) ⬇️
sandbox 79.56% <ø> (ø) Carriedforward from 6e61d04
scorecard 82.63% <ø> (ø) Carriedforward from 6e61d04
theme 83.85% <ø> (ø) Carriedforward from 6e61d04
translations 5.12% <ø> (ø) Carriedforward from 6e61d04
x2a 79.31% <ø> (ø) Carriedforward from 6e61d04

*This pull request uses carry forward flags. Click here to find out more.


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6e61d04...5f80526. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@divyanshiGupta
divyanshiGupta force-pushed the remove-ofs-reexports-quickstart branch from a04e11e to 5f80526 Compare July 24, 2026 10:49
@sonarqubecloud

Copy link
Copy Markdown

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 workspace/quickstart

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant