Commit Graph

833 Commits

Author SHA1 Message Date
David Montero Crespo e1ac29b3c5
Merge pull request #185 from davidmonterocrespo24/feat/compile-logs-store-slot
feat(compile): expose compile logs via Zustand store + UI slot
2026-05-14 11:51:39 -03:00
davidmonterocrespo24 729c8785ba feat(compile): expose compile logs via Zustand store + UI slot
Two minimal hooks so the velxio-pro agent overlay can offer a 'Diagnose
this compile failure with AI' affordance without touching upstream
component internals:

  - New store/useCompileLogsStore: holds the editor's compile output as
    Zustand state instead of local React useState in EditorPage. The
    setter accepts both a value and an updater fn so the EditorToolbar
    callers that used setCompileLogs(prev => [...prev, log]) keep
    working without changes.

  - CompilationConsole header now renders a
    <div data-velxio-slot='compile-console-actions' /> when errorCount
    > 0. The pro overlay mounts a 'Diagnose with AI' button into this
    slot via slotMounter. Empty in the OSS image — no behaviour change.

EditorPage replaces its local useState<CompilationLog[]> with the store
selector. The downstream prop-drilled setCompileLogs callers (toolbar,
sub-toolbars) keep their signature.

Companion commit lands the button + diagnostic prompt builder in the
velxio-prod overlay.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 16:44:05 +02:00
David Montero Crespo 30004bb82b
Merge pull request #184 from davidmonterocrespo24/feat/bump-quota-limits
feat(landing): bump pricing display to 100/500/2000 daily credits
2026-05-14 03:13:43 -03:00
davidmonterocrespo24 aaebfedd23 feat(landing): bump pricing display to 100/500/2000 daily credits
Mirrors the velxio-prod backend quota bump (PLANS dict in
pro/backend/app/pro/services/quota.py). With 9router serving the bulk
of agent traffic for free, the cost-of-LLM ceiling is much lower than
when the limits were originally tuned, so we can be significantly more
generous and let casual users actually evaluate the agent.

  Free     20  /day, 300 /mo   →  100  /day, 1500 /mo
  Pro      400 /day, 12k /mo   →  500  /day, 15k  /mo
  Pro Max  1000/day, 30k /mo   →  2000 /day, 60k  /mo

