super-productivity/src
afonso-resendes 916fe188c8
Fix #5461: Task dates with delayed start-of-day (#7503)
* Fix #5461: Task dates with delayed start-of-day

Fixes incorrect behavior after midnight when start-of-next-day is set

(e.g. 3 AM). Time between midnight and that hour maps to

the correct logical day.

* test(add-task-bar): mock getLogicalTodayDate for #5461

* test(date): address PR review for #5461

Treat out-of-range start-of-next-day hours as 0.

Add logical-tomorrow tests with non-zero offset.

* test: address optional PR review nits for #5461

* test(add-task-bar): drop redundant mocks from logical-today display test

Mirror the simplification already applied to the logical-tomorrow test:
dateDisplay() only reads getLogicalTodayDate(), so the todayStr /
getStartOfNextDayDiffMs / Date.now stubs were circular and would let the
test pass even if dateDisplay stopped honoring the offset.

* test(add-task-bar): cover offset-aware today for repeat-preset tasks

The repeat-preset dueDay and repeat-config startDate paths (added for #5461)
had no behavioral coverage — reverting either to getDbDateStr() left all
specs green. Add two tests that mock todayStr() to a fixed past date and
assert addTask() forwards it to taskData.dueDay and the repeat-cfg startDate,
so a regression to calendar-midnight is caught.

---------

Co-authored-by: Johannes Millan <johannes.millan@gmail.com>
2026-06-01 14:20:15 +02:00
..
app Fix #5461: Task dates with delayed start-of-day (#7503) 2026-06-01 14:20:15 +02:00
assets feat(caldav): make VTODO poll interval configurable (#7881) 2026-06-01 13:19:55 +02:00
environments 18.8.0 2026-05-30 01:19:30 +02:00
static fix(security): harden XSS sinks and add Origin check (#7413) 2026-05-06 21:37:06 +02:00
styles Experiment right side action bar (#7594) 2026-05-23 16:11:37 +02:00
test-helpers build: improve testing setup to give indication about which test hangs 2025-07-18 12:11:05 +02:00
typings refactor: improve typing 2025-09-16 18:04:40 +02:00
_common.scss refactor: modernize scss syntax and get rid of most of the warnings 2025-09-04 20:29:24 +02:00
favicon.ico
hammer-config.class.ts feat: replace hammerjs with custom swipe and pan directives 2025-08-10 12:56:11 +02:00
index.html fix(splash): keep productivity-tip heading readable on dark theme 2026-04-21 21:50:52 +02:00
karma.conf.js test: restore karma coverage reporter setup 2026-04-24 17:40:28 +02:00
main.ts fix(i18n): boot with bundled English when translation fetch fails offline (#7854) (#7875) 2026-06-01 13:15:33 +02:00
manifest.json
polyfills.ts fix(schedule): indicate tasks beyond available time 2026-05-11 14:30:55 +02:00
styles.scss fix(styles): use package imports for fontsource instead of relative paths 2026-03-18 13:14:10 +01:00
test.ts test(op-log): restore connection-lifecycle assertions under fake-indexeddb 2026-05-27 00:39:57 +02:00
tsconfig.app.json fix(build): exclude test helpers from production build 2026-02-25 16:46:51 +01:00
tsconfig.spec.json feat(sync): add OneDrive sync provider with PKCE auth (#7523) 2026-05-26 15:31:06 +02:00
tsconfig.worker.json build: update configuration files 2025-06-27 10:25:00 +02:00