Skip to content

feat: land away mode and web guidance changes on main - #31

Merged
subpathdev merged 4 commits into
mainfrom
feat/away-mode
Dec 1, 2026
Merged

subpathdev merged 4 commits into
mainfrom
feat/away-mode

Conversation

@subpathdev

Copy link
Copy Markdown
Owner

Why

#28 and #29 were stacked PRs. #28 was merged into feat/save-airing and #29 into feat/away-mode, so neither change reached main; only #27 (airing in SQLite) did. This PR brings both stacked changes to main.

What lands on main

Both were already reviewed and merged in their stacked PRs; this PR has no new code.

Verification

  • CI on this PR
  • Not deployed; nothing sent to the real thermostats

🤖 Generated with Claude Code

subpathdev and others added 4 commits November 30, 2026 11:16
"Away…" lowers every room with a known target to one target until a date
and time, then raises each room back to the target it had before. Rooms
whose target was changed during away are left alone. Raising the target
back follows the rules for the end of airing: it repeats until the
thermostat confirms it, never gives up, and the page shows a problem.

Away is saved through a new AwayStore port in the SQLite database
(migration 0002), so it survives a restart, and an end that passed while
the service was down is applied as soon as it runs again. Changes to
several rooms are made together: if one room can't be saved, none
changes.

API: PUT and DELETE /api/away, RoomList.away, and Room.awayState and
awayRestoreTarget. The page gets a banner with "Back now" and a native
dialog that suggests 17 °C and the next day.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From a review of the page against Modern Web Guidance 1.0 (Chrome, Firefox
and Edge, built on Baseline):

- Forbid framing (CSP frame-ancestors 'none' and X-Frame-Options DENY).
  A framed page's requests are same-origin, so the cross-origin check
  alone didn't stop another website from tricking a tap.
- One set of color tokens with light-dark() instead of a second set in a
  prefers-color-scheme media query.
- Drop the legacy apple-mobile-web-app-* and mobile-web-app-capable tags,
  which the manifest covers, and give the manifest an id.
- Time out the room refresh with AbortSignal.timeout, so a hung request
  can't hold back the refreshes after it.
- Announce errors with role="alert" and put the content in <main>.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat: simplify the page with platform features from Modern Web Guidance
@subpathdev
subpathdev merged commit eaf3095 into main Dec 1, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant