FOYER-V3 R1: assert-gated walkthroughs for node-foyer - #10
Merged
Merged
Conversation
Hand-applied from wip/slidelang-capture-viewport-20260912 (5088aaa): geometryFor(wt) replaces the hardcoded CAP_VW/IMG_H/SX/SY module constants, deriving displayed image height and per-axis cursor scale from wt.captureViewport (default 1280x800 unchanged). Upstream had since added the chromeless FILL/framed refactor, burst frames and scalesOf, none of which this commit touches -- only the geometry math is ported. Load-bearing for FOYER-V3 R1: FYwall (1440x900) and FYphone (390x844) captures need their own aspect ratio instead of inheriting the Streamlit-era 1280x800 default. Co-Authored-By: Claude Sonnet 5 <[email protected]>
…e-foyer Three single-pane specs for Node Foyer's own surfaces (walkthrough.foyer.specs.mjs, captured by walkthrough.foyer.mjs, rendered via src/foyer-index.js reusing Walkthrough.jsx's new captureViewport geometry): - FYwall (1440x900, production): header provenance, all 22 cards, a verified card beside a reachable-only one, a stable-sweeps line, the NodeRoom hover apparatus, the dead fixture's UNKNOWN state with its tried URL, and the Foyer's own card verified on both layers. - FYphone (390x844, production): a soft-hyphenated long name, Details opening a real dialog with the wall inert behind it, a 44px Open target, Close returning focus. - FYagent (1440x900, built preview with VITE_CONVEX_URL unset): the wall's own data-foyer-snapshot-source="file" fallback attribute, then the same build's /.well-known/agent-ui.json and /api/apps.json served raw. New in this capturer, not present in any existing walkthrough.*.mjs: every `cap` op carries an `assert` (visible / count / attr equals|matches / focused) checked against the live DOM immediately before the screenshot, fail-closed on a mismatch (aborts, keeps zz-fail.png) rather than only on a thrown exception. Each capture also reads the wall's own foyer-build-sha via a same-origin fetch (works even when the last frame has navigated off the wall's HTML, e.g. FYagent's raw JSON pages) at the first and last frame and discards the run if the served build moved mid-capture. Selector resolver (testid:/btn:/link:/aria:/placeholder:/text:/css:) merges walkthrough.collab.mjs's testid: prefix with walkthrough.visual.mjs's broader set. Judge (gemini-3.6-flash, GEMINI key resolved from env, never printed): FYwall fix-then-publish 20/22, FYphone fix-then-publish 22/22. FYagent scored 13/8/6 across 3 sampled runs (2 of 3 rework) — this repo's own documented judge variance, but the underlying defect repeats every run: goto-based JSON navigation has no in-app element to animate a cursor onto, and STORYBOARD.md forbids faking one. Recorded honestly rather than resampled until a good score appeared; a terminal/curl panel is the real fix, left for a follow-up round. README gains a "Node Foyer" real-world example section; docs/START_HERE.md and .tours/01-primary-user-flow.tour line citations updated for the line numbers the prior geometry commit (4cffdba) shifted in src/Walkthrough.jsx. Co-Authored-By: Claude Sonnet 5 <[email protected]>
This was referenced Sep 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three single-pane walkthrough specs for Node Foyer's own surfaces (
walkthrough.foyer.specs.mjs, captured bywalkthrough.foyer.mjs, rendered viasrc/foyer-index.jsreusingWalkthrough.jsx's newcaptureViewportgeometry). New mechanism in this capturer, not present in any existingwalkthrough.*.mjs: everycapop carries anassertchecked against the live DOM immediately before the screenshot — fail-closed on a mismatch (aborts the spec, keepszz-fail.png), so a capture that would show a wrong or stale state never ships. Each capture also reads the wall's ownfoyer-build-shavia a same-origin fetch at the first and last frame and discards the run if the served build moved mid-capture.Step 0 (separate commit,
4cffdba): hand-applied thecaptureViewportgeometry change fromwip/slidelang-capture-viewport-20260912(5088aaa) onto the currentWalkthrough.jsx(which had since gained the chromeless/FILLrefactor upstream) —geometryFor(wt)replaces the hardcoded 1280x800CAP_VW/IMG_H/SX/SYconstants so a 1440x900 wall and a 390x844 phone capture each get their own aspect ratio.Storyboard
https://node-foyer.vercel.app/)__fixture_deadUNKNOWN with its tried URL → the Foyer's own card verified on both layersinertbehind it → a 44px Open target → Close returns focus to DetailsVITE_CONVEX_URLunsetdata-foyer-snapshot-source="file"fallback attribute → the same build's/.well-known/agent-ui.jsonand/api/apps.jsonserved rawEach capture carries the seven STORYBOARD.md beats (premise/question/axis/conflict/evidence/verdict/exit) as one
storyboardobject, matching node-foyer'sWalkthroughCapturetype exactly.Judge results (
gemini-3.6-flash, key resolved from env, never printed)fix-then-publish, 20/22.fix-then-publish, 22/22.fix-then-publish, then 8/22 and 6/22rework. Recorded asrework(2 of 3, most recent run) rather than resampled until a good score appeared. The defect repeats every run for a structural reason: thegotobeats navigate to a raw JSON response with no in-app element to animate a cursor onto, and STORYBOARD.md forbids faking an interaction the frame doesn't show. The judge's own fix — a terminal/curl panel showing the actual fetch — is real but out of scope for this round.Media budget
Three GIFs (979KB + 399KB + 998KB) + three posters (126KB + 87KB + 120KB) = ~2.58MB, under node-foyer's
WALKTHROUGH_MEDIA_BUDGET_BYTES(4MB). Posters and GIFs are copied intonode-foyer/public/media/walkthroughs/<id>/; the manifest draft is atnode-foyer/data/walkthroughs.manifest.jsonfor the planner to re-hash and promote topublic/media/walkthroughs.json.Test plan
npm run check— 60/60 JS files parse, 36/36 tour steps and 34/34 prose citations match (fixed the line-number drift the geometry commit caused indocs/START_HERE.mdand.tours/01-primary-user-flow.tour)npx playwright test e2e/foyer.spec.tsagainst the FYagent preview: 12 passed, 1 skipped, 1 failed (pre-existingregistry/adapters.jsonvspublic/data/snapshot.jsondrift from a concurrent planner commit — both protected/runner-owned files outside this PR's scope)🤖 Generated with Claude Code