Web basepath - #1215
Merged
Merged
Web basepath#1215
Conversation
the router matched paths from the domain root, so every page showed Not Found once served under /app/ and sidebar links pointed back at the old site.
the oauth callback is registered to the classic site and reads its cookie session, so starting it from the console crashed the callback. also moves two setState calls out of effects, which the oxlint in CCExtractor#1209 rejects.
add_header in a location drops the server-level hsts header, and index.html was never revalidated after a deploy.
pulk17
requested review from
canihavesomecoffee and
thealphadollar
as code owners
September 27, 2026 08:31
|
canihavesomecoffee
approved these changes
Sep 27, 2026
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.



[FIX]
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
Follow-up to #1196–#1204, from the first real deploy. The console was only ever tested at a domain root (the Vercel demo), and a few things only show up under
/app/.What's broken on live right now
basepath, so it matched/app/against/,/runs, … and found nothing./uploadinstead of/app/upload, so they land on Flask, which asks for its own login.g.user.id), which a console sign-in doesn't have, so it errors./app(no trailing slash) is a 404. nginx only matches/app/.add_headerinside a location stops the server-leveladd_headerlines being inherited. The assets block also sent two conflictingCache-Controlheaders.index.htmlis never revalidated, so a browser can keep loading the previous build for hours after a deploy.Separately, #1209 (dependabot) fails the web check: the newer oxlint adds
react/set-state-in-effectand flags two spots.Changes
fix console routes under /app/—basepathfrom Vite'sBASE_URL, so routes and links follow whatever base the build uses. Relative bases (the demo build) fall back to/.send github linking to the classic account page/account/manage, which already renders a working "Link GitHub" and is@login_required, so a signed-out user is asked to log in instead of hitting the crash.Account: the draft fields re-sync from the server during render rather than in an effect (React's documented pattern for resetting state when a prop changes). The "Saved." confirmation is kept, which akey-based remount would have cleared.ResetPassword: the link parameters never change, so they are read once in theuseStateinitialiser.redirect bare /app and keep hsts on console responseslocation = /app→ 301 to/app/expires -1on/app/andexpires maxon/app/assets/, with noadd_header, so HSTS is inherited.Testing
tsc -b,oxlint --deny-warnings(the pinned 1.72 and 1.83.0 from chore(deps): bump the minor-and-patch group in /web with 21 updates #1209), andbuild:appall pass. On master, 1.83.0 reproduces both warnings.build:appoutput under/app/with the sametry_filesfallback as nginx:/app/renders Home, and all 7 sidebar links carry the/app/prefix/app/runs/9503renders the run page/app/without a full reload/app/reset?uid=…&expires=…&mac=…shows the form; a bare/app/resetshows the "missing part of itself" messageCache-Controlissues.Needs a manual step after merge
Deploys don't touch the server's nginx config. The two console blocks in
/etc/nginx/sites-available/platformneed replacing with the ones ininstall/nginx.conf(NGINX_DIR→/var/www/sample-platform), thensudo nginx -t && sudo systemctl reload nginx. The routing and GitHub fixes ship with the normal deploy.Not in this PR
statecheck. Worth its own PR.actions/checkout@v4/setup-node@v4. Warnings only for now.