feat(demo): list the demo's sign-ins on /beta and link into it per game #42

Merged
whitlocktech merged 1 commits from feat/demo-live into main 2026-10-29 05:12:43 -05:00
Member

This is the site half of DEMO_MODE.md §10 step 6 ("runicgateway.com /beta publishes the logins"). It records two decisions the org lead took on 2026-10-28, in PLAN.md §15.

D82: /beta lists the demo's sign-ins as the demo publishes them. With demoUrl mounted, the page's server reads <demoUrl>/api/v1/public/settings → demo.logins. It caches the answer for 60 s, gives up after 1.5 s, and caches a failure for 15 s. Every field is checked for shape and length before it is rendered. When the demo doesn't answer (it's down a few minutes at every wipe), the page links to the demo's own sign-in page instead. Gate two ("somewhere to point it") reads as in place and gives the host name to type into the app. The browser loads nothing new, so D9 and the CSP are unchanged.

D83: a demo deep link names its game. A link into a game module's pages carries data-demo-game. applyBrand.mjs fills it only when the new mounted demoGames list names that game; core links (/wiki, /site/events, /site/news) follow demoUrl alone. The Rust features link to /rust and /rust/servers/demo?tab=… (demo is the fixture's server id). UO's links, including Teams → /uo/guilds, stay hidden on a Rust demo. checkBrand.mjs holds demoGames to the known games and checks that DEEP_LINK reads the game.

Also in this PR:

  • The public-demo not-built entry is removed, because its resolvedBy was met.
  • §15 now says how the real demo differs from the 2026-08-19 plan.
  • DEPLOY.md covers the two fields.
  • The §5 decisions table gains D80–D83. D80/D81 were recorded in phase 18 but never added to the table.

Going live (operator): add "demoUrl": "https://demo.runicgateway.com" and "demoGames": ["rust"] to the mounted brand.json, then docker compose restart site.

Checked:

  • New test/demo.test.mjs passes 13/13, including applyBrand run on a scratch build.
  • npm run verify passes every step except check:facts, for a reason that is already on main (below).
  • A local npm start with that mount against the live demo listed 3 logins (play-review not among them) and the 22:00 UTC wipe. It filled 7 Rust links and 3 core links and left /uo/guilds empty.

Known red, not from this PR: check:facts fails on release Module-Rust. platform.json says v0.6.0, but v0.6.3 shipped today. main has the same failure. I've asked the org lead whether to fold the bump in here or open a separate PR.

  • AI-assisted: Claude Code (Claude Opus 5.5)

🤖 Generated with Claude Code

https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY

This is the site half of `DEMO_MODE.md` §10 step 6 ("runicgateway.com `/beta` publishes the logins"). It records two decisions the org lead took on 2026-10-28, in `PLAN.md` §15. **D82: `/beta` lists the demo's sign-ins as the demo publishes them.** With `demoUrl` mounted, the page's server reads `<demoUrl>/api/v1/public/settings` → `demo.logins`. It caches the answer for 60 s, gives up after 1.5 s, and caches a failure for 15 s. Every field is checked for shape and length before it is rendered. When the demo doesn't answer (it's down a few minutes at every wipe), the page links to the demo's own sign-in page instead. Gate two ("somewhere to point it") reads as in place and gives the host name to type into the app. The browser loads nothing new, so D9 and the CSP are unchanged. **D83: a demo deep link names its game.** A link into a game module's pages carries `data-demo-game`. `applyBrand.mjs` fills it only when the new mounted `demoGames` list names that game; core links (`/wiki`, `/site/events`, `/site/news`) follow `demoUrl` alone. The Rust features link to `/rust` and `/rust/servers/demo?tab=…` (`demo` is the fixture's server id). UO's links, including Teams → `/uo/guilds`, stay hidden on a Rust demo. `checkBrand.mjs` holds `demoGames` to the known games and checks that `DEEP_LINK` reads the game. Also in this PR: - The `public-demo` not-built entry is removed, because its `resolvedBy` was met. - §15 now says how the real demo differs from the 2026-08-19 plan. - `DEPLOY.md` covers the two fields. - The §5 decisions table gains D80–D83. D80/D81 were recorded in phase 18 but never added to the table. **Going live (operator):** add `"demoUrl": "https://demo.runicgateway.com"` and `"demoGames": ["rust"]` to the mounted `brand.json`, then `docker compose restart site`. **Checked:** - New `test/demo.test.mjs` passes 13/13, including `applyBrand` run on a scratch build. - `npm run verify` passes every step except `check:facts`, for a reason that is already on `main` (below). - A local `npm start` with that mount against the live demo listed 3 logins (`play-review` not among them) and the 22:00 UTC wipe. It filled 7 Rust links and 3 core links and left `/uo/guilds` empty. **Known red, not from this PR:** `check:facts` fails on `release Module-Rust`. `platform.json` says v0.6.0, but v0.6.3 shipped today. `main` has the same failure. I've asked the org lead whether to fold the bump in here or open a separate PR. - [x] AI-assisted: Claude Code (Claude Opus 5.5) 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
wtclaude added 1 commit 2026-10-28 15:32:58 -05:00
feat(demo): list the demo's sign-ins on /beta and link into it per game
Some checks failed
PR checks / checks (pull_request) Failing after 2m16s
769d213c80
The public demo (demo.runicgateway.com) is live, so the site's demo slot
can be switched on. Two decisions of record, PLAN.md §15:

- D82: /beta reads the demo's GET /api/v1/public/settings demo.logins on
  the server, caches it for a minute, and lists the published sign-ins
  with the next wipe. If the demo does not answer, /beta links to its
  sign-in page instead. Gate two reads as in place.
- D83: a deep link into a game module's pages carries data-demo-game, and
  applyBrand.mjs fills it only for games in the new mounted demoGames
  list. The Rust features gain links into /rust and /rust/servers/demo.
  UO's stay hidden on a Rust demo.

The public-demo not-built entry is removed, because its resolvedBy was met.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
whitlocktech merged commit fcc1a06361 into main 2026-10-29 05:12:43 -05:00
whitlocktech deleted branch feat/demo-live 2026-10-29 05:12:44 -05:00
Sign in to join this conversation.
No description provided.