Skip to content

Show recently visited tasks first in Ctrl+P picker#367

Merged
bborn merged 1 commit intomainfrom
task/954-ctrl-pp-picker-should-show-the-most-rece
Feb 4, 2026
Merged

Show recently visited tasks first in Ctrl+P picker#367
bborn merged 1 commit intomainfrom
task/954-ctrl-pp-picker-should-show-the-most-rece

Conversation

@bborn
Copy link
Owner

@bborn bborn commented Feb 4, 2026

Summary

  • When opening the task picker dialog with Ctrl+P, tasks are now sorted by when they were last accessed
  • Recently accessed tasks appear first, making it easier to quickly switch between tasks you're actively working on
  • Tasks that have never been accessed fall back to sorting by creation date (newest first)

Changes

  • Added LastAccessedAt field to Task struct to track when tasks are opened in the UI
  • Updated loadTaskWithOptions to record access time asynchronously when a task is loaded
  • Modified command palette's filterTasks to sort by last_accessed_at when no search query is entered
  • Added database migration for the new last_accessed_at column
  • Added comprehensive tests for the new sorting behavior

Test plan

  • Unit tests pass for new sorting logic
  • All existing tests continue to pass
  • Manual testing: Open Ctrl+P picker, verify tasks are sorted by recency
  • Manual testing: Select a task, close detail view, reopen picker, verify selected task is now first

🤖 Generated with Claude Code

When opening the task picker dialog with Ctrl+P, tasks are now sorted by
when they were last accessed rather than a static order. This makes it
easier to quickly switch between tasks you're actively working on.

Changes:
- Add `LastAccessedAt` field to Task struct to track when tasks are opened
- Update task load function to record access time asynchronously
- Sort command palette by last_accessed_at when no search query is entered
- Tasks that have been accessed appear before those that haven't
- Fall back to created_at for tasks that have never been accessed
- Add database migration for the new column
- Add comprehensive tests for the new sorting behavior

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bborn bborn merged commit 60a4810 into main Feb 4, 2026
3 checks passed
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