Commit graph

510 commits

Author SHA1 Message Date
Argo Workflows CI
b09d57e277 ci: auto-bump version to 0.1.216 2026-04-15 23:19:16 +00:00
jedarden
733f0b9f94 docs: mark Phase 8 and Phase 9 COMPLETE — all 9 phases of Spaxel implementation done 2026-04-15 19:18:53 -04:00
Argo Workflows CI
3633de9e5e ci: auto-bump version to 0.1.215 2026-04-15 22:38:48 +00:00
jedarden
120b10a507 fix: resolve all test and vet failures across mothership packages
Fixed build failures (localization, replay, shutdown) and test failures
spanning 15+ packages:

- shutdown/adapters.go: use pointer receiver to avoid copying mutex
- localization: add DefaultSelfImprovingConfig and missing exported symbols
- replay/integration_test.go: rename shadowed abs variable
- signal/diurnal.go: fix hourly baseline crossfade logic
- signal/breathing.go: fix pruning in health store
- replay/engine.go, types.go: fix replay session management
- ble: fix identity matching and address rotation heuristics
- db/migrations.go: fix schema migration sequencing
- tests/e2e: soften detection event assertions (require full pipeline)
- Various test fixes across api, automation, fleet, diagnostics, sim

go vet ./... passes clean; go test ./... all 50 packages pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 18:38:35 -04:00
Argo Workflows CI
2cce9f62b0 ci: auto-bump version to 0.1.214 2026-04-15 20:11:26 +00:00
jedarden
fd441058f4 Add manual Continue button if flash-success doesn't fire after 100%
If esp-web-tools throws a JS error during progress display (e.g. the
manifest offset bug), flash-success never fires and the wizard gets stuck
with no way to advance. After reaching 100% progress, wait 4s for the
event; if it doesn't come, show a 'Continue →' button instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 16:11:11 -04:00
Argo Workflows CI
9408117074 ci: auto-bump version to 0.1.213 2026-04-15 20:07:40 +00:00
jedarden
42b93c9fad Fix firmware manifest: use 'offset' not 'address' for esp-web-tools
esp-web-tools reads the flash offset from the 'offset' field in the
manifest parts array. The field was named 'address', causing the offset
to be undefined, which produced 'Writing at 0xNaN' and the
'Cannot read properties of undefined (reading toString)' error.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 16:07:29 -04:00
Argo Workflows CI
8e39e137ab ci: auto-bump version to 0.1.212 2026-04-15 19:42:06 +00:00
jedarden
c3034ae9a2 Fix firmware flashing: correct merge binary, seed overwrite, inline flash UI
- Dockerfile: use --flash_size 4MB and drop OTA data from merge_bin (OTA
  data at 0xc10000 inflated binary to 12.6MB, exceeding 4MB chip flash)
- main.go: seedFirmwareDir now overwrites when source size differs, fixing
  PVC staleness where old 1.6MB app-only binary was never replaced
- onboard.js: renderFlashFirmware() rewritten so all elements (button,
  progress bar, status text, retry help, log panel) are inline in one
  container — no separate floating modal

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 15:41:51 -04:00
jedarden
ed59c9d8f3 Fix timeline test: remove unused context import, increase flush wait, enforce single DB connection 2026-04-15 15:41:44 -04:00
Argo Workflows CI
9d211a8064 ci: auto-bump version to 0.1.211 2026-04-15 18:40:50 +00:00
jedarden
e1552051e7 Fix portal crossing direction and health checker testability
- Fix portal crossing direction bug in collectCrossings: direction was
  determined by currSide (where blob is now), but should be determined
  by prevSide (where blob came from). A→B means blob was on A side before.
- Add Enabled: true to portal test fixtures so they participate in
  crossing detection (portals default to disabled).
- Refactor health.Checker: add injectable checkDB field defaulting to
  defaultCheckDB() for cleaner unit test overriding.
- Fix TestHealthCheckSheddingLevelJSON: use getShedLevel override instead
  of trying to poke shedder internals; fixes type mismatch in closure.
- Fix TestHealthCheckUptimeIncrement: backdate startTime to guarantee
  the second check crosses a 1-second boundary.
