Commit graph

674 commits

Author SHA1 Message Date
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
jedarden
296d54b614 close(spaxel-trsm): Make expert mode mobile-responsive
Implemented mobile touch controls for expert mode 3D scene:

- OrbitControls touch gesture configuration:
  - ONE: THREE.TOUCH.ROTATE (one-finger orbit)
  - TWO: THREE.TOUCH.DOLLY (pinch zoom ONLY, no accidental pan)
  - THREE: THREE.TOUCH.PAN (three-finger pan)

- Mobile-specific touch handling improvements:
  - CSS touch-action: none on scene container and canvas
  - -webkit-touch-callout: none
  - -webkit-user-select: none
  - user-select: none
  - -webkit-tap-highlight-color: transparent

- iOS Safari-specific touch improvements:
  - Double-tap zoom prevention
  - Visual viewport handling for orientation changes

All 29 mobile tests pass. Implementation already committed in ef9cd3f.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 11:10:19 -04:00
Argo Workflows CI
c3fec99b39 ci: auto-bump version to 0.1.279 2026-04-25 15:02:14 +00:00
jedarden
ef9cd3fe15 feat(expert-mode): improve mobile touch controls for 3D scene
- Simplified OrbitControls touch gesture configuration:
  - ONE: THREE.TOUCH.ROTATE (one-finger orbit)
  - TWO: THREE.TOUCH.DOLLY (pinch zoom only, no accidental pan)
  - THREE: THREE.TOUCH.PAN (three-finger pan)

- Removed complex dynamic enablePan toggling that didn't work reliably
  with OrbitControls' internal touch processing

- Added iOS Safari-specific touch improvements:
  - Double-tap zoom prevention
  - Touch action and user select CSS properties
  - -webkit-tap-highlight-color: transparent

- Enhanced CSS for better mobile touch handling:
  - touch-action: none on scene container and canvas
  - -webkit-touch-callout: none
  - -webkit-user-select: none
  - user-select: none

All mobile tests (29 tests) and quick-actions tests (22 tests) pass.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 11:01:34 -04:00
jedarden
7aae1c2a46 feat(events): internal event bus already implemented; wire explainability requests in fusion loop
The EventBus pub-sub mechanism in mothership/internal/events/bus.go was
already implemented with all required EventType constants, typed payload
structs, fan-out subscriber support, and comprehensive tests. This commit
also wires ConsumeExplainRequests into the fusion loop for dashboard clients.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 11:01:34 -04:00
Argo Workflows CI
45a3e4d9dd ci: auto-bump version to 0.1.278 2026-04-25 13:17:17 +00:00
jedarden
057285f901 feat(explainability): fix X-ray overlay with normalized confidence breakdown and tests
Three issues resolved in the detection explainability system:

- computeExplanation returned early when grid==nil (always the case in the
  live fusion loop), causing all explain requests to return empty link
  contributions. Removed the unnecessary nil-grid guard since the Fresnel
  computation uses only blob/link positions, not the grid.

- Contribution values were raw deltaRMS×weight×zoneDecay scalars, not
  percentages. Now normalized so contributing links sum to 1.0, giving the
  dashboard a proper confidence breakdown (60% / 40% / etc.).

- Fixed off-by-one in blobHistory eviction (kept 101 instead of 100).

Added 23 table-driven tests covering: nil-grid computation, single/multi-link
normalization, Fresnel zone number geometry, ellipsoid generation, HTTP
handlers (200/400 paths), WebSocket snapshot fields, BLE match inclusion,
zone decay inverse-square law, and history eviction cap.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 09:16:57 -04:00
Argo Workflows CI
b7972ccb0b ci: auto-bump version to 0.1.277 2026-04-25 13:04:06 +00:00
jedarden
c0416fee6c feat(dashboard): anomaly detection & security mode UI with WS consistency fix
- Add security status card with arm/disarm dialog, DISARMED/LEARNING/ARMED/ALERT
  badge, learning progress bar (N of 7 days), and last-anomaly summary line
- Add full-width alert banner with acknowledge button for armed-mode anomalies;
  acknowledged alerts disappear from banner but remain in history
- Add anomaly timeline panel (24h) with severity scores and timeline navigation
- Fix WS broadcast field names to match AnomalyEvent JSON/REST API:
  anomaly_type→type, timestamp_ms→RFC3339 timestamp so JS handles both
  WS pushes and polled history uniformly
