Skip to content

fix: include the /admin-console prefix in the app's route path - #232

Merged
arbrandes merged 1 commit into
openedx:masterfrom
arbrandes:arbrandes/fix-route-prefix
Sep 20, 2026
Merged

arbrandes merged 1 commit into
openedx:masterfrom
arbrandes:arbrandes/fix-route-prefix

Conversation

@arbrandes

Copy link
Copy Markdown
Contributor

Description

The admin console route was declared as /authz/*, relying on a
basename: '/admin-console' in the site configs. That works standalone,
but in a unified frontend-base site (such as the one built by tutor-mfe,
which links to {MFE_HOST}/admin-console/authz/...) app routes are
mounted verbatim under the site root, so those URLs rendered a 404.

Declare the full /admin-console/authz/* path in the route instead, as
authn and learner-dashboard already do, and drop the basename from the
dev, CI, and test site configs. Consolidate the absolute base path into
AUTHZ_HOME_PATH, make the nested route segments visibly relative, and
add a buildAuditUserPath() helper so internal navigation no longer
hand-assembles paths. Standalone URLs are unchanged.

Companion to openedx/frontend-app-gradebook#626.

LLM usage notice

Built with assistance from Claude.

@codecov

codecov Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.53%. Comparing base (fd7a9b7) to head (43e2211).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #232   +/-   ##
=======================================
  Coverage   98.53%   98.53%           
=======================================
  Files          73       73           
  Lines        1294     1295    +1     
  Branches      423      424    +1     
=======================================
+ Hits         1275     1276    +1     
  Misses         19       19           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Frontend-base sites mount app routes verbatim, so the app must declare
its own URL prefix instead of relying on a site basename.

Co-Authored-By: Claude <noreply@anthropic.com>
@arbrandes
arbrandes force-pushed the arbrandes/fix-route-prefix branch from 22b7c45 to 43e2211 Compare September 20, 2026 12:10
@arbrandes
arbrandes merged commit 1a2252a into openedx:master Sep 20, 2026
6 checks passed
@arbrandes
arbrandes deleted the arbrandes/fix-route-prefix branch September 20, 2026 12:14
@openedx-semantic-release-bot

Copy link
Copy Markdown
Collaborator

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

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

None yet

Development

Successfully merging this pull request may close these issues.

2 participants