Skip to content

Building a pathway crashed the whole page - #68

Merged
diego-salvatierra merged 1 commit into
mainfrom
fix-pathway-crash
Aug 18, 2026
Merged

Building a pathway crashed the whole page#68
diego-salvatierra merged 1 commit into
mainfrom
fix-pathway-crash

Conversation

@diego-salvatierra

Copy link
Copy Markdown
Collaborator

Every pathway build died partway through streaming:

InvalidCharacterError: Failed to execute 'createElement' on 'Document':
The tag name provided ('') is not a valid name.

leaving "This page couldn't load" and no way forward.

Cause

A streamed partial step arrives with purpose: "" before the token lands — confirmed, 4 occurrences in a single photosynthesis stream, not inferred. The icon lookup used ??, which only replaces null/undefined, so an empty string fell straight through:

('' && PURPOSE_META['']?.Icon) ?? Sparkles   // => ''

React was then handed <"" /> and threw from completeWork, taking the whole page down rather than one step. || treats the empty string as absent, which is what was meant.

The neighbouring waypoint lookup had the identical trap. It was benign — ''?.dot is undefined and the class fallback caught it — but it's fixed alongside so the pattern doesn't get copied into the next widget.

Verification

Driven in a real browser against the live page, not just reasoned about:

before after
pathway build dies ~10s in completes
rendered elements 0 (blank error page) 29
uncaught exceptions 1 0

Typecheck clean, lint clean (0 errors; the 6 warnings are pre-existing).

Worth noting this reproduces on main and affects the deployed app for everyone, not just one environment.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Aug 18, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
interactive-learning-experiences Ready Ready Preview Aug 18, 2026 10:55pm

Request Review

Every pathway build died partway through streaming with

  InvalidCharacterError: Failed to execute 'createElement' on 'Document':
  The tag name provided ('') is not a valid name.

leaving "This page couldn't load" and no way forward.

A streamed partial step arrives with `purpose: ""` before the token lands —
confirmed, 4 occurrences in a single photosynthesis stream. The icon lookup
used `??`, which only replaces null/undefined, so an empty string fell
straight through:

  ('' && PURPOSE_META['']?.Icon) ?? Sparkles   // => ''

React was then handed `<"" />` and threw from completeWork, taking the page
with it rather than one step. `||` treats the empty string as absent, which
is what was meant.

The neighbouring waypoint lookup had the same trap. It was benign — `''?.dot`
is undefined and the class fallback caught it — but it is fixed alongside so
the pattern does not get copied.

Repro: build any pathway. Verified fixed by driving the real page in a
browser — full build completes, zero exceptions.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@diego-salvatierra
diego-salvatierra merged commit d5aeb8a into main Aug 18, 2026
3 checks passed
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.

1 participant