Repository navigation
Overdue tasks: visible on Home, Plan, nav and app badge - #27
Merged
Merged
Conversation
A task planned for a past day that isn't done (kind other or an open quest) is overdue — computed, never stored, no auto-rollover. It stays visible until the user moves it (Today / Tomorrow / Backlog), finishes it or deletes it. - #lib/overdue.ts: pure rules (isOverdue, display order, ages, selection parsing, appendOrders); server/tasks.ts: listOverdue, taskCounts, rescheduleOverdue (one transaction, only still-overdue tasks, order kept) - Home: Overdue card (desktop/iPad) / one row + bottom sheet (phones) with per-row Today + ⋯ and "All to today" (shared overdueTo form action) - Plan: Overdue group atop the backlog rail (drag onto a day, Today + ⋯), marker on past-day cards, overdue dot in the phone day strip - Nav dot on Home; palette action "Move overdue tasks to today" (POST /api/overdue) - App badge = today's open + overdue tasks (closed quests excluded); root layout data badge / overdueCount (was openToday) - Root layout refreshes all data when the server's day ends (nextDayStart) - --overdue token; en/de strings; unit + e2e tests (overdue.spec.ts) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A task planned for a day that passed without being done used to stay on that past day — Home only lists today and Plan only the current week, so it was only findable through search. Missed tasks are now visible everywhere until you decide what to do with them.
Overdue = planned before today (server
TZ, so right after midnight), not done, and of kind other or of an open quest (closed quests' tasks stay hidden, like their backlog). It is computed, never stored — no migration, no nightly job, no automatic rollover. The planned day changes only through an explicit action: Today · Tomorrow · Backlog · Done (checkbox, the day stays) · Delete.Screenshots
Demo seed data on Sunday, Nov 22 — Monday–Saturday's seed tasks were never done.
Desktop (1600px) — Home
Desktop (1600px) — Plan (board scrolled to the backlog rail)
Phone (iPhone 13) — Home, the overdue sheet, Plan's day strip
Technical notes
#lib/overdue.ts(isOverdue,compareOverdue, age labels viaIntl,parseOverdueSelection,appendOrders); SQL twinoverdueCondition+listOverdue,taskCounts(badge + overdue in one query ontasks_day_idx) andrescheduleOverdue(ids | 'all', day, today)inserver/tasks.ts— one transaction, rows locked, only tasks that are still overdue move, appended to the end of the target day's lists in display order.overdueTo(task-actions.ts, fieldsto+all=1ortaskId…) on Home and Plan;POST /api/overduefor the palette (400 on invalid input). Backlog / Done / Delete reusetoBacklog/toggle/deleteTask.components/tasks/OverdueList.svelte(Home'sOverdueCard, Plan's rail group). Plan rows carry nodata-task(the task may also have a card in the shown week).badge+overdueCount(wasopenToday),today,dayEndsAt(nextDayStartin#lib/dates.ts, DST-safe). Push payloads usebadgeCount()(wasopenTodayCount()).--overdue(a muted--dangermix) for dots, markers and the age text only.plan.spec.ts' drop onto the rail now scrolls its quest group into view first (the new group plus other runs' leftovers could push it below the rail).Test plan
bun run check(0 errors / 0 warnings),bun run test(471 pass),bun run lint,bun run buildbun run test:e2e(desktop: 98 passed) andbun run test:e2e:mobile(iPhone + iPad: 49 passed)overdue.spec.tsandplan.spec.tswith--repeat-each=2rescheduleOverduebreaks the "All to today" order test (fails) — both pass again after revertingnextDayStartis unit-tested incl. both DST switches), the badge on a real iPhone home screen🤖 Generated with Claude Code