Commit graph

645 commits

Author SHA1 Message Date
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
Argo Workflows CI
68dcc6552b ci: auto-bump version to 0.1.269 2026-04-25 01:48:15 +00:00
jedarden
cf934ba2a2 feat(dashboard): tap-to-jump time-travel removes expert mode gating
Timeline event clicks now always trigger jump-to-time replay regardless
of dashboard mode, not just in expert mode. Simplified handleSeek to
remove the dashboardMode state variable and expert mode check.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 21:47:32 -04:00
Argo Workflows CI
79d8392095 ci: auto-bump version to 0.1.268 2026-04-25 01:42:50 +00:00
jedarden
5d919818e7 fix(sim): correct default WS endpoint and remove dead walker code
Fix default mothership URL from /ws to /ws/node to match the ingestion
server's actual WebSocket endpoint. Remove unused updateWalkerPosition
and walkerDistanceToNode functions from walker.go (the walker update
logic lives in main.go's updateWalkers).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 21:42:14 -04:00
Argo Workflows CI
7402e1ed90 ci: auto-bump version to 0.1.267 2026-04-25 01:31:16 +00:00
jedarden
e6fa1a7bf6 chore(dashboard): remove last simple/expert mode remnants
Rename expert.css → scene.css (file contained WCAG touch targets and
3D scene layout, nothing mode-specific). Remove dead dashboardMode !==
'expert' guard in timeline seek handler. Simple/expert toggle and
localStorage key were already removed in prior commits.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 21:30:28 -04:00
Argo Workflows CI
b5e0039211 ci: auto-bump version to 0.1.266 2026-04-25 01:27:34 +00:00
jedarden
54172abd03 fix(sim): resolve compile error in CSI frame generator
Fix byte constant overflow for noise_floor field by using an int8
variable instead of a constant conversion expression. Also update
channel field to use --channel flag value instead of hardcoded 6.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 21:26:29 -04:00
Argo Workflows CI
c8622fb510 ci: auto-bump version to 0.1.265 2026-04-25 00:37:33 +00:00
jedarden
85c763253b chore(dashboard): remove stale simple/expert mode references from CSS comments
The Simple/Expert toggle was removed in an earlier commit but left behind
stale comments referencing "mode toggle bar", "expert mode", and
"simple.html" in CSS files. Clean these up to avoid confusion.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 20:37:18 -04:00
Argo Workflows CI
f44826cf23 ci: auto-bump version to 0.1.264 2026-04-25 00:12:33 +00:00
jedarden
959a0c5962 feat(timeline): tap-to-jump time-travel with correct mode handling
Wire sidebar timeline handleSeek to navigate to timeline view in simple
mode instead of attempting replay. Fix onRouterModeChange to properly
detect expert vs simple modes based on route name. All 41 tests pass.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 20:11:44 -04:00
Argo Workflows CI
b111b4a1e6 ci: auto-bump version to 0.1.263 2026-04-25 00:05:25 +00:00
jedarden
cf963ad905 feat(explainability): add explain.js entry point module for right-click/long-press explain mode
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 20:05:10 -04:00
Argo Workflows CI
7a6d8fc40c ci: auto-bump version to 0.1.262 2026-04-24 23:24:56 +00:00
jedarden
6bf1e0394a feat(explainability): detection explainability overlay with per-link contributions, Fresnel zones, and BLE identity
Implements the full explainability overlay for understanding why a blob was detected:
- ExplainabilitySnapshot generation with per-link contribution tracking and zone decay
- Fresnel zone ellipsoid geometry computation and 3D wireframe rendering
- WebSocket request_explain / blob_explain flow for on-demand snapshots
- Right-click, long-press, click, and hover tooltip activation paths
- X-ray overlay dims non-contributing elements, highlights contributing links
- Sidebar panel with confidence gauge, links table, sparklines, BLE match card
- Escape key and backdrop click to exit, restoring scene state

Also includes: simple mode removal, CSS cleanup, fleet page enhancements, sidebar timeline fixes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 19:23:55 -04:00
Argo Workflows CI
abecba6d74 ci: auto-bump version to 0.1.261 2026-04-24 23:21:29 +00:00
jedarden
3038f632b7 fix(dashboard): CSS syntax fixes and timeline mode detection cleanup
Fix missing colons in CSS declarations across timeline.css and replay.css
that broke gap/padding/margin/bottom properties. Simplify timeline mode
detection to use router callbacks instead of SpaxelSimpleModeDetection.
Add aria-labels to select elements for accessibility.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 19:20:58 -04:00
Argo Workflows CI
f297872a3a ci: auto-bump version to 0.1.260 2026-04-24 22:47:04 +00:00
jedarden
03fd4e2752 feat(onboarding): migration window, Unpaired badge, re-provision flow
Nodes that connect without a valid token during the migration window are
now accepted and flagged as Unpaired rather than rejected.  Fleet health
surfaces the flag so the dashboard can show an amber Unpaired badge in
the MAC column, an "Unpaired" status badge, and a ↺ re-provision action
button that re-opens the onboarding wizard in reprove mode (skips the
firmware-flash step, targets the specific node's MAC during detect).

- ingestion/server: migrationDeadline + Unpaired flag on NodeConnection
- fleet/fleethandler: UnpairedProvider interface, merges unpaired MACs
  into fleet health response
- config: SPAXEL_MIGRATION_WINDOW_HOURS (default 24 h, range 0-168)
- main: wires migration deadline and unpaired provider at startup
- onboard.js: reprove(mac) public API, skip-flash + targeted-detect mode
- fleet.js: Unpaired badge, Re-provision button, unpaired banner, ⚠ in
  role list, reproveNode public API
- wizard.css: .wizard-reprove-banner amber styling

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 18:46:47 -04:00
Argo Workflows CI
bbf3b8ba04 ci: auto-bump version to 0.1.259 2026-04-24 22:32:16 +00:00
jedarden
ce7108a277 fix(dashboard): register sidebar timeline for simple mode detection changes
The sidebar timeline module was not listening for SpaxelSimpleModeDetection
mode changes, causing the tap-to-jump simple mode test to fail. Added
onSimpleModeChange handler and registration so the sidebar correctly
switches to simple mode and navigates to timeline view instead of replay.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 18:31:17 -04:00
jedarden
6951ff1d00 feat(dashboard): add axe-core accessibility CI gate for all dashboard pages
Add @axe-core/playwright with Playwright test runner that asserts zero
WCAG 2A/2AA violations across index, live, fleet, setup, and
integrations pages. Fix contrast violations on integrations page: use
darker blue for primary buttons, lighter text for descriptions/hints,
and add body-level dark background in layout.css.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 18:31:17 -04:00
Argo Workflows CI
0bf11c51f6 ci: auto-bump version to 0.1.258 2026-04-24 22:15:23 +00:00
jedarden
4960fbfd51 feat(dashboard): implement tap-to-jump time-travel coordination
Timeline events now delegate to SpaxelReplay.jumpToTime() for coordinated
replay session creation instead of making direct fetch calls. Selected
events highlight with timeline-event-selected class, and cross-module
selection is cleared between sidebar and full-page timeline views.

- timeline.js: use SpaxelReplay.jumpToTime() in handleSeek, export
  clearSelection and hideNowReplayingChip, clear sidebar on jump
- sidebar-timeline.js: clear full-page timeline selection on sidebar jump
- replay.js: return promise from exitReplayMode for proper chaining
- timeline.test.js: 14 tests covering timestamp emission, highlighting,
  now-replaying chip, cross-module coordination, simple mode gating,
  and error handling

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 18:14:51 -04:00
Argo Workflows CI
60cac48a02 ci: auto-bump version to 0.1.257 2026-04-24 21:47:05 +00:00
jedarden
8db0795017 feat(dashboard): make mobile frame rate cap configurable via URL parameter
Add ?maxFps=N URL parameter to configure the frame rate cap at renderer
initialization time. ?maxFps=30 caps at 30fps (default for struggling
mobile devices), ?maxFps=60 disables the initial cap, and ?maxFps=0
disables both the cap and auto-detection. Also respects the
autoDetectStrugglingDevice config flag in the detection function.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 17:46:26 -04:00
Argo Workflows CI
972d70315e ci: auto-bump version to 0.1.256 2026-04-24 21:45:33 +00:00
jedarden
e3cd805629 fix(dashboard): remove ES module export from notifications.js
notifications.js was loaded as a classic <script> in simple.html but used
`export class`, causing "Unexpected token 'export'" and a blank page.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 17:45:12 -04:00