Repository navigation
Simulator LEDs look like light; the REPL's arrows recall one clean line - #128
Merged
Merged
Conversation
MicroPython's event-driven REPL (the simulator's) took any key that left an empty line empty as Enter, an arrow's escape sequence part way included, so Up printed a second prompt and the rest of the sequence as text. shared.patch waits for the rest of the sequence; both runtimes are rebuilt. The page feeds the REPL one character at a time, in order. A recalled line longer than the terminal is wide was redrawn on one row: the terminal now turns the line editor's cursor-left and erase-line into backspaces with reverse wraparound and erase-below (line-edits.js), so it redraws over the wrapped rows, on a board too. It loads with the first thing a board says, off the first visit's budget. Colours were already drawn by xterm.js; the stray characters were the REPL bug. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A lit LED or NeoPixel is its light alone, a little see-through, hotter than full toward white with its hue kept, with a stronger, wider glow. The look is a set of numbers per board (LOOK_DEFAULTS in led.js); a hidden panel sets them live (?tune=leds, or Ctrl+Alt+Shift+L), lights every LED on the board, and shows the numbers as JSON to copy back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Visit the preview URL for this PR (updated for commit 3008f4d): https://firialabs-open-editor--pr128-sim-leds-terminal-hmv02ktr.web.app (expires Wed, 02 Dec 2026 02:04:49 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 81259a1fec315ca1af3747d225d9c7424890be3e |
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.
LEDs in the simulator (CodeBot, CodeX, CodeAIR)
A lit LED or NeoPixel was a coloured box with a little glow. Now its body is the light alone (no painted colour), a little see-through, run hotter than full toward white with its hue kept, and its glow is stronger and wider.
The look is a set of numbers per board,
LOOK_DEFAULTSinsrc/sim/view/led.js. A hidden panel sets them live:?tune=ledsin the address, or Ctrl+Alt+Shift+L with the simulator showing (the same keys close it).The terminal
[Aas text.sim/runtime/shared.patchmakes it wait for the rest of the sequence; both runtimes are rebuilt. The page also feeds the REPL one character at a time, in order.src/ui/line-edits.js), so this holds on a board over Web Serial too. It loads with the first thing a board says, keeping the first visit within its 600 KB budget.Tests
tests/terminal.mjs: the line-edit rewriting.tests/sim-ui.mjs: colours drawn, Up and Down through history (a wrapped line included), no stray characters or second prompt, a pasted run of commands.tests/sim.mjs: the runtimes matchshared.patch; a lit NeoPixel keeps its hue, full and hotter.🤖 Generated with Claude Code