Skip to content

feat(nodebench): real ScratchNode->NodeBench bridge route /events/:slug/wiki#489

Merged
HomenShum merged 4 commits into
mainfrom
feat/nodebench-wiki-bridge-route
Jun 3, 2026
Merged

feat(nodebench): real ScratchNode->NodeBench bridge route /events/:slug/wiki#489
HomenShum merged 4 commits into
mainfrom
feat/nodebench-wiki-bridge-route

Conversation

@HomenShum
Copy link
Copy Markdown
Owner

@

Why

The ScratchNode → NodeBench bridge was broken end-to-end (found during the viral audit): nodebenchai.com/events/<slug>/wiki 404d — the src/App.tsx /events matcher ^/events/([^/]+)/?$ rejects trailing segments, no surface read the source=scratchnode/room params, and the "Now in NodeBench" overlay was hidden demo theater. Thats exactly why the ScratchNode wiki reader (#487) shipped without a "Continue in NodeBench" CTA — pointing at a 404 violates HONEST_STATUS.

What (the real receiving surface)

  • ScratchnodeWikiBridge — reads the slug (+ optional source/room), loads the PUBLIC, no-account events:getPublishedWikiBySlug (#486, live), and renders the recap inside the NodeBench shell with a conversion frame ("Keep this in NodeBench" → Explore NodeBench, plus "View the public wiki" / "Open in ScratchNode"). No cross-domain session needed — slug is in the URL, query is public.
  • Route in App.tsx/events/:slug/wiki matched above the single-segment /events/:eventId route so the trailing /wiki is captured first (the exact 404 bug).
  • Honesty + security — unpublished/unknown → real empty state (no fake recap); loading state; bodyHtml is server-public-safe (private notes excluded at publish) and DOMPurify-sanitized before render (XSS defense in the main app).

Tests

ScratchnodeWikiBridge.test.tsx — 4 cases: published render + NodeBench CTA + reverse paths; unpublished → honest empty; loading; and a sanitization case asserting a <script> + onerror handler in bodyHtml never reach the DOM. 4/4 green; full-project tsc clean.

Route-first: ships before the wiki readers "Continue in NodeBench" CTA is re-added (follow-up), so the CTA can never dead-end. Deeper event→workspace data carryover remains a follow-up.

🤖 Generated with Claude Code
@

feat(nodebench): real ScratchNode->NodeBench bridge receiving route /events/:slug/wiki

The bridge was broken end-to-end: nodebenchai.com/events/<slug>/wiki 404d because the
src/App.tsx /events matcher (^/events/([^/]+)/?$) rejects trailing segments, and no
surface read the source=scratchnode/room params. That is why the ScratchNode wiki
reader shipped WITHOUT a "Continue in NodeBench" CTA (a 404 violates HONEST_STATUS).

Build the real receiving surface:
- ScratchnodeWikiBridge: reads slug (+source/room), loads the PUBLIC no-account
  getPublishedWikiBySlug, renders the recap inside the NodeBench shell with a
  conversion frame (Explore NodeBench + View public wiki + Open in ScratchNode).
  No cross-domain session needed (slug in URL, query is public).
- Route in App.tsx matched ABOVE /events/:eventId so the trailing /wiki is captured
  first (the exact bug that 404d).
- Honesty + security: unpublished/unknown -> real empty state (no fake recap);
  loading state; bodyHtml is server-public-safe AND DOMPurify-sanitized (XSS defense).

Tests: ScratchnodeWikiBridge.test.tsx (4: published+CTA+reverse paths; unpublished
empty; loading; sanitization strips script/onerror). 4/4 green; full tsc clean.

Route-first: ships before the wiki reader CTA is re-added, so the CTA cant dead-end.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@
@HomenShum HomenShum enabled auto-merge (squash) June 3, 2026 06:28
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 3, 2026

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

Project Deployment Actions Updated (UTC)
nodebench-ai Ready Ready Preview, Comment Jun 3, 2026 7:48am

Request Review

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


Generated by Dogfood QA Gate

@HomenShum HomenShum merged commit 7d09cf2 into main Jun 3, 2026
17 checks passed
@HomenShum HomenShum deleted the feat/nodebench-wiki-bridge-route branch June 3, 2026 07:59
@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-489) at https://github.com/HomenShum/nodebench-ai/actions/runs/26871674133

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