Skip to content

feat(calendar): apply Loic's changes before the 1 December opening - #63

Merged
maxitect merged 14 commits into
mainfrom
feat/60-calendar-lo-c-s-round-of-changes-before-1-december
Nov 26, 2026
Merged

maxitect merged 14 commits into
mainfrom
feat/60-calendar-lo-c-s-round-of-changes-before-1-december

Conversation

@maxitect

@maxitect maxitect commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

What

Loïc's 26 November changes to the advent calendar, ported from his Codex copy: no download, no per-door colour, an opening sound chosen in the admin, an Instagram button, a new intro, snowflakes and the site-header logo.

Changes

  • Download removed: no link on the opened door, no download text or downloadLabel, and ?download=1 no longer sets Content-Disposition on /api/calendar/audio/{day}.
  • Per-door color field removed from calendar-doors; every door takes the doorColors palette.
  • New public upload collection audio (audio/mpeg, public bucket like media) and an openingSound upload on calendar-settings. openingSound.ts (inline base64) is deleted; the page fetches the file. Loïc's calendar-opening.mp3 is in public/audio/ as the fallback when the field is empty.
  • The chosen sound is served through /api/calendar/opening-sound, a same-origin proxy of the storage file, because the page's CSP has connect-src 'self' and fetch of the bucket URL would be blocked (and would need a bucket CORS rule). Cached immutably per ?v= version.
  • Instagram button under the intro in both languages, new intro defaults, snowflakes (hidden under reduced motion), and the Damion / Blanch Caps logo with the ball, linking to /?isFrench=…, on the masthead and the holding page.
  • Two migrations: calendar_remove_download_and_color and audio_and_opening_sound.

Acceptance criteria

AC Result Method Evidence
No download link; ?download=1 not an attachment PASS browser, api AC1
Door admin has no colour field; doors use the palette PASS code, db AC2
Opening sound plays Loïc's; admin upload changes it; empty field uses /public fallback PASS locally; prod upload after merge browser, api, db AC3
HTML no longer contains the base64 sound PASS api AC4
Instagram button in both languages, new tab, keyboard PASS browser AC5
/calendrier and /calendar show the new intro in prod PASS locally; prod after merge browser, api, db AC6
Snowflakes on opening, not under reduced motion PASS browser AC7
Logo in Damion and Blanch Caps with the ball PASS browser AC8
Migrations clean on a Neon branch and in prod; no console errors or CSP violations PASS on preview; prod after merge cli, browser AC9

Closes

Closes #60

Notes

Post-merge steps, in order (production data is not touched by this PR):

  1. Run payload migrate against Neon main. This drops calendar_doors.color and calendar_settings_locales.texts_download. Read-only check of prod on 26 November: door 1 has color = #f7ab55 (door 2 none); it will fall back to the palette, as the ticket intends. If Loïc wants that colour kept, add it to doorColors in the admin.
  2. In the prod admin, open Audio and upload calendar-opening.mp3 (the same file as public/audio/calendar-opening.mp3), then set it as the Opening sound in Calendar settings. Until then the /public fallback plays the same sound.
  3. The prod calendar_settings_locales has no rows (read-only check), so no saved intro overrides the defaults: nothing to change for the new intro. If an intro is saved later or by the time of merge, clear it or replace it with the new text.
  4. Then prove on prod: both pages show the new intro, the sound plays, no console errors.

Other points:

  • The preview run used the Neon preview branch (migrations applied, one audio, two doors, one settings row with year = 2025 so the doors are open before 1 December) and its bucket. neon env pull was used to read the branch variables.
  • check.sh ran pnpm build, which rewrites .next in the shared checkout; this affects a dev session on port 3000.
  • The 404s on /api/calendar in the console of the last run are the expected response while the calendar is switched off (holding page).
  • Prises-pour-Max-2026-11-26.zip is untracked and not committed.

Review

Verdict: ALL CLEAR
Rounds: 7

