super-productivity/docs/wiki
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
..
assets docs(wiki): initial revision (v0.1) 2026-01-20 03:04:08 -08:00
0.-Meta-Diataxis.md docs(wiki) v0.2: refactor and populate meta notes (#6134) 2026-01-24 21:14:29 +01:00
0.00-Wiki-Structure-and-Organization.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
0.01-Style-Guide.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
0.02-Wiki-QA-and-Maintenance.md docs(wiki) v0.2: refactor and populate meta notes (#6134) 2026-01-24 21:14:29 +01:00
1.00-Quickstarts.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
1.01-First-Steps.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
1.02-Configure-Data-Synchronization.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.00-How_To.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.01-Downloads and Install.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.02-Restore-Data-From-Backup.md docs(wiki): lint headings and lists 2026-02-16 16:23:32 +01:00
2.03-Add-Tasks.md docs(wiki): lint headings and lists 2026-02-16 16:23:32 +01:00
2.04-Manage-Subtasks.md docs(wiki): lint headings and lists 2026-02-16 16:23:32 +01:00
2.05-Manage-Scheduled-Tasks.md docs(wiki): lint headings and lists 2026-02-16 16:23:32 +01:00
2.06-Manage-Repeating-Tasks.md docs(wiki): lint headings and lists 2026-02-16 16:23:32 +01:00
2.07-Manage-Task-Integrations.md docs(wiki): lint headings and lists 2026-02-16 16:23:32 +01:00
2.08-Choose-Sync-Backend.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.09-Configure-Sync-Backend.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.10-Configure-Obsidian-for-Wiki-Contributions.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.11-Run-the-Development-Server.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.12-Package-the-App.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.13-Run-with-Docker.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.14-Build-for-Android.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.15-Develop-a-Plugin.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.16-Set-Up-Development-Environment.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.17-Add-a-New-Issue-Integration.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
2.18-Contribute-Translations.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
3.00-Reference.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
3.01-API.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
3.02-Settings-and-Preferences.md docs/wiki content v0.4 (#6257) 2026-01-29 17:35:38 +01:00
3.03-Keyboard-Shortcuts.md docs(wiki): lint style 2026-02-04 14:45:00 +01:00
3.04-Short-Syntax.md docs/wiki content v0.4 (#6257) 2026-01-29 17:35:38 +01:00
3.05-Web-App-vs-Desktop.md docs(wiki): lint style 2026-02-04 14:45:00 +01:00
3.06-User-Data.md Feat/plugin UI kit (#6362) 2026-02-04 18:18:22 +01:00
3.07-Issue-Integration-Comparison.md docs(wiki): clarify differences between iCal and CalDAV 2026-02-16 16:23:32 +01:00
3.08-Sync-Integration-Comparison.md docs(wiki): lint style 2026-02-04 14:45:00 +01:00
3.09-Theming.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
3.97-Obsidian-Linter-Config-MD.md docs/wiki content v0.4 (#6257) 2026-01-29 17:35:38 +01:00
3.98-Obsidian-Linter-Config-YAML.md docs/wiki content v0.4 (#6257) 2026-01-29 17:35:38 +01:00
3.99-Other.md docs(wiki) v0.2: refactor and populate meta notes (#6134) 2026-01-24 21:14:29 +01:00
4.00-Concepts.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
4.01-The-Today-View.md docs(wiki): normalize tables and rework ToC 2026-02-04 14:45:00 +01:00
4.02-Inbox-View.md docs/wiki content v0.3 (#6231) 2026-01-28 16:11:22 +01:00
4.03-Planner-View.md docs(wiki): normalize tables and rework ToC 2026-02-04 14:45:00 +01:00
4.04-Schedule-View.md docs(wiki): add Repeating Tasks section and update references across multiple documents 2026-02-04 14:45:00 +01:00
4.05-Board-View.md docs(wiki): normalize tables and rework ToC 2026-02-04 14:45:00 +01:00
4.06-Project-View.md docs(wiki): normalize tables and rework ToC 2026-02-04 14:45:00 +01:00
4.07-Tag-View.md docs(wiki): normalize tables and rework ToC 2026-02-04 14:45:00 +01:00
4.07a-Tags_Eat-the-Frog.md docs/wiki content v0.3 (#6231) 2026-01-28 16:11:22 +01:00
4.07b-Tags_Ordinal-Priorities.md docs/wiki content v0.3 (#6231) 2026-01-28 16:11:22 +01:00
4.08-Time-Estimates.md docs(wiki): add How Time Is Logged section 2026-02-04 14:45:00 +01:00
4.09-Task-Attributes.md docs(wiki): substantial addition of integrations (issue and sync) 2026-02-04 14:45:00 +01:00
4.10-Task-Notes.md docs(wiki): add Task Notes 2026-02-04 14:45:00 +01:00
4.11-Subtasks.md docs(wiki): add Repeating Tasks section and update references across multiple documents 2026-02-04 14:45:00 +01:00
4.12-Scheduled-Tasks.md docs(wiki): added Scheduled Tasks; updated references in multiple sections 2026-02-04 14:45:00 +01:00
4.13-Repeating-Tasks.md docs(wiki): lint style 2026-02-04 14:45:00 +01:00
4.14-How-Time-Is-Logged.md docs(wiki): lint style 2026-02-04 14:45:00 +01:00
4.15-Timers-and-Focus-Mode.md docs(wiki): lint style 2026-02-04 14:45:00 +01:00
4.16-Break-Reminders.md docs(wiki): add Reminders and Idle Time 2026-02-04 14:45:00 +01:00
4.17-Idle-Time.md docs(wiki): lint style 2026-02-04 14:45:00 +01:00
4.18-Reflection.md docs(wiki): add Metrics 2026-02-04 14:45:00 +01:00
4.19-Metrics.md docs(wiki): add Metrics 2026-02-04 14:45:00 +01:00
4.20-Task-Archiving.md docs(wiki): add Task Archiving section and update references across multiple documents 2026-02-04 14:45:00 +01:00
4.21-Worklog.md docs(wiki): add new notes for Quick History and Worklog 2026-02-04 14:45:00 +01:00
4.22-Quick-History.md docs(wiki): normalize tables and rework ToC 2026-02-04 14:45:00 +01:00
4.23-Managing-Your-Data.md docs(wiki): substantial addition of integrations (issue and sync) 2026-02-04 14:45:00 +01:00
4.24-Integrations.md Feat/start of next day (#6565) 2026-02-21 12:47:19 +01:00
_Footer.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
_Sidebar.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00
Home.md docs/wiki content v0.7 (#6568) 2026-02-20 21:13:38 +01:00