Dezio/docs/tests/S006a-dezio-path.md
2026-12-02 16:25:57 -06:00

2.9 KiB

S006a — website under /dezio/ (tests)

Local checks

Run: DASHBOARD_URL=http://127.0.0.1:8099/dezio DISCORD_BOT_TOKEN=dev-placeholder target/debug/dezio --web-dev, cookie dezio_session=devtoken.

  1. /dezio/ shows the site with fonts and images; /dezio/terms, /dezio/privacy load and their Home link goes to /dezio/.
  2. /dezio/assets/site.css, /dezio/images/dezio.png return 200.
  3. Site: the Dashboard button appears (fetch of /dezio/api/me works).
  4. /dezio/dashboard loads styled; its scripts load from /dezio/dashboard/static/; settings load and save (/dezio/api/user).
  5. Dashboard URL bar after navigating stays /dezio/dashboard#...; Sign out returns to /dezio/dashboard.
  6. Signed out (no cookie): "Sign in with Discord" links to /dezio/login; /dezio/login redirects to Discord with redirect_uri=http://127.0.0.1:8099/dezio/callback.
  7. Set-Cookie headers from login have Path=/dezio.
  8. /dezio/activity redirects to /dezio/activity/; the page loads, /dezio/activity/api/config works, the 401 from web-session has login = /dezio/login?next=/activity/.
  9. A hosted link from hosted::store is http://127.0.0.1:8099/dezio/f/<token>/<name> and downloads.
  10. Without a path (DASHBOARD_URL=http://127.0.0.1:8099) everything still works at /.
  11. cargo test base_path passes.

Deploy commands for S011 (do not run before)

  • Back up: ssh [email protected] cp /root/Dezio/.env /root/Dezio/.env.bak-<date>.
  • Landing: scp deploy/landing/index.html [email protected]:/srv/landing/index.html (mkdir /srv/landing first).
  • tailscale serve --bg --set-path / /srv/landing
  • tailscale serve --bg --set-path /dezio http://127.0.0.1:8080 (keep Funnel on; keep the /git mapping).
  • In /root/Dezio/.env: DASHBOARD_URL=https://astar76.com/dezio, then restart dezio-bot.
  • Check https://astar76.com/, /dezio/, /git/. The router accepts the prefix stripped or not.

Owner checklist 🧑

  • Developer Portal → OAuth2 → Redirects: add https://astar76.com/dezio/callback.
  • Activities → URL Mappings: / → astar76.com/dezio/activity.
  • top.gg website field: https://astar76.com/dezio/.

Doubts

  • Whether tailscale strips /dezio (both handled, not verified).
  • web/dashboard/index.html has __BASE__ placeholders, so opening it as a plain file shows broken links.
  • Root-absolute paths left in web/: none outside __BASE__ placeholders (grep (href|src|action)="/[a-z] in web/site finds none).

Results (server, 2026-12-01)

  • Server steps applied. / = landing 200, /dezio/ 200, /dezio/dashboard 200, /dezio/terms 200, /git/ 200, Funnel on. dezio-bot active, journal clean, log shows Dashboard on .../dezio.
  • Note: tailscale serve --set-path turns Funnel off; tailscale funnel --bg --set-path / /srv/landing restored it (brief outage, about 5 min).
  • Not checked: OAuth login and Activity (need owner portal changes).