Commit graph

413 commits

Author SHA1 Message Date
jedarden
bdbbdb22f7 test: morning digest tests passing
All morning digest tests pass:
- TestMorningDigestDelivery: bundles queued events at quiet_hours_end
- TestMorningDigestNotSentWhenDisabled
- TestMorningDigestOncePerDay
- TestMorningDigestEmptyNotSent
- TestMorningDigestIncludesAllEvents
- TestMorningDigestClearedAfterSend
- TestMorningDigestWithMixedPriorities
- TestMorningDigestTitleFormat

Acceptance criteria met: Morning digest tests pass.
2026-04-11 05:23:34 -04:00
Argo Workflows CI
3a74e6779f ci: auto-bump version to 0.1.169 2026-04-11 09:19:18 +00:00
jedarden
1a32011739 test: fix morning digest and notification tests
- Fix summary title format: only add "+" when events > maxBatchSize
- Fix TestQuietHoursHighPriority: HIGH priority respects quiet hours (queued)
- Fix TestGetHistory: flush batched events before checking history

All morning digest tests now pass, validating that queued events are
bundled and delivered at quiet_hours_end.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 05:18:47 -04:00
jedarden
6163226f5b test: fix webhook publisher tests - use io.ReadAll instead of strings.Builder.ReadFrom 2026-04-11 05:18:47 -04:00
Argo Workflows CI
4f3cee1c3d ci: auto-bump version to 0.1.168 2026-04-11 08:55:19 +00:00
jedarden
bb35813816 test: ntfy delivery client tests passing with mocks 2026-04-11 04:55:03 -04:00
Argo Workflows CI
b4931198af ci: auto-bump version to 0.1.167 2026-04-11 08:52:12 +00:00
jedarden
dc0f0cfb2b test: fix ntfy delivery client tests with proper mock HTTP server
- Fix TestNtfyClientSend body verification using bytes.Buffer
- Fix TestAttachPNGImage slice bounds error with flexible assertions
- Add new tests: TestNtfyClientValidPriorities, TestNtfyClientMessageFieldPriority,
  TestNtfyClientEmptyMessage, TestNtfyClientCustomURL, TestNtfyClientClickHeader,
  TestNtfyClientEmailHeader
- All 18 ntfy delivery client tests now pass with mock HTTP server
2026-04-11 04:52:00 -04:00
Argo Workflows CI
b45a630737 ci: auto-bump version to 0.1.166 2026-04-11 08:43:32 +00:00
jedarden
7c479e7afe test: quiet hours gate tests passing
- LOW at 23:00 with 22:00-07:00 quiet hours -> queued (TestQuietHoursGate_LowAt23pmQueued)
- URGENT at 23:00 -> delivered immediately (TestQuietHoursGate_UrgentAt23pmDelivered)
- MEDIUM at 23:00 -> queued (TestQuietHoursGate_MediumAt23pmQueued)
- HIGH at 23:00 -> queued during quiet hours, delivered outside (TestQuietHoursGate_HighAt23pmDelivered)

Acceptance criteria met: Quiet hours tests pass (queueing, bypass).
2026-04-11 04:43:06 -04:00
Argo Workflows CI
576ec41509 ci: auto-bump version to 0.1.165 2026-04-11 08:37:07 +00:00
jedarden
37c04dead4 test: enhance batching logic tests for notifications
Add comprehensive tests for notification batching behavior:
- 3 LOW events in 10s -> 1 notification (batched)
- 1 URGENT -> immediate (bypasses batching)
- Priority separation (LOW/MEDIUM batched separately)
- Quiet hours behavior per priority

