mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-17 16:37:43 +00:00
* fix(task): schedule overdue tasks for today via Shift+T and guard stale task focus (#8851) * fix(planner): only bind data-task-id on planner-task when focusable The unconditional data-task-id host binding broke the e2e done-confirmation strategy in e2e/pages/task.page.ts, which selects its wait branch based on the attribute's presence. Boards render planner-task cards without an inner <task> element, so the id-based wait could never resolve (#8851). * refactor(tasks): share overdue predicate across selector and util The rebase onto #8858 re-inlined the overdue comparison into selectOverdueTaskIds and dropped the delegation to isTaskOverdue, so the two overdue definitions (the overdue list vs. the Shift+T "Add to Today" path) were duplicated and free to drift — the exact footgun #8851 set out to avoid, and the util's JSDoc still claimed the selector delegated to it. Extract isTaskOverdueByThreshold as the single source of truth for the comparison and getLogicalTodayStartMs for the boundary. isTaskOverdue and selectOverdueTaskIds both route through it, so they cannot drift. The selector still computes the threshold once per recompute (no per-task date parsing), preserving #8858's perf posture. No behavior change. * test(e2e): base markTaskAsDone strategy on <task> host, not attr planner-task now carries data-task-id in the Planner overdue list (#8851), so keying the done-confirmation strategy off data-task-id presence would send a wrapper down the <task> path — document.querySelectorAll('task') finds no match and the wait hangs 10s. Key it off the element actually being a <task> instead. No behavior change for real <task> rows; every wrapper keeps the 300ms wrapper path. Verified: worklog-basic (real task) and boards #7498 (planner-task wrapper) both pass. --------- Co-authored-by: Johannes Millan <johannes.millan@gmail.com> |
||
|---|---|---|
| .. | ||
| base.page.ts | ||
| dialog.page.ts | ||
| import.page.ts | ||
| index.ts | ||
| note.page.ts | ||
| planner.page.ts | ||
| project.page.ts | ||
| schedule.page.ts | ||
| settings.page.ts | ||
| side-nav.page.ts | ||
| supersync.page.ts | ||
| sync.page.ts | ||
| tag.page.ts | ||
| task.page.ts | ||
| work-view.page.ts | ||