velxio/frontend/src/components
David Montero 5a23e89eb5 feat(custom-chip): program lives in its own editor group, not the board sketch
A programmable custom-chip (a CPU emulator that runs a ROM/program, e.g. the
Z80 or 8080) now keeps its program (larson.s, chaser.c, ...) in a dedicated
editor file group — group-chip-<chipId> — rendered as its own collapsible
section in the file explorer, exactly like each board owns its sketch group.
Behaviour/driver chips and predefined chips carry no programFile and get no
group; they stay editable only in the chip designer.

Fixes two reported issues on the Z80 examples:
- /example/z80-larson-no-board: the board-less chip example now opens its
  program (larson.s) as the active group, editable on the left — previously
  the editor showed but no file appeared.
- /example/z80-led-chaser-c: the chip program (chaser.c) no longer shows as
  a sibling tab inside the Arduino sketch group; it sits in its own chip
  section instead. The board group shows only sketch.ino.

Details:
- useEditorStore: chipFileGroupId()/CHIP_GROUP_PREFIX helpers.
- loadExample: seedChipProgramGroups() routes each chip's programFile into its
  own group (seeded from the example files), sweeps stale chip groups, keeps
  the program OUT of the board group, and for a board-less chip example makes
  the chip group active so the program is the editable file shown.
- EditorToolbar.prepareCustomChips: resolves the program from the chip's own
  group (falls back to board files for older projects) before assembling ROM.
- FileExplorer: renders one collapsible section per programmable chip with an
  IC icon; clicking switches the editor to the chip group. Lazy-creates a
  group for chips dropped on the canvas.
- projectPayload + vlxFile: serialise chip groups alongside board groups and
  include them in the dirty-check hash, so chip-program edits persist on
  save / autosave / .vlx export and round-trip via replaceFileGroups on load.
- Regression tests for board-less + board+chip routing and stale-group sweep.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 22:07:56 +02:00
..
analog-ui
components-instruments
customChips fix(z80-cpu): map RAM over the whole 0x8000-0xFFFF so vanilla SDCC C runs 2026-06-03 13:31:26 +02:00
editor feat(custom-chip): program lives in its own editor group, not the board sketch 2026-06-03 22:07:56 +02:00
examples feat(examples): order gallery by board (Arduino Uno first), then title 2026-05-31 08:26:16 +02:00
layout feat(seo+nav+community): public-project indexing + classroom nav + examples grid 2026-05-29 18:11:28 +02:00
raspberry-pi feat(pi): pluggable slave handler + canvas wire detection for I2C/SPI/UART 2026-05-18 16:26:37 +02:00
simulator feat(boards): add 6 STM32 boards (F4 Discovery, Olimex H405, Netduino 2/+2, Pill variants) 2026-05-31 03:19:26 -03:00
ui
velxio-components feat(motors): fix stepper rotation + add A4988 driver (real Fritzing SVG) 2026-05-31 16:28:34 -03:00
ComponentPickerModal.css
ComponentPickerModal.tsx feat(boards): add 6 STM32 boards (F4 Discovery, Olimex H405, Netduino 2/+2, Pill variants) 2026-05-31 03:19:26 -03:00
DynamicComponent.tsx feat(custom-chip): run custom chips with no board (general-purpose sim) 2026-06-03 21:04:17 +02:00