Skip to content

feat(app-defaults): Add Learning Paths plugin - #4814

Merged
debsmita1 merged 4 commits into
redhat-developer:mainfrom
debsmita1:LMS-plugin
Sep 18, 2026
Merged

debsmita1 merged 4 commits into
redhat-developer:mainfrom
debsmita1:LMS-plugin

Conversation

@debsmita1

@debsmita1 debsmita1 commented Sep 16, 2026

Copy link
Copy Markdown
Member

Hey, I just made a Pull Request!

Resolves:
https://redhat.atlassian.net/browse/RHIDP-16847

Test setup:

Publish a data.json on GitHub with unique card labels (e.g. https://github.com/debsmita1/rhdh/blob/learning-paths-test/packages/app/public/learning-paths/data.json ) so proxy-loaded content is visually distinct from the bundled fallback at packages/app/public/learning-paths/data.json.

app-config.yaml
Point the /developer-hub proxy at the raw GitHub file:

proxy:
  endpoints:
    '/developer-hub':
      target: https://raw.githubusercontent.com/
      pathRewrite:
        '^/api/proxy/developer-hub/learning-paths': '/debsmita1/rhdh/learning-paths-test/packages/app/public/learning-paths/data.json' # configure your path here
      changeOrigin: true
      secure: true

Screenshots:

rhdh-plugins
With proxy configured → cards show proxy labels; network shows /api/proxy/developer-hub/learning-paths → 200

Screenshot 2026-09-16 at 6 20 16 PM

rhdh-local

Screenshot 2026-09-16 at 9 57 15 PM

rhdh-plugins

With proxy disabled/broken → console warns about fallback; network shows /learning-paths/data.json; cards show bundled content.

Screenshot 2026-09-16 at 6 21 19 PM

rhdh-local

Screenshot 2026-09-16 at 10 19 50 PM

Tests:

Screenshot 2026-09-16 at 7 28 47 PM Screenshot 2026-09-16 at 7 30 27 PM

✔️ 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 Sep 16, 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.

Unexpected Changesets

The following changeset(s) reference packages that have not been changed in this PR:

  • /home/runner/work/rhdh-plugins/rhdh-plugins/workspaces/app-defaults/.changeset/app-defaults-learning-paths.md: @red-hat-developer-hub/backstage-plugin-app-auth, @red-hat-developer-hub/backstage-plugin-app-integrations, @red-hat-developer-hub/backstage-plugin-app-react

Note that only changes that affect the published package require changesets, for example changes to tests and storybook stories do not require changesets.

Changed Packages

Package Name Package Path Changeset Bump Current Version
app workspaces/app-defaults/packages/app none v0.0.0
@red-hat-developer-hub/backstage-plugin-app-defaults workspaces/app-defaults/plugins/app-defaults minor v1.3.0

@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.41958% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.62%. Comparing base (ef6ab36) to head (febf9d0).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4814      +/-   ##
==========================================
+ Coverage   63.60%   63.62%   +0.02%     
==========================================
  Files        2685     2693       +8     
  Lines      107077   107215     +138     
  Branches    30010    30041      +31     
==========================================
+ Hits        68101    68216     +115     
- Misses      37165    37188      +23     
  Partials     1811     1811              
Flag Coverage Δ *Carryforward flag
adoption-insights 84.77% <ø> (ø) Carriedforward from ef6ab36
ai-integrations 82.63% <ø> (ø) Carriedforward from ef6ab36
app-defaults 63.39% <80.41%> (+8.57%) ⬆️
augment 46.67% <ø> (ø) Carriedforward from ef6ab36
boost 84.97% <ø> (ø) Carriedforward from ef6ab36
bulk-import 73.12% <ø> (ø) Carriedforward from ef6ab36
cost-management 13.53% <ø> (ø) Carriedforward from ef6ab36
dcm 73.47% <ø> (ø) Carriedforward from ef6ab36
e2e-adoption-insights 60.00% <ø> (ø) Carriedforward from ef6ab36
e2e-extensions 62.31% <ø> (ø) Carriedforward from ef6ab36
e2e-global-header 51.82% <ø> (ø) Carriedforward from ef6ab36
e2e-homepage 61.11% <ø> (ø) Carriedforward from ef6ab36
e2e-intelligent-assistant 46.01% <ø> (ø) Carriedforward from ef6ab36
e2e-orchestrator 49.49% <ø> (ø) Carriedforward from ef6ab36
e2e-orchestrator-plugin 49.48% <ø> (ø) Carriedforward from ef6ab36
e2e-quickstart 55.21% <ø> (ø) Carriedforward from ef6ab36
e2e-scorecard 50.00% <ø> (ø) Carriedforward from ef6ab36
e2e-theme 16.36% <ø> (ø) Carriedforward from ef6ab36
extensions 58.30% <ø> (ø) Carriedforward from ef6ab36
global-floating-action-button 71.18% <ø> (ø) Carriedforward from ef6ab36
global-header 67.76% <ø> (ø) Carriedforward from ef6ab36
homepage 55.16% <ø> (ø) Carriedforward from ef6ab36
install-dynamic-plugins 71.77% <ø> (ø) Carriedforward from ef6ab36
intelligent-assistant 78.04% <ø> (ø) Carriedforward from ef6ab36
konflux 91.98% <ø> (ø) Carriedforward from ef6ab36
lightspeed 69.02% <ø> (ø) Carriedforward from ef6ab36
mcp-integrations 84.46% <ø> (ø) Carriedforward from ef6ab36
orchestrator 77.69% <ø> (ø) Carriedforward from ef6ab36
quickstart 63.74% <ø> (ø) Carriedforward from ef6ab36
sandbox 79.56% <ø> (ø) Carriedforward from ef6ab36
scorecard 88.71% <ø> (ø) Carriedforward from ef6ab36
theme 87.94% <ø> (ø) Carriedforward from ef6ab36
translations 5.12% <ø> (ø) Carriedforward from ef6ab36
x2a 78.44% <ø> (ø) Carriedforward from ef6ab36

*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 ef6ab36...febf9d0. 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.

@debsmita1
debsmita1 force-pushed the LMS-plugin branch 7 times, most recently from 9fbe906 to 0415191 Compare September 17, 2026 05:55

@lokanandaprabhu lokanandaprabhu 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.

Legacy behavior In legacy RHDH (packages/app), when the Developer Hub proxy call failed, the app fell back to a runtime fetch:

  • GET /learning-paths/data.json
  • Source file: packages/app/public/learning-paths/data.json

That meant operators could customize fallback content without rebuilding the frontend (e.g. by mounting/replacing the JSON via ConfigMap, volume, or image layer), even if they didn’t use the proxy.

NFS behavior in this PR When the proxy fails, the hook now uses build-time bundled data:

  • src/learning-paths/data/data.json (imported into the bundle)
  • No runtime request to /learning-paths/data.json

Proxy-based customization is unchanged and still the documented path:

proxy:
  endpoints:
    '/developer-hub':
      target: ...
      pathRewrite:
        '^/api/proxy/developer-hub/learning-paths': '...'

Do we have any existing deployments/customers that customize Learning Paths by replacing packages/app/public/learning-paths/data.json without configuring the /developer-hub proxy?

If yes:

  • Should we document an explicit migration note (README/changelog) directing them to proxy pathRewrite?
  • Is proxy-only customization the intended long-term approach for NFS, or do we need a runtime-overridable fallback equivalent?

If no:

  • A short README note may still help future adopters avoid assuming /learning-paths/data.json is still overridable at runtime.

@debsmita1

Copy link
Copy Markdown
Member Author

Legacy behavior In legacy RHDH (packages/app), when the Developer Hub proxy call failed, the app fell back to a runtime fetch:

  • GET /learning-paths/data.json
  • Source file: packages/app/public/learning-paths/data.json

That meant operators could customize fallback content without rebuilding the frontend (e.g. by mounting/replacing the JSON via ConfigMap, volume, or image layer), even if they didn’t use the proxy.

NFS behavior in this PR When the proxy fails, the hook now uses build-time bundled data:

  • src/learning-paths/data/data.json (imported into the bundle)
  • No runtime request to /learning-paths/data.json

Proxy-based customization is unchanged and still the documented path:

proxy:
  endpoints:
    '/developer-hub':
      target: ...
      pathRewrite:
        '^/api/proxy/developer-hub/learning-paths': '...'

Do we have any existing deployments/customers that customize Learning Paths by replacing packages/app/public/learning-paths/data.json without configuring the /developer-hub proxy?

If yes:

  • Should we document an explicit migration note (README/changelog) directing them to proxy pathRewrite?
  • Is proxy-only customization the intended long-term approach for NFS, or do we need a runtime-overridable fallback equivalent?

If no:

  • A short README note may still help future adopters avoid assuming /learning-paths/data.json is still overridable at runtime.

Legacy RHDH (packages/app) did load fallback data at runtime via GET /learning-paths/data.json, served from packages/app/public/learning-paths/data.json. In NFS, Learning Paths lives in the plugin bundle rather than the app shell’s public/ tree. Keeping a runtime fetch to /learning-paths/data.json would reintroduce a dependency on app packaging that NFS is meant to avoid. Instead, the bundled JSON is a build-time fallback, while production customization remains on the proxy path. This aligns with Red Hat’s documented approach. The RHDH customizing guide describes configuring Learning Paths by hosting data externally and delivering it through the built-in proxy not by mounting or replacing public/learning-paths/data.json. As the docs put it: operators should use the proxy to deliver customized data “rather than the default.”

cc @christoph-jerolimov @karthikjeeyar @gashcrumb

@debsmita1
debsmita1 force-pushed the LMS-plugin branch 2 times, most recently from 74e2759 to 939de6c Compare September 17, 2026 18:20

@HusneShabbir HusneShabbir 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
Tested locally, works as expected

@lokanandaprabhu lokanandaprabhu 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.

Image

Tested locally, working fine.

@debsmita1

Copy link
Copy Markdown
Member Author

/hold
till I test the changes on a cluster

@teknaS47 teknaS47 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.

Looks good, tested locally. All tests passing.

Image

@openshift-ci

openshift-ci Bot commented Sep 18, 2026

Copy link
Copy Markdown

New changes are detected. LGTM label has been removed.

@debsmita1

Copy link
Copy Markdown
Member Author

Once the CI is green , we can merge it. The overlay image can be tested on a cluster @teknaS47

@sonarqubecloud

Copy link
Copy Markdown

@debsmita1
debsmita1 merged commit 947374a into redhat-developer:main Sep 18, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants