From ee2c0d55ea9244ae4b22b0c5cdb27b52996d75b5 Mon Sep 17 00:00:00 2001 From: digital-garbage <133010426+digital-garbage@users.noreply.github.com> Date: Tue, 15 Sep 2026 22:26:01 +0300 Subject: [PATCH] fix: tour demo -- parsed.scenes must be an array, not a count Verified the ported Tour feature live end-to-end (entry via ?mode=tour and via Help > Welcome tour..., all 15 spotlight steps, FAQ landing, exit) and found the one real bug: tour.js's canned preview.parsed was `{scenes: 3}` -- a count, not an array. inspector.js's renderSplit() does `(parsed.scenes || []).forEach(...)`, which throws the moment the Scene preview panel renders during the tour. Confirmed identical in v4's original tour.js -- a pre-existing bug carried over verbatim by the byte-for-byte port, not something the port introduced. Fixed by giving the demo preview a real 3-scene array matching the demo project's own scene texts. Re-verified live: zero thrown errors across the full tour sequence after the fix. Co-Authored-By: Claude Sonnet 5 --- app/legacy/tour.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/legacy/tour.js b/app/legacy/tour.js index 985830d7..57e9b658 100644 --- a/app/legacy/tour.js +++ b/app/legacy/tour.js @@ -264,7 +264,18 @@ }, preview: { combined_prompt: "Demo combined prompt preview", - parsed: { scenes: 3 }, + // `parsed.scenes` is an array of {text} rendered by inspector.js's + // renderSplit() -- a bare count here throws on .forEach the moment + // that panel renders (pre-existing in v4's tour.js too, found while + // verifying this port live). + parsed: { + scenes: [ + { text: "Wide establishing shot of the city at dawn, soft haze." }, + { text: "B-roll alley clip." }, + { text: "Close-up reaction, emotional beat, shallow depth of field." }, + ], + transitions: [], + }, warning: "", parse_error: "", },