Commit graph

19 commits

Author SHA1 Message Date
Johannes Millan
b94b6c4e78 fix(task-repeat-cfg): preserve planned date when converting past-dated task to recurring (#7344)
When an existing task with a past dueDay was converted to a recurring
task, both conversion effects called getFirstRepeatOccurrence with
`new Date()` as the anchor, which silently advanced the first occurrence
to the next future date matching the recurrence pattern — shifting the
task out of the user's planned date without consent.

Anchor on the task's existing dueDay only when it equals cfg.startDate
(the dialog default). If the user overrode startDate, fall back to
today — preserving existing behavior for all other flows.
2026-04-24 17:57:38 +02:00
Johannes Millan
b9d6dc6d86
test(e2e): update Show/hide task panel button label (#7260)
* test(e2e): update Show/hide task panel button label

The TOGGLE_DETAIL_PANEL translation was renamed from "Show/Hide
additional info" to "Show/hide task panel" in dd789d2, but e2e
selectors still referenced the old string, causing every test that
opens the task detail panel to time out.

https://claude.ai/code/session_011mX4Pr24S42svmA5j7fRux

* 18.2.1

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-17 22:19:22 +02:00
Johannes Millan
f528262f8d test(e2e): fix bug-7067 spec to work in production builds
ng.getComponent is dev-mode only and is stripped in production builds,
causing the CI run (which uses ng build + http-server) to fail at the
store-corruption step. Add an IndexedDB fallback (Strategy B) that
injects a corrupt op directly into the SUP_OPS ops store and reloads
the page so the hydrator replays it as a tail op.
2026-04-01 17:57:50 +02:00
Johannes Millan
fc02693287 style: fix prettier formatting errors in e2e tests and nav-item scss
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-01 15:41:14 +02:00
Johannes Millan
de3e374396 fix(task-repeat-cfg): handle invalid startTime from sync/import gracefully (#7067)
Guard all getDateTimeFromClockString() call sites that receive
repeatCfg.startTime with isValidSplitTime(), preventing "Invalid clock
string" crashes when corrupt data arrives via sync or import.

- get-task-repeat-info-text.util.ts: fall back to no-time display
- task-repeat-cfg.effects.ts: filter/skip invalid startTime in all effects
- create-sorted-blocker-blocks.ts: devError + skip instead of throw
- planner.selectors.ts: devError for corrupt case, silent skip for missing
- is-valid-split-time.ts: narrow return type to v is string type guard
2026-04-01 15:41:14 +02:00
Johannes Millan
821896496b test(e2e): add day-change sync convergence test (#6992) and fix lint
Add supersync E2E test for day-change overdue sync race condition.
Fix prettier/lint issues in repeat task first occurrence spec.
2026-03-29 19:57:10 +02:00
Johannes Millan
76cf9dcb3c test(e2e): add regression test for repeat task first occurrence (#5594)
Verifies that creating a weekly Mon/Wed/Fri repeat on a Saturday
schedules the task for Monday (not today), and that daily repeats
correctly keep the task in Today.
2026-03-29 19:57:10 +02:00
Johannes Millan
1e49f7d1ce test(e2e): add reproduction test and diagnostic logging for #6230
Add e2e test verifying the day-change trigger correctly creates new
repeat task instances when midnight passes. Uses Playwright clock
manipulation (setFixedTime) to control Date.now() while keeping real
timers running.

Document a known intra-day gap in TaskDueEffects: once addAllDueToday()
fires for today (via distinctUntilChanged on todayDateStr$), there is no
retry mechanism within the same day. Investigation verified day-change
trigger, sync buffering, and data loading guards all work correctly in
isolation — the exact real-world trigger remains unidentified.

Add diagnostic logging in addAllDueToday() to help users reproduce and
identify the failure point (repeat config count + IDs, sync window state).
2026-03-26 17:43:03 +01:00
Johannes Millan
a578cbfa86 test(e2e): fix recurring task tests failing in CI production builds
Replace window.ng.getComponent() calls with UI-based interactions.
Angular debug APIs are unavailable in production builds (CI uses
ng build which defaults to production config with enableProdMode).

- Use calendar picker instead of signal manipulation for date setting
- Remove page.evaluate() model verification (input value checks suffice)
- Replace waitForTimeout with proper toBeVisible/toBeEnabled waits
- Fix date input focus issues with click + pressSequentially
- Use en-GB date format (DD/MM/YYYY) matching app default locale
2026-03-19 12:15:47 +01:00
Johannes Millan
fc70665861
Fix recurring task tests and update GitHub Actions output syntax (#6871)
* fix(ci): replace deprecated set-output and fix E2E test failures

- Replace deprecated `::set-output` with `$GITHUB_OUTPUT` in all
  workflow files (build.yml, ci.yml, build-android.yml, manual-build.yml)
- Fix recurring-start-date-epoch-bug-6860 E2E test: use en-GB date
  format (DD/MM/YYYY) instead of US format since app defaults to en-GB
- Fix recurring-future-start-date-bug-6856 E2E test: wait for Save
  button to be enabled, increase persistence wait, and fix
  reload/navigation ordering for more reliable state verification

https://claude.ai/code/session_01JovQ5nVMSVQXUBFVknZtSm

* fix(ci): replace deprecated set-output in remaining workflow files

Fix 3 additional workflow files that still used the deprecated
::set-output syntax: build-create-windows-store-on-release.yml,
build-publish-to-mac-store-on-release.yml, and
build-update-web-app-on-release.yml.

https://claude.ai/code/session_01JovQ5nVMSVQXUBFVknZtSm

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-19 01:42:57 +01:00
Johannes Millan
b7e369d512 fix(recurring): prevent start date from reverting to 1970-01-01 (#6860)
When FormlyDatePickerComponent bound [min]="props.min" with an
undefined value, Angular overrode the signal input default, causing
DatePickerInputComponent.validateDate() to compare against Invalid
Date. Every date failed validation, emitting null, which the formly
parser getDbDateStr(null) converted to '1970-01-01' (Unix epoch).

Fix at three layers:
- FormlyDatePickerComponent: use ?? fallbacks so undefined never
  reaches the signal inputs
- DatePickerInputComponent.validateDate(): handle undefined/invalid
  min/max with nullish checks and isNaN guards
- Formly parser: only convert Date objects via getDbDateStr, pass
  null/string values through for the required validator to handle

Also extract shared DATE_PICKER_MIN/MAX_DEFAULT constants and widen
signal input types to include undefined for type-honest code.
2026-03-18 13:14:10 +01:00
Johannes Millan
f3585b5dc1 test(e2e): fix recurring future-start-date and supersync encryption tests
- Rewrite recurring-future-start-date test to set startDate via the
  repeat dialog's model signal instead of the broken schedule-dialog
  approach (mat-datepicker signals don't work from page.evaluate)
- Fix supersync encryption password-change test by clicking syncBtn
  directly instead of triggerSync() which throws on error state before
  the async decrypt dialog renders
2026-03-18 13:14:10 +01:00
Johannes Millan
1b12484c1e fix(recurring): schedule task for start date when made recurring with future date
When making a task recurring with a future start date, set dueDay
immediately so the task no longer appears in today's view (#6856).
2026-03-17 13:59:40 +01:00
Johannes Millan
1a0e38fb17 test(e2e): use correct route /#/tag/TODAY/tasks instead of /#/tag/TODAY
The deadlines feature commit accidentally reverted e2e URL fixes.
The route /#/tag/TODAY has no default child component — only
/#/tag/TODAY/tasks renders the work view with task-list.
2026-03-15 18:48:00 +01:00
Johannes Millan
d401e6169e feat(tasks): add deadlines feature with reminders and planner integration
Add deadline support for tasks with date-only and time-specific deadlines.

Core:
- Add deadlineDay, deadlineWithTime, deadlineRemindAt fields to task model
- Add NgRx actions (setDeadline, removeDeadline, clearDeadlineReminder)
- Add meta-reducer with mutual exclusivity and input validation
- Register deadline actions in ActionType enum and op-log codes

UI:
- Create deadline dialog with calendar, time input, and reminder options
- Add deadline badge to task list row with overdue warning color
- Add deadline item to task detail panel with flag icon
- Add deadline options to task context menu
- Show deadlines in scheduled list page

Reminders:
- Add deadline reminder effects and selectors
- Show reminder dialog with grouped deadline/schedule sections
- Handle deadline reminder clearing on dismiss, done, add-to-today
- Cancel Android native deadline notifications on delete/archive

Planner:
- Show deadline tasks in planner day view and overdue section
- Create dedicated planner-deadline-task component
- Optimize deadline grouping with O(N) single-pass selector

Other:
- Add deadline-today banner effect for unplanned deadline tasks
- Add translation keys for all deadline UI strings
- Add E2E tests for deadline reminder flows
- Add unit tests for deadline reducer and overdue utility
- Extract shared isDeadlineOverdue utility function
- Guard app-state selectors against undefined during teardown
2026-03-15 18:48:00 +01:00
Johannes Millan
da6d70bae5 fix(recurring): preserve due date when selecting quick setting (#6766)
Selecting a monthly/yearly quick setting overwrote startDate with
today's date because the change callback called getQuickSettingUpdates
without a reference date. Now passes the model's current startDate.
Also adds dueWithTime fallback in _getReferenceDate().
2026-03-15 16:47:52 +01:00
Johannes Millan
80c178cf03 test(e2e): use correct route /#/tag/TODAY/tasks instead of /#/tag/TODAY
The route /#/tag/TODAY has no default child component — only sub-routes
like /worklog, /quick-history render content. The /tasks route is defined
as a separate eagerly-loaded route, not as a child of /tag/:id. Navigating
to /#/tag/TODAY leaves an empty router-outlet, causing 6 test failures
and 1 flaky test.
2026-03-13 19:33:17 +01:00
Johannes Millan
0414b74365 fix(repeat): add event loop yield and isPaused filter (#5976)
Add potential fix for repeat tasks not appearing in Today view:
- Add event loop yield after creating repeat tasks to ensure store
  processes dispatched actions before querying
- Add isPaused filter to selectors to exclude paused repeat configs
- Add unit tests for isPaused filter
- Add E2E test for regression protection

Note: We're not 100% certain the event loop yield fixes #5976, but it
follows the established pattern used elsewhere in the codebase.
2026-01-13 18:26:45 +01:00
Johannes Millan
1f3856a22c test(e2e): add comprehensive E2E test coverage for core features
Add 11 new E2E test suites covering previously untested features:
- Tags CRUD (create, assign, remove, delete)
- Notes CRUD (create, edit, delete in projects)
- Recurring/scheduled tasks (short syntax, context menu)
- Context switching (project/tag navigation)
- Boards/Kanban view (navigation, display)
- Finish day workflow (complete daily flow)
- Worklog (time tracking history)
- Global search (keyboard, autocomplete)
- Settings (navigation, sections, form elements)
- Keyboard shortcuts (navigation, escape)
- Take-a-break (settings page verification)

Also fix flaky plugin-loading test by adding retry mechanism
and proper waits between enable/disable operations.
2026-01-12 15:11:27 +01:00