Skip to content

Fix sky state falling out of sync with manual mode and demo stop - #63

Merged
amyrlam merged 1 commit into
mainfrom
claude/github-issue-60-e743e7
Aug 17, 2026
Merged

Fix sky state falling out of sync with manual mode and demo stop#63
amyrlam merged 1 commit into
mainfrom
claude/github-issue-60-e743e7

Conversation

@amyrlam

@amyrlam amyrlam commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Fixes #60, fixes #51.

What was wrong

Amy's screenshot on #60 shows it: with sky: night forced during the day, the status line still read "daylight · salt lake city", and the mobile browser's bottom bar kept its day-colored tint under a night sky.

  1. Status label ignored the manual override. render() fed skyLabel the real sun altitude, so a forced night sky at noon was still labeled "daylight". It now derives from the altitude actually being shown, so forced night reads the moon phase (e.g. "waxing crescent") and forced day reads "daylight".
  2. Browser chrome never followed the sky. There was no theme-color meta, so mobile Safari sampled the page once at load and kept that tint forever. The layout now ships a theme-color meta that sky.ts rewrites on every render with the horizon's computed chip color, so the toolbar tracks day/night switches.
  3. Stopping the 24h demo restored a stale sky (Bug: stop and day/night timing #51). playDemo captured mode and place as start-time snapshots; the mode button stays clickable during the demo (its repaint is deferred, not its state change), so stopping the demo repainted the sky the user had already switched away from. It now reads both through getters at demo end.

Also repairs the worktree dev-server entries in .claude/launch.json, whose pnpm run dev -- --port arg passing no longer survives Astro 7's CLI parsing (Unknown command: astro dev --port), and documents the theme-color mechanism in the README per CLAUDE.md.

Verified

  • Browser-tested on the dev server: forced night now shows waxing crescent · san francisco with the theme-color meta flipping from day slate rgb(64, 82, 100) to night navy rgb(29, 42, 97); switching mode mid-demo then stopping repaints with the new mode.
  • All 19 Playwright tests pass; pnpm check:contrast holds AAA across all sun altitudes; Prettier and ESLint clean (the two remaining lint warnings are pre-existing in the blog page).

🤖 Generated with Claude Code

Three related fixes for #60 and #51:

- The status line now labels the sky being shown: under a manual
  day/night override it derives from the forced altitude, so "sky:
  night" at noon reads the moon phase instead of "daylight".
- A theme-color meta tag, rewritten on every render, tints mobile
  browser chrome (Safari's toolbar) to the horizon's computed chip
  color — previously Safari kept whatever it sampled at page load,
  leaving a day-colored bar under a night sky.
- playDemo reads mode and place through getters instead of start-time
  snapshots, so stopping the 24h time-lapse repaints with whatever
  mode the user switched to mid-demo rather than restoring a stale sky.

Also repairs the worktree dev-server launch configs, whose pnpm arg
passing no longer survives Astro 7's CLI parsing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
youthphase Ready Ready Preview Aug 17, 2026 9:58pm

@amyrlam

amyrlam commented Aug 17, 2026

Copy link
Copy Markdown
Owner Author

gonna merge and test live

@amyrlam
amyrlam merged commit 723412c into main Aug 17, 2026
8 checks passed
@amyrlam
amyrlam deleted the claude/github-issue-60-e743e7 branch August 17, 2026 22:02
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.

Footer state issue Bug: stop and day/night timing

1 participant