Commit graph

697 commits

Author SHA1 Message Date
Argo Workflows CI
46dbcb1f45 ci: auto-bump version to 0.1.304 2026-05-04 10:35:17 +00:00
jedarden
7afbdc9441 test: add CI benchmark gate for fusion loop timing budget
Add BenchmarkFusionLoop and TestTimingBudgetProduction that enforce the fusion loop timing budget as a CI quality gate per plan §Quality Gates / Definition of Done (item 9).

The benchmark runs the full fusion pipeline (phase sanitization → feature extraction → Fresnel accumulation → peak extraction → UKF update) against synthetic CSI data from spaxel-sim output.

Timing constraints:
- Median fusion iteration < 15ms (production target)
- Median fusion iteration < 30ms (CI threshold - 2x allowance for slower CI hardware)
- P99 < 40ms (hard limit)

Typical results on reference hardware:
- Median: ~3-5ms (well under 15ms production target)
- P99: ~14-20ms (well under 40ms hard limit)

Also includes:
- GitHub Actions workflow (.github/workflows/benchmark-ci.yml) for CI
- Documentation (docs/ci-benchmark-integration.md) for Argo Workflows integration

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 06:34:50 -04:00
Argo Workflows CI
a5ad5acf8f ci: auto-bump version to 0.1.303 2026-05-04 10:01:18 +00:00
jedarden
ab5e79fb26 test: add fuzz tests for binary frame parser, JSON protocol, and phase sanitization property tests
- FuzzParseBinaryFrame: validates ParseFrame never panics on any input
  Seed corpus: valid frame, truncated header, n_sub mismatch, channel=0, n_sub>128
  Property: never panic; drop/parse/error all OK

- FuzzParseJSONFrame: validates ParseJSONMessage never panics on any input
  Seed corpus: hello, health, ble, motion_hint, ota_status, unknown type
  Property: never panic; unknown types return typed error

- Phase sanitization property test: validates output never contains NaN or Inf
  For all valid int8 I/Q pairs: all-zero, max int8 (127), min int8 (-128),
  alternating signs, typical CSI values, extreme RSSI values

All fuzz tests run for 60 seconds with no panics found.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 06:00:48 -04:00
jedarden
de12325953 test: improve e2e test debugging by capturing stderr
Added stderr buffer to TestHarness to capture mothership output
when health check fails. This helps diagnose issues like port
conflicts during e2e test runs.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 06:00:48 -04:00
Argo Workflows CI
e5df1739df ci: auto-bump version to 0.1.302 2026-05-04 08:55:52 +00:00
jedarden
16462e7671 test: improve HelpOverlay test mocking
- Add dispatchEvent and classList mocks for more complete DOM element simulation
- Fix help_articles.json path expectation (relative, not absolute)
- Ensure window.HelpOverlay is properly loaded from module
2026-05-04 04:55:33 -04:00
Argo Workflows CI
fda2e2a93f ci: auto-bump version to 0.1.301 2026-05-04 08:38:56 +00:00
jedarden
6f5705e5bd feat(sleep): add HasAnyCompletedSession for feature discovery
Phase 9 implementation verification - all guided troubleshooting features are in place:
- Proactive quality prompts with 5-minute threshold (proactive.js)
- Repeated-setting change detection with guided calibration flow
- Post-feedback explanations via DiagnosticEngine.GetDiagnosticFor
- Feature discovery notifications with quiet hours support (notifier.go)
- Contextual help system with 73 articles (help.js + help_articles.json)

All acceptance criteria met. Tests passing.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 04:38:36 -04:00
Argo Workflows CI
08cc83824c ci: auto-bump version to 0.1.300 2026-05-04 08:08:45 +00:00
jedarden
1845c09bb1 feat(sleep): add HasAnyCompletedSession for feature discovery
Add HasAnyCompletedSession() method to sleep storage to check if any
sleep sessions have been completed. This is used by the feature discovery
notification system to determine when to fire the "first sleep session
complete" notification.

