Tasks silently disappear after 7 days — no opt-out, no indicator
Problem
Action items (tasks) silently vanish from the Tasks page after 7 days. Users report tasks they previously saw are no longer visible, with no indication items are being hidden.
User impact: A real user (an affected user) has 100+ action items in the DB but can only see ~37 in the app. The other 63 are silently filtered out.
Root Cause
action_items_page.dart:216-221 applies a hard-coded 7-day cutoff in _categorizeItems():
if (!showCompleted) {
if (item.dueAt != null) {
if (item.dueAt!.isBefore(sevenDaysAgo)) continue; // silently dropped
} else {
if (item.createdAt != null && item.createdAt!.isBefore(sevenDaysAgo)) continue;
}
}
- Items with
due_atolder than 7 days → hidden - Items with no
due_atandcreated_atolder than 7 days → hidden - No UI indicator that items are being filtered
- No "show all" or "show hidden" option — date-range filter methods exist in the provider (
setDateRangeFilter,clearDateRangeFilter) but have zero call sites in the app
Evidence
From prod API data for the affected user:
- 19 items have
due_atin 2025 (see #TBD — separate agent bug) → never visible - 44 items have correct but old
due_at(Jan–early Feb 2026) → visible when fresh, silently disappeared - 27 items have
due_at: null→ always visible - Items like "merge youtube history" (due Feb 6) were visible until ~Feb 13, then silently dropped
- Items like "record shark tank before Bex leaving" (due Feb 11) are still visible but will disappear ~Feb 18
Validated By
Codex (gpt-5.3) independently confirmed:
- The 7-day filter exists at the cited lines
- No hidden-items indicator exists in the page
- The completed-view toggle bypasses the filter, but there's no equivalent for the time filter
todoItems/snoozedItemsgetters in the provider are dead code (page usesprovider.actionItemsdirectly)
Proposed Fix
Option A (minimal): Add "N overdue tasks hidden" indicator with a tap-to-reveal toggle
Option B (better): Replace hard 7-day cutoff with an "Overdue" section at the bottom of the task list that shows old items in a collapsed state
Option C (full): Wire up the existing setDateRangeFilter/clearDateRangeFilter provider methods to a UI date picker, giving users full control over which items are visible
Related: #4841 (agent creates items with past due dates). These two bugs compound — #4841 creates items that #4840's filter permanently hides.
Add a Overdue section and show those tasks there!
Implementation guidance
No PR exists for this yet. Here's the proposed fix:
File: app/lib/pages/action_items/action_items_page.dart
Option A (recommended): Replace hard cutoff with "Overdue" section
- Remove the 7-day silent drop at lines 216-221
- Add an "Overdue" category in
_categorizeItems()for items past due date - Show overdue items in a collapsible section (collapsed by default)
- This preserves the clean UI while making items discoverable
Option B (simpler): Wire up existing date range filter
- The provider already has
setDateRangeFilter()andclearDateRangeFilter()with zero call sites - Add a "Show all" toggle or date picker to the Tasks page header
- This uses existing code but is less discoverable
Also needed (for both options):
- Items with
due_at = nullshould default tocreated_atfor sorting, not be hidden - Items with past
due_atfrom #4841 should become visible once the filter is fixed
Acceptance criteria:
- All 100+ items for the affected user become visible (not just 37)
- Overdue items are clearly labeled, not mixed with current items
- No silent dropping — every item the user created should be reachable