Commit Graph

356 Commits (master)

Author SHA1 Message Date
a2nr c6063e8eed revert ubuntu:22.04 2026-04-11 16:44:14 +07:00
a2nr 0d6b65b3a5 ganti debian 2026-04-11 14:41:40 +07:00
a2nr 2274d28a3f downgrade ubuntu veraion 2026-04-11 14:14:54 +07:00
a2nr a11dd87d5a feat: add pin hover tooltip during wire aiming and implement null-safety checks for wire rendering 2026-04-10 13:59:44 +07:00
a2nr 1973b0adbc fix(simulator): prevent crosshair from activating during wire segment editing on mobile
- Add data-segment-handle attribute to segment handle circles in WireLayer
- Skip long-press aiming timer when touch targets segment handle
- Add safety checks to cancel pending timer when segment drag starts
- Ensure segment drag always takes priority over crosshair activation

This fixes the bug where accidentally holding still while dragging a wire
segment would activate the crosshair overlay and interrupt the editing workflow.
2026-04-09 11:04:05 +07:00
a2nr 52321dffe8 feat: add wire undo/redo with snapshot-based history stack
- Snapshot-based undo/redo (full wires array per step, max 50 entries)
- Keyboard shortcuts: Ctrl+Z (undo), Ctrl+Shift+Z (redo)
- Toolbar buttons in canvas header (visible on mobile via separate
  undo-controls CSS class that isn't hidden by mobile media query)
- All 4 wire mutations (add, remove, update, finish) push snapshots
- selectedWireId reset on undo/redo to avoid stale references
2026-04-09 09:53:08 +07:00
a2nr cd85b78b75 feat: improve mobile wiring UX with pinch-zoom preserve and crosshair
- Pinch-zoom no longer cancels wire-in-progress (preview freezes during
  2-finger gesture, resumes after)
- Full-canvas crosshair guides (8000px dashed lines) at cursor position
  during wire creation for touch precision alignment
- PinOverlay touch interaction improvements
- Segment handle scaling inverse to zoom for constant screen size
2026-04-09 09:52:08 +07:00
a2nr ea82602102 feat: add EmbedBridge PostMessage protocol for LMS iframe integration
Implement bidirectional PostMessage bridge (EmbedBridge.ts) enabling
Velxio to be embedded as iframe in Elemes LMS. Supports: load_code,
load_circuit, get_source_code, get_serial_log, get_wires, set_embed_mode,
stop, ping. EditorPage/Toolbar hide auth UI in embed mode.
2026-04-09 09:44:49 +07:00
David Montero 2a386f99b0 fix: SaveProjectModal uses active board files/kind and better error messages
Two bugs fixed:
1. SaveProjectModal was reading from the legacy global `files` array instead
   of the active board's file group, causing projects to be saved with the
   wrong board_type (e.g. 'arduino-uno' for ESP32 projects).
   Now reads from fileGroups[activeBoard.activeFileGroupId] and uses
   activeBoard.boardKind for board_type.

2. Error handling was always showing "Save failed." — now shows:
   - "Server unreachable. Check your connection and try again." for network errors
   - "Not authenticated. Please log in and try again." for 401 responses
   - The server's detail message (with status code) for other errors

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 22:27:17 +02:00
David Montero 32acf80e0d fix: propagate has_wifi from compiler to startBoard for reliable WiFi detection
Frontend WiFi detection via file-content scanning was unreliable because
fileGroups[board.activeFileGroupId] could be an empty array (not null),
bypassing the ?? fallback to editorState.files.

Fix: the ESP-IDF compiler now returns has_wifi:bool in its compile response.
The frontend stores this on the BoardInstance and uses it in startBoard()
instead of scanning file contents. The file-content scan is kept as a
fallback for boards that haven't been compiled in this session.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 22:14:40 +02:00
David Montero 7c755ca3d1 fix: use board's file group for WiFi auto-detection instead of legacy global files
startBoard() was reading useEditorStore.getState().files (the legacy global
array with the default Arduino sketch) instead of the board's specific file
group. This caused hasWifi to always be false for ESP32 boards, so QEMU
never received the -nic flag and WiFi never connected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 21:36:04 +02:00
David Montero 1298be72b2 fix: add RISC-V toolchain paths to build env for ESP32-C3 compilation
_build_env() on Linux only set IDF_TOOLS_PATH but never added the tool
binary directories to PATH, so cmake could not find riscv32-esp-elf-g++
when compiling for ESP32-C3. Also improve ninja failure logging to show
stdout (where build errors actually appear) instead of empty stderr.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 20:55:38 +02:00
David Montero Crespo 0d83b09dd9
Merge pull request #93 from davidmonterocrespo24/feature/vscode-extension
feat: enhance logging for library loading and WiFi progress; update s…
2026-04-05 00:50:00 -03:00
David Montero Crespo b0fe5b5d14 feat: enhance logging for library loading and WiFi progress; update subproject commits 2026-04-05 00:49:25 -03:00
David Montero Crespo 79865ab289
Merge pull request #92 from davidmonterocrespo24/feature/vscode-extension
feat: enhance ESP32 boot stability with deterministic instruction cou…
2026-04-05 00:17:42 -03:00
David Montero Crespo 7ccd5a7b63 feat: enhance ESP32 boot stability with deterministic instruction counting and mark subprojects as dirty 2026-04-05 00:16:40 -03:00
David Montero Crespo 669fbe7e5c
Merge pull request #91 from davidmonterocrespo24/feature/vscode-extension
Feature/vscode extension
2026-04-04 23:32:28 -03:00
David Montero Crespo 4d87ea9bb9 feat: add ARDUINO_ESP32_PATH to docker-compose and mark subprojects as dirty 2026-04-04 23:32:09 -03:00
David Montero Crespo 826c207970 feat: update workflows for ESP-IDF toolchain and Docker image publishing 2026-04-04 23:28:06 -03:00
David Montero Crespo 9aab48ec64
Merge pull request #90 from davidmonterocrespo24/feature/vscode-extension
Feature/vscode extension
2026-04-04 18:04:22 -03:00
David Montero Crespo b73f28c174 feat: add pre-built ESP-IDF toolchain image workflow 2026-04-04 18:03:43 -03:00
David Montero Crespo 0a724b7566 feat: pre-built QEMU binaries from GitHub Release + WiFi SSID normalization
- Dockerfile: download pre-built .so + ROM from velxio public release
  instead of building from private qemu-lcgamboa source
- espidf_compiler: normalize any WiFi SSID → "Velxio-GUEST" for QEMU
  compatibility (channel 6, open auth)
- docker-compose.yml: unified dev/prod using Dockerfile.standalone
- .dockerignore: exclude qemu-lcgamboa source from Docker context
- .gitignore: ignore prebuilt/ binaries, keep .gitkeep

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-04 14:27:52 -03:00
David Montero Crespo 1afcbf7718 vs extension fix 2026-04-03 18:14:22 -03:00
David Montero Crespo 937ac36d04 Merge branch 'master' into feature/vscode-extension 2026-04-03 00:03:38 -03:00
David Montero Crespo ff12b83e34 feat: add ESP-IDF compilation service for QEMU-compatible firmware generation 2026-04-02 02:54:02 -03:00
David Montero Crespo d77a68e896 feat: add ESP-IDF compilation service for QEMU-compatible firmware generation 2026-04-02 00:12:38 -03:00
David Montero Crespo f495a2ce3a feat: implement ESP32 QEMU backend manager and frontend simulation interface 2026-04-01 22:41:52 -03:00
David Montero 69aaa070f2 chore: update sitemap.xml with current date
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 19:30:28 +02:00
David Montero f29e964e91 fix: ESP32 Run button auto-compiles and recovers firmware after page refresh
- handleRun now auto-compiles for ESP32/QEMU boards when no firmware is
  available (same behavior as AVR/RP2040 boards)
- startBoard now reloads compiledProgram into the bridge if _pendingFirmware
  was lost (e.g. after a page refresh between compile and run)
- Adds Esp32Bridge.hasFirmware() helper used by the store check

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 18:47:15 +02:00
David Montero ba8b56c647 fix: install ESP-IDF Python requirements in final Docker stage
ESP-IDF 4.4.x requires specific package versions (reedsolo<=1.5.4,
bitstring<4, pyparsing<2.4.0, kconfiglib==13.7.1, etc.) that conflict
with newer defaults. Installing requirements.txt after copying ESP-IDF
ensures the correct versions are used and cmake configure succeeds.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 07:45:47 +02:00
David Montero 372e4aea38 fix: add git and packaging to runtime image for ESP-IDF cmake
- git is required by ESP-IDF cmake to resolve submodules and version info
- packaging Python package is required by ESP-IDF Python dependency checks
  during cmake configure step

Without these, ESP32 compilation fails at cmake configure with:
  "Some Python dependencies must be installed"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 07:39:46 +02:00
David Montero 447ab872f5 fix: add cmake, ninja-build and libusb to runtime image
- cmake and ninja are required by ESP-IDF compilation pipeline but were
  missing from the final stage, causing all ESP32 compilations to fail
- libusb-1.0-0 fixes the openocd-esp32 shared library warning on startup

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 07:28:01 +02:00
David Montero 8cff52bb2e fix: ignore ESP-IDF export.sh non-zero exit to prevent container crash
The openocd-esp32 tool fails with exit code 127 due to missing libusb-1.0.so.0
in the runtime image. With set -e, this caused the entrypoint to exit before
starting uvicorn and nginx, putting the container in a restart loop.

Adding || true allows the ESP-IDF environment to be sourced while tolerating
the non-critical openocd warning.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 07:18:35 +02:00
David Montero Crespo 4b8e342a71
Merge pull request #88 from davidmonterocrespo24/feature/wifi-esp32
Feature/wifi esp32
2026-04-01 01:40:09 -03:00
David Montero Crespo e8511f2257
Merge pull request #84 from davidmonterocrespo24/feature/remove-board-from-workspace
feat: allow removing boards from workspace
2026-03-31 23:11:27 -03:00
David Montero Crespo d44ea38dcf
Merge pull request #82 from davidmonterocrespo24/feature/auto-compile-on-play
feat: auto-compile when pressing Play if code changed or no hex loaded
2026-03-31 23:10:25 -03:00
David Montero Crespo f9975d67c5 fix: update gateway IP in documentation and mark submodules as dirty 2026-03-31 23:08:54 -03:00
David Montero Crespo 54f8f2782b feat: add ESP32 WiFi/BLE emulation with ESP-IDF compilation pipeline
Replace arduino-cli with ESP-IDF 4.4.7 for ESP32 compilation — Arduino-compiled
firmware crashes in QEMU (9-28 reboots) while ESP-IDF boots cleanly (0 reboots).
The new espidf_compiler translates Arduino WiFi/WebServer sketches to native
ESP-IDF C code, compiles with cmake+ninja, and merges into 4MB flash images.

Key changes:
- ESP-IDF compiler: translates WiFi.begin/WebServer to esp_wifi/esp_http_server
- ESP-IDF project template with QEMU-optimized sdkconfig (DIO, 40MHz, no WDT)
- WiFi status parser for ESP-IDF serial logs (wifi_status, ble_status events)
- IoT Gateway HTTP reverse proxy for ESP32 web servers
- WiFi/BLE auto-detection from sketch content + visual status icons
- Static IP 192.168.4.15 matching slirp DHCP first-client range
- Docker: new espidf-builder stage with ESP-IDF 4.4.7 toolchain
- 157 tests covering WiFi/BLE for both ESP32 (Xtensa) and ESP32-C3 (RISC-V)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 20:53:56 -03:00
David Montero Crespo dcf1bea20b feat: scaffold VS Code extension (Phase 1 MVP)
Adds the Velxio VS Code extension skeleton with:
- Extension host: commands (Open/Compile/Run/Stop/Select Board),
  WebView panel with postMessage bridge, FastAPI backend manager,
  velxio.toml + diagram.json config parser, file watcher, serial
  pseudo-terminal
- WebView: placeholder React app with board display and serial
  monitor, ready for wiring to the real simulation engines
- Build system: esbuild for extension (94KB), Vite for webview (198KB)
- Wokwi-compatible diagram.json schema for future import support

Based on reverse-engineering of the Wokwi VS Code extension (v3.5.0).
Key differentiator: Velxio runs simulation 100% locally (avr8js/rp2040js
in WebView, QEMU for ESP32) vs Wokwi's cloud iframe approach.

Refs #4

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-30 01:18:22 -03:00
David Montero Crespo 5dac9bca5c feat: allow removing boards from workspace
Closes #14

- Right-click context menu on boards with "Remove board" option
- Delete/Backspace key removes the active board (when no component selected)
- Confirmation dialog before removal showing connected wire count
- Removing a board also removes all connected wires and cleans up
  file groups, simulators, bridges, and VFS
- Cannot remove the last remaining board (button disabled + guard)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 01:55:10 -03:00
David Montero Crespo 67f9bc70c6 feat: auto-compile when pressing Play if code changed or no hex loaded
Closes #81

- Add `codeChangedSinceLastCompile` dirty flag to useEditorStore
- Play button now triggers compilation automatically when no compiled
  program exists or code has changed since last compile
- Show compilation progress during auto-compile before run
- If compilation fails, show errors instead of running stale code
- Keep separate Compile button for manual compile-only workflow
- Play button always enabled (disabled only while running/compiling)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 01:46:07 -03:00
David Montero Crespo e99ded70b5 feat: update AboutPage with new external links and improve press section 2026-03-28 23:11:57 -03:00
David Montero Crespo c0b658e6d6 fix: update npm ci to npm install for building libraries and mark submodules as dirty 2026-03-28 22:50:18 -03:00
David Montero Crespo 7da1b2261d
Merge pull request #80 from davidmonterocrespo24/copilot/add-google-analytics-key-events-tracking
feat: add About link to navigation in index.html and Velxio2Page
2026-03-28 22:44:33 -03:00
David Montero Crespo 922d0dd682 feat: add About link to navigation in index.html and Velxio2Page 2026-03-28 22:43:53 -03:00
David Montero Crespo 4d05b6ea7e
Merge pull request #79 from davidmonterocrespo24/copilot/add-google-analytics-key-events-tracking
feat: add About link to AppHeader component
2026-03-28 22:06:01 -03:00
David Montero Crespo 28ba7cb589 feat: add About link to AppHeader component 2026-03-28 22:05:30 -03:00
David Montero Crespo 2b239a8700
Merge pull request #78 from davidmonterocrespo24/copilot/add-google-analytics-key-events-tracking
fix: update Discord invite links across the application
2026-03-28 22:00:59 -03:00
David Montero Crespo 051d90374c Merge remote-tracking branch 'origin/master' into copilot/add-google-analytics-key-events-tracking 2026-03-28 22:00:49 -03:00
David Montero Crespo a346190086 fix: update Discord invite links across the application 2026-03-28 21:58:17 -03:00