Skip to content

feat: simplify the page with platform features from Modern Web Guidance - #29

Merged
subpathdev merged 1 commit into
feat/away-modefrom
feat/web-guidance
Dec 1, 2026
Merged

subpathdev merged 1 commit into
feat/away-modefrom
feat/web-guidance

Conversation

@subpathdev

Copy link
Copy Markdown
Owner

Stacked on #28 (away mode), which is stacked on #27. Merge those first; GitHub then retargets this PR.

Why

This PR applies the findings Jan picked from a review of the page against Modern Web Guidance 1.0. That is the cross-browser guidance for web pages from Chrome, Firefox and Edge, published 2026-11-10 and built on Baseline. The page was already lean, so the changes are small.

What changes

# Change Guide
W1 Every response sends Content-Security-Policy: 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 framing the page and tricking a tap. security §1.4
W3 One set of color tokens using light-dark(), instead of a second set in a prefers-color-scheme media query. component-specific light/dark theme
W5 Removes the legacy apple-mobile-web-app-* and mobile-web-app-capable meta tags, since the manifest covers them, and adds "id": "/" to the manifest. apple-touch-icon stays. install-web-app
W6 The room refresh uses AbortSignal.timeout(10 s), so a hung request can't hold back the refreshes after it. js: AbortSignal.timeout
W7 Errors are announced with role="alert" instead of role="status", and the content sits in a <main> landmark. accessibility: live regions, landmarks

Verification

  • go vet, go test -race ./... and golangci-lint v2.15.0 pass. A new test checks the anti-framing headers on the page and the API, and the manifest test checks id.
  • Local run against a throwaway Mosquitto with fake thermostats:
    • curl -I shows both headers;
    • the page renders correctly at phone width in light and dark (checked in the browser pane).
  • Not verified:
    • on an iPhone: home-screen behaviour without the Apple meta tags;
    • in Firefox on Android, which Jan uses.

🤖 Generated with Claude Code

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>
@subpathdev
subpathdev merged commit 75b79a6 into feat/away-mode 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