feat: Signal Scope — live browser monitor for incoming sensor signals - #1
feat: Signal Scope — live browser monitor for incoming sensor signals#1v1b3x0r wants to merge 9 commits into
Conversation
…eo feeder - scope.html: group channels into one auto-created column per probe, each with its own waves + collapsible raw JSON; auto-fit time axis (works for slow polls and fast feeds); single-point dot; set probe title via textContent (XSS-safe) - tools/feed-meteo.mjs: real-data feeder pulling all numeric current-weather fields from Open-Meteo (no API key), location/probe/interval via env 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
🤖 Generated with Claude Code Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0810eab66e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const body = { | ||
| probeId: PROBE, | ||
| timestamp: Date.now(), | ||
| readings: { level: +level.toFixed(2), temp: +temp.toFixed(2) }, | ||
| drift: +drift.toFixed(2) |
There was a problem hiding this comment.
Include a semantic value in simulated reports
When the documented node tools/feed.mjs simulator posts this payload, it omits semanticValue, but /report still updates globalBaseline with ALPHA * semanticValue and broadcasts ground.*.val before the scope-only recording runs. The first simulated sample therefore turns the response baseline into NaN/null and sends undefined semantic context; either include a representative semanticValue here (and in the meteo feeder's same payload shape) or default it in the handler.
Useful? React with 👍 / 👎.
…ivates Untracked for seven weeks. States plainly that DreamLink is Layer 3 (Mind) of the MDS stack and is NOT yet integrated into HomeLog, so a session that lands here does not mistake it for active sprint surface. Also picks up the package-lock drift from the signal-scope work. 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
What
Opt-in browser signal scope (
--scope) that turns incoming sensor JSON into live waves — a debug instrument to confirm all signals are arriving before trusting interpretation. Production stays--headlessand untouched.Highlights
readings: {}bundle (BME280/688-style multi-sensor) alongside legacysemanticValue(backward compatible).tools/feed-meteo.mjs(Open-Meteo, no API key) + simulatedtools/feed.mjscreek-level stand-in → testable with no hardware.<canvas>+ SSE, zero new runtime deps (Tailwind via CDN for layout).Architecture
src/scope/SignalBuffer.js— pure in-memory ring buffer, auto-channel by numeric keysrc/scope/ScopeServer.js—GET /+ SSEGET /streamon the existing express app (backlog-first)src/scope/public/scope.html— per-probe columns, auto-fit waves, raw JSON, livenesssrc/index.js—--scopeflag + tinyrecord()hook at end of/reportTests
test/scope.test.mjs— SignalBuffer (eviction, multi-value, auto-channel, isolation) + ScopeServer SSE backlog/liveNotes / follow-ups
readingsonly (nosemanticValue) make the legacyglobalBaselineEMA return NaN/null — doesn't affect scope or interpretation; patch ifreadingsbecomes primary.Design spec + plan under
docs/superpowers/.🤖 Generated with Claude Code