- Fix formatTimeAgo() to parse RFC3339 string timestamps in addition to Unix-ms
- Fix fetchAnomalyCount() to use /api/anomalies?since=24h (structured response)
  instead of /api/anomalies/history (returns plain array)
- Add security-card detail area styling to anomaly.css
- Add BlobIdentityProvider wiring in zones API for people resolution in zone responses
- Add linkweather diagnostic engine tests (Rules 1-5 + helpers)

All go test ./... pass; go vet ./... clean.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 09:03:51 -04:00
Argo Workflows CI
d14e8e9ee6 ci: auto-bump version to 0.1.276 2026-04-25 05:44:07 +00:00
jedarden
fb5937af2f feat(dashboard): add Fresnel zone debug overlay with shared geometry module
Fresnel zone ellipsoids render for all active links when the debug layer
is toggled on. Uses shared fresnel.js helper for geometry computation,
with hover tooltips showing link details and click-to-select. viz3d.js
refactored to use the shared module instead of duplicating calculations.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 01:43:51 -04:00
Argo Workflows CI
ebf615a696 ci: auto-bump version to 0.1.275 2026-04-25 04:58:22 +00:00
jedarden
2bd1f9096b fix(dashboard): resolve Fresnel tooltip MAC address lookup bug
The showFresnelTooltip function referenced data.txMAC/data.rxMAC which
don't exist on the ellipsoid geometry data object. Use link.nodeMAC and
link.peerMAC from the link state instead, which are always available.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 00:57:57 -04:00
Argo Workflows CI
8f8f2ccc74 ci: auto-bump version to 0.1.274 2026-04-25 04:25:43 +00:00
jedarden
3150dadf32 fix(dashboard): clean up Fresnel toggle sync and fix semi-minor axis formula
Simplify Fresnel debug overlay toggle to use single toggleFresnelDebugOverlay
call instead of duplicating Viz3D sync logic. Fix semi-minor axis calculation
in viz3d.js (was missing factor of 2 in distance term). Add Math.max(0,...)
guard against negative sqrt. Add missing dispose mocks in fresnel tests.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 00:25:24 -04:00
Argo Workflows CI
ccf12da102 ci: auto-bump version to 0.1.273 2026-04-25 04:16:09 +00:00
jedarden
71377b9efc feat(dashboard): add layer management module for toggle controls
Wire Fresnel zone toggle through Layers module for consistent
state management across toolbar, debug panel, and layer controls.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 00:15:39 -04:00
Argo Workflows CI
294e55cb53 ci: auto-bump version to 0.1.272 2026-04-25 04:03:10 +00:00
jedarden
0663f1df3e feat(fleet): include manufacturer in fleet list response
Expose the OUI-looked-up manufacturer field in the /api/fleet endpoint
so the fleet page can display hardware vendor info alongside each node.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 00:02:11 -04:00
Argo Workflows CI
4684ef8c2a ci: auto-bump version to 0.1.271 2026-04-25 03:17:58 +00:00
jedarden
8708c02929 feat(dashboard): polish tap-to-jump UX and remove expert-mode gating
- Improve link highlighting with Fresnel health color mapping
- Route re-provision through live page via query param for reliability
- Remove simple-mode gating from command palette (now available everywhere except ambient)
- Update Fresnel tests, fleet page unpaired node UX, and help articles

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 23:16:56 -04:00
jedarden
ccaaaded55 feat(onboarding): harden node onboarding UX with migration window and unpaired flow
Add 24h migration window for legacy/unprovisioned nodes to connect while
flagged as Unpaired rather than silently rejected. Surface unpaired nodes
in the fleet UI with amber badge, pulsing status indicator, and migration
window countdown banner. Add re-provision wizard entry point from fleet
panel — clicking "Pair" on an unpaired node opens the onboarding wizard
in re-provisioning mode, skipping firmware flash and going straight to
serial credential provisioning. After migration window closes, nodes
without valid tokens are rejected outright.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 23:16:56 -04:00
Argo Workflows CI
712be74942 ci: auto-bump version to 0.1.270 2026-04-25 01:57:45 +00:00
jedarden
e0fbc698e1 fix(fleet): correct test decode type for wrapped fleet list response
Three fleet handler tests (TestFleetWithVirtualNodes, TestFleetWithNoNodes,
TestFleetWithUnpairedNode) were decoding the API response as []FleetNode
instead of the wrapped fleetListResponse struct. Fixed to use fleetListResp.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 21:56:54 -04:00