Finding Severity Resolution
Deploy preview failed: payload migrate hung on the "dev mode push" prompt, because a dev row (batch -1) was left in the preview branch's payload_migrations by a dev server run against it critical fixed on the Neon preview branch (row deleted); later previews run payload migrate with no prompt
Preview credentials after neon env pull critical settled: no role password reset in the Neon log, and /api/calendar/audio/1 on the preview answers 200 from storage
Logo lockup does not match the user's reference (size, colours, ball position, word spacing) critical fixed in 918a738 and 084abf3
BOWLING ● CLUB ink sat about 5px left of the "Clark's" ink critical fixed in 1ec14f6 (centred on painted pixels, colours now from the site theme)
English title too long for one line next to the disc critical fixed in 0d3f6cd: English title is "Calendar", the e7af93a shrink-to-fit is removed
Calendar language switch differs from the site's toggle and sits beside the sound button critical fixed in 95b96d3: the site stylesheet is loaded and the site's Toggle is stacked above the sound button
Language toggle: the ball did not slide before the page changed critical fixed in 2896a94: the ball slides with the site's 300ms transition, then the page changes; Space and Enter do the same; no delay under reduced motion
Language toggle sat 18.5px further right in English than in French critical fixed in 30fc0e1: the stack is right-aligned, so the toggle has the same box on both pages
Active language label in clarks-orange was unreadable on the gradient (1.1:1) warning fixed in d3e818c: the active label is clarks-red (3.3 to 3.4:1, above 3:1 for 24px text); the ball stays yellow
/api/calendar/opening-sound threw a 500 when the storage fetch rejected, and its 404 had no cache header warning fixed in bd76f33
The page has no fallback to /audio/calendar-opening.mp3 when the proxy fails suggestion fixed in 518ce63 (the user chose the fallback): a non-OK response or network error from the route plays the /public file

Re-verified locally (518ce63): opening-sound fallback (browser) PASS · on the deploy preview (d3e818c): language toggle (browser, deploy) PASS, AC8 (browser, deploy) PASS, AC1 (browser) PASS, AC3 (browser, deploy) PASS, AC5 (browser) PASS, AC6 defaults (deploy) PASS, AC7 (browser, both motion settings) PASS · check.sh PASS · CI check PASS
The only console error on the preview is Netlify's preview-only drawer (/.netlify/scripts/cdp) framing app.netlify.com against frame-src; production does not inject that script.
CSS weight on the calendar page: before, 11.3 KB inline (3.6 KB gzip) plus the 19.9 KB font stylesheet (2.8 KB gzip); now the site stylesheet is added, 38.8 KB (7.3 KB gzip), served from 'self' and shared with the rest of the site.

Evidence

AC1

browser (door 1 opened): snow=10, download links ($('.case-download, a[download]'))=0
$ curl -si "localhost:4060/api/calendar/audio/1?download=1" | grep -ic content-disposition
0      (status 200, content-type audio/mpeg)

AC2

$ neon psql preview -- ... column_name='color' on calendar_doors   -> no row

AC3

opening sound set:   page fetches /api/calendar/opening-sound?v=1795720236352
  HEAD -> 200, content-type: audio/mpeg, cache-control: public, max-age=31536000, immutable
field emptied (update calendar_settings set opening_sound_id=null):
  page HTML references /audio/calendar-opening.mp3; /api/calendar/opening-sound -> 404
$ curl -s -o /dev/null -w "%{http_code} %{size_download}" localhost:4060/audio/calendar-opening.mp3
200 86834

AC4

$ curl -s localhost:4060/calendar | grep -c base64
0

AC5

["Clark's on Insta:", "https://instagram.com/clarksbowlingclub", "_blank", "noopener noreferrer"]
focus(): {"focused":true,"tabindex":0}   (an <a href>)
FR page: "Clark's sur Insta :" (messages.ts)

AC6

EN: "An unreleased song demo every day until 24 December. Merry Christmas!"
$ curl -s localhost:4060/calendrier | grep -o "Une maquette[^<]*"  (defaults.ts; prod has no saved intro rows)

AC7

normal motion: .snow-flake count after opening = 10
reduced motion (emulated): flakes 0, no .snow-burst created

AC8

<a class="brand" href="/?isFrench=false" ...><span class="brand-script">Clark's</span><span class="brand-caps"><span>BOWLING</span><img src="/svg/bowling-ball-toggle.svg" ...><span>CLUB</span></span></a>
computed: Damion, "Damion Fallback", cursive | blanchCaps, "blanchCaps Fallback", sans-serif
Holding page (FR, calendar switched off): href="/?isFrench=true"; screenshot .git/ticket/60/artefacts/holding-fr.png

AC9

$ pnpm exec payload migrate  (NEON_BRANCH=preview)
Migrated:  20261126_190804_calendar_remove_download_and_color (60ms)
Migrated:  20261126_190808_audio_and_opening_sound (160ms)
Browser console on /calendar with a door opened: 0 errors, 0 warnings (no CSP violations)
check.sh: CHECK PASS: lint typecheck build

Review evidence

Deploy preview 6b08850387229df943a4948c: state error, "Build script returned non-zero exit code: 2"
  log: "? It looks like you've run Payload in dev mode ... Would you like to proceed? (y/N)" then "Command failed with exit code 13"
