Skip to content

feat(tutorial): split stage 1's text into its goal and numbered steps - #101

Merged
Rn86222 merged 6 commits into
mainfrom
feat/stage-one-steps
Nov 19, 2026
Merged

Rn86222 merged 6 commits into
mainfrom
feat/stage-one-steps

Conversation

@Rn86222

@Rn86222 Rn86222 commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Stage 1 is where a visitor who has never used the editor starts. Its goal used to be one paragraph mixing what to build with how to drag, connect and play, and it did not explain pins or say what keeps the play button disabled. This PR separates the goal from the steps and keeps Check in view.

  • Goal: stage 1's goal only says what to build, and that the table under it is what clears the stage.
  • Steps: a stage's texts now have a list of steps, shown as a numbered list under "Steps" between the goal and Check. Only stage 1 has steps for now:
    1. Drag a part from the Parts list onto the editor.
    2. The small squares on a part's edges are pins. Left pins are inputs, which receive ON or OFF, and right pins are outputs, which send ON or OFF. Drag between an output and an input to connect them.
    3. The play button can be pressed once Out and every input pin of the placed parts are connected. A part with a free input keeps it disabled, which is what isEachInputPinConnected checks.
    4. After pressing it, click A and B to switch them and watch Out. The pencil button goes back to editing.
    5. When it works as in the table, press Check.
  • Check in view: the left column now scrolls above a footer holding Check, its result and the next-stage button. With the steps, Check was otherwise pushed below the window.
  • Types: the stage texts have a declared type, so a stage without steps is not typed never[], and a stage without texts is a type error.

Not in this PR

  • On a very short window, a long failure message makes the footer tall and leaves little room for the scrolling text.
  • The missing-pin message points to "Reset this stage", which sits at the bottom of the scrolling area and may need scrolling to.
  • Check's messages still use words such as "output pin" and "simulate", which a visitor may not know. They will be reviewed separately.

Testing

  • npx vitest run (190 tests), npx tsc -p . and npx biome check src pass.
  • Checked in the browser:
    • stage 1 shows the goal with its table and the five steps
    • Check stays at the bottom of the left column, with its failure message right under it
    • the play button becomes available once And is wired to A, B and Out, and is disabled again when an unused Or is added
    • the Japanese steps read naturally

🤖 Generated with Claude Code

Rn86222 and others added 6 commits November 20, 2026 00:19
A stage's texts now have a list of steps, shown under "Steps" between the goal
and Check. Stage 1's goal says the table is what clears it, and its steps say
that the play button waits for every pin to be connected.

The left column now scrolls above a footer holding Check and its result, so that
Check stays in view however long the text is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The button waits for Out and every input pin of the placed parts, not for the
pins of A and B, so a spare part left unconnected keeps it disabled.

The stage texts get a declared type, so that a stage without steps is not typed
as never[].

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The steps now point at the small circles on a part's edges, and name the input
pins by where they are, on the left side.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Deploying create-cpu-c8345196-9409-4cce-afc4-389f413ad8ee with  Cloudflare Pages  Cloudflare Pages

Latest commit: 725837e
Status: ✅  Deploy successful!
Preview URL: https://0785af90.create-cpu-c8345196-9409-4cce-afc4-389f413ad8ee.pages.dev
Branch Preview URL: https://feat-stage-one-steps.create-cpu-c8345196-9409-4cce-afc4-389f413ad8ee.pages.dev

View logs

@Rn86222
Rn86222 merged commit 0cbbd9c into main Nov 19, 2026
2 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