super-productivity/docs
Johannes Millan 03572c3f2c
Feat/start of next day (#6565)
* feat: add label to heatmap for repeat task

* style(e2e): fix prettier formatting in planner spec

* fix(focus-mode): clear stale _isResumingBreak flag when isPauseTrackingDuringBreak is enabled (#6534)

When both isSyncSessionWithTracking and isPauseTrackingDuringBreak are
enabled, pausing and resuming a break left _isResumingBreak stale,
causing the next manual tracking start to dispatch clearResumingBreakFlag
instead of skipBreak. Refactor syncSessionResumeToTracking$ to explicitly
dispatch clearResumingBreakFlag in this case.

* refactor(sync): unify JWT expiry to 365 days for all auth methods

Replace separate JWT_EXPIRY_MAGIC_LINK (365d) and JWT_EXPIRY_PASSKEY (7d)
constants with a single JWT_EXPIRY (365d). The auth method only matters
during login — once a JWT is issued, it represents a verified session
regardless of how the user authenticated.

* feat(start-of-next-day): respect startOfNextDayDiff offset in today view

Thread startOfNextDayDiffMs through AppState, selectors, meta-reducers,
and task component so that "today" membership correctly accounts for the
user's configured day-start offset. When startOfNextDay=4 (4 AM), at
2:30 AM the app now correctly treats the previous calendar day as "today".

- Add isTodayWithOffset utility for offset-aware date comparison
- Store startOfNextDayDiffMs in AppState alongside todayStr
- Update all selectors (work-context, planner, task, overdue) to use offset
- Update meta-reducers with defensive fallbacks for state access
- Fix task component computed signals (isOverdue, isScheduledToday, etc.)
- Add 48 new tests covering offset boundary conditions

* style(planner): remove unused eslint-disable directive

* fix(start-of-next-day): use offset-aware date in ensureTasksDueTodayInTodayTag effect

Replace raw getDbDateStr() and getDateRangeForDay(Date.now()) with
store-derived todayStr and offset-adjusted range in task-due.effects.ts.
Without this, the effect would use the wrong day between midnight and
the configured startOfNextDay hour.

Also add selectOverdueTasks offset boundary tests.

* refactor(start-of-next-day): use DateService for offset-aware today checks

Add DateService.isToday() method that encapsulates the startOfNextDayDiff
offset logic, replacing scattered isToday()/getDbDateStr() calls across
effects, services, and components.

- Add isToday(date) to DateService for DRY offset-aware checks
- Fix task-repeat-cfg.effects.ts: 6 isToday/getDbDateStr calls
- Fix task-repeat-cfg.service.ts: isToday call
- Fix task-context-menu-inner.component.ts: 6 isToday/getDbDateStr calls
- Fix task-related-model.effects.ts: getDbDateStr call
- Fix work-context.service.ts: getDbDateStr call
- Remove duplicate planTaskForDay handler from tag.reducer.ts
  (already handled by planner-shared meta-reducer with offset)

* refactor(start-of-next-day): migrate remaining isToday() calls to offset-aware DateService

Replace 6 call sites still using the non-offset isToday()/isYesterday()
with DateService methods that respect startOfNextDayDiff. Also adds
isYesterday() to DateService and uses isTodayWithOffset in legacy backup
migration. Behavior is identical at offset=0 (default).

* fix(start-of-next-day): fix offset bugs, sync regression, and code quality issues

- Fix wrong config path in legacy backup migration (misc.startOfNextDay)
- Restore sync readiness check (filter+first instead of take(1))
- Restore SYNC_AFTER_ENABLE in setInitialSyncDone conditions
- Use offset-aware dates in addAllDueToday/addAllDueTomorrow
- Make isSameDay offset-aware and pass offset through planner selectors
- Fix TagSettingsPageComponent selector from 'project-settings' to 'tag-settings'
- Hide settings link for virtual TODAY tag
- Revert direct ru.json edits (only en.json should be edited)
- Add standalone:true and use takeUntilDestroyed in settings components
- Restore Math.max(duration,1) for zero-duration overlap detection
- Remove dead code, stale CSS, and commented-out HTML
- Add input validation clamping in DateService.setStartOfNextDayDiff

* fix(start-of-next-day): fix offset bugs in overdue detection, planner display, and LWW sync

- Fix isOverdue ignoring offset for dueWithTime tasks in task.component
- Remove duplicate moveBeforeTask handler from tag.reducer (handled by meta-reducer)
- Add skip(1) and hydration guard to setTodayStr$ effect to prevent race condition
- Move side effects from map() to tap() in global-config.effects
- Fix isSameDay double-offset bug in planner.selectors for scheduled tasks/events
- Replace unsafe `as any` casts with proper PlannerState types
- Use safe optional chaining for todayStr access in meta-reducers
- Refactor handlePlanTaskForDay to use helper functions with hasChanges optimization
- Extend syncTodayTagTaskIds in LWW meta-reducer to handle dueWithTime changes
- Fix absolute import path in global-config.effects
- Add @deprecated to isToday() in favor of offset-aware alternatives

* fix(config): migrate task dueDays when startOfNextDay offset changes

When the "start of next day" offset changes and causes todayStr to shift,
existing tasks with dueDay matching the old todayStr are now migrated to
the new todayStr so they remain classified as "today" tasks.

* refactor(config): use switchMap and document archive task exclusion

Replace mergeMap with switchMap in setStartOfNextDayDiffOnChange
effect to better communicate intent (only latest emission matters).
Add comment clarifying archived tasks are intentionally excluded
from dueDay migration.

* test(sync): add LWW tests for dueWithTime → TODAY_TAG sync

Cover the dueWithTime path in syncTodayTagTaskIds that was added
but had no test coverage. Tests verify TODAY_TAG membership updates
when dueWithTime changes via LWW sync.
2026-02-21 12:47:19 +01:00
..
long-term-plans fix(sync): prevent double-encryption of snapshot state in file-based adapter 2026-02-15 11:19:22 +01:00
promotion build: better organize stuff 2025-06-27 09:03:16 +02:00
research docs: Add recurring events research and implementation plan (#6375) 2026-02-05 15:32:44 +01:00
screens build: better organize stuff 2025-06-27 09:03:16 +02:00
sync-and-op-log fix(sync): add vector clock pruning to compaction and update docs 2026-02-15 11:19:22 +01:00
wiki Feat/start of next day (#6565) 2026-02-21 12:47:19 +01:00
add-new-integration.md docs: add comprehensive guide for creating new issue tracker integrations 2025-03-07 16:11:10 +01:00
build-and-publish-notes.md feat(build): add SignPath code signing integration for Windows 2026-01-23 14:31:24 +01:00
ENV_SETUP.md build: final approach 2025-07-14 20:52:51 +02:00
github-access-token-instructions.md docs: make token docs work better 2025-01-11 14:45:24 +01:00
gitlab-access-token-instructions.md build: update links to match our new organization 2026-01-05 14:45:06 +01:00
how-to-rate.md docs: add iOS App Store section to how-to-rate guide 2026-02-17 18:19:20 +01:00
howto-refresh-snap-credentials.md docs: add info to refresh snap credentials 2024-02-16 17:01:49 +01:00
i18n-script-usage.md feat(tools): enhance translation management script (#6171) 2026-01-25 18:08:06 +01:00
legacy-webview-analysis.md 16.2.1 2025-11-01 13:22:58 +01:00
mac-app-store-code-signing-guide.md build: update links to match our new organization 2026-01-05 14:45:06 +01:00
performance-project-tag-report.md docs: add performance report 2025-11-13 18:23:50 +01:00
plugin-development.md Feat/plugin UI kit (#6362) 2026-02-04 18:18:22 +01:00
TRANSLATING.md feat(tools): enhance translation management script (#6171) 2026-01-25 18:08:06 +01:00
unused-translations-analysis.md chore(i18n): remove additional 86 orphan translation keys 2026-01-09 14:59:05 +01:00
update-android-app.md docs: update instructions on how to release android 2025-03-09 13:16:23 +01:00
update-mac-certificates.md build: make mas build work and fix guide 2025-11-09 16:35:09 +01:00