$ neon psql preview -- -Atc "select name, batch from payload_migrations"   -> ... | dev|-1 (2026-11-26 19:10:35)
$ neon psql preview -- -Atc "delete from payload_migrations where batch = -1 returning name"   -> dev, DELETE 1
$ DATABASE_URL=<preview> pnpm exec payload migrate < /dev/null   -> INFO: Done.  exit 0

Opening-sound route (next start on :4060, preview DB)
  red:  node -e 'fetch("/media/calendar-opening.mp3")'   -> rejects: TypeError Failed to parse URL (unhandled in the route, so 500)
  green, storage URL unreachable (S3_ENDPOINT empty): HTTP/1.1 404 Not Found, cache-control: private, no-cache
  green, storage set: HTTP/1.1 200 OK, content-type: audio/mpeg, cache-control: public, max-age=31536000, immutable

Logo (1280px, measured): ball/cap height 0.38 (reference 0.38), ball centre to cap centre -0.01px,
  gap BOWLING-CLUB / cap height 0.63 (reference 0.63), Clark's width 190px / BOWLING CLUB width 186px,
  Clark's color rgb(254, 188, 18), text-shadow rgb(193, 70, 39) 2.1px 2.1px 0px
  scrollWidth at 390px: 390 on all eight pages (no overflow)
  Comparison sheet: .git/ticket/60/artefacts/logo-comparison.png
  Screenshots: .git/ticket/60/artefacts/{calendar,holding}-{en,fr}-{1280,390}.png

Calendar, door opened (EN and FR, 1280px): snow-flake 10, download links 0,
  sound request /api/calendar/opening-sound?v=1795720236352
  Instagram: ["Clark's on Insta:" | "Clark's sur Insta :", "https://instagram.com/clarksbowlingclub", "_blank"]
  Logo href: /?isFrench=false (EN), /?isFrench=true (FR)
  Console: one 500 from /api/calendar/audio/1, because the local run had no S3 keys; holding page: 0 errors

Deploy preview 6b08887c78f44729ae1d0542 (bd76f33), https://deploy-preview-63--clarksbowlingclub.netlify.app
  build log: $ if [ -n "$DATABASE_URL" ]; then pnpm exec payload migrate; fi && pnpm build
             INFO: Reading migration files ... INFO: Done.  ...  Site is live
  $ curl -sI $U/api/calendar/audio/1              -> HTTP/2 200, content-type: audio/mpeg, cache-control: private,no-cache
  $ curl -sI "$U/api/calendar/audio/1?download=1" -> HTTP/2 200, no content-disposition
  $ curl -sI "$U/api/calendar/opening-sound?v=1795720236352" -> HTTP/2 200, audio/mpeg, public,max-age=31536000,immutable
  Browser (headless, /calendar and /calendrier, 1280 and 390): logo Damion / blanchCaps, Clark's rgb(254, 188, 18),
    href /?isFrench=false|true, scrollWidth = viewport, new intro in each language,
    door 1 opened: 200 /api/calendar/opening-sound, 206 /api/calendar/audio/1, snow-flake 10 (0 under reduced motion), download links 0
  Console: only "Framing 'https://app.netlify.com/' violates ... frame-src" from /.netlify/scripts/cdp
    (curl -s <prod>/calendar | grep -c /.netlify/scripts/cdp -> 0; preview -> 1)
  Screenshots: .git/ticket/60/artefacts/preview-{en,fr}-{1280,390}[-open].png