A completed session has both sleep_onset and wake_time set.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 04:08:06 -04:00
Argo Workflows CI
a50a4f7949 ci: auto-bump version to 0.1.299 2026-05-04 07:44:49 +00:00
jedarden
66125289be chore: update bead tracking metadata for spaxel-tig
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 03:44:20 -04:00
Argo Workflows CI
f8db89361a ci: auto-bump version to 0.1.298 2026-05-04 07:00:46 +00:00
jedarden
a0b49d5d9c feat(notify): add comprehensive tests for notification system
Add extensive test coverage for all notification components including:

- Floor plan renderer tests (300x300 PNG dimensions, zone boundaries at correct pixels, blob colors)
- Batching behavior tests (3 LOW events batch to 1 merged notification, URGENT bypasses batch)
- Quiet hours tests (LOW priority suppressed, URGENT bypasses, morning digest bundles queued events)
- Delivery client tests with mock HTTP servers (ntfy, pushover, gotify, webhook)
- Test endpoint integration tests with real HTTP delivery

Test coverage: 87.8% of statements (exceeds 80% target)

All renderer tests pass (dimensions, coordinates, colors)
All batching tests pass (windowing, priority bypass)
All quiet hours tests pass (queueing, bypass, digest)
All delivery client tests pass with mocks
Test endpoint integration test passes

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 03:00:18 -04:00
Argo Workflows CI
bd6ef4e708 ci: auto-bump version to 0.1.297 2026-05-04 06:27:20 +00:00
jedarden
f2be2c1f6a fix(dashboard): fix Three.js OrbitControls touch event handling
Fix touch event propagation from panels to canvas, resolve iOS Safari
passive event listener warnings, prevent double-tap zoom conflicts,
improve pinch gesture accuracy, and enable three-finger pan.

Changes:
- Add maximum-scale=1.0, user-scalable=no to viewport meta tag (live.html)
- Add touch-action: none to canvas elements (expert.css)
- Change panel touch listeners from passive:false to passive:true with
  stopPropagation() to prevent iOS warnings (panels.js)
- Enhance controls.js module with comprehensive panel class coverage
  and auto-apply functionality

Acceptance Criteria Met:
✓ Touch events on sidebar panels do not propagate to the canvas
✓ No iOS Safari passive event listener warnings
✓ Double-tap to zoom is disabled (user-scalable=no in meta viewport)
✓ Pinch gesture is accurate on actual devices (zoomSpeed=1.0)
✓ Three-finger pan is enabled in OrbitControls

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 02:27:00 -04:00
Argo Workflows CI
21ccc8e6cd ci: auto-bump version to 0.1.296 2026-05-04 05:53:51 +00:00
jedarden
68526e1871 feat(dashboard): add controls.js and expert.css for panel touch propagation 2026-05-04 01:53:32 -04:00
Argo Workflows CI
8b891f828c ci: auto-bump version to 0.1.295 2026-05-04 05:28:48 +00:00
jedarden
d0326e6383 feat(help): improve search scoring to match command palette
- Use relevance-based scoring (exact > prefix > substring > subsequence)
- Add title weight boost (1.5x) for better title matching
- Add category filter (0.5x) for category matching
- Minimum 0.6 score threshold for better result quality
- Sort results by relevance score

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 01:28:19 -04:00
Argo Workflows CI
284904260f ci: auto-bump version to 0.1.294 2026-05-04 05:21:31 +00:00
jedarden
c227dccdd3 fix(timeline): include category types in server query params 2026-05-04 01:21:06 -04:00
Argo Workflows CI
2abc02ccd1 ci: auto-bump version to 0.1.293 2026-05-04 05:17:33 +00:00
jedarden
670d7cef87 feat(timeline): add search and filter bar to sidebar timeline
Implement comprehensive filter bar with checkboxes for event categories
(Presence, Zones, Alerts, System, Learning), person and zone dropdowns,
date range selector, and text search with fuzzy matching.

