Skip to content

refactor: migrate to frontend-base#669

Draft
arbrandes wants to merge 73 commits intomasterfrom
frontend-base
Draft

refactor: migrate to frontend-base#669
arbrandes wants to merge 73 commits intomasterfrom
frontend-base

Conversation

@arbrandes
Copy link
Copy Markdown
Contributor

@arbrandes arbrandes commented Jun 24, 2025

Description

Refer to the parent issue for a full description.

In short, this refactors the codebase for frontend-base support. There are several breaking changes. It is a long-lived feature branch, and as such, should not be rebased or squashed until time comes for it to either merge to master or become master.

BREAKING CHANGE: refactors the MFE for frontend-base.
@arbrandes arbrandes requested a review from a team as a code owner June 24, 2025 18:58
@arbrandes arbrandes marked this pull request as draft June 24, 2025 18:59
@brian-smith-tcril
Copy link
Copy Markdown
Contributor

When trying to run npm run dev locally I hit the following error:

node:internal/fs/watchers:247
    const error = new UVException({
                  ^

Error: ENOSPC: System limit for number of file watchers reached, watch '/home/bsmith/code/frontend-app-learner-dashboard/node_modules/serve-index/node_modules/http-errors/LICENSE'

I did a bit of searching and found https://stackoverflow.com/a/65621732

I had the same problem. However, mine was coming from Webpack. Thankfully, they had a great solution on their site:

For some systems, watching many files can result in a lot of CPU or memory usage. It is possible to exclude a huge folder like node_modules using a regular expression:

module.exports = {
  watchOptions: {
    ignored: /node_modules/
  }
};

I haven't tried, but my guess is that adding a watchOptions block to https://github.com/openedx/frontend-base/blob/main/tools/webpack/webpack.config.dev.ts might fix this.

@arbrandes
Copy link
Copy Markdown
Contributor Author

arbrandes commented Jun 25, 2025

@brian-smith-tcril, what I did was just increase my fs.inotify.max_user_watches to 524288 in sysctl.conf. There's no reason to stick with the low default on modern systems.

That said, yes, it's arguable that few people will go messing around in node_modules, and fewer still would expect changes to be applied immediately.

Comment thread Makefile Outdated
Comment thread src/data/services/lms/urls.test.js Outdated
@arbrandes arbrandes linked an issue Jun 25, 2025 that may be closed by this pull request
16 tasks
@brian-smith-tcril
Copy link
Copy Markdown
Contributor

@brian-smith-tcril, what I did was just increase my fs.inotify.max_user_watches to 524288 in sysctl.conf. There's no reason to stick with the low default on modern systems.

That said, yes, it's arguable that few people will go messing around in node_modules, and fewer still would expect changes to be applied immediately.

Yeah, some of the other answers on that stackoverflow thread recommended increasing that limit. The reason excluding node_modules feels like a better solution to me is that it removes the need to do some "scary" (even if it's a reasonable change) configuration of dev environments.

arbrandes and others added 12 commits March 23, 2026 16:55
… errors

Client errors (4xx) won't resolve on retry, so skip them. Server errors
(5xx) and network failures get up to 3 retries with React Query's
default exponential backoff.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Split learnerDashboardQueryKeys into distinct query and mutation key
factories for clearer semantics. Mutation keys now live in
learnerDashboardMutationKeys while query invalidation still uses
learnerDashboardQueryKeys.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
MasqueradeProvider and FiltersProvider used useReducer with action
type enums for what are simple value states. Replaced with useState
for less boilerplate while preserving the same public API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Verifies the basic flow: API is called without masquerade user,
data is returned with coursesByCardId transformation applied.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Port of master PR #738 to frontend-base.

Differences from master:
- Config added to src/app.ts instead of .env files and src/config/index.js
  (frontend-base convention)
- Uses useAppConfig() hook instead of importing configuration object
  directly (idiomatic for code running inside the provider tree)
- Default is false (master defaults to true)

Co-Authored-By: Adolfo R. Brandes <adolfo@opencraft.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…s/ dirs

Move the asset copy step before tsc-alias so that .svg and .png files
exist in dist/ when tsc-alias resolves @src path aliases. Also restrict
image file copying to files under assets/ directories, excluding
screenshots in slots/.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Restore accidental reverts from the master port: Dashboard wrapper
div and main landmark, test assertions for disabled state and
aria-disabled, and initIsPending in Dashboard test.

Clean up nits: remove unused React imports, replace escape sequences
with literal unicode, simplify ConfirmEmailBanner hooks, fix test
names, use @src alias in socialShare, and deduplicate beforeEach
mocks in UnenrollConfirmModal tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Ensures unauthenticated users are redirected to login before
reaching the learner dashboard.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Add workspaces configuration and workspace-aware scripts for developing
with local packages (such as frontend-base).

Also, since npm skips bin-linking for workspace packages during install,
do it when frontend-base is built.

Part of openedx/frontend-base#184

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds `.releaserc` and a release GitHub Actions workflow, releasing
from the `frontend-base` branch as a prerelease (`alpha`) to the
`latest` dist-tag.

Co-Authored-By: Claude <noreply@anthropic.com>
@openedx-semantic-release-bot
Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0-alpha.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

brian-smith-tcril and others added 3 commits April 9, 2026 10:02
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Rename src/i18n/index.js → index.ts (project uses TypeScript)
- Replace placeholder messages object with clean re-export from ./messages
- Add src/i18n/messages.d.ts type stub so TypeScript is satisfied before
  translations:pull has been run
- Add translations:pull npm script (backed by openedx translations:pull)
- Replace old atlas-based pull_translations Makefile target with
  npm run translations:pull, passing ATLAS_OPTIONS through
- Remove unused intl_imports, i18n, ATLAS_EXTRA_SOURCES, and
  ATLAS_EXTRA_INTL_IMPORTS Makefile variables
- Remove detect_changed_source_translations Makefile target (unused by
  any CI workflow, extract_translations, or pull_translations)
- Add src/i18n/messages.ts, src/i18n/messages/, and
  src/i18n/site-messages/index.ts to .gitignore (generated files)
- Update package-lock to resolve @openedx/frontend-base to 1.0.0-alpha.23

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@openedx-semantic-release-bot
Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0-alpha.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

The old App.messages pattern included apps exporting their messages via
\`src/index.ts\`. There is no reason for apps to export this. The file
only exists so the app can run as a site with \`npm run dev\`. With
frontend-base's i18n pipeline, translations are handled at the site
level via \`site.i18n\`.

App-only testing didn't catch this because the webpack fallback plugin
correctly resolves the missing messages file when \`npm run dev\` is
running the app as a site from the repo root (\`src/i18n/\` context).
The broken export only surfaces when the compiled \`dist/\` is consumed
by a site.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@openedx-semantic-release-bot
Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0-alpha.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

arbrandes and others added 2 commits April 13, 2026 14:39
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@openedx-semantic-release-bot
Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0-alpha.10 🎉

The release is available on:

Your semantic-release bot 📦🚀

Fixes #829

Co-Authored-By: Claude <noreply@anthropic.com>
@openedx-semantic-release-bot
Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0-alpha.11 🎉

The release is available on:

Your semantic-release bot 📦🚀

Co-Authored-By: Claude <noreply@anthropic.com>
@openedx-semantic-release-bot
Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0-alpha.12 🎉

The release is available on:

Your semantic-release bot 📦🚀

Use a roles array in the dashboard route so that header slot widgets
scope correctly to the dashboard role, and set the Courses link URL
accordingly.

Also wrap MasqueradeBar in a Paragon Container so its content aligns
with the header and main content areas.

Co-Authored-By: Claude <noreply@anthropic.com>
@openedx-semantic-release-bot
Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0-alpha.13 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Convert Learner Dashboard to frontend-base