Repository navigation
feat(frontend): serve the new frontend at /next beside the classic UI - #4
Merged
Merged
Conversation
Add the editable React frontend and embed it under /next while the classic Prism UI (with the community overlay) keeps serving /. Both share one origin and session, so either can be compared against the other without signing in twice. - build.rs: NEXT_ASSETS_PATH embeds a second bundle as generate_next(); without it the function returns no files and /next is not mounted. - server/query server: mount /next ahead of the catch-all / route. - OIDC: keep the /next prefix when redirecting to oidc-not-configured. - frontend: build with base /next/, route under that basename, prefix auth redirects, and add "Compare in classic UI" plus classic-only sidebar links (alerts, users, roles). - Dockerfiles, workflows and Cross build the frontend and set NEXT_ASSETS_PATH; .gitignore excludes *.pem and pr-*.md notes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Review: serve the new frontend at /next
The server side is small and reads well. configure_ui registers /next before the catch-all /, and a build without NEXT_ASSETS_PATH keeps today's behaviour. The /next routing, the base-path helpers in auth.ts and the CI wiring also look correct. Inline comments cover the live browser suite, which still targets root paths, plus test coverage and CI cleanup.
Smaller notes
LOCAL_ASSETS_PATHbuilds now reportUI_VERSION=localinstead ofdevelopmentfrom/about(build.rs). That's fine, but the PR description doesn't mention it.frontend/README.mdstill says the check passed 36 unit tests. The PR description says 44.frontend/docs/adds about 2.2 MB of parity screenshots and page-text dumps, plus internal notes (validation-review.md,component-design-review.md,wiki-drafts/). Should these live in the wiki or a PR artifact instead of the tree?
The live suite navigated to root paths, which a server built with NEXT_ASSETS_PATH serves from the classic UI. Prefix page navigations and URL assertions with PARSEABLE_LIVE_BASE (default /next), keep API calls and the next= route value unprefixed, and match exact login and oidc-not-configured paths so a fall-through to the classic UI fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Unit-test redirect_no_oauth_setup for /next, /next/..., / and /nextfoo, and split configure_ui into mount_ui so a test can mount stub UIs and check that /next paths reach the next UI ahead of the / SPA fallback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the new React/TypeScript frontend and serves it at
/next/beside the classic Prism UI at/, so the two can be compared on one server while features move over.How it works
build.rs:NEXT_ASSETS_PATHembeds a second bundle asgenerate_next(). Without it the function returns no files and nothing is mounted at/next.LOCAL_ASSETS_PATHand the Prism zip with the community overlay at/are unchanged./nextis registered ahead of the catch-all/route, with its own SPA fallback./nextredirects to/next/oidc-not-configuredinstead of Prism's page./next/and routes under that base path;Cross.tomlbuild the frontend with Node 24 and setNEXT_ASSETS_PATH. A newfrontend.yamlworkflow runs the frontend checks..gitignore: excludes*.pemandpr-*.mdnotes.Both UIs share one origin, so a single sign-in (native or OIDC) works in both. When the frontend reaches parity, it moves to
/and the/nextmount, the community overlay and the classic UI links are removed (seefrontend/README.md).Validation
cargo fmt --check;cargo clippy --locked -- -D warningswith and withoutNEXT_ASSETS_PATH: passcargo test --lib -- oidc oauth rbac: 21 passedNEXT_ASSETS_PATH:/and/logsserve Prism;/next,/next/and deep links serve the new frontend, and its JS assets load./next/loginreturns to the requested page; the classic Users page opens already signed in; signing out returns to/next/login; no page errors.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.