Skip to content

feat(scratchnode): self-serve "Create a room" front-door on the landing#472

Merged
HomenShum merged 2 commits into
mainfrom
claude/wizardly-poincare-55c0a0
Jun 2, 2026
Merged

feat(scratchnode): self-serve "Create a room" front-door on the landing#472
HomenShum merged 2 commits into
mainfrom
claude/wizardly-poincare-55c0a0

Conversation

@HomenShum

Copy link
Copy Markdown
Owner

Re your ask

"wait so i currently cannot just hop on the live site and create a room for my event or my friends and I? make it happen and shipped and tested live"

Correct — you couldn't. This adds the missing front-door.

Root cause (5 whys)

  1. You can't create a room from scratchnode.live → 2. the landing hero only renders a Join form → 3. the create flow (snCreateEventFromHostSheet) lives inside the in-room host console → 4. the entire Convex client module bails early on the apex (if (!slugMatch) return), so events:createEvent was never wired on the landing → 5. the apex was built "join-first"; createEvent shipped later (Phase 4) but never got a front-door. The backend was fully ready (rate-limited 5/10min, issues an HMAC host token, auto-generates a room code).

What changed (public/proto/home-v5.html)

  • A .landing-create form beside Join: event name (required) + optional custom room code.
  • A self-contained _landingCreate() handler that lazily bootstraps a Convex client (same /api/scratchnode-config + esm.sh paths the room module uses), calls events:createEvent, persists the issued host token (sn_host_owner_key_v2), and navigates the new host into /e/<slug> — where the room boot recognizes them as host.
  • Hierarchy: Join stays the single primary accent CTA; Create is outline-accent (secondary), with an "or host your own" divider.

Honesty contract preserved

Every failure (config down, client load fail, taken code, rate limit) surfaces a real inline error and re-enables the button — never a fake success. data-sn-live is left untouched so the apex stays honestly "not live" until the host lands in their room.

Verification

  • tsc --noEmit: clean (exit 0)
  • e2e: scratchnode-live-route-honesty.spec.ts 10/10 green, incl. 4 new landing-create cases (happy path, auto-code, short-name rejection, honest config-failure)
  • Live preview (public/proto static server): desktop + mobile (375px, no overflow) render clean, zero console errors; real-environment honesty confirmed — a valid-name submit with no API present shows "Could not load room config (HTTP 404)", no navigation, no host token persisted.

🤖 Generated with Claude Code

The scratchnode.live apex only offered "Join with a code" — a first-time
visitor had no way to actually create a room. createEvent existed in the
backend and a create flow lived in the in-room host console, but the
live-backend module bails early on the apex (if (!slugMatch) return), so
creation was never wired on the landing at all.

Add a .landing-create form (event name + optional custom room code) beside
Join, plus a self-contained _landingCreate() handler that lazily bootstraps a
Convex client (same /api/scratchnode-config + esm.sh paths the room module
uses), calls events:createEvent, persists the issued host token
(sn_host_owner_key_v2), and navigates the new host into /e/<slug>. Join stays
the single primary accent CTA; Create is outline-accent (secondary).

Honesty contract preserved: every failure (config down, client load fail,
taken code, rate limit) surfaces a real inline error and re-enables the
button — never a fake success, and data-sn-live stays untouched so the apex
reads honestly "not live" until the host lands in their room.

Covered by 4 new cases in scratchnode-live-route-honesty.spec.ts (happy path,
auto-code, short-name rejection, honest config-failure). 10/10 honesty suite
green; tsc clean; verified live in preview (desktop + mobile, honest 404 on
missing API).

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

vercel Bot commented Jun 2, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
nodebench-ai Ready Ready Preview, Comment Jun 2, 2026 7:47pm

Request Review

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown

✅ 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-f62aad2 artifact from the Actions tab for full screenshots, frames, and walkthrough video.


Generated by Dogfood QA Gate

@HomenShum
HomenShum merged commit 319f15d into main Jun 2, 2026
16 of 17 checks passed
@HomenShum
HomenShum deleted the claude/wizardly-poincare-55c0a0 branch June 2, 2026 19:58
@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown

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

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