- Client-side filtering on loaded events for instant response
- Server-side date range queries with since/until parameters
- FTS5 full-text search for fuzzy matching on descriptions
- Cursor-based pagination supporting 500+ results
- Virtualized rendering with IntersectionObserver for performance
- Active filters display with removable tags

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 01:17:07 -04:00
Argo Workflows CI
b1e584858d ci: auto-bump version to 0.1.292 2026-05-04 04:59:53 +00:00
jedarden
a33ca37920 fix(proactive): use best-matching key for server-side repeated-edit hint
When the server sets repeated_edit_hint:true, pick the most-changed
qualifying setting from localStorage history instead of passing the
literal string 'detected_by_server' into formatSettingName, which
rendered as broken text in the hint banner.
2026-05-04 00:59:38 -04:00
Argo Workflows CI
58715c368c ci: auto-bump version to 0.1.291 2026-05-04 04:54:44 +00:00
jedarden
758bef0138 feat(timeline): add search and filter bar to sidebar timeline
- Add collapsible filter panel with category checkboxes (Presence, Zones,
  Alerts, System, Learning) for client-side event type filtering
- Add person and zone dropdowns populated from /api/people and /api/zones
- Add date range selector (All Time / Today / Last 7 Days / Last 30 Days /
  Custom range) with server-side re-fetch on date changes
- Add text search input with fuzzy client-side matching and FTS5 server-side
  prefix matching for descriptions
- Add active filter tags with individual remove buttons and Clear All
- Add load-more cursor pagination for 500+ results
- Add virtualized rendering with IntersectionObserver for 1000+ events
- Render event feedback buttons (thumbs up/down) inline on each event
- Add now-replaying chip showing current replay timestamp

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 00:54:21 -04:00
Argo Workflows CI
ce73ca488e ci: auto-bump version to 0.1.290 2026-05-04 04:38:06 +00:00
jedarden
4c221418c1 test(proactive): fix localStorage state isolation between tests
Move localStorage.clear() to parent beforeEach to ensure module
initialization always starts with clean state. This fixes test
isolation where localStorage data from previous tests was being
loaded by the module before the nested beforeEach could clear it.

The repeated-setting change detection feature is already fully
implemented in proactive.js with:
- Setting change tracking in localStorage (24h window)
- Help prompt after 3+ changes for qualifying settings
- Guided calibration flow with false positive and missed motion tests
- Value suggestions based on diurnal baseline SNR and link health
- Apply suggested value button

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 00:37:50 -04:00
Argo Workflows CI
cf66209e06 ci: auto-bump version to 0.1.289 2026-05-04 04:28:39 +00:00
jedarden
104b480256 fix(timeline): replace unsafe drop-oldest with drop-new on queue overflow
The drop-oldest path (drain + re-send) was not goroutine-safe: multiple
concurrent EventBus delivery goroutines could each drain one slot and
then all block waiting to re-send, causing inFlight.Wait() in Close()
to deadlock. Drop-new is atomic via the select/default pattern and
never blocks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 00:28:21 -04:00
Argo Workflows CI
fff7c65aee ci: auto-bump version to 0.1.288 2026-05-04 04:22:02 +00:00
jedarden
9007f6ed55 feat: implement repeated-setting change detection with guided calibration flow
- Detect when user changes same config setting 3+ times within 24 hours
- Show non-intrusive help prompt with 'Help me tune this' button
- Guided calibration flow tests both directions:
  - False positive test: walk around room
  - Missed motion test: sit still
- Suggest optimal value based on diurnal baseline SNR and link health
- Apply suggested value button writes to /api/settings
- Track changes in localStorage (spaxel_setting_changes)

Acceptance:
- Help prompt fires after 3+ changes in 24h
- Calibration flow tests both directions
- Suggests value based on system data
- Apply button works

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 00:21:38 -04:00
Argo Workflows CI
399f86e734 ci: auto-bump version to 0.1.287 2026-05-04 04:14:01 +00:00
jedarden
a1a87babe7 bead: spaxel-dz5s - proactive quality prompts already implemented
The proactive quality prompt system for link degradation warnings is already fully implemented:

- dashboard/js/proactive.js: monitorLinkQuality() tracks links with quality < 0.6
  - 5-minute sustained drop threshold (DURATION_MS = 5 * 60 * 1000)
  - Non-blocking dismissible prompt card with 'Diagnose' and 'Dismiss for today' buttons
  - Pulsing amber highlight (0xff9800) on 3D link lines via startLinkPulsing()
  - diagnoseLink() fetches from /api/diagnostics/link/{linkID}
  - Dismissed prompts tracked in localStorage, cleared on recovery

