Repository navigation
test: cover release #783 gaps in Stage, Base and piezo views - #790
Merged
Merged
Conversation
…e and setup refresh
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 33 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (21)
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 |
ng
enabled auto-merge
October 8, 2026 04:40
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
2 of 3 tasks
ng
added a commit
that referenced
this pull request
Oct 8, 2026
…tions, 3D temperature Stage and experimental Base (#783) Promote `dev` to `main`: power-off and alarm fixes, hardware recovery and diagnostics, a 24-hour time option, keeping temperature after a schedule ends, a 3D temperature Stage, hosted demo mode, and experimental adjustable-base controls. OFF now clears the side's active firmware timer before resetting its temperature level, and reports a failure if the timer cannot be cleared (#713). This addresses the hub continuing to regulate after OFF. ## Release scope - **Alarms:** fix snooze, the wake window and warm-up (#766, #779). A snooze is no longer lost when the firmware write that confirms a tap fails (#790). - **Hardware:** DAC connections recover after firmware restarts (#782); pump stalls are no longer reported falsely during startup (#786); the installer separates socket discovery from hardware identity (#785). - **Settings:** a pod-wide 12-hour / 24-hour time format, used by every clock, chart and time editor (#788). Solo bed setup is now separate from partner away mode (#767). - **Schedules:** "After schedule ends" can keep the final temperature instead of turning the Pod off. There is a device default and a per-curve choice, and the setting is available over REST/tRPC and MCP (#789). - **Temperature:** a 3D thermal bed, a temperature Stage view and a sweep-mode piezo waveform (#787). - **Performance and diagnostics:** piezo vitals are suppressed while the bed reads empty; the temperature controller does less work; the firmware probe is cached; V8 and native memory counters are reported (#768, #772, #770, #773). - **Demo:** a hosted demo mode (#765, #781). - **Base (experimental):** controls, presets, schedules and a 3D bed view with a 2D fallback (#780, #784). Physical movement is unverified, and independent per-side movement stays locked until the firmware is validated. - **Tests:** coverage for the Stage, ThermalBed, Base and piezo views (#790), plus automation and sensor-stream tests. **Database migrations:** - `0017_majestic_enchantress` - `0018_amazing_captain_marvel` - `0019_closed_psynapse` - `0020_mature_puff_adder`: schedule end action, which defaults to `turn_off` - `0021_device_time_format`: `time_format`, which defaults to `12h` The iOS companion change for end actions is sleepypod/ios#51. It should be merged after this deploy.
4 of 6 tasks
ng
added a commit
to ng/core
that referenced
this pull request
Oct 10, 2026
…s and activity on its timeline (sleepypod#793) ## Summary Follow-up to sleepypod#787. The Temperature screen now opens on the 3D Stage, and the old timeline's information moves into the Stage. - **Stage is the default view.** `temp.view` defaults to `stage`. A **Cards | Stage** segmented switch (`ViewSwitch`) replaces the Thermal view and Stage buttons, so the choice reads as a mode, not an action, and the choice is remembered. - **Stage timeline carries the old timeline's detail.** Both schedule curves are coloured by temperature tone (left solid, right dashed). A dot marks the next set point, and a dashed line marks neutral. Each side gets rows for powered and in-bed stretches, with schedule mismatches bracketed ("bed empty while warming · 1h 0m", "in bed 20m past schedule"). - **Power bar stops at now.** Thermal-history buckets are widened by half a bucket on each side. Without a cap, the last powered stretch could draw up to half a bucket past the now marker. - **ThermalBedCard removed.** The Stage replaces the thermal card on the Temp screen, and so does the pod-health pill in the Stage header. - **Merged with dev.** The 24-hour time setting (sleepypod#788) now runs through the reworked Stage timeline: now and preview labels, hour ticks, and activity tooltips. The tests sleepypod#790 added for the removed Thermal view toggle and health pill are gone. ## Test plan - [x] `tsc --noEmit` clean - [x] `vitest run`: 317 files, 5532 passed - [x] `eslint` clean on the changed files - [x] Deployed `c9a10f5` to Pod 5 (`eight-pod`): the Temp screen opens on the Stage, and Cards | Stage switches and is remembered across reloads - [ ] On the pod, the timeline shows power and in-bed rows per side, and the powered bar ends at the now marker - [ ] Switching Settings → 24-hour time changes the Stage now marker, preview pill and hour ticks to `HH:MM` 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- sleepypod:install-start --> <!-- 🛑 AUTO-GENERATED — sleepypod-bot owns this block. Hello fellow agent / curious human! Anything between the sleepypod:install-start and sleepypod:install-end markers gets overwritten on the next CI run. Want to change what's here? Edit .github/workflows/build.yml instead. 💤 --> <details open> <summary>🛏️ <strong>Beam this PR onto a sleepypod</strong> ✨</summary> 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-update` instead; it's on disk and opens WAN as its first step. 🔄 **Already on a sleepypod** (most common — review a PR on a running pod): ```bash sudo sp-update feat/bed-temperature-3d ``` 🚀 **Fresh pod / first install** — bootstraps from GitHub, rebuilds every push: ```bash curl -fsSL https://raw.githubusercontent.com/sleepypod/core/feat/bed-temperature-3d/scripts/install \ | sudo bash -s -- --branch feat/bed-temperature-3d ``` 🎯 **Pin to this exact build** ([run 37838347527](https://github.com/sleepypod/core/actions/runs/37838347527) · `75ff47d`) — fresh-pod path, locked to one CI artifact for reproducible review: ```bash curl -fsSL https://raw.githubusercontent.com/sleepypod/core/75ff47d77e421e571c3dc0e3d3034caac707ed0f/scripts/install \ | sudo bash -s -- \ --branch feat/bed-temperature-3d \ --artifact-url 'https://nightly.link/sleepypod/core/actions/runs/37838347527/sleepypod-core.zip' ``` 🧊 Artifact: [`sleepypod-core`](https://github.com/sleepypod/core/actions/runs/37838347527/artifacts/11577060977) · self-destructs in 30 days 💥 </details> <!-- sleepypod:install-end --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a switch between Cards and Stage views, with the selection saved for future visits. Press **V** to switch from Cards to Stage; keyboard shortcuts are ignored while editing text. * Expanded the Stage timeline with temperature trends, time markers, and available power, in-bed, and schedule-mismatch activity. * The stepper view now displays the temperature and time-of-day backdrop. * **Changes** * Removed the thermal-bed card from the Cards view. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Fable 5.1 <[email protected]>
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.
Adds tests for the patch-coverage gaps Codecov flagged on release #783 (patch 92.8%, 186 lines missing), plus one small alarm fix from reviewing the release diff.
Fix
src/hardware/gestureActionHandler.ts). When a snooze or dismiss tap came in while the DAC was unreachable,client.connect()orclient.clearAlarm()threw. That skippedalarm.ended(), and for a snooze it also skippedalarm.snooze(). The firmware has already stopped the vibration on the tap, so the snoozed alarm never came back and the side stayed marked vibrating. The clear write is now best-effort and logged on failure, and the alarm bookkeeping always runs.Coverage added (statements measured locally with v8, per file)
Stage/TempStage.tsx: 180/211, 36 branches missed → 210/211, 0 branches missed. Covers keyboard edge cases (modifier keys, input focus, toggling selection), every panel action (power, warmer and cooler, dial, resume, close, stepper tabs and phases), the 2D fallback card callbacks, the panel scope for away and presence, link and unlink, the preview pill, and the fallbacks for room, health and status.Stage/stageScene.ts,StageTimeline.tsx,heatTexture.ts: now 100% of statements. Covers linked hover, missing label refs, labels behind the camera, a zero-size canvas, a frame that fires after dispose, scrubbing (secondary button, zero width, empty lane) and the knit when there is no 2D context.Sensors/PiezoWaveform.tsx: 338/360 → 356/360. Covers the replay draw and hover readout, no 2D context, empty frames, a missing rate, a flat signal, an all-NaN signal, and the cursor at the end of a pass. The tests don't assert time-of-day strings, so they hold up under feat(settings): 24-hour time format, stored on the pod #788.ThermalBed/thermalScene.ts: 259/266 → 266/266. Covers pill placement in the overview, a theme flip with no reading yet, a class change that leaves the theme as it was, and orbit-drag redraws. Also adds tests forThermalCanvasmount failure,ThermalBedCardwith a stored surface, heating and unfocus, and thethermalDatainvalid timestamp and legend.Base/BasePage.tsx: 88/93 → 93/93.BaseSchedules.tsx: 35/39 → 39/39. AlsoBedView3D,bedLook,bedOrbit, and a newcontrols.test.tsxfor the storage-denied preference.TempScreen/TempScreen.tsx: every patch line is now covered: the sleeper-line variants, the return date, and the Thermal view and Stage toggles.Settings/SideSettingsForm.tsx: the return date's local display, clearing it, and a blur with no change.AppearanceSettingscamera-return toggle.BedSetupSettingsrefresh after save.Review notes (not fixed here, larger or judgment calls)
dacTransport.tssendCommandwaits through a whole reconnect cycle while holding the side lock.snoozeManager.tsdrops a snoozed alarm whensetAlarmfails.jobManager.tskeeps the held power-off after an alarm only in memory, so a restart loses it.autoOffWatcher.tsdoesn't account for thefollowmirror zone.device.tssetPower(on)releases the held power-off before the power-on command succeeds.dacMonitor.instance.tshas a race between theonServerFramesubscription and shutdown.Test plan
./node_modules/.bin/vitest runon every touched test file: 20 files, 223 tests, all passed. They passed again after rebasing onto the currentdev../node_modules/.bin/tsc --noEmit: no errors../node_modules/.bin/eslinton changed files: no errors.🤖 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/test/release-783-coverage/scripts/install \ | sudo bash -s -- --branch test/release-783-coverage🎯 Pin to this exact build (run 37728557461 ·
5ef5fd9) — fresh-pod path, locked to one CI artifact for reproducible review:🧊 Artifact:
sleepypod-core· self-destructs in 30 days 💥