From cc1f17769bc96adb112dab61679ab992dc8abfbd Mon Sep 17 00:00:00 2001 From: Chisel Date: Mon, 2 Feb 2026 14:48:16 +0000 Subject: [PATCH 1/3] chore(test): add test for timer behavior on Reset Day --- cypress/e2e/05-timer-behavior.cy.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/cypress/e2e/05-timer-behavior.cy.js b/cypress/e2e/05-timer-behavior.cy.js index d54f510..0ee517f 100644 --- a/cypress/e2e/05-timer-behavior.cy.js +++ b/cypress/e2e/05-timer-behavior.cy.js @@ -44,4 +44,32 @@ describe('Timer Behavior', () => { // Verify timer shows full day countdown cy.get('.timer-display').should('not.have.text', '00:00'); }); + + it('shows the correct timer value when Reset Day is used', () => { + cy.visit('/'); + + cy.get('#settingsDialog').should('be.visible'); + cy.get('#closeSettings').click(); + cy.get('#settingsDialog').should('not.be.visible'); + + // Click Day 1 preset to start the timer and capture its full duration + cy.get('#clocktowerPresets .clocktower-btn') + .first() + .then(($btn) => { + const expectedMinutes = String( + parseInt($btn.attr('data-minutes'), 10) + ).padStart(2, '0'); + const expectedSeconds = String( + parseInt($btn.attr('data-seconds'), 10) + ).padStart(2, '0'); + + cy.get('#clocktowerPresets .clocktower-btn').first().click(); + cy.wait(1000); // Let timer count down briefly + cy.get('#resetBtn').click(); + + // Timer should show the full day value (same as Day 1 preset) + cy.get('#minutes').should('have.text', expectedMinutes); + cy.get('#seconds').should('have.text', expectedSeconds); + }); + }); }); From b37f3e253743ebbcca8b956c1d63aa7016a5f999 Mon Sep 17 00:00:00 2001 From: Chisel Date: Mon, 2 Feb 2026 14:52:10 +0000 Subject: [PATCH 2/3] fix: resolve issue with Reset Day button/behaviour --- script.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/script.js b/script.js index f3fa8ad..0eb9c02 100644 --- a/script.js +++ b/script.js @@ -1573,9 +1573,13 @@ function resetTimer() { wakeUpTimeout = null; } - // Reset to the full day countdown time - const timerValues = calcTimerStartEndValues(playerCount); - timeLeft = timerValues.dayStartValue * 60; // Convert minutes to seconds + // Reset to the full day countdown time (use current day's preset, which includes pace) + const day = currentDay ?? 1; + const presets = generateDayPresets(playerCount); + const preset = presets.find((p) => p.day === day) ?? presets[0]; + timeLeft = preset.minutes * 60 + preset.seconds; + selectedMinutes = preset.minutes; + selectedSeconds = preset.seconds; currentInterval = normalInterval; isRunning = false; // Ensure timer is marked as not running hasReset = true; // Set the reset state From 56a7350b66574eb09e9292b210ca783f4fb75516 Mon Sep 17 00:00:00 2001 From: Chisel Date: Mon, 2 Feb 2026 14:56:49 +0000 Subject: [PATCH 3/3] chore(changelog): update changelog for 1.0.23 --- changelog.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/changelog.js b/changelog.js index 7fcaacd..22264d6 100644 --- a/changelog.js +++ b/changelog.js @@ -1,7 +1,15 @@ // Version tracking -export const APP_VERSION = '1.0.22'; +export const APP_VERSION = '1.0.23'; export const CHANGELOG = { + '1.0.23': { + date: '2026-02-02', + changes: { + improvements: [ + 'Resolve issue with Reset Day showing incorrect timer value', + ], + }, + }, '1.0.22': { date: '2026-02-02', changes: {