Make the page playable: interactive board, live solver, and a usable run picker
Three things the build was quietly missing. The interactive board was never mounted. The contract has `interactive.init` and `interactive.Controls`, the demo implemented both, and the shell's `split-play` beat rendered only the replay — so the beat titled "you and the model get the same word" showed one board. PlayYourself now renders the visitor's attempt from the same seed as the run beside it, generically: it knows only the contract, so any demo shipping an interactive mode gets it and one that does not renders nothing rather than an empty pane. solver.worker.ts was dead code — nothing constructed it, which is how CI caught it: `new Worker(` appeared nowhere in the bundle. It is wired now behind "what would the best player guess?", and it answers in 92ms from a real worker on boards no recording covers. That is the difference between a demo and a video. It also surfaces the moment the solver picks a word that CANNOT win, which is the counterweight visible in one line instead of explained in a paragraph. The CI check that found it was itself wrong: it grepped every bundled file for `blob:`, which React's own code contains in a scheme check, so it failed on a risk that was not present. It now greps for worker construction from a blob, which is the thing production CSP actually blocks in silence. And the run switcher was thirty buttons carrying four distinct labels. Split into arm and seed, holding the seed across an arm change — comparing two agents means comparing them on the same hidden word, and silently jumping seeds would break that while looking fine. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019mt6sHQHEnEYrJZvoMCJSB
This commit is contained in:
@@ -51,11 +51,20 @@ jobs:
|
||||
|
||||
# A blob-backed worker is blocked in production and nowhere else: the
|
||||
# site's CSP has no worker-src, so it falls back to default-src 'self'.
|
||||
# The failure is silent — the solver simply never boots.
|
||||
- name: no inline workers
|
||||
# The failure is silent — the worker simply never boots.
|
||||
#
|
||||
# Grep for worker construction FROM a blob, not for the string `blob:`
|
||||
# anywhere. React's own bundle contains that string in a URL-scheme check,
|
||||
# so the broad version fails on a risk that is not present, which teaches
|
||||
# everyone to ignore it.
|
||||
- name: no blob-backed workers
|
||||
run: |
|
||||
! grep -rqE "createObjectURL|blob:" dist/assets/*.js \
|
||||
|| { echo "a blob: URL reached the bundle; CSP will block it in prod"; exit 1; }
|
||||
if grep -rEo "new (Shared)?Worker\([^)]{0,80}" dist/assets/*.js \
|
||||
| grep -E "blob:|createObjectURL"; then
|
||||
echo "a worker is constructed from a blob URL; production CSP blocks it silently"
|
||||
exit 1
|
||||
fi
|
||||
echo "ok — no blob-backed worker construction in the bundle"
|
||||
|
||||
python:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Reference in New Issue
Block a user