collab-presence 0009 A: real session identity for presence + comments
presenceUser()/userSlug() now resolve the authenticated user: a plain /api/me fetch (GPL no-link rule — no closed contract import) races the WASM boot and is awaited before presence/comments bind. `?user=`/`?libowner=` overrides are gated behind VITE_ALLOW_USER_OVERRIDE=1 (dev script + e2e harnesses set it; prod builds never do). Anonymous/example-backend sessions keep the pre-auth slug fallback. Fixes prod's empty presence (everyone was "local-user", deduped as own tabs) and comment authorship in one move. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A42xfPFNdfsUt9eowkC9eM
This commit is contained in:
parent
abb0923f70
commit
6675c1f0fc
8 changed files with 173 additions and 10 deletions
|
|
@ -40,6 +40,12 @@ VITE_WASM_ROOT=/wasm
|
|||
# Leave UNSET for dev and the demo: every route renders locally.
|
||||
# VITE_APP_URL=https://app.pcbjam.com
|
||||
|
||||
# Honor `?user=` / `?libowner=` identity overrides ("1"). Dev servers and e2e
|
||||
# harnesses set this so specs can mint isolated per-run identities; NEVER set
|
||||
# it on a production build — the session user from /api/me (or the VITE_USER
|
||||
# fallback) is the identity there (collab-presence 0009).
|
||||
# VITE_ALLOW_USER_OVERRIDE=1
|
||||
|
||||
# Where the in-editor waitlist form POSTs (default https://www.pcbjam.com/api/waitlist).
|
||||
# The demo is static with no backend, so it cross-posts to the landing site's
|
||||
# serverless endpoint, which must send CORS for this origin (see
|
||||
|
|
|
|||
Loading…
Reference in a new issue