[PR #7825] [MERGED] fix(seasonal): one shared window for dated looks #7951

Closed
opened 2026-10-24 04:09:06 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7825
Author: @Gunterlie
Created: 10/19/2026
Status: ✅ Merged
Merged: 10/19/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/seasonal-window


📝 Commits (1)

  • 00f664e fix(seasonal): share one dated window and check it every minute

📊 Changes

9 files changed (+54 additions, -41 deletions)

View changed files

📝 e2e/mari-appearance-pack.e2e.ts (+2 -0)
📝 packages/client/src/hooks/use-mari-appearance-pack.ts (+3 -1)
📝 packages/client/src/hooks/use-seasonal-theme.ts (+16 -15)
📝 packages/client/src/lib/mari-work-animations.ts (+10 -6)
📝 packages/client/src/lib/seasonal-themes.ts (+5 -4)
📝 packages/client/src/localization/locales/en.json (+1 -1)
📝 packages/client/src/styles/themes/seasonal-halloween.css (+3 -2)
📝 scripts/regressions/mari-appearance-pack.regression.mjs (+4 -3)
📝 scripts/regressions/seasonal-themes.regression.ts (+10 -9)

📄 Description

Release notes: leave this PR out of the changelog and the What's New text; it is a Halloween surprise.

Important

Release notes: please leave this PR out of CHANGELOG.md and the release text, like #7819. No CHANGELOG line is included on purpose.

Why

The seasonal theme and the dated Professor Mari pack used two different windows (one local day vs. four whole days). They should start and stop together: on at Oct 30 00:00 and off at Nov 1 12:00, device-local time. The theme hook also rounded the clock down to midnight, so a midday cutoff could never fire.

What changed

  • MariSeason is now "MM-DD HH:mm" with from inclusive and to exclusive. One HALLOWEEN_SEASON constant drives both the seasonal theme (SEASONAL_THEMES) and the dated pack.
  • useMinuteClock() (in use-seasonal-theme.ts) ticks once a minute; the seasonal theme hook and useMariAppearancePack both use it, so the window opens and closes on time while the app stays open (previously the pack only re-checked on some other re-render).
  • Greeting copy: "comes off by itself tomorrow" → "on November 1 at noon" (no translated locale has this key).
  • Stale comments in the theme stylesheet and hook updated.
  • Tests: both regressions now pin the new edges (Oct 29 23:59 off, Oct 30 00:00 on, Nov 1 11:59 on, Nov 1 12:00 off, time-zone case moved to the noon edge). The pack e2e seeds the theme greeting as shown, since the greeting modal now also opens on Oct 30.

Validation

  • pnpm check: passed.
  • seasonal-themes.regression.ts, mari-appearance-pack.regression.mjs: passed.
  • e2e/mari-appearance-pack.e2e.ts + e2e/seasonal-halloween.e2e.ts (desktop-chromium): 4 passed.
  • Local CodeRabbit: 2 minor findings, not changed (reasons below). A separate agent review found the midnight-rounding bug and the stale comments; fixed here.

Manual verification

  • Set the system clock to Oct 29 23:59, keep the app open: at Oct 30 00:00 the seasonal theme and the dated pack both appear within a minute.
  • Set the clock to Nov 1 11:59, keep the app open: at 12:00 both go away within a minute.
  • Inside the window, the greeting text says the costume comes off on November 1 at noon.

No linked issue: planned work.

@SpicyMarinara

Local CodeRabbit (2 minor findings, not changed)

  1. Greeting seed year in the e2e: the test pins its clock to 2026 (page.clock.setFixedTime), so the seeded year always matches.
  2. First tick up to 59 s after the boundary: the old hook had the same minute granularity; a cutoff that lands up to a minute late is fine for this window and keeps the hook simple.

Summary by CodeRabbit

  • New Features
    • Halloween seasonal themes and the raccoon appearance pack are now available from October 30 through November 1 at noon, based on local time.
    • Seasonal appearance updates now reflect time-based changes.
  • Bug Fixes
    • Updated the Halloween greeting to clarify that the costume comes off on November 1 at noon.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/7825 **Author:** [@Gunterlie](https://github.com/Gunterlie) **Created:** 10/19/2026 **Status:** ✅ Merged **Merged:** 10/19/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/seasonal-window` --- ### 📝 Commits (1) - [`00f664e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/00f664e7f92500f6c0d47576e51959e7f9f41902) fix(seasonal): share one dated window and check it every minute ### 📊 Changes **9 files changed** (+54 additions, -41 deletions) <details> <summary>View changed files</summary> 📝 `e2e/mari-appearance-pack.e2e.ts` (+2 -0) 📝 `packages/client/src/hooks/use-mari-appearance-pack.ts` (+3 -1) 📝 `packages/client/src/hooks/use-seasonal-theme.ts` (+16 -15) 📝 `packages/client/src/lib/mari-work-animations.ts` (+10 -6) 📝 `packages/client/src/lib/seasonal-themes.ts` (+5 -4) 📝 `packages/client/src/localization/locales/en.json` (+1 -1) 📝 `packages/client/src/styles/themes/seasonal-halloween.css` (+3 -2) 📝 `scripts/regressions/mari-appearance-pack.regression.mjs` (+4 -3) 📝 `scripts/regressions/seasonal-themes.regression.ts` (+10 -9) </details> ### 📄 Description Release notes: leave this PR out of the changelog and the What's New text; it is a Halloween surprise. > [!IMPORTANT] > **Release notes: please leave this PR out of `CHANGELOG.md` and the release text**, like #7819. No CHANGELOG line is included on purpose. ## Why The seasonal theme and the dated Professor Mari pack used two different windows (one local day vs. four whole days). They should start and stop together: on at **Oct 30 00:00** and off at **Nov 1 12:00**, device-local time. The theme hook also rounded the clock down to midnight, so a midday cutoff could never fire. ## What changed - `MariSeason` is now `"MM-DD HH:mm"` with `from` inclusive and `to` exclusive. One `HALLOWEEN_SEASON` constant drives both the seasonal theme (`SEASONAL_THEMES`) and the dated pack. - `useMinuteClock()` (in `use-seasonal-theme.ts`) ticks once a minute; the seasonal theme hook and `useMariAppearancePack` both use it, so the window opens and closes on time while the app stays open (previously the pack only re-checked on some other re-render). - Greeting copy: "comes off by itself tomorrow" → "on November 1 at noon" (no translated locale has this key). - Stale comments in the theme stylesheet and hook updated. - Tests: both regressions now pin the new edges (Oct 29 23:59 off, Oct 30 00:00 on, Nov 1 11:59 on, Nov 1 12:00 off, time-zone case moved to the noon edge). The pack e2e seeds the theme greeting as shown, since the greeting modal now also opens on Oct 30. ## Validation - `pnpm check`: passed. - `seasonal-themes.regression.ts`, `mari-appearance-pack.regression.mjs`: passed. - `e2e/mari-appearance-pack.e2e.ts` + `e2e/seasonal-halloween.e2e.ts` (desktop-chromium): 4 passed. - Local CodeRabbit: 2 minor findings, not changed (reasons below). A separate agent review found the midnight-rounding bug and the stale comments; fixed here. ## Manual verification - [ ] Set the system clock to Oct 29 23:59, keep the app open: at Oct 30 00:00 the seasonal theme and the dated pack both appear within a minute. - [ ] Set the clock to Nov 1 11:59, keep the app open: at 12:00 both go away within a minute. - [ ] Inside the window, the greeting text says the costume comes off on November 1 at noon. No linked issue: planned work. @SpicyMarinara ### Local CodeRabbit (2 minor findings, not changed) 1. *Greeting seed year in the e2e*: the test pins its clock to 2026 (`page.clock.setFixedTime`), so the seeded year always matches. 2. *First tick up to 59 s after the boundary*: the old hook had the same minute granularity; a cutoff that lands up to a minute late is fine for this window and keeps the hook simple. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Halloween seasonal themes and the raccoon appearance pack are now available from October 30 through November 1 at noon, based on local time. * Seasonal appearance updates now reflect time-based changes. * **Bug Fixes** * Updated the Halloween greeting to clarify that the costume comes off on November 1 at noon. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-24 04:09:06 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#7951
No description provided.