Round 4, deploy preview at e7af93a (title and logo measured in the browser)
  logo centres (Clark's / BOWLING CLUB): 176.6 / 176.6 at 1280, 109.6 / 109.6 at 390, EN and FR, masthead and holding page
  ball: filter drop-shadow(rgb(193, 70, 39) 1.04px 1.04px 0px)
  title lines / font / hero height:  EN 1280: 1 / 102.4px / 428   FR 1280: 1 / 102.4px / 428
                                     EN 390:  1 / 48.5px / 317    FR 390:  1 / 52px / 323 (FR unchanged from before)
  title one line across widths (EN): 1280, 1000, 720, 600, 461, 460, 390, 360, 320 -> 1 line each, scrollWidth = viewport
  door opened: snow-flake 10 (0 under reduced motion), download links 0, 200 /api/calendar/opening-sound, 206 /api/calendar/audio/1
  Sheet: .git/ticket/60/artefacts/r3-comparison.png (reference, logo crops, EN and FR side by side at 1280 and 390, calendar and holding)

Round 5, deploy preview at 1ec14f6
  ink (painted pixels, script vs BOWLING CLUB, centres):  /calendar 1280 180.8 / 180.8 · 390 113.8 / 113.8 · /calendrier 1280 180.8 / 180.8 · 390 113.8 / 113.8
    (before: 180.8 / 176.0, i.e. 4.8px left, about 10 device pixels as in the user's screenshot)
  hero height EN / FR: calendar 1280 428 / 428, 390 323 / 323 · holding 1280 298 / 298, 390 193 / 193 · title on one line, not over the disc
  toggle by keyboard: Tab, Tab -> #language role=switch "Switch to English", Space -> /calendar (and back to /calendrier)
  computed styles of body, main, hero, h1, intro, label, Instagram button, status, grid, door, footer, portrait dialog, sound button:
    unchanged from e7af93a except border-style none -> solid at 0px width (preflight, nothing painted) and the h1 width (68% max-width restored)
  door opened: snow-flake 10 (0 under reduced motion), download links 0, 200 /api/calendar/opening-sound, 206 /api/calendar/audio/1
  CSP: style-src 'self' 'unsafe-inline'; stylesheets /_next/static/chunks/*.css from 'self'; no violations from the page
  Sheet: .git/ticket/60/artefacts/r4-comparison.png (reference, user's screenshot, logo now, site toggle; before/after EN and FR at 1280 and 390; holding)

Round 6, deploy preview at d3e818c (language toggle)
  toggle box (fieldset x, y, width / track x, y), /calendrier vs /calendar:
    before 1280: 1070, 53.3, 107 / 1095.5 vs 1088.5, 53.3, 107 / 1114.1 (18.5px apart) · 390: 247 vs 265.5
    after  1280: 1093, 53.3, 107 / 1118.6 on both · 390: 270, 33.3, 107 / 295.6 on both
  ball x after a click, /calendrier 1280: before, one sample then the page changed (no movement)
    after: 1148.6 -> 1147.7 -> 1143.7 -> 1135.8 -> 1126.9 -> 1122.0 -> 1120.6 over about 340ms, then /calendar
  keyboard (local next start): Space -> /calendar 342ms, Enter -> /calendar 331ms, Space with reduced motion -> /calendar 29ms, no console errors
  active label: rgb(193, 70, 39) on the gradient behind it (avg 242,203,158 to 242,208,168): 3.29 to 3.44:1; clarks-orange there: 1.10 to 1.16:1
  logo ink unchanged: centres 180.8 / 180.8 at 1280, 113.8 / 113.8 at 390
  Crops: .git/ticket/60/artefacts/toggle-comparison.png (before and after, both languages, 1280 and 390)

Round 7, local next start at 518ce63 (door track stubbed in the browser with the same mp3, since the local run has no private-bucket keys)
  storage unset, route 404: /calendar and /calendrier -> 404 /api/calendar/opening-sound, 200 /audio/calendar-opening.mp3,
    decoded 86834 bytes (2.14s), opening sound started 1, CSP violations 0; console: only the route's own 404
  storage set, route 200: /calendar and /calendrier -> 200 /api/calendar/opening-sound only, decoded 86834 bytes, started 1, CSP 0, console errors 0

Screenshots at 390px and in English were taken in review (above).

@netlify

netlify Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for clarksbowlingclub ready!

Name Link
🔨 Latest commit b44e545
🔍 Latest deploy log https://app.netlify.com/projects/clarksbowlingclub/deploys/6b089a33f502a937882b35c3
😎 Deploy Preview https://deploy-preview-63--clarksbowlingclub.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@maxitect
maxitect marked this pull request as ready for review November 26, 2026 19:32
@maxitect
maxitect marked this pull request as draft November 26, 2026 19:37
@maxitect
maxitect marked this pull request as ready for review November 26, 2026 19:43
@maxitect
maxitect marked this pull request as draft November 26, 2026 20:12
@maxitect
maxitect marked this pull request as ready for review November 26, 2026 20:23
@maxitect
maxitect marked this pull request as draft November 26, 2026 20:28
@maxitect
maxitect marked this pull request as ready for review November 26, 2026 20:33
@maxitect
maxitect force-pushed the feat/60-calendar-lo-c-s-round-of-changes-before-1-december branch from 518ce63 to b44e545 Compare November 26, 2026 20:44
@maxitect
maxitect added this pull request to stack #65 November 26, 2026 20:44
@maxitect
maxitect merged commit 46aa058 into main Nov 26, 2026
5 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.

Calendar: Loïc's round of changes before 1 December

1 participant