Implementation Checkpoint#31
Open
ContinuumLS wants to merge 24 commits into
Open
Conversation
- config.toml now mounts to /etc/mag-usb/ - Add logs directory for container to dump .log files
…_project_template - Add CLAUDE.md with project metadata (PI, NSF grants, stack, repo structure) - Add .claude/settings.json, commands/commit.md, rules/ai-governance.md, rules/js-code.md - Add ai/ai_usage_log.md with initial session entry - Update .gitignore with Claude Code local-state exclusions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add Project Management section linking to the HamSCI gmag_webui project board (https://github.com/orgs/HamSCI/projects/7/views/1). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a trailing, time-based moving-average filter (FR-DP-04) with a configurable window (10s/30s/60s) and on/off toggle. Smoothed H/E/Z/Magnitude/Temperature traces overlay the raw data, which fades while the filter is on. The window is time-based, so data gaps are handled gracefully. - js/filter.js: trailing moving-average algorithm (+ unit tests) - js/data/plots.json: 5 hidden overlay traces (indices 5-9) - index.html: Moving Average controls in Data Postprocessing - js/index.js: settings + migration, overlay recompute/append, control wiring, file-upload integration Also fix a pre-existing ReferenceError in the magclose reset handler (undefined mainTraces/slTraces) that the new trace set interacted with; replaced with a resetPlots() that re-initializes both plots. Closes #24 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ersistence - Bound the page to the viewport (no more page scroll/break) and make the spreadsheet fill its box and scroll internally - Replace the recoiling sticky table header with a static header over an independently scrolling body, with aligned columns - Rebuild all spreadsheet rows on coordinate-rotation save so existing rows reflect the change, not just new ones - Keep the Date column on one line; widen the right column for readability - Apply the saved moving-average filter state on load so the overlay shows after a page refresh when the filter is enabled Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Redesign the config sidebar into an opaque, instrument-style panel with collapsible Connection / Processing / Display sections. - Connection: source name, WebSocket/MQTT/File type selector with conditional fields, a single Connect button with input validation, localStorage persistence, load-on-startup, and auto-reconnect - MQTT fields are present but visual-only (live ingestion is #19) - Refactor transit.js from a cookie-based, WebSocket-only script into a connection manager (window.MagConnection) emitting the same magread/magclose/magerror events; index.js rendering is unchanged - Anchor the sidebar flush between the header and footer Refs #20 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Vendor MQTT.js 5.15.1 and add an MQTT transport to the connection manager: connect to a broker over WebSocket, subscribe to a topic, parse each message in the same JSONL reading format and dispatch magread, with optional username/password auth and MQTT.js-driven reconnection. - Validate broker URL + topic at Connect time - Surface a dedicated "Auth failed" status (and stop retrying) when the broker rejects credentials - WebSocket <-> MQTT source switching works; WebSocket path unchanged Verified end-to-end against local aedes MQTT-over-WS brokers, including a credential-required broker (accept + reject). Closes #19 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Restructure the single-source dashboard onto a sources[] + activeSourceId model so multiple data sources can each keep independent state. No visible behavior change yet; this is groundwork for the tabbed interface (#21). - transit.js: rewritten as a DOM-free per-source connection factory, MagConnection.create(config, { onReading, onStatus }), supporting both WebSocket and MQTT transports - index.js: per-source sessions (own measurement/sparkline buffers and connection), settings migration from the old connection+transform shape, per-source reading/status routing with only the active session rendering, connection-status mapping moved here, and per-source rotation - Unconfigured sources no longer auto-connect Single-source parity (WS/MQTT/auth/file/rotation/filter/persistence) verified via headless browser. Refs #21 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Build a tab bar so several magnetometer stations can be monitored at once, each with an independent connection and state. - Tabs: add / switch / close, per-tab connection-status dot, live rename, 6-source cap, and an always-at-least-one-tab rule - All tabs stay connected and keep buffering in the background; only the active session renders to the shared plots/spreadsheet/trends; switching re-renders from the active session; rotation is per-tab - Fix residual rendering when switching sources (a previous source's axis ranges, range slider, and WebGL traces lingered): Plotly mutates the shared layout's axis objects with computed ranges, so deep-clone the layout per draw, purge + newPlot on reset, and key uirevision to the active source Verified via headless browser with two independent live sources: create/ switch/close, background buffering, persistence + reconnect-all on reload, and a clean switch to an empty source. Closes #21 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR brings the
feature-aibranch up to a more capable real-time dashboard for the HamSCI Ground Magnetometer network inline with the minimum requirements. It adds live data ingestion over WebSocket and MQTT, a redesigned configuration panel, a tabbed multi-source interface, on-the-fly data processing (orientation transforms and moving-average filtering), configurable visualization, and the supporting Docker/AI-governance infrastructure.All connection, processing, and multi-source behavior was verified end-to-end in a headless browser against local fake WebSocket/MQTT hosts; the moving-average algorithm also has unit tests.
Issues closed
Highlights
Data ingestion & connections (#19, #20)
js/transit.js) with pluggable WebSocket and MQTT-over-WebSocket transports, both emitting the same normalized readings. MQTT supports a configurable broker/topic, optional username/password auth (with an "Auth failed" status), and automatic reconnection. Vendorsmqtt.js.localStoragepersistence with auto-reconnect on load.Multiple data sources (#21)
Data processing (#22, #24)
js/filter_test.js).Visualization (#17, #18, #28)
Performance (#9)
Infrastructure & governance
ai/ai_usage_log.mdper University of Scranton / HamSCI / NSF policy.Testing
deno test js/filter_test.js).Notes
vendor/mqtt.min.js(MQTT.js 5.x).🤖 Generated with Claude Code (minor edits by author)