Repository navigation
feat: land away mode and web guidance changes on main - #31
Merged
Merged
Conversation
"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
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.
Why
#28 and #29 were stacked PRs. #28 was merged into
feat/save-airingand #29 intofeat/away-mode, so neither change reachedmain; only #27 (airing in SQLite) did. This PR brings both stacked changes tomain.What lands on main
0002_away.sqlmigration, controller and SQLite tests.internal/web/static.Both were already reviewed and merged in their stacked PRs; this PR has no new code.
Verification
🤖 Generated with Claude Code