feat(scratchnode): directory viral slice — flyer cards, presence cue, one-tap request-to-join#483
Merged
Merged
Conversation
Directory viral slice: flyer cards, presence cue, one-tap request-to-join
The public-rooms directory rendered every room as a list row with a single
hardcoded "Request to join" link that ignored joinPolicy and just navigated to
/e/<slug> — never touching the door-policy backend. Wire it to the live door:
- "● N inside" presence cue: pulsing green dot + real activeSessions count
("friends are inside") + room code; zero-presence reads "Open for guests".
Request-policy cards get a terracotta wash. Reduced-motion safe.
- Open rooms -> "Join now" <a> (navigate). Request rooms -> "Request to join"
<button> calling events:requestJoinEvent.
- One-tap request uses the SAME sn_session_id the room uses, so a host approval
carries through the joinEvent door gate. Honest "Requested" state (never fake
entry); watches events:getMyJoinRequest reactively -> navigates on approved,
"Request declined" on denied; no live client -> plain navigate; error -> reset.
Tests: updated directory case (open -> "Join now" + presence) + new request-policy
case (real request, no nav, host approval carries guest into /e/<slug>).
18/18 chromium honesty suite green; desktop + mobile flyer cards verified.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
✅ Dogfood Visual QA Gate: PASSED
ArtifactsDownload the Generated by Dogfood QA Gate |
|
Demo: walkthrough of the surfaces this PR changed is available as a workflow artifact ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@
What
Closes the last gap in the viral loop on the discovery side. The public-rooms directory rendered every room as a list row with a single hardcoded
Request to joinlink that just navigated to/e/<slug>— it ignored the rooms actualjoinPolicyand never touched the door-policy backend (#480).Changes (
public/proto/home-v5.html,renderPublicRooms+.landing-room-*)activeSessionscount ("friends are inside") +· code XXXX. Zero-presence rooms read "Open for guests". Request-policy cards get a subtle terracotta wash. Reduced-motion disables the dot pulse.Join now<a>(navigate); request rooms → a realRequest to join<button>wired toevents:requestJoinEvent.sn_session_idthe room will use, so a host approval carries through thejoinEventdoor gate when the guest lands in/e/<slug>. Shows an honest "Requested ✓" (never a fake entry), watchesevents:getMyJoinRequestreactively → carries the guest in on approved, "Request declined" on denied. No live client → plain navigate (room handles its own door); backend error → reset + toast.Honesty contract preserved
No fabricated state, no fake entry. The apex stays
data-sn-live=null; the only paths into a room are a real navigate (open) or a real backend-confirmed approval (request).Tests
tests/e2e/scratchnode-live-route-honesty.spec.ts:Join now+ "● 6 inside" presence + visible dot.requestJoinEventwith a ≥8-char sessionId, shows "Requested ✓" with no navigation, then a host approval (getMyJoinRequest→ approved) carries the guest into/e/rooftop-launch.18/18 chromium honesty suite green. Desktop + mobile (375px) flyer cards screenshot-verified.
🤖 Generated with Claude Code
@