velxio/frontend/src/store
davidmonterocrespo24 9c93d99802 fix(micropython-esp32): write helper .py files to flash before main.py
loadMicroPythonProgram only forwarded main.py (or files[0]) to the
bridge for raw-paste injection. Any auxiliary module the project
imported (mylib.py, drivers, etc.) never reached the device, so
`import mylib` died with ModuleNotFoundError.

Build a Python prelude that writes every other .py file to the
MicroPython filesystem via raw REPL, then runs main.py in the same
paste. JSON.stringify produces an ASCII-safe Python-compatible string
literal for the file body, which keeps the prelude inside the existing
chunked-UART path Esp32Bridge already uses to feed the 128-byte FIFO.

The RP2040 path was already multi-file via sim.loadMicroPython(files),
so it stays untouched.

Reproduces with the project shared in the bug report:
  https://velxio.dev/project/ac7e285c-8dc3-4d51-8751-b4aba9912f9e
2026-05-10 01:42:11 +02:00
..
serialBatcher.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
useAuthStore.ts feat(frontend): /pricing route placeholder + UserResponse subscription fields 2026-05-05 10:24:01 -03:00
useEditorStore.ts feat(editor): view-mode toggle, agent-chat slot, toolbar polish 2026-05-08 00:56:51 -03:00
useElectricalStore.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
useOscilloscopeStore.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
useProjectStore.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00
useSimulatorStore.ts fix(micropython-esp32): write helper .py files to flash before main.py 2026-05-10 01:42:11 +02:00
useVfsStore.ts refactor: rename components and update prefixes to 'velxio-' for consistency 2026-04-21 16:45:45 -03:00