Repository navigation
feat(biometrics): add calibration UI, browser tests and docs - #831
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Important Review skippedToo many files! This PR contains 109 files, which is 9 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configuration
📒 Files selected for processing: 109
You can disable this status message by setting the
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
9ac5c2f to
6992227
Compare
6992227 to
94d2ea9
Compare
94d2ea9 to
2eed4dc
Compare
2eed4dc to
95042a8
Compare
95042a8 to
a08f64a
Compare
67b3ce6 to
1639835
Compare
a08f64a to
f67e89e
Compare
1cfde00 to
a6fb67c
Compare
a6fb67c to
13d60df
Compare
00dba78 to
7ffe551
Compare
13d60df to
143a346
Compare
143a346 to
338aabe
Compare
…ad cannot time it out
…an import unmounts both
…ibration, saved curves and presence auto-on (#820) Promotes `dev` to `main` with Apple Watch reference data, configurable sleep-stage classification, biometrics calibration, saved and annotated curves, experimental presence auto-on, and Host/Origin hardening for the pod API. ## Changes - Import Apple Watch sleep stages and heart rate, overlay reference heart rate on the vitals chart, explore vitals, and build datasets for classifier calibration (#802, #803, #814, #821, #826). - Add per-side sleep-stage rules, written as sentences with quick adjust, preview and a change log, and respect piezo calibration quality, including unknown calibration in the week view (#815, #816, #817, #822). - Add biometrics calibration: versioned profiles and references, a shared Python runtime, a retained backtest replay engine, a prospective shadow runtime with a calibration API, and the calibration UI (#828–#831). - MCP tools to inspect, preview and apply sleep-stage rules against the Watch reference, and to build and save a sleep curve from pod data (#823, #825). - Save named curves on the pod and add optional notes to curves (#827, #832). - Experimental per-side presence auto-on with person-vs-pet occupancy classification; auto-off now ignores light loads such as pets (#810). - Reject unknown Host headers so DNS-rebinding pages cannot reach the unauthenticated pod API, and apply the same Host/Origin allowlist to the sensor WebSocket handshake (#833, #834). - Improve session endings, movement scoring during Pod 5 pump operation, and vitals continuity for quiet sleepers (#804, #813). - Add away-mode toggles to the side card and Stage panel, move Settings to per-section side tabs, improve the scheduled label contrast, and prevent premature stalled-pipeline banners (#805–#808). - Update dependencies and pin Babel runtime to fix the Turbopack MQTT build (#811, #812, #818, #819). ## Migrations - Configuration DB: side stage classifier, stage classifier changes, curve templates, schedule notes and presence auto-on columns (0022–0027). - Biometrics DB: Watch reference stages and vitals, and calibration tables (0017–0030). ## Test plan - [x] GitHub checks on the `dev` head: build, lint, typecheck, unit tests, browser tests and all Python test jobs. - [ ] After merge, wait for "Analyze & Release" on the `main` merge commit, then `sudo sp-update main` once on a pod and confirm the service starts and migrations apply.
Part 4 of 4 splitting #824 (reference snapshot
7b9ac5d3) into reviewable stacked PRs. #824 stays open as the umbrella and is not merged; the four parts reproduce its tree exactly (the tree offeat/bio-cal-4-uiis identical to the tree of7b9ac5d3).Stack, merge in order:
feat/bio-cal-1-foundation→dev: versioned calibration profiles, references, DB schema and migrations, shared Python runtimefeat/bio-cal-2-backtest→ part 1: retained backtest replay engine and isolated package experimentsfeat/bio-cal-3-shadow-api→ part 2: prospective shadow runtime, isolated coordinator host, calibration API and MCP, demo handlersfeat/bio-cal-4-ui→ part 3: calibration UI, i18n catalogs, browser tests and docsThis part
src/components/biometrics): profile editing and revisions, reference imports and corrections, dataset freezing, backtest submission and monitoring, report review, replay traces, shadow planning and prospective observations.tests/browser), thetest:browserscript and the Browser Tests CI job.signal_replayexperiments are labelled in the experiment list, CSV formula prefixes behind leading line breaks are neutralized, the correction and measurement panels in the reference library use distinct React keys, and the calibration components gained unit cases for their error, loading, paging and toggle paths so the per-PR patch-coverage gate holds without the browser suite.Test plan
tsc --noEmitclean at this sliceeslinton the changed TS/TSX files cleanvitest rungreen at this slice (507 files, 7,164 tests) (the only failure under full-suite load was the pre-existing, unrelatedscripts/tests/diagnosticCli.test.tstiming test, which passes in isolation)🤖 Generated with Claude Code
🛏️ Beam this PR onto a sleepypod ✨
Pick the snippet that matches your pod. Already-installed pods can't use the curl bootstraps below — sleepypod's egress firewall DROPs github.com, and the script that knows how to unblock WAN is the very file curl is trying to fetch. Use
sp-updateinstead; it's on disk and opens WAN as its first step.🔄 Already on a sleepypod (most common — review a PR on a running pod):
🚀 Fresh pod / first install — bootstraps from GitHub, rebuilds every push:
curl -fsSL https://raw.githubusercontent.com/sleepypod/core/feat/bio-cal-4-ui/scripts/install \ | sudo bash -s -- --branch feat/bio-cal-4-ui🎯 Pin to this exact build (run 38524545463 ·
d71688c) — fresh-pod path, locked to one CI artifact for reproducible review:🧊 Artifact:
sleepypod-core· self-destructs in 30 days 💥