From 5c527a809d252a45eca7028338442260b54b5d64 Mon Sep 17 00:00:00 2001 From: Cyborg Viktor <307551610+vpetersson-bot@users.noreply.github.com> Date: Wed, 5 Aug 2026 18:45:04 +0000 Subject: [PATCH] Correct the deploy docs and drop the remaining em dashes Two doc/copy cleanups, no behaviour change. README.md already described the tag-driven deploy correctly (#18), but CLAUDE.md still said "Pushing to master runs deploy-pages.yml" and the workflow's own header comment still said it publishes "on every push to master". Neither is true: the trigger is a CalVer tag (or a manual workflow_dispatch). Both now match the workflow, and README's CalVer example is spelled YYYY.M.PATCH to match the tags actually in use. Also removes the remaining em dashes (55 across CLAUDE.md, README.md, main.css, build.ts, dev-server.ts, src/clocks.ts, src/main.ts and sync-fonts.ts), rewriting each to a colon, semicolon, comma or parenthetical as the sentence needs rather than swapping the character blindly. In the README parameter table the em dash was doing duty as the "no default" value, so it now reads "none". The manifest and meta description were already done in #19. lint, typecheck, test (35 pass) and build all clean. --- .github/workflows/deploy-pages.yml | 8 +++--- CLAUDE.md | 27 +++++++++++---------- README.md | 18 +++++++------- assets/styles/main.css | 39 +++++++++++++++--------------- build.ts | 2 +- dev-server.ts | 6 ++--- src/clocks.ts | 12 ++++----- src/main.ts | 16 ++++++------ sync-fonts.ts | 2 +- 9 files changed, 66 insertions(+), 64 deletions(-) diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml index 6141c4e..ef1975b 100644 --- a/.github/workflows/deploy-pages.yml +++ b/.github/workflows/deploy-pages.yml @@ -1,9 +1,9 @@ --- name: Deploy to GitHub Pages -# Builds the static site and publishes ./dist to GitHub Pages on every push to -# master. One-time setup: repo Settings → Pages → Build and deployment → Source -# = "GitHub Actions". +# Builds the static site and publishes ./dist to GitHub Pages when a CalVer tag +# (e.g. 2026.8.0) is pushed; a push to master alone does not deploy. One-time +# setup: repo Settings → Pages → Build and deployment → Source = "GitHub Actions". on: push: @@ -32,7 +32,7 @@ jobs: with: bun-version: 1.3.14 - run: bun install --frozen-lockfile - # Gate the deploy on the same checks CI runs, so master never ships red. + # Gate the deploy on the same checks CI runs, so a tag never ships red. - run: bun run lint - run: bun run typecheck - run: bun test diff --git a/CLAUDE.md b/CLAUDE.md index 90221fb..b255a2a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -6,11 +6,11 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co A **fully static** world clock for digital signage: a board of cities, each showing its own local time, date, GMT offset and a day/night accent. Everything -on screen is driven by **URL query parameters** — there is no server and no +on screen is driven by **URL query parameters**: there is no server and no backend. The site builds to `./dist` and is published to **GitHub Pages**. It is modelled loosely on the sibling [`../clock-app`](../clock-app) (the -"Observatory" aesthetic — Fraunces serif over a night sky), but where clock-app +"Observatory" aesthetic: Fraunces serif over a night sky), but where clock-app is a single edge-rendered Cloudflare Worker clock, this is a self-contained, multi-zone, client-only static site. All client code is **TypeScript**. @@ -32,21 +32,22 @@ bun run sync-fonts # vendor webfonts from @fontsource only ``` CI (`.github/workflows/ci.yml`) runs lint → typecheck → test → build on every PR. -Pushing to `master` runs `deploy-pages.yml`, which re-runs those checks and -publishes `./dist` to GitHub Pages. +Deploys are tag-driven: pushing a CalVer tag (e.g. `2026.8.0`) runs +`deploy-pages.yml`, which re-runs those checks and publishes `./dist` to GitHub +Pages. Pushing to `master` on its own does not deploy. ## Architecture ### Pure logic vs. DOM (the split to preserve) -- **`src/clocks.ts`** — pure, side-effect-free helpers: URL parsing +- **`src/clocks.ts`** holds the pure, side-effect-free helpers: URL parsing (`parseClocks`), `Intl` formatter construction (`buildFormatters`), and the formatting/banding helpers. Every function takes an explicit `Date`, so tests are independent of the machine clock and timezone. This is the **only** file with unit tests (`src/clocks.test.ts`). Keep testable logic here. -- **`src/main.ts`** — the DOM driver: reads `location.search`, builds one card +- **`src/main.ts`** is the DOM driver: reads `location.search`, builds one card per clock, and repaints them on a shared timer. No `Intl`/parsing logic of its - own — it imports it from `clocks.ts`. Loaded as a `type="module"` script. + own; it imports it from `clocks.ts`. Loaded as a `type="module"` script. This mirrors clock-app's `locale.js` / `main.js` split, but here `main.ts` is a normal ES module (the static page uses `