Skip to content

fix(tutorial): word check failures for players, and outline the parts they name - #110

Merged
Rn86222 merged 4 commits into
mainfrom
fix/tutorial-check-messages
Nov 20, 2026
Merged

Rn86222 merged 4 commits into
mainfrom
fix/tutorial-check-messages

Conversation

@Rn86222

@Rn86222 Rn86222 commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Summary

The Check failures and the editor's play errors used words a visitor who does not know logic circuits cannot follow, such as "simulated", "node" and "feed back", and named Input and Output nodes by English part names in Japanese. A loop found by Check said "outlined", but nothing was outlined outside play mode.

  • Simulation errors are worded for players. These texts are shared by Check and the editor's play-mode notification.
    • A loop is told by what the wiring does and why it cannot run: "The output of each part outlined in red comes back to its own input along the wires. Working out its output needs that same output, so the circuit cannot run as it is. Reconnect a wire, or put a FlipFlop somewhere along the way." A loop inside a part says the same about that part, and tells to open it.
    • Input and Output nodes are named by their role, translated, and their pin: 「出力 Out」 / "Output Out". An Output inside a part is then not read as that part's pin.
    • An unconnected pin of a part is named by its label: 「And の B のピン」 / "Pin B of And".
  • Check shows a worded error on its own. The sentence before it ("The circuit cannot run.") said the same thing again. Errors without their own wording, such as a failed evaluation, keep it.
  • Check outlines the parts its error names, as playing does, on the stage's own circuit. If a part is open when Check finds such an error, the editor goes back to the stage's circuit so that the outline can be seen. The outline goes when the circuit changes.
  • A missing stage pin is told by its side, 「右の出力 Out」 / "The output Out on the right", and the message has its own "Reset this stage" button, as the one at the end of the stage text may be out of view.

Testing

  • npx vitest run (284 tests), npx tsc -p . and npx biome check src pass. New tests cover which simulation failures get the sentence before them, and naming an Output inside a part in Japanese.
  • In the browser, in English and Japanese:
    • Check with nothing connected tells that Output Out is not connected
    • an And with a free input is named by the pin, and outlined
    • two parts wired in a loop give the loop message and are outlined, also when Check is pressed with a part open; the outline goes when a wire of the loop is removed
    • with a stage pin renamed, the missing-pin message shows its reset button, which opens the reset dialog

🤖 Generated with Claude Code

Rn86222 and others added 4 commits November 20, 2026 22:23
… Check

- The simulation errors no longer say "simulated", "node", "input pin" or
  "feed back". A loop is told by what the wiring does and why it cannot
  run, Input and Output nodes are named by their pin as they are shown,
  and an unconnected pin by its name on the part. A worded error is shown
  on its own, without a sentence before it saying the same.
- A missing stage pin is told by its side, as the stage texts do, and the
  message has its own reset button, as the one at the end of the stage
  text may be out of view.
- A loop found by Check is outlined in red, as the message says, as it
  already was on play.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… outline

- An evaluation failure keeps the sentence before it and stays worded in
  the language shown, as only loop, unconnected pin and bit width errors
  word themselves.
- Check goes back to the stage's circuit when it outlines parts there, as
  the outline cannot be seen while a part is open.
- Input and Output nodes are named by their role, translated, so that an
  Output inside a part is not read as that part's pin.
- The English loop sentence reads more naturally, and the outlined nodes
  are worked out only when the result changes.

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 20, 2026 •

Copy link
Copy Markdown

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

Latest commit: bd9dfed
Status: ✅  Deploy successful!
Preview URL: https://455ee425.create-cpu-c8345196-9409-4cce-afc4-389f413ad8ee.pages.dev
Branch Preview URL: https://fix-tutorial-check-messages.create-cpu-c8345196-9409-4cce-afc4-389f413ad8ee.pages.dev

View logs

@Rn86222
Rn86222 merged commit 856ea9a into main Nov 20, 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