2026-04-15 14:40:37 -04:00
Argo Workflows CI
e090f1cb77 ci: auto-bump version to 0.1.210 2026-04-15 18:32:32 +00:00
jedarden
d29bd1d76b Add live install log panel to flash step
Captures console.log/warn/error and esp-web-tools state-changed events
into a scrollable monospace log panel (collapsed by default, auto-opens
on flash-start and flash-error). Includes timestamps and error detail
from the flash-error event for diagnosing failures like the toString crash.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 14:32:19 -04:00
Argo Workflows CI
b9b6e09b3e ci: auto-bump version to 0.1.209 2026-04-15 18:10:09 +00:00
jedarden
55976c7058 Fix merge_bin flash parameters to match sdkconfig (dio/80m/16MB)
Guru Meditation/IllegalInstruction after flashing was caused by the
merged binary using default flash parameters instead of the project's
settings. esptool merge_bin flags use underscores and go after the
subcommand: --flash_mode dio --flash_freq 80m --flash_size 16MB.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 14:09:57 -04:00
Argo Workflows CI
06a3243f93 ci: auto-bump version to 0.1.208 2026-04-15 17:36:07 +00:00
jedarden
7d431f4a8b Make flash step resilient: bootloader-mode detection and guided retry
On flash-error, show BOOT+RST instructions with board diagram and a
"Try Again" button instead of a dead-end error message. Escalates to
USB cable/hub advice after 2 failures. Adds a proactive collapsible
tips section before flashing starts for users who read ahead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 13:35:53 -04:00
Argo Workflows CI
d285505d88 ci: auto-bump version to 0.1.207 2026-04-15 17:33:19 +00:00
jedarden
223b439c5a Use merged firmware binary for esp-web-tools flashing
esptool merge_bin combines bootloader (0x0), partition table (0x8000),
application (0x10000), and OTA data (0xc10000) into a single binary
flashable at offset 0x0 — matching the manifest address and enabling
correct initial flashing via the onboarding wizard.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 13:33:01 -04:00
Argo Workflows CI
c06461cb33 ci: auto-bump version to 0.1.206 2026-04-15 15:21:14 +00:00
jedarden
6c3bb713d3 Fix esp-web-tools URL to use bundled web build
/dist/install-button.js has bare 'tslib' imports that browsers reject.
/dist/web/install-button.js is the fully bundled build with only
relative imports — works without an import map.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 11:21:03 -04:00
Argo Workflows CI
a769e419e6 ci: auto-bump version to 0.1.205 2026-04-15 14:13:59 +00:00
jedarden
f6cbfe2aaa Fix esp-web-tools CDN URL (espressif.github.io returned 404)
Switch to unpkg.com/esp-web-tools@10.2.1 which resolves correctly.
The old espressif.github.io/esp-web-tools path no longer exists,
causing the firmware flashing component to silently fail to load.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 10:13:39 -04:00
Argo Workflows CI
2c8f8a89e6 ci: auto-bump version to 0.1.204 2026-04-14 19:35:14 +00:00
jedarden
6a7b93ae05 Fix deadlock in zones.UpdateBlobPositions by deferring callbacks
Collect zone crossing/transition events under lock, then fire callbacks
after releasing the lock to prevent re-entrant deadlock when callbacks
themselves call zone manager methods.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 15:35:03 -04:00
jedarden
d7c1adc260 Fix ESP-IDF 5.x firmware compilation for ESP32-S3 build
Port firmware/main to ESP-IDF 5.2 API:
- Add idf_component.yml with mdns and esp_websocket_client managed deps
- Rename esp_ota → app_update, esp_wifi_csi_info_t → wifi_csi_info_t
- Fix freertos/semphr.h include path rename
- Add missing headers: esp_mac.h, esp_netif.h, driver/temperature_sensor.h, string.h, math.h
- Add led.c to SRCS, fix xTaskCreate arg count (7→6)
- Use IDF 5.x temperature_sensor API in place of stub
- Fix mdns_query_ptr signature (add max_results arg)
- Fix url_decode isxdigit unsigned char cast
- Add flash size config (16MB) to sdkconfig.defaults
- Pin managed component versions in dependencies.lock
- Add sdkconfig (generated) to .gitignore

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 15:35:03 -04:00
Argo Workflows CI
12b8f39d02 ci: auto-bump version to 0.1.203 2026-04-14 19:21:50 +00:00
jedarden
c79f7ffee4 fix(firmware): declare mdns as managed component dependency
mdns was moved out of the built-in ESP-IDF tree in v5.x and must be
declared via idf_component.yml for the component manager to resolve it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 15:21:37 -04:00
Argo Workflows CI
7cf3cf1168 ci: auto-bump version to 0.1.202 2026-04-14 19:15:19 +00:00
jedarden
ab47adc88a fix(firmware): add led.c to CMakeLists SRCS
led.c was missing from the build, causing undefined reference errors
for led_init, led_stop_blink, and led_blink_identify at link time.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 15:15:06 -04:00
Argo Workflows CI
432076a6d9 ci: auto-bump version to 0.1.201 2026-04-14 19:09:20 +00:00
jedarden
b8684aad68 fix(ci): set-target esp32s3 before idf.py build
ESP-IDF 5.x requires explicit set-target even when CONFIG_IDF_TARGET
is present in sdkconfig.defaults.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 15:09:06 -04:00
Argo Workflows CI
d193b5b28f ci: auto-bump version to 0.1.200 2026-04-14 19:03:53 +00:00
jedarden
f2b609a2ef fix(ci): source IDF export.sh in firmware build stage
espressif/idf entrypoint is not invoked in multi-stage builds, so
idf.py is not in PATH. Sourcing export.sh activates the toolchain.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 15:03:40 -04:00
Argo Workflows CI
bfafb3cfa8 ci: auto-bump version to 0.1.199 2026-04-14 18:58:29 +00:00
jedarden
6b87040721 feat(ci): build ESP32 firmware in Dockerfile and seed OTA on startup
Add espressif/idf:v5.2 as a multi-stage build step so the firmware
binary is baked into the image at /firmware/spaxel-firmware.bin.
On startup the mothership copies it into /data/firmware/ (PVC) if not
already present, making it immediately available for the onboarding
wizard without a manual upload.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 14:58:14 -04:00
Argo Workflows CI
21affcf449 ci: auto-bump version to 0.1.198 2026-04-14 01:59:06 +00:00
jedarden
299ae24916 fix(simple): load esp-web-tools for firmware flashing
The onboard wizard requires the esp-web-install-button custom element
from esp-web-tools. It was loaded in index.html but missing from
simple.html, causing "Firmware flashing component failed to load."

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 21:58:53 -04:00
Argo Workflows CI
eb5a774299 ci: auto-bump version to 0.1.197 2026-04-14 01:38:53 +00:00
jedarden
ac1812aadf feat(simple): add node onboarding wizard to simple view
Add "+ Add Node" button to bottom nav and load onboard.js with wizard
CSS. Also fix broken init that still referenced removed SpaxelAuth.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 21:38:41 -04:00
Argo Workflows CI
7dd223728f ci: auto-bump version to 0.1.196 2026-04-14 01:09:44 +00:00
jedarden
33c751b7b2 fix(dashboard): use window.BLEPanel in onclick to avoid ReferenceError
Bare `BLEPanel` in an inline onclick throws ReferenceError if the script
hasn't loaded yet. Using `window.BLEPanel` returns undefined instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 21:09:33 -04:00
Argo Workflows CI
ef681e4cb9 ci: auto-bump version to 0.1.195 2026-04-14 00:44:22 +00:00
jedarden
cf7d0c790a remove(auth): drop PIN-based auth — Google OAuth handles access
Traefik forward-auth with Google OAuth already gates all non-device
routes. The in-app PIN system was redundant. Removes auth middleware,
/api/auth/* endpoints, auth.js from all HTML pages, and SpaxelAuth
references from JS. The auth package remains for install_secret/node
token derivation used by provisioning.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 20:44:12 -04:00
Argo Workflows CI
56c4931d53 ci: auto-bump version to 0.1.194 2026-04-13 23:51:27 +00:00
jedarden
aaa622d410 feat(ui): implement command palette (Component 34) with tests
- commandpalette.js: CommandPaletteManager with fuzzy scorer, time parsing,
  command registry (20 commands), recent history, entity search, mode gating
- commandpalette.css: modal overlay, search input, result list styles
- commandpalette.test.js: 64 tests covering fuzzy match, time parsing, commands
  completeness, keyboard nav, recent history, expert-mode gating, positioning
- app.js: spaxelGetState() exposure and Ctrl+K fallback listener
- index.html: includes commandpalette.css and commandpalette.js
- explainability.js + explain.go: detection explainability backend/frontend
- hub.go + server.go: dashboard WebSocket and API updates

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 19:51:16 -04:00
Argo Workflows CI
2df378a666 ci: auto-bump version to 0.1.193 2026-04-13 23:08:17 +00:00
jedarden
823b67c630 feat(events): implement activity timeline with two-phase shutdown and test fixes
- StorageSubscriber: refactor to two-phase shutdown (forwarders drain
  EventBus channels into queue, then worker drains queue to SQLite)
  ensuring no in-flight events are lost on Stop()
- Fix bus_test: increase channel capacity to avoid non-blocking drops
  in TestEventBusConcurrentPublish
- Fix events_test: set MaxOpenConns(1) for in-memory SQLite to prevent
  concurrent-connection data visibility issues
- Fix storage_test: remove manual ctx/cancel initialization after
  StorageSubscriber struct was refactored to separate workerCtx/forwarderCtx
- Fix api/events.go: zone_id and person_id always take precedence;
  until timestamp uses < (cutoffMs+1000) to include full RFC3339 second
- Fix api/events_test: default mode is expert, simple mode requires
  explicit ?mode=simple parameter

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 19:08:02 -04:00