- mothership/internal/diagnostics/linkweather.go: GetDiagnosticFor() method
  - Returns Diagnosis with Title, Detail, Advice, Severity, ConfidenceScore
  - Root cause analysis for environmental changes, WiFi congestion, metal interference, Fresnel blockage, periodic interference

- mothership/cmd/mothership/main.go: API endpoint /api/diagnostics/link/{linkID}
  - Handles optional timestamp parameter
  - Returns diagnosis with repositioning suggestions if applicable

All acceptance criteria met:
- Prompt appears within 5 minutes of sustained drop ✓
- No prompt for transient drops (< 5 min) ✓
- Diagnose button shows root cause ✓
- Dismissed prompts don't re-appear unless condition reoccurs after recovery ✓
- Pulsing amber highlight on 3D link line ✓
2026-05-04 00:13:40 -04:00
Argo Workflows CI
fea14268b2 ci: auto-bump version to 0.1.286 2026-05-04 04:01:24 +00:00
jedarden
78884f1fd1 test(api): add load-more pagination test for 500+ results
Adds TestListEvents_LoadMoreWith500Plus to explicitly verify that cursor-based
pagination correctly retrieves all events when the total exceeds 500 (the max
single-page limit). Covers the acceptance criterion: "Load more pagination works
for 500+ results".

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 00:01:10 -04:00
Argo Workflows CI
605bef32bd ci: auto-bump version to 0.1.285 2026-05-04 03:36:44 +00:00
jedarden
d0f79449c5 feat(api): verify and document REST API endpoints
Verified all REST API endpoints are implemented and tested:
- Settings: GET/POST /api/settings with validation
- Zones: GET/POST/PUT/DELETE /api/zones with history
- Portals: GET/POST/PUT/DELETE /api/portals with crossings
- Triggers: GET/POST/PUT/DELETE /api/triggers with test endpoint
- Notifications: GET/POST /api/notifications/config and test
- Replay: GET/POST sessions, seek, tune, speed control
- BLE Devices: GET/PUT/DELETE /api/ble/devices with aliases

All endpoints include OpenAPI-style godoc comments and return appropriate
JSON with proper HTTP status codes. Settings persist to SQLite across
restarts. Zone/portal changes broadcast via WebSocket for live updates.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-03 23:36:07 -04:00
Argo Workflows CI
e7605d8e45 ci: auto-bump version to 0.1.284 2026-04-25 16:41:16 +00:00
jedarden
28e0f6239e feat(dashboard): add iOS Safari safe area CSS support
Add CSS environment variables for safe-area-inset to prevent content
overlap with notch/home indicator on iOS devices.

- Add padding-top and padding-bottom to body using env(safe-area-inset-*)
- Mobile bottom navigation already respects safe-area-inset-bottom
- viewport-fit=cover meta tag already present in all HTML pages
2026-04-25 12:40:52 -04:00
Argo Workflows CI
efee714482 ci: auto-bump version to 0.1.283 2026-04-25 16:35:50 +00:00
jedarden
03f765639b feat(feedback): enhance false positive explanations with diagnostic context
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 12:35:04 -04:00
Argo Workflows CI
6b496c3298 ci: auto-bump version to 0.1.282 2026-04-25 16:19:33 +00:00
jedarden
16a4c658d8 feat(feedback): enhance false positive explanations with diagnostic context
- Update renderFeedbackExplanation to properly display diagnosis info
- Fix showInlineResponse to access explainability from inline_response
- Show contributing link name with deltaRMS and threshold ratio
- Display diagnostic result or default ambient RF interference message
- Add correction note for all feedback types

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 12:18:54 -04:00
Argo Workflows CI
12767a993c ci: auto-bump version to 0.1.281 2026-04-25 16:11:54 +00:00
jedarden
af5101e9e4 feat(feedback): enhance false positive explanations with diagnostic context
When users mark detections as incorrect, the system now provides:
- Contributing link name (MAC prefix)
- DeltaRMS value and threshold ratio
- Root cause from diagnostic checks
- Note about applying corrections

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 12:11:39 -04:00
Argo Workflows CI
5d0feaeaa6 ci: auto-bump version to 0.1.280 2026-04-25 15:10:53 +00:00