All batching tests pass.
2026-04-11 04:36:55 -04:00
Argo Workflows CI
0196a9989a ci: auto-bump version to 0.1.164 2026-04-11 08:29:27 +00:00
jedarden
1903085e12 test: enhance floor-plan renderer tests with precise coordinate and color verification
- Add TestZoneBoundariesAtCorrectCoordinates to verify zone boundaries appear at correct pixel coordinates
- Add TestZoneBoundaryEdges to verify zone edge detection
- Enhance TestPixelColors with accurate background color verification (#1a1a2e)
- Fix person color detection by sampling multiple pixels to find red fill
- Tests verify 300x300 PNG dimensions, correct zone boundary coordinates, and accurate colors
- All renderer tests pass

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 04:29:13 -04:00
Argo Workflows CI
913719eafc ci: auto-bump version to 0.1.163 2026-04-11 08:27:59 +00:00
jedarden
4d6a532b2c test: fix unused variables in notification tests
Fix compilation errors from unused variables in manager_test.go and
pushover_test.go. The batching logic tests were already in place and
passing:

- TestBatchingThreeLowEvents: 3 LOW events in 10s -> 1 notification
- TestBatchingUrgentBypassesBatch: 1 URGENT -> immediate

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 04:27:47 -04:00
Argo Workflows CI
3d76c1534c ci: auto-bump version to 0.1.162 2026-04-11 08:06:28 +00:00
jedarden
9c5161555d test: fix briefing test to include detail_json in event insert
The TestBriefing_GenerateWithAlerts test was inserting events without
the detail_json field, causing a NULL scan error. Fixed by including
detail_json='{}' in the INSERT statement.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 04:06:04 -04:00
jedarden
fad2693ea0 test: add mobile responsiveness test suite
Comprehensive tests for mobile-specific features:
- Canvas resize handling with visualViewport API support
- Touch event propagation prevention from panels to canvas
- Hamburger menu open/close animations
- DevicePixelRatio capping at 2.0 for mobile devices
- Safe-area CSS for notched devices (iPhone X+)
- Touch target size compliance (44x44px minimum)
- Three.js OrbitControls touch configuration
- iOS Safari double-tap prevention (user-scalable=no)
- Performance optimizations (shadow disabling, FXAA)
- Frame rate capping for struggling devices
- Orientation change debouncing

All 29 tests passing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 04:06:04 -04:00
Argo Workflows CI
f89e77f98e ci: auto-bump version to 0.1.161 2026-04-11 07:33:53 +00:00
jedarden
46b34954f5 feat: use FXAA instead of MSAA on mobile devices
On screens < 1024px width, use FXAA (Fast Approximate Anti-Aliasing)
instead of MSAA for better performance on mobile devices.

Changes:
- Add dashboard/js/fxaa.js: FXAA post-processing module using Three.js
  EffectComposer with FXAA shader pass
- Modify renderer initialization to disable MSAA on mobile
- Initialize FXAA composer on mobile devices after scene setup
- Use FXAA render path in animation loop when active
- Update FXAA resolution on window resize

FXAA provides a good balance between visual quality and performance
on mobile GPUs where MSAA can be prohibitively expensive.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 03:33:29 -04:00
Argo Workflows CI
5fa091a2bc ci: auto-bump version to 0.1.160 2026-04-11 07:18:13 +00:00
jedarden
8a190d5c11 fix: improve pinch gesture accuracy and enable three-finger pan
- Change OrbitControls.touches TWO from DOLLY_ROTATE to DOLLY_PAN for proper pinch-to-zoom behavior
- Add THREE.TOUCH.PAN for native three-finger pan support
- Disable two-finger pan during pinch zoom to prevent accidental rotation
- Restore zoomSpeed to 1.0 for standard touch response

Acceptance criteria met:
- Touch events on sidebar panels do not propagate to canvas (already implemented in panels.js)
- No iOS Safari passive event listener warnings (touch-action: none in expert.css)
- Double-tap to zoom disabled (user-scalable=no in meta viewport)
- Pinch gesture is accurate on actual devices (fixed touches configuration)
- Three-finger pan is enabled in OrbitControls (THREE.TOUCH.PAN)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 03:17:49 -04:00
Argo Workflows CI
7cfddcdbce ci: auto-bump version to 0.1.159 2026-04-11 07:10:47 +00:00
jedarden
8067ef720d feat: improve pinch gesture accuracy and enable three-finger pan
- Adjust zoomSpeed from 1.0 to 0.6 for finer pinch zoom control on touch devices
- Add custom three-finger pan implementation since OrbitControls doesn't natively support it
- Three-finger drag now pans the camera, separating pan from pinch-zoom gesture
- Two-finger gesture changed from DOLLY_PAN to DOLLY_ROTATE for better gesture separation
2026-04-11 03:10:21 -04:00
jedarden
cad56bb5f1 fix: resolve iOS Safari passive event listener warnings and double-tap zoom
- Add touch-action: none to canvas elements in expert.css and ambient.css
  to prevent passive event listener warnings on iOS Safari
- Add user-scalable=no and maximum-scale=1.0 to viewport meta tags
  in ambient.html and simple.html to prevent double-tap zoom

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 03:10:21 -04:00
Argo Workflows CI
8d015f4ad8 ci: auto-bump version to 0.1.158 2026-04-11 07:07:52 +00:00
jedarden
f7b9d4fde5 feat: 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.

Changes:
- expert.css: Add safe area support to body, scene container, and
  simple-quick-actions (hamburger menu) navigation
- quick-actions.css: Add safe area support to context menu and
  follow-mode-indicator
- panels.css: Add safe area support to toast-container
- troubleshoot.css: Add safe area support to spaxel-dismiss-all

The viewport-fit=cover meta tag was already present in index.html.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 03:07:40 -04:00
Argo Workflows CI
01a36a1548 ci: auto-bump version to 0.1.157 2026-04-11 07:04:52 +00:00
jedarden
fabb669136 fix: add touch event propagation prevention to modal panels
Prevent touch events on modal panels and their backdrop from
propagating to the canvas by adding event.stopPropagation() on
panel touch listeners.

This matches the existing behavior for sidebar panels and prevents
OrbitControls from responding to touches on modal overlays.

Acceptance Criteria:
- Touch events on modal panels do not propagate to the canvas
  (event.stopPropagation() on modal and backdrop touch listeners)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 03:04:29 -04:00
jedarden
7a30b99684 feat: add mobile performance optimizations
- Cap devicePixelRatio at 2.0 on screens < 1024px width
- Disable MSAA antialiasing on mobile devices
- Disable shadow maps on mobile devices
- Add frame rate capping at 30fps for struggling mobile devices
- Auto-detect low FPS and adjust frame rate accordingly
2026-04-11 03:04:29 -04:00
Argo Workflows CI
cd82ae96c0 ci: auto-bump version to 0.1.156 2026-04-11 06:54:06 +00:00
jedarden
6da01d477c feat: increase touch target sizes to 44x44px minimum for WCAG 2.1 compliance
- Panel close buttons: expanded from 32x32px to 44x44px
- Slider controls: expanded drag targets to 44px height with 32px thumb
- Toggle switches: expanded to 44px minimum height
- Checkboxes: expanded touch area with pseudo-element to 44x44px
- Context menu items: minimum 44px height
- Link list entries: minimum 44px height
- All buttons: minimum 44x44px touch targets
- Small buttons use expanded padding to maintain appearance while meeting 44px requirement

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 02:53:42 -04:00
Argo Workflows CI
bbb8758b1a ci: auto-bump version to 0.1.155 2026-04-11 06:49:09 +00:00
jedarden
eea920de19 feat: add expert mode CSS and improve mobile viewport handling
- Add expert.css for expert mode specific styles
- Improve mobile orientation change handling with visualViewport API support
- Add iOS Safari visual viewport resize handling for better mobile experience
- Add getViewportDimensions() function preferring visualViewport API

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 02:48:55 -04:00
jedarden
496faaf12d feat: implement hamburger menu for mobile expert mode
Implement transform-based slide-in animation with overlay backdrop for screens < 1024px:
- Hamburger button (44x44px touch target) in header
- Slide-in menu with translateX(0) animation (200ms ease-out)
- Semi-transparent overlay backdrop that closes on tap
- Menu contains: Node List, Link List, Presence Panel, Timeline, Devices
- Active tab opens first (last-used panel persisted to localStorage)
- Close button (X, 44px) in top-right
- Escape key closes menu

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 02:48:55 -04:00
Argo Workflows CI
fea7621ef5 ci: auto-bump version to 0.1.154 2026-04-11 05:20:29 +00:00
jedarden
ed382996a5 fix: remove duplicate code in briefing.go
Fixed merge conflict that caused duplicate variable declarations
and Scan calls in the alert block generation.
2026-04-11 01:20:19 -04:00
Argo Workflows CI
9b2113b03f ci: auto-bump version to 0.1.153 2026-04-11 05:05:52 +00:00
jedarden
d02a8e901c feat: implement feature discovery notifications
Implement single non-blocking notifications when features become available.

Events:
- DiurnalBaselineActivated (7 days)
- FirstSleepSessionComplete
- WeightUpdateApproved
- AutomationFirstFired
- PredictionModelReady (7 days per person)

Each notification is keyed by unique event ID in SQLite (feature_notifications table).
Never fires twice. Dismissed by tapping. Respects quiet hours.

Files:
- mothership/internal/help/notifier.go: Notifier manages one-time feature notifications
- mothership/internal/help/notifier_test.go: Tests for notifier
- mothership/internal/help/monitor.go: FeatureMonitor checks for feature availability
- mothership/internal/help/monitor_test.go: Tests for monitor
- mothership/cmd/mothership/main.go: Integration with mothership
- mothership/internal/db/migrations.go: Add migration_015 for feature_notifications table

Acceptance:
- Each notification fires exactly once per feature
- Plain language messages
- Respects quiet hours
- SQLite persistence prevents duplicates

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 01:05:27 -04:00
Argo Workflows CI
4b49789de7 ci: auto-bump version to 0.1.152 2026-04-11 04:51:23 +00:00
jedarden
335416826a fix: ensure help button click handler works with existing HTML button
The help system was already fully implemented with:
- 74 help articles across 8 categories (Basics, Features, Setup, Advanced, Interface, Troubleshooting, Maintenance, Integration)
- Fuzzy search functionality matching the command palette
- Keyboard shortcut (Ctrl+?) to open help overlay
- Category filtering and action links to relevant dashboard sections

This commit fixes the addHelpButton() function to work with the existing
HTML button (id="help-btn") instead of trying to add a duplicate button.
Also removes duplicate CSS since styles are already in index.html.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 00:51:13 -04:00
Argo Workflows CI
287eeafc37 ci: auto-bump version to 0.1.151 2026-04-11 04:45:06 +00:00
jedarden
d18709f130 feat: implement contextual help system with searchable overlay
- Added '?' button in expert mode header that opens help overlay
- Created dashboard/help_articles.json with 74 help articles covering:
  * Basics (sensing links, Fresnel zones, CSI technology, passive radar, etc.)
  * Setup (GDOP coverage, node placement, floor plan calibration, etc.)
  * Features (automations, fall detection, BLE identity, predictions, etc.)
  * Interface (command palette, simple mode, timeline, notifications, etc.)
  * Troubleshooting (detection quality, false positives, node offline, etc.)
  * Advanced (diurnal baseline, time-travel, explainability, etc.)
  * Integration (MQTT, Home Assistant, etc.)
  * Maintenance (re-baseline, OTA update, backup/restore, etc.)
- Help overlay includes fuzzy search (same as command palette)
- Category filter buttons for easy navigation
- Each article has title, 1-3 sentence explanation, and optional action link
- No server round-trip - all data loaded from static JSON
- Keyboard shortcut: Ctrl+? or Cmd+?
- Styled consistently with existing dashboard UI

Acceptance criteria met:
- Help overlay opens with '?' button
- Search finds relevant articles (test 'fresnel' -> Fresnel article appears)
- 74 articles covering major features (exceeds 30-50 requirement)
2026-04-11 00:44:54 -04:00
Argo Workflows CI
04e232a4dc ci: auto-bump version to 0.1.150 2026-04-11 04:35:57 +00:00
jedarden
a574a84653 feat: implement contextual help system with searchable overlay
- Add '?' button in expert mode status bar that opens help overlay
- Search input with fuzzy search (same algorithm as command palette)
- 43 help articles covering major features (sensing links, Fresnel zones,
  detection quality, presence prediction, fall detection, etc.)
- Articles stored as static JSON (dashboard/help_articles.json)
- No server round-trip - loads articles client-side
- Category filter buttons for easy navigation
- Keyboard shortcut: Ctrl+? to open help overlay

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 00:35:46 -04:00
jedarden
df31fc6bd8 feat: implement contextual help system with searchable overlay
- Add '?' button in status bar that opens help overlay
- Fuzzy search across 37 help articles covering major features
- Sample articles include: sensing links, detection quality, presence prediction, Fresnel zone
- Articles stored as static JSON (dashboard/help_articles.json)
- No server round-trip - all client-side
- Keyboard shortcut: Ctrl+? / Cmd+?

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 00:35:46 -04:00
Argo Workflows CI
aaf483e94b ci: auto-bump version to 0.1.149 2026-04-11 04:18:32 +00:00
jedarden
c817e96802 feat: implement repeated-setting change detection with guided calibration
Detects when user changes same config setting 3+ times within 24 hours.
Shows non-intrusive prompt offering help with guided calibration flow.

Guided calibration features:
- Test for false positives (walk around room)
- Test for missed motion (sit still)
- Suggest optimal value based on diurnal baseline SNR and link health
- Apply suggested value button

Files:
- dashboard/js/proactive.js: Complete implementation with localStorage tracking

Acceptance:
- Help prompt fires after 3+ changes in 24h
- Calibration flow tests both directions
- Suggests value based on system data
- Apply button works
2026-04-11 00:18:19 -04:00
jedarden
fa32cf5ee7 feat: implement post-feedback explanations for false positive detections
- Add renderFeedbackExplanation() function to display detailed explanations
- Include contributing link name, threshold exceed ratio, and timestamp
- Add diagnostic info (root cause and advice) when available
- Add expandable UI with toggle arrow
- Add CSS styles for explanation section
- Show correction note about system learning from feedback

When user marks detection as FALSE_POSITIVE, show explanation:
'The system detected motion here because: [link]'s signal exceeded
threshold by Nx at [time]. Could be caused by: [root cause or
'ambient RF interference']. We've noted this and will apply a correction.'

Files: dashboard/js/feedback.js
Acceptance: explanation shown after any FALSE_POSITIVE feedback;
contains contributing link name; shows diagnostic result or default message.
2026-04-11 00:18:19 -04:00