Repository navigation
feat(temp): shared notice banners and toasts, and an away card state - #796
Conversation
|
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 55 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (24)
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 |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Adversarial review (Sonnet + Codex, standard depth)Fixed in the review-fix commit (rebased onto dev after #795), each with a regression test that fails on the pre-fix code:
Left for the author (Minor): the snooze countdown can be stale for up to 15s after a snooze starts; a failed prime dismissal is never retried; the toast isn't keyboard-reachable and hover and focus share one pause flag; the toast exit animation doesn't restart (same keyframes reversed); Pre-existing: Stage's global Space shortcut fires on focused notice buttons; a closed StagePanel is still keyboard-focusable; WaterLevelCard reads Unix seconds as milliseconds. |
…rves, and shared notices (#797) Promote `dev` at `8b52e84a01d6f5dbe2d64559d324c052a6912f1a` to `main`. - **Stage is the Temperature default** (#793): the 3D Stage opens first, with tones and per-side activity on its timeline. - **Curves get their own URLs** (#794): `/schedule/<days>?side=` deep-links straight into a curve's editor; curves draw as a smooth line with a tone-tinted fill; set points inside a flat hold are dropped on save (the first row after midnight and any row that would open a >12h gap are kept). - **Shared notices** (#796): pump stall, priming and alarm banners plus a priming-complete toast, shared by the cards and the Stage; a notice that blocks a side pauses all of that side's controls (link, resume, dial, queued steps); away shows on the side card itself. - **Stage panel** (#795): says Off once instead of twice. ## Test plan - [x] dev CI: lint, typecheck, unit tests, build green on each merged PR - [x] Adversarial review (Sonnet + Codex) on #794 and #796; Major findings fixed with regression tests - [ ] After release: `sudo sp-update main` on a pod; Temperature opens on the Stage; a curve link opens its editor; priming shows the banner and pauses controls 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Summary
Replaces the one-off notices on the Temperature screen with a small shared system: banners for things that are ongoing or need action, and toasts for confirmations. The Cards view and the Stage both use it.
New pieces
ds/notice.tsx:NoticeBannerandNoticeStack. Kinds areprogress,action,successandinfo. Tones are cool, ok, warn and danger. The stack sorts danger, then warn, then cool. Danger banners userole="alert"and the rest userole="status".ds/toast.tsx:ToastProvideris mounted inAppShell, anduseToast().show(notice)shows a toast.prefers-reduced-motionit only fades.TempScreen/useTempNotices.tsx: derives notices from device status and fires the prime-complete toast.Notices
{n}Mremaining and a Cancel action. The existing side-targeting logic is kept.isPriming, so the banner has no progress bar or ETA.dismissPrimeNotificationis called right away.Blocked sides. While a notice blocks a side, its SideCard renders at 40% opacity with pointer events off and reads
PAUSED. In the Stage, the side's label readsPAUSEDand its keys, drag and power are ignored.Away (separate commit). An away side now shows on its card: a dashed border, a mono
AWAYlabel with a plane icon, and, when the side is off, "Off" with a Turn on button.Removed:
DeviceAlerts,AlarmBanner,PumpStallNotification,PrimingIndicatorandPrimeCompleteNotification. Their tests moved intouseTempNotices.test.tsx.Behavior notes
useDeviceStatuswraps the WebSocket's unix-secondsprimeCompletedNotification.timestampin a Date as if it were milliseconds.primeCompletedAtMsreads either form back correctly. The underlying conversion is not fixed in this PR.Test plan
tsc --noEmitcleaneslintclean on changed filesvitest runover TempScreen, Stage, ds, AppShell and app: 31 files, 301 passed🤖 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/temp-notices/scripts/install \ | sudo bash -s -- --branch feat/temp-notices🎯 Pin to this exact build (run 37864492321 ·
87f768d) — fresh-pod path, locked to one CI artifact for reproducible review:🧊 Artifact:
sleepypod-core· self-destructs in 30 days 💥