Updates the landing.pricing.tiers.{free|pro|pro_max}.f1 string in all
9 locales (de, en, es, fr, it, ja, pt-br, ru, zh-cn) with each
locale's native thousands separator (',' / '.' / ' ' depending on
convention).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 08:10:25 +02:00
David Montero Crespo ec690a93f1
Merge pull request #183 from davidmonterocrespo24/fix/publish-docker-license-key
fix(ci): pass VELXIO_LICENSE_KEY to publish workflow
2026-05-14 01:27:41 -03:00
davidmonterocrespo24 4dbb860237 fix(ci): pass VELXIO_LICENSE_KEY to publish workflow
After the Dockerfile.standalone refactor (PR #182), the qemu-provider
stage requires VELXIO_LICENSE_KEY to fetch libqemu .so + ESP32 ROM
blobs from velxio.dev's gated download endpoint. The Publish Docker
Image workflow was missing the build-arg, so it failed on every push
to master and the GHCR / Docker Hub :master image went stale.

Plumbs the existing repo secret VELXIO_BUILD_LICENSE_KEY into
docker/build-push-action@v6's build-args list. Same secret the
backend-e2e-tests workflow already consumes — single source of truth.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 06:26:29 +02:00
David Montero Crespo 029f782a8f
Merge pull request #182 from davidmonterocrespo24/feat/docker-fetch-binaries-from-velxio
feat(build): fetch QEMU binaries from velxio.dev license endpoint
2026-05-14 00:57:33 -03:00
davidmonterocrespo24 36bd49f507 feat(build): fetch QEMU binaries from velxio.dev license endpoint
The qemu-prebuilt GitHub Release was the convenience-binary hosting
path before we shipped the license module. With the license module
live at /api/pro/license/downloads/, the prebuilts now live there
behind a free personal-tier key.

Dockerfile.standalone:
  - New build-args VELXIO_LICENSE_KEY + VELXIO_BINARY_BASE_URL
  - prebuilt/qemu/ local files still win first (lets users compile
    QEMU from source per docs/BUILD-QEMU.md and use that instead)
  - Legacy QEMU_RELEASE_URL kept as escape hatch for private mirrors
  - Fail-fast with a friendly message if no path is configured

backend-e2e-tests workflow:
  - Reads secrets.VELXIO_BUILD_LICENSE_KEY (set in repo settings)
  - Uses the gated URL pattern; same fallback message on missing key

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 05:55:38 +02:00
David Montero Crespo 1dd1d37696
Merge pull request #181 from davidmonterocrespo24/feat/docs-build-qemu-from-source
docs: BUILD-QEMU.md + 'Build QEMU from source' docs section
2026-05-14 00:46:13 -03:00
davidmonterocrespo24 888ce03cc3 docs: BUILD-QEMU.md + 'Build QEMU from source' docs section
Adds a transparent self-hosting path for users who would rather not
run Velxio's prebuilt libqemu binaries. The prebuilts have always
been a convenience under the AGPLv3 license; this just documents
how to skip them.

- docs/BUILD-QEMU.md as the canonical step-by-step (dependencies per
  Debian/Arch/macOS, ESP32 xtensa + ESP32-C3 riscv32 configure-and-
  ninja, drop-in instructions, troubleshooting, license notes on the
  QEMU/Velxio GPL-vs-AGPL boundary).
- DocsPage gets a new 'build-qemu' section between Setup and Roadmap
  in the sidebar. Content is hardcoded English (technical reference,
  not marketing copy) and ends with a link to the .md on GitHub.
- nav + SEO meta keys added to all 9 locales (de en es fr it ja
  pt-br ru zh-cn). Body remains English in every locale; technical
  content doesn't need translation for the audience that follows it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 05:44:10 +02:00
David Montero Crespo 3ba20e9d92
Merge pull request #180 from davidmonterocrespo24/feat/header-pricing-link
feat(header): add Pricing link to top nav + landing footer
2026-05-14 00:29:47 -03:00
davidmonterocrespo24 fedb197be0 feat(header): add Pricing link to top nav + landing footer
The /pricing page exists (PricingPlaceholder upstream, real PricingPage
portal-mounted by the private overlay) but had no entry in the top nav.
Adds 'pricing' to header.nav in all 9 locales (de, en, es, fr, it, ja,
pt-br, ru, zh-cn), wires the Link in AppHeader between About and Blog,
and mirrors the link in the landing-page footer.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 05:28:59 +02:00
David Montero Crespo 623a471623
Merge pull request #179 from davidmonterocrespo24/feat-pico-doom-example
feat(examples): Pico Doom — Wolf3D-style raycaster on RP2040 + ILI9341
2026-05-13 22:43:05 -03:00
davidmonterocrespo24 5742ed0146 feat(examples): Pico Doom — Wolf3D-style raycaster on RP2040 + ILI9341
A new entry in the games category for the Raspberry Pi Pico. Renders
a first-person 3D corridor à la Wolfenstein / early Doom using a
column-wise DDA raycaster — 160 rays per frame drawn straight to a
320×240 ILI9341 TFT via drawFastVLine, no framebuffer. 16×16 tile map
with 5 wall palettes (slate, blood, brown, toxic green, bronze door),
darkened on NS faces so corners read in 3D. Forward / back move,
two more buttons turn the player. 40-px HUD bar.

Why a demo, not the canonical id Software Doom: Graham Sanderson's
rp2040-doom port shoehorns DOOM1.WAD into 2 MB of flash with custom
compression and pushes video out over PIO-driven DVI / VGA — none of
that survives the rp2040js emulator (no PIO accuracy, no flash
mapping for huge assets). A raycaster reproduces the *visual* of
early Doom using only ~67 KB of flash and 9 KB of RAM, which the
emulator runs perfectly.

Pre-flight: arduino-cli compile against rp2040:rp2040:rpipico
already verified inside the Velxio backend container — 3 % flash,
3 % RAM. The Adafruit_GFX + Adafruit_ILI9341 libs the example
declares are already in the gallery's auto-install list.

Bundled:
  test/pico_doom_demo/arduino_sketch.ino — source of truth sketch
  test/pico_doom_demo/README.md          — what + why + pin map
  test/pico_doom_demo/compile_check.sh   — operator script that
    runs arduino-cli against the same FQBN the prod backend uses
  frontend/src/data/examples.ts          — gallery entry (boardType
    raspberry-pi-pico, category games, difficulty advanced, 5
    components, 14 wires)
  frontend/src/__tests__/examples-pico-doom.test.ts — 10 vitest
    assertions: example is registered exactly once, target board /
    category / difficulty match, libraries declared, all four
    pushbuttons present, every wire endpoint references a real
    component id, SPI pin mapping matches the sketch's #define
    block, every button has a GND wire, the renderFrame loop is
    still present in the embedded code.
2026-05-13 22:54:35 +02:00
David Montero Crespo a4893a0da7
Merge pull request #178 from davidmonterocrespo24/feat-canvas-minimap
feat(canvas): minimap with draggable viewport in the bottom-right corner
2026-05-13 17:36:29 -03:00
davidmonterocrespo24 dcf98fd0e5 feat(canvas): minimap with draggable viewport in the bottom-right corner
Renders a 200×150 px overview of the whole 4000×3000 world in the
bottom-right corner of .canvas-content. Boards show as filled blue
rectangles, components as small white dots, and the current viewport
appears as an outlined rectangle the user can drag to pan.

Geometry mirrors the canvas's existing pan+zoom model:
  SCALE_X = MINIMAP_W / WORLD_W = 0.05
  rect.x = -pan.x / zoom * SCALE_X
  rect.w =  viewport.width / zoom * SCALE_X

Two interaction modes, decided at pointerdown by hit-testing the
rectangle:
  - Inside the rect  → drag-pan: keep updating pan as the pointer
    moves, with delta in minimap-px converted back to world units
    by (delta / SCALE) * zoom.
  - Outside the rect → teleport: re-center the viewport on the
    clicked world point.

Pan is clamped so the viewport rectangle never escapes the minimap
bounds (matches the canvas's implicit world boundaries at 4000×3000).
ResizeObserver on the canvas-content keeps the rect accurate when
the user toggles side panels or resizes the window.

Mobile: at ≤720 px width the minimap shrinks to 140×105 px so it
doesn't eat too much of the canvas. Touch events go through the same
pointerdown / pointermove path — no separate touch code path needed
thanks to Pointer Events.

Bundles with: matching CSS file, import + JSX hookup inside
.canvas-content's render tree.
2026-05-13 22:29:46 +02:00
David Montero Crespo 83f11f839a
Merge pull request #177 from davidmonterocrespo24/feat-pricing-multipliers-and-canvas-tone
feat(landing+theme): multiplier pricing copy + softer canvas
2026-05-13 16:06:47 -03:00
davidmonterocrespo24 cd4050c499 feat(landing+theme): multiplier pricing copy + softer canvas
Two small fixes that compound:

1. Drop LLM model names from the landing AI section. The agent
   auto-routes between several providers (9router combo, direct
   DeepSeek, direct Gemini, future-others) and naming any of them on
   the homepage misleads visitors. Replace "DeepSeek-V4-Flash and
   Gemini 2.5 under the hood" with "frontier LLMs auto-routed for
   cost and reliability" so the marketing line stays accurate as the
   provider mix changes.

2. Pricing copy switches from absolute message counts (300/day,
   700/day — small, intimidating, hard to anchor) to comparative
   multipliers (Pro = 20×, Pro Max = 50×). Visitors instinctively
   read these as "much more" without needing to count usage. The
   multipliers reflect the new backend quotas (400/day, 1000/day,
   committed separately in velxio-prod's pro overlay).

3. --color-bg-canvas moves from gray-1000 (#000000) to gray-950
   (#0a0a0c). Pure black collided with the slightly-lighter card
   surface (gray-900 #141416) and produced a harsh transition wherever
   a `min-height: 100vh` page wrapper grew taller than its content —
   visible on docs and user-profile pages with sparse content. The
   2-luminance-step shift removes the jarring while keeping the dark
   palette feel intact. gray-1000 stays in the scale for intentional
   black uses.

All 9 locales updated for (1) and (2).
2026-05-13 21:02:48 +02:00
David Montero Crespo edc7bfa132
Merge pull request #176 from davidmonterocrespo24/feat-landing-ai-agent-and-pricing
feat(landing): AI agent + pricing sections
2026-05-13 15:31:31 -03:00
davidmonterocrespo24 b7797b1eea feat(landing): AI agent + pricing sections
Two new sections on the landing page, between Features and Support:

1. "Powered by AI agents" — three cards explaining the in-editor agent
   (place & wire parts, generate code, diagnose circuits). Calls out
   DeepSeek-V4-Flash + Gemini 2.5 as the LLM backbone so visitors know
   the simulator does more than draw boxes.

2. "Pricing" — three cards summarising Free / Pro / Pro Max with the
   actual monthly cost, the daily AI-message quota, and a CTA per
   tier. Pro is highlighted as Most Popular. Free CTA opens the editor,
   the two paid CTAs link to /pricing where the PayPal subscription
   flow lives.

The simulator itself stays free — only the AI-agent quota changes per
tier — that copy is repeated in the section subtitle so visitors don't
worry about the boards/components becoming paywalled.

All 9 locales translated.
2026-05-13 20:24:40 +02:00
David Montero Crespo 14f5c7a2e7
Merge pull request #175 from davidmonterocrespo24/feat-drag-while-running-threshold
feat(canvas): drag-threshold lets users move parts while running
2026-05-13 12:02:32 -03:00
davidmonterocrespo24 d193954c2f feat(canvas): drag-threshold lets users move parts while running
Closes the long-standing "components are frozen during simulation"
complaint. Once the user clicked Run, interactive wokwi parts
(pushbuttons, slide-switches, potentiometers …) called
stopPropagation in their bubble-phase mousedown handlers and the
canvas's React onMouseDown never fired — so dragging them to
rearrange the layout was impossible without first stopping the sim.

Two surgical changes:

1. DynamicComponent.tsx switches the wrapper from `onMouseDown` to
   `onMouseDownCapture`. Capture phase runs before the inner
   wokwi-element, so the canvas sees the mousedown regardless of
   stopPropagation downstream. The existing posDiff < 5 check in
   mouseup keeps disambiguating click vs drag: a click still falls
   through to the wokwi-element's own mousedown/up for button-press
   semantics, only sustained movement promotes to a drag.

2. SimulatorCanvas.tsx's touch path used to early-return on touchstart
   when interactionRunning + .web-component-container, killing any
   chance of a touch-drag. Now we remember the touch's start position
   in pendingTouchDragRef and let the browser keep synthesizing mouse
   events for the wokwi-element. If the finger drifts past
   DRAG_PROMOTE_THRESHOLD_PX (8 px) onTouchMove cancels the
   passthrough and starts a real component drag — dispatching a
   synthesized mouseup on the original target so the wokwi-element
   doesn't stay visually pressed mid-drag.
2026-05-13 16:51:52 +02:00
David Montero Crespo 3e24811a0d
Merge pull request #174 from davidmonterocrespo24/feat-landing-licensing-section
feat(landing): licensing section — AGPLv3 + commercial option
2026-05-13 09:50:10 -03:00
davidmonterocrespo24 5d40408718 feat(landing): licensing section — AGPLv3 + commercial option
Adds a two-card section at the foot of the landing page (before the
brand footer) that surfaces Velxio's licensing model: AGPLv3 for the
public release, commercial license for teams that need to ship
Velxio inside closed-source products. Mirrors the existing
.feature-card visual language so it slots into the page without a
new design system.

Commercial CTA opens a mailto:info@velxio.dev. Open-source CTA links
to GitHub via the existing trackVisitGitHub handler so the analytics
event still fires.

All 9 locales translated.
2026-05-13 14:27:49 +02:00
David Montero Crespo f3f5d0b6de feat(user): add plan_id column for agent quota tier management 2026-05-13 03:21:51 -03:00
David Montero Crespo 083e0df732 fix(canvas): board-less SPICE switches toggle on click instead of opening property dialog
In digital / analog board-less examples the user clicks a slide-switch
or pushbutton expecting it to flip its state. Until this commit the
component property dialog opened instead and the click never reached
the wokwi-element underneath, so:

  - The user couldn't change switch state through the canvas at all.
  - With no state change the SPICE solver kept the old netlist, and
    every downstream LED stayed dark — the symptom that read as
    "voltages change but no LED lights".

Root cause was the gating: SimulatorCanvas only suppressed the
property dialog when `useSimulatorStore.running` was true, but that
flag is bound to an MCU's start/stop. Board-less circuits have no MCU
to start so `running` is permanently false, even when the SPICE engine
has been live since the example loaded.

New derived flag `interactionRunning = running || (boards.length === 0
&& !electricalPaused)` — true whenever the user is in an "interactive"
session, MCU or SPICE-only. Used in three click-handling paths:

  - SimulatorCanvas mouse-up handler: dialog is suppressed and the
    click falls through to the wokwi-element (line 1395).
  - SimulatorCanvas touch-start passthrough: same for touch (line 474).
  - SimulatorCanvas touch-end short-tap: same for tap (line 774).

Also propagated to DynamicComponent so the cursor becomes pointer (not
move) for interactive parts in board-less mode — visual cue that the
user can click instead of just drag.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 23:34:58 -03:00
David Montero Crespo 55581690f9
Merge pull request #173 from davidmonterocrespo24/feat-sync-partner-before-mail
feat(odoo-mail): sync partner upsert before firing async mails
2026-05-12 22:38:45 -03:00
David Montero Crespo 248d5ed37b Merge branch 'master' of https://github.com/davidmonterocrespo24/velxio 2026-05-12 22:37:45 -03:00
davidmonterocrespo24 4df7abc624 feat(odoo-mail): sync partner upsert before firing async mails
Closes the register-then-immediately-forgot race for good. Two parallel
calls to /velxio/api/send-welcome and /velxio/api/send-password-reset
were hitting Odoo's REPEATABLE-READ snapshot timing: both workers took
their snapshot BEFORE either had committed the partner row, so each
ran its own INSERT and the second blew up on the velxio_user_id
unique constraint — costing one of the two emails.

Add a new sync_partner() helper that POSTs to a new Odoo route
/velxio/api/upsert-partner (lives in velxio_subscription) which only
upserts the partner — no mail, no subscription, fast. Register and
forgot-password await this BEFORE firing the async welcome / reset
tasks. Each user's flow is sequential at the Velxio HTTP layer, so
the snapshot race disappears.

sync_partner() reuses the existing _post() error-swallowing pattern.
If Odoo is down, sync_partner returns None and the await is a no-op
— the user still registers / gets the generic 200, the welcome /
reset endpoints retain their defensive upsert as a fallback path.
2026-05-13 02:59:52 +02:00
David Montero Crespo 60d570cc5a
Merge pull request #172 from davidmonterocrespo24/fix-odoo-password-reset-include-user-id
fix(odoo-mail): forward velxio_user_id on password-reset payload
2026-05-12 18:33:39 -03:00
davidmonterocrespo24 40edae15b8 fix(odoo-mail): forward velxio_user_id on password-reset payload
Adds velxio_user_id to the send_password_reset payload (mirroring
send_welcome). The Odoo side's res_partner.velxio_user_id is unique,
so when Odoo eventually upserts on this endpoint the constraint
serializes concurrent register-then-immediately-forgot upserts and
prevents the duplicate-partner record the previous wire format risked.
2026-05-12 23:28:57 +02:00
David Montero Crespo 81ac2283c6 fix(canvas): wires follow components on rotation
Rotating a part with the 90° button used to leave every wire pinned to
the pre-rotation pixel coordinates — the component visually unhooked
from its cables. Two paths were missing:

  1. useSimulatorStore.updateComponent only triggered updateWirePositions
     for x/y changes. A rotation went through properties.rotation, so
     wires never recomputed.
  2. calculatePinPosition didn't know about rotation. Even when called,
     it returned the unrotated offset, so the new endpoints would still
     have been wrong.
  3. recordRotate (undo/redo) skipped updateWirePositions on both legs,
     so Ctrl+Z after a rotate left the canvas inconsistent.

Fix:

  - calculatePinPosition gets a 5th `rotation` argument. When non-zero,
    it finds the .dynamic-component-wrapper ancestor in the DOM, reads
    its offsetWidth/Height (layout-only, immune to CSS transforms) to
    locate the wrapper centre, and applies a 2D rotation matrix around
    that pivot. The wrapper top-left is recovered as (componentX - 4,
    componentY - 6) to match the offset convention updateWirePositions
    already uses.
  - updateWirePositions and recalculateAllWirePositions read the per-
    component rotation and thread it through.
  - updateComponent recomputes wires whenever properties.rotation
    changes, mirroring the existing x/y path.
  - recordRotate.execute and .undo both call updateWirePositions so
    Ctrl+Z keeps the canvas coherent.

Tests (pin-position-rotation.test.ts, 6 cases): unrotated identity,
90° (left edge → bottom), 180° (point reflection), 360° round-trip,
negative angles, and a store-level integration that rotates a fake
component and asserts wires[0].start moves to the rotated coordinate.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 18:03:32 -03:00
David Montero Crespo 36ad2bef3f feat(i2c): cross-board bridging across all velxio boards (AVR/RP2040/ESP32 xtensa+riscv)
Closes the remaining gaps in cross-board I2C so any topology of
supported boards (Uno↔ESP32, two ESP32s, Uno↔Uno↔Uno, ESP32-C3
connected to anything, etc.) works end-to-end with all I2C
components including write-only sinks (SSD1306, PCF8574, LCD-I2C).

Implementation (6 phases):

1. **BFS routing in I2CBusManager**: connectToSlave + handleExternalConnect
   walk the bridge graph with a visited Set so multi-hop chains
   (A↔B↔C with the device on C) resolve transparently.  A new
   forwarder-device shim is installed at intermediate hops so the
   existing handleExternalWrite/Read/Stop machinery routes
   through without per-method visited tracking.

2. **Per-peer proxy ownership in Esp32BridgeShim**: replaces the
   global _proxiedAddrs Set with _proxiedByPeer Map so concurrent
   bridges to the same ESP32 (e.g. wired to both Uno and Pico)
   don't wipe each other's proxies on teardown.  Interconnect's
   per-wire teardown calls clearProxiesForPeer(peerBus) instead of
   clearAllProxies.

3. **BFS-aware proxy sync**: syncProxyFromPeer now walks the peer
   bus + its transitive bridges, so an ESP32 sees devices on
   boards two or more hops away.  _peerDeviceLookup keeps a flat
   addr → device map for write-forwarding and resync.

4. **Periodic resync (250 ms)**: Esp32BridgeShim runs a setInterval
   while any proxy is live, re-dumping each device with
   dumpRegisters() and pushing updateProxyI2c only when an XOR-
   stride hash changes.  This keeps RTC time advancing visible to
   ESP32 firmware without flooding the WS pipe with static
   calibration dumps.  Hash is primed during initial sync so the
   first tick doesn't push a redundant identical buffer.

5. **Write-forwarding ProxySlave → peer**: backend ProxySlave
   buffers write bytes during the transaction and emits a
   `proxy_i2c_complete` event on STOP / repeated-START.  Frontend
   Esp32Bridge dispatches the event to a new onProxyI2cComplete
   callback; the shim replays the byte sequence on the actual
   peer I2CDevice via writeByte() + stop().  Makes ESP32 firmware
   writes to peer SSD1306 actually repaint the OLED, peer PCF8574
   latch updates, peer I2CMemoryDevice register mutations propagate.

6. **ESP32-C3 routed as bridge**: Interconnect.isBrowserSim no
   longer claims c3/xiao-c3/c3-supermini — they were already
   going through Esp32Bridge per the store's ESP32_RISCV_KINDS
   routing, but Interconnect was treating them as browser sims
   which broke proxy install.  isEsp32Bridge now correctly
   includes c3 family + ESP32-S3 + Arduino Nano ESP32.

Defensive: addBoard now disposes any existing shim's proxies
before overwriting simulatorMap entry so test reruns don't leak
timers.

Tests:
- 4 BFS multi-hop tests (i2c-multi-board-slave-gap.test.ts)
- 11 cross-board scenarios + per-peer + write-forward + resync
  (i2c-esp32-multiboard-bridge.test.ts)
- 1 real-firmware E2E for write-forward via QEMU (compile +
  load + observe proxy_i2c_complete arriving with the byte)
- New sketch fixture: esp32_i2c_write_to_peer.ino

Result: 90 test files / 1295 tests pass / 0 fail.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 17:51:39 -03:00
David Montero Crespo 44789cf58b feat(auth): welcome email on register + password reset via Odoo mail relay
Adds the transactional email pipeline driven from the Odoo SMTP relay so
new sign-ups get a Velxio-branded welcome and existing users can reset a
forgotten password without us running our own outbound mail server.

Backend:
- PasswordResetToken model: one-time, SHA-256-hashed (plain text never on
  disk), TTL 60 min, marked used_at on consume to prevent replay.
- POST /auth/forgot-password — anti-enumeration (always 200 + generic
  message), rate-limited 3/hour/user.
- POST /auth/reset-password — verifies token, hashes new password,
  atomically marks token used.
- /auth/register hooked with asyncio.create_task to fire welcome mail —
  registration is never blocked on Odoo being up.
- New service app/services/odoo_mail.py: async httpx wrapper, fire-and-
  forget, swallows every error so the request lifecycle stays clean.
- Settings ODOO_URL / ODOO_API_KEY / ODOO_MAIL_TIMEOUT_S /
  PASSWORD_RESET_TOKEN_TTL_MINUTES / PASSWORD_RESET_RATE_LIMIT_PER_HOUR.

Frontend:
- /forgot-password page (single email field + "check your inbox" state).
- /reset-password?token=XYZ page (new password + confirmation, redirects
  to /login?reset=ok on success).
- "Forgot your password?" link + green confirmation banner on /login.
- authService gains requestPasswordReset() and resetPassword().

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 17:34:30 -03:00
David Montero Crespo 71616e580d Add end-to-end tests for ESP32 I2C functionality and circuit verification
- Implemented `i2c-esp32-real-firmware.test.ts` to test ESP32 I2C communication via backend and WebSocket.
- Created `load-example-transitions.test.ts` to ensure proper loading of examples between board-less and board-based contexts.
- Added `CircuitVerificationModal.tsx` to display circuit verification results before running simulations.
- Developed `circuitVerifier.ts` to perform pre-flight checks for circuit safety, identifying potential issues like short circuits and component overloads.
- Introduced minimal ESP32 I2C master sketch `esp32_i2c_writer.ino` for testing I2C transactions.
2026-05-12 16:55:15 -03:00
David Montero Crespo a097601a73 Add HD44780Decoder and various I2C sketches
- Implement HD44780Decoder for decoding I2C commands to HD44780-compatible LCDs.
- Add bmp280_bridge_reader.ino to read BMP280 chip_id and status registers via I2C.
- Create i2c_scanner_multi.ino to scan I2C addresses and report responding devices.
- Introduce lcd_i2c_hello.ino to demonstrate basic LCD functionality with I2C.
- Implement pcf8574_bidirectional.ino to test bidirectional communication with PCF8574.
- Add pico_i2c_master_reader.ino for reading BMP280 from a Raspberry Pi Pico.
- Create rtc_lcd_clock.ino to display time from a DS1307 RTC on an I2C LCD.
2026-05-12 14:26:33 -03:00
David Montero Crespo 7b760f860a docs: add missing third-party repo references to README 2026-05-11 13:05:21 -03:00
David Montero Crespo e65fa69abd docs(frontend): update README to reflect npm packages instead of third-party clones 2026-05-11 13:03:52 -03:00
David Montero Crespo 391df34f5a fix(repo): remove broken submodule entries from third-party/
The 12 repos under third-party/ were tracked as gitlinks (mode 160000)
without a matching .gitmodules file, causing 'git submodule' errors and
broken links in the GitHub UI (issue #164).

These repos are reference-only clones and are NOT required to run Velxio
(npm packages @wokwi/elements, avr8js, rp2040js cover all runtime needs).
Removing them from git tracking and ignoring the directory entirely so:
- New cloners get a clean repo with no broken submodule warnings
- Existing local clones keep their third-party/ folders untouched
- Optional manual clones remain possible for offline hacking

Closes #164
2026-05-11 13:01:13 -03:00
David Montero Crespo ac7d74b2b5 fix(monaco): cross-platform postinstall via Node script
Replace Unix-only shell one-liner (mkdir -p / printf / cp -r) with a
Node.js ESM script (scripts/copy-monaco.mjs) that works on Windows,
macOS and Linux alike. The script still writes public/monaco/.gitignore
to keep copied assets out of git.
2026-05-11 12:42:33 -03:00
David Montero Crespo 64024207d8 fix(monaco): ignore public/monaco/ in git per Copilot suggestion (PR #163)
- postinstall now writes a '*' .gitignore into public/monaco/ so the
  copied monaco-editor assets are never tracked as untracked files
- Also add public/monaco/ to frontend/.gitignore as a belt-and-suspenders
  fallback for the same reason
2026-05-11 12:24:45 -03:00
David Montero Crespo dec7a6ec56
Merge pull request #167 from naweiss/fix/wire-boxes
Fix wire hovering in desktop mode
2026-05-11 12:23:05 -03:00
David Montero Crespo 13789ae08c
Merge pull request #169 from naweiss/fix/wire-color-on-finish
Make wire connected to ground black even when ending in ground
2026-05-11 12:18:32 -03:00
David Montero Crespo a785a7e108 Merge remote master (PR #170) - integrate Copilot suggestions
# Conflicts:
#	frontend/src/components/simulator/SelectionActionBar.tsx
2026-05-11 12:17:20 -03:00
David Montero Crespo 8de51da5a5 feat(simulator): wire color palette from PR #170 + Copilot suggestions
- Add color picker button to SelectionActionBar for wire selections
- Toggle palette using WIRE_KEY_COLORS swatches
- Pass currentColor and onColorChange from SimulatorCanvas
- Reset showPalette on kind/onColorChange change (Copilot suggestion)
- Use t('editor.selectionBar.changeColor') for title/aria-label (Copilot suggestion)
- Add changeColor i18n key to all 9 locale files

Co-authored-by: naweiss <naweiss@users.noreply.github.com>
2026-05-11 12:14:36 -03:00
David Montero Crespo 19c09ae260
Merge pull request #170 from naweiss/feat/wire-color-picker
Add color pallete for changing wire color
2026-05-11 12:13:28 -03:00
David Montero Crespo 46f615ef69
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-11 11:51:03 -03:00
David Montero Crespo 861e22572e
Merge pull request #163 from naweiss/fix/offline-editor
Load monaco editor from local installation
2026-05-11 11:40:06 -03:00
David Montero Crespo 5c70f09afe
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-11 11:36:51 -03:00
naweiss 47e96a027b Add color pallete for changing wire color 2026-05-11 09:35:46 +03:00