Skip to content

feat(scratchnode): directory viral slice — flyer cards, presence cue, one-tap request-to-join#483

Merged
HomenShum merged 2 commits into
mainfrom
feat/scratchnode-directory-viral
Jun 3, 2026
Merged

feat(scratchnode): directory viral slice — flyer cards, presence cue, one-tap request-to-join#483
HomenShum merged 2 commits into
mainfrom
feat/scratchnode-directory-viral

Conversation

@HomenShum
Copy link
Copy Markdown
Owner

@

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 join link that just navigated to /e/<slug> — it ignored the rooms actual joinPolicy and never touched the door-policy backend (#480).

Changes (public/proto/home-v5.html, renderPublicRooms + .landing-room-*)

  • Flyer feel + live presence — each card leads with a "● N inside" cue: a pulsing green dot + the real activeSessions count ("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.
  • Policy-aware actionopen rooms → a Join now <a> (navigate); request rooms → a real Request to join <button> wired to events:requestJoinEvent.
  • One-tap request, honest waiting — the request uses the same sn_session_id the room will use, so a host approval carries through the joinEvent door gate when the guest lands in /e/<slug>. Shows an honest "Requested ✓" (never a fake entry), watches events:getMyJoinRequest reactively → 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:

  • Updated directory case: open room → Join now + "● 6 inside" presence + visible dot.
  • New request-policy case: button files a real requestJoinEvent with 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
@

HShuM and others added 2 commits June 2, 2026 21:36
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>
@
ledger: release home-v5.html#directory claim, log directory viral slice shipped

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
nodebench-ai Ignored Ignored Jun 3, 2026 4:37am

Request Review

@HomenShum HomenShum enabled auto-merge (squash) June 3, 2026 04:37
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

✅ Dogfood Visual QA Gate: PASSED

Check Status
Screenshots 23 captured (pass)
Walkthrough 9 chapters (pass)
Key Frames 9 extracted (pass)
Scribe Steps 8 how-to steps (pass)
Build success
Artifacts

Download the dogfood-evidence-605a5ed artifact from the Actions tab for full screenshots, frames, and walkthrough video.


Generated by Dogfood QA Gate

@HomenShum HomenShum merged commit a8220c0 into main Jun 3, 2026
14 checks passed
@HomenShum HomenShum deleted the feat/scratchnode-directory-viral branch June 3, 2026 04:49
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

Demo: walkthrough of the surfaces this PR changed is available as a workflow artifact (pr-demo-483) at https://github.com/HomenShum/nodebench-ai/actions/runs/26864385583

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants