Skip to content

Fix deadline auto-pin overriding user intent#50

Merged
sohamM97 merged 5 commits intomainfrom
bugfix/deadline-autopin-override
Mar 21, 2026
Merged

Fix deadline auto-pin overriding user intent#50
sohamM97 merged 5 commits intomainfrom
bugfix/deadline-autopin-override

Conversation

@sohamM97
Copy link
Copy Markdown
Owner

Summary

  • Bug: Deadline tasks were force-pinned on every reload/refresh/tab switch (10-15 pins accumulating), ignoring user unpins
  • Fix: Remove auto-pin from _reloadFromDb, _refreshTodaysTasks, and _generateNewSet — auto-pin now only happens when explicitly setting a deadline from All Tasks via Schedule dialog
  • Race condition fix: Pin DB write now happens before updateTaskDeadline (which triggers notifyListenersrefreshSnapshots_persist, which was overwriting the pin)
  • Suppression tracking: New todays_five_deadline_suppressed table (v23 migration) tracks user unpins so deadline tasks aren't re-pinned across reloads
  • Bottom sheet overflow: SingleChildScrollView wrap in task card bottom sheet
  • Skill renames: /add-tests/add-auto-tests, /test-all/test-suite

Test plan

  • 6 new DB tests for suppression methods (suppress/unsuppress/get/idempotent/cross-date/deleteAll)
  • 4 new widget tests for deadline auto-pin override (unpinned stays unpinned, generate doesn't re-pin, suppression cleared on re-pin, re-pin persists)
  • Full test suite passes
  • Manual: no runaway pinning on tab switch / app restart
  • Manual: deadline pin from All Tasks shows in Today's 5
  • Manual: unpin deadline task → stays unpinned across navigation

🤖 Generated with Claude Code

Soham Marik and others added 3 commits March 21, 2026 11:01
- Remove all auto-pin from reload, refresh, and "New set" paths
- Auto-pin only on first generation of the day (weight boost) and
  setting a deadline from All Tasks (direct pin via pinNewTask)
- New DB table todays_five_deadline_suppressed (v23) tracks blocked pins
- Immediate pin from _editSchedule with accurate snackbar messages
- Fix isLeaf check (was using provider.tasks instead of DB query)
- Fix bottom sheet overflow (SingleChildScrollView)
- Enforce maxPins cap in all remaining auto-pin paths
- Update manual-test skill rules and tests

Pending: manual testing on device (see memory/wip_deadline_autopin.md)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pin DB write now happens before updateTaskDeadline (which triggers
notifyListeners → refreshSnapshots → _persist, overwriting the pin).
Also rename /add-tests → /add-auto-tests and /test-all → /test-suite
for clarity alongside /manual-test.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6 tests covering suppressDeadlineAutoPin, unsuppressDeadlineAutoPin,
getDeadlineSuppressedIds: idempotent insert, per-date isolation,
unsuppress, empty for unknown date, cleared by deleteAllLocalData.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Soham Marik and others added 2 commits March 21, 2026 13:19
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ppression rows

Suppression DB writes in _togglePinFromSheet now have .catchError to surface
failures in debug mode. Added purgeOldDeadlineSuppressed to clean up rows
from past dates on each load, preventing unbounded table growth.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sohamM97 sohamM97 merged commit 017c941 into main Mar 21, 2026
1 check passed
@sohamM97 sohamM97 deleted the bugfix/deadline-autopin-override branch March 21, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant