Repository navigation
Give the help site the game's menu bar, and move it to help.verticopolis.com - #2339
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
The docs preview for this pull request was removed when it closed. |
📸 Screenshot drift checkNo drift: the committed screenshots already match a fresh deterministic generation. ✅ |
acaefef to
c5dbcdc
Compare
maniator
left a comment
There was a problem hiding this comment.
Review of acaefefd9 (bmad-code-review layers + stand-in review)
Copilot, Codex and PR-Agent are out of credits, so this is the stand-in review alongside /bmad-code-review (Blind Hunter on the diff, Edge Case Hunter with the repo and the deployment open, Acceptance Auditor against the PR body), run as one lean pass.
What I checked beyond the diff
- Production build in help-host mode (
VC_HELP_ORIGIN=https://help.verticopolis.com, game + manual): resolved all 134 distinct links and asset URLs in the 31 built pages against the new routes (help host rewrite todist/help/, with/api/,/_vercel/,/assets/,/styles/passed through). 0 unresolved, no/help/link left, canonical/og:image/sitemap on the help host, game links absolute to verticopolis.com, the bundles call/api/ingest,/_vercel/insightsand/pagefind/on the help host as intended. - This branch's deployment (
dpl_5svsHT…, on help.verticopolis.com via the branch domain):/help/rooms/?from=gameon the help host redirects and serves the Rooms page,/robots.txtis the manual's,/api/ingestreaches the function (405 on GET, as expected),/version.jsonkeepsno-store, and an unknown path still gets the game's 404 page with status 404, so the move toroutesdid not lose the custom 404. - Domains:
www.verticopolis.comis a domain-level 308 to the apex, so the apex-onlyhashost rule is enough.staging.verticopolis.combuilds withVERCEL_ENV=preview, so staging and previews keep/helpand the host rules never match them. - Service worker: unchanged.
/help/stays in the navigation denylist andhelp/**out of precache, and the game's links now leave the worker's origin entirely. - Analytics:
originAllowedandtelemetryHostAllowedalready accept*.verticopolis.com;help_page_viewdetails keep the same names under the root base. - CSS move:
menu-bar.cssis byte-for-byte the old block, imported at the same cascade spot. - History: two logical commits, no fixups. Change note
app: minorfits a new feature.
Findings (inline)
- High, patch: CI red.
parityHelpPage.guard.test.tsstill matches the old URL in its regex (test,test-engine (unit)fail). - High, patch:
deploy-production.yml's post-deploy byte check curls everydist/help/**file on verticopolis.com without-L, so the first release with this PR fails after going live and skips the release archive. - Medium, patch:
help_menu_pickhas no tile inscripts/posthog-dashboard.mjs(help + analytics rule), and two tile descriptions still say/help. - Low, patch: the committed share cards print
verticopolis.com/help/.... - Low, optional:
/gallerytakes two redirects in production.
Not inline (low, mention only)
- The PR body says "a rollback moves both". A
vercel promoteto a deployment from before this PR has no help host routes, so help.verticopolis.com would serve the game at/and 404 the manual pages. Worth a line indocs/or the body. - Query strings on the new 308s: I could not confirm through deployment protection whether
?from=gamesurvivesverticopolis.com/help?from=game→ help host. Current game builds link the help host directly, so only an old cached tab is affected; worth one check on production after the domain flip. help-site.ymllink-checks only the/helpbuild; the root build that actually ships has no link check in CI (I ran it by hand). AddingVC_HELP_ORIGIN=… check-linkswould keep it honest.
Hot-path record
The PR body says "no hot-path surface", but the diff touches vite.config.ts, src/ui/ and root modules src/ui/ imports (src/helpAddress.ts, src/analyticsCore.ts). The section 6 table is in the next comment: no findings, every changed path is click-time or module-load.
Verdict
NO-GO at acaefefd91e6d016a2da24c42be8c773e954aaa3. Fix findings 1 to 4; then it is a GO from me once CI is green, with the standing condition from the PR body that help.verticopolis.com is moved to Production before the release deploys.
Reviewed against Verticopolis conventions (.github/copilot-instructions.md).
Generated by Claude Code
Hot-path record (section 6), commit
|
| Item | Result | What was checked | Findings and resolution |
|---|---|---|---|
| HP-1 | clear | Traced every changed production function to its caller: helpUrl (src/helpAddress.ts) runs in openPageInTab / showHelp (Help click), openLinksInNewTab (compare link click), releaseNotesHref (update prompt render, once per new build), welcome helpLink (one-time modal), and at module load for PRIVACY_HREF, NOT_FOUND_LINKS and the gallery links. wireHelpMenu runs only on help pages. None is reached from a tick, frame, HUD refresh or command. |
none |
| HP-2 | clear | helpUrl is one anchored regex over a short path; wireHelpMenu's onOpen loops over three theme items when a menu opens. No collection work. |
none |
| HP-3 | clear | One string per click or render in helpUrl/fromGameHref; nothing per frame. |
none |
| HP-4 | n/a | No sorting added or changed. | none |
| HP-5 | n/a | No containers or hashing added; THEME_ITEMS is a three-entry constant. |
none |
| HP-6 | n/a | No id lookups or removals. | none |
| HP-7 | clear | Moved code: the menu bar CSS block moved to src/styles/menu-bar.css unchanged (diffed against main) and imported at the same cascade position, so selector matching and layout are the same. |
none |
| HP-8 | n/a | No cache added, dropped or bypassed. | none |
| HP-9 | n/a | No HP-2 to HP-6 findings to remedy. | none |
| HP-10 | clear | helpUrl is a pure function of its path and a build-time constant (__HELP_ORIGIN__); unit tests cover both modes. No result changes for the /help build. |
none |
| HP-11 | clear | vite.config.ts adds one define (__HELP_ORIGIN__), a string constant; no engine, WASM, worker or chunking change. The production build splits helpAddress into a tiny shared chunk, loaded with the 404 page and the game. |
none |
| HP-12 | clear | No renderer, HUD or per-frame UI path changed; the menu bar CSS is the same rules in the same order. | none |
Generated by Claude Code
c5dbcdc to
2d54302
Compare
The manual draws the game's Win95 menu bar under its title bar, with File (back to the game, print), Edit (find, copy this page's link), Options (light, dark, match the device) and Help (what's new, report a problem, sponsor). The bar's behavior is the game's MenuBar, its styles move to a shared src/styles/menu-bar.css that both import, and each pick reports app_action help_menu_pick with the item's code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ms7trYsinXUbmcSQZ3d6N7
2d54302 to
57150c6
Compare
A production build now puts the manual at the root of its own host, so its pages read help.verticopolis.com/rooms/ and the installed Android app opens Help in the browser over the running game instead of in place of it. Every other build (previews, staging, CI, local) keeps it under /help on its own host. - scripts/vercel-build.sh sets VC_HELP_ORIGIN for production. The help build reads it for its base, its canonical links and sitemap, and a Satteri hast plugin points the pages' /help/... and game links at this build's address. The game reads it (src/helpAddress.ts) for every link it opens into the manual. - vercel.json moves to ordered routes so the help host can be matched before the filesystem: help.verticopolis.com serves dist/help/, and verticopolis.com/help/... redirects (308) to the same page there. - Drop the test that parsed vercel.json's headers; it read configuration, not behavior, and the routes format replaced what it parsed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ms7trYsinXUbmcSQZ3d6N7
Re-review of
|
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Requested by Naftali · project thread
What & why
Replaces #2338, moved from its old branch to
help-subdomainat the owner's request.Two changes Naftali asked for after #2316:
The game's menu bar on the help site. The Win95 menu bar is now the top row of every help page, above the navy title bar, where the game draws it.
The bar's behavior is the game's own
MenuBar(src/ui/menuBar.ts). Its styles move unchanged into a sharedsrc/styles/menu-bar.css, which both the game and the help site import. Each pick sendsapp_actionhelp_menu_pickwith the item's code, and the PostHog dashboard gets a "Help menu picks" tile for it.The manual moves to help.verticopolis.com, with clean addresses (help.verticopolis.com/rooms/, Naftali's pick). On Android the installed app keeps in-scope links in its own window, so the manual replaced the game. On its own host, Help opens in the browser over the running game.
scripts/vercel-build.shsetsVC_HELP_ORIGIN=https://help.verticopolis.comin a production build. The help build (help-site/site.mjs) then sits at the root of that host, with its canonical links, sitemap, robots.txt and share cards there. A Satteri hast plugin (astro.config.mjs) andsiteHrefpoint the pages'/help/...and game links at the right address. The Markdown keeps writing/help/..., because the game's own Help window reads the same files.helpUrl(src/helpAddress.ts,__HELP_ORIGIN__): the Help button, the mode badge, the welcome, the update prompt, About's privacy link, the Classic and Modern summary, the gallery and the 404 page.vercel.jsonmoves to orderedroutes. Vercel checks its files before anyrewritesrun, so the game'sindex.htmlwould otherwise win at help.verticopolis.com/. Requests on the help host are now served fromdist/help/, except/api/(the analytics relay),/_vercel/, and/assets/and/styles/(the shared 404 page). verticopolis.com/help/... answers with a 308 to the same page on the help host, and the gallery redirect goes there in one hop. The cache headers are the same rules as before, now also matching the help host's/_astro/and/pagefind/paths.*.verticopolis.com. The help page view and the landing read the base from Astro, so they report the same page names on the new host. The dashboard's landing and help page view descriptions now name the new host.help.verticopolis.com/<slug>/, redrawn in the pinned Playwright image.help/*files from help.verticopolis.com.help-site.ymladds a second build withVC_HELP_ORIGINset. It fails on any/help/link left in the output and runs the link check on that build too.How the manual ships per release
It stays in the same Vercel project and the same build, so every production deployment carries its matching manual. help.verticopolis.com is a second domain on that deployment, so the game and the manual can never drift apart. Previews and staging keep the manual at
/helpon their own host, as today; staging gets no separate help host.Rollback caveat: a rollback moves both together, except across this PR. Promoting a deployment from before this PR leaves help.verticopolis.com serving the game, because that deployment has no help-host routes. If that rollback is ever needed, move the domain off Production (or point it back to the branch) at the same time.
Before this merges (owner setup)
The MCP token can't add domains or env vars (403), so the owner adds:
help.verticopolis.comon the project. Vercel already hosts the DNS, so it configures the record and certificate itself. First assign it to the Git branchhelp-subdomainto try it on this preview (done), then switch it to Production right before the release that carries this PR deploys.VC_HELP_ORIGIN=https://help.verticopolis.comscoped to branchhelp-subdomain, then a redeploy. Delete it at merge. While it is set, this branch's*.vercel.apppreview builds the manual for the help host, so its own/helplinks break. That is expected.The production deploy must not go out before the domain is on Production, or verticopolis.com/help would redirect to a host that doesn't answer.
After the production deploy, check that verticopolis.com/help/rooms/?from=game lands on help.verticopolis.com/rooms/?from=game with the query kept, and that
help_page_viewevents arrive from the new host.Type of change
Game mode impact
n/a: the help site's chrome, its address and the game's links to it. No simulation change.
Quality gates
npm run typechecknpm run lintnpm test(the full unit project passed locally, 6262 tests; CI runs the rest)npm run build(CI. The help site builds locally in both modes:/help, with the link check at 0 broken, and the help host root.)Versioning
.changesnote with the rightapp:andcrate:levels, or this PR changes no deployed pathpackages/verticopolis-engine/README.mdand/orengine-rs/CRATE_README.md, or read both and putreadmes: unchangedin the note, or this PR changes no engine sourceComplexity
n/a: no hot path. The help menu runs only on a click, and
helpUrlruns only when the player opens a manual link. The game's menu bar CSS moves to its own file and keeps the same rules in the same cascade position (src/styles.cssimports it right beforegame/menubar.css). The routes add no function or middleware: game requests match only the same header rules as before.Hot-path record (section 6): no hot-path surface
Screenshots / recordings
The local builds (desktop and phone) are in the project thread. The preview link is in the Vercel comment. The owner confirmed help.verticopolis.com serving the manual with the menu bar on top from this branch.
Notes for reviewers
--sl-nav-height). The bar sits on top, and the title bar's logo and the phone's menu button keep their old size, moved down under it (help-site/src/styles/help.css)./help/link is left, game links are absolute to verticopolis.com, and the search results, room pictures (catalog.json) and menu links resolve, with no 4xx in the browser.src/tests/helpSite.test.tsloses its vercel.json header test. It parsed configuration rather than behavior, which project policy rules out, and the routes format replaced what it read.src/analyticsCore.tscomments were trimmed to stay at the 500-line ceiling.🤖 Generated with Claude Code
https://claude.ai/code/session_01Ms7trYsinXUbmcSQZ3d6N7