Fix 1 — new user pages 404 (server.py:228):

After registration creates the user's directories, it now calls _write_root_manifest(dd). This rewrites index.json to include the new handle's shard immediately. Since Astro dev re-evaluates getStaticPaths() on every request (reading that file), /u/pres/, /u/pres/stats/, and /u/pres/athlete/ will resolve correctly as soon as the new user navigates there.

  Fix 2 — invites link (athlete/index.astro:33):
  Added an Invites button (top-right, same style as "Edit profile") that starts hidden. When bincio:me fires and me === handle (you're on your own page), the subnav tabs are removed as before AND the invites button is revealed. Other visitors see neither.
This commit is contained in:
Davide Scaini
2026-04-09 21:44:38 +02:00
parent 084c652fdd
commit cbac82a2ba
2 changed files with 23 additions and 7 deletions
+5
View File
@@ -229,6 +229,11 @@ async def register(request: Request) -> JSONResponse:
(dd / handle / "activities").mkdir(parents=True, exist_ok=True)
(dd / handle / "edits").mkdir(parents=True, exist_ok=True)
# Update root manifest so the new user's shard is discoverable immediately
# (Astro dev re-evaluates getStaticPaths() on each request from this file)
from bincio.render.cli import _write_root_manifest
_write_root_manifest(dd)
token = create_session(_get_db(), handle)
resp = JSONResponse({"ok": True, "handle": handle})
_set_session_cookie(resp, token)