Overview
Tasks appear as a card on your new tab page, displaying your todo items with completion tracking. The interface supports both mouse and keyboard interactions for quick task management.Key Capabilities
- Create and manage tasks with completion tracking
- Mark tasks as important with star indicators
- Drag-and-drop reordering for manual organization
- Multiple sorting modes (manual, oldest first, newest first)
- Filter by completion status or importance
- Hold-to-delete interaction for safe task removal
- Right-click context menus for quick actions
- Persistent storage with automatic saving
Task Structure
Each task contains the following properties:src/types/todo.ts
Unique identifier generated using
crypto.randomUUID()Task description, automatically converted to lowercase
Completion status, toggled via checkbox
Priority flag, displayed with star icon when true
Unix timestamp for creation time, used for date-based sorting
Creating Tasks
Add new tasks using the input field and add button:src/components/todo-list.tsx
better-home-todos.
Press Enter in the input field to quickly add a task without clicking the button.
Sorting Modes
Tasks support three sorting modes accessible via right-click context menu:src/types/todo.ts
- Manual Order
- Oldest First
- Newest First
Default mode. Drag and drop tasks to arrange them in your preferred order. The grip handle on the left of each task enables reordering.
src/components/todo-list.tsx
Drag-and-drop automatically switches to manual mode and intelligently merges reordered visible tasks with hidden filtered tasks.
Filtering Options
Filter tasks using the right-click context menu on the card:src/types/todo.ts
Hide Completed
Hide tasks that have been marked as completed, keeping your view focused on active work:src/lib/todo-utils.ts
Show Important Only
Display only tasks marked as important (starred):src/lib/todo-utils.ts
Task Interactions
Toggle Completion
Click the checkbox or use the right-click context menu:src/components/todo-list.tsx
Mark as Important
Use the context menu to toggle the important flag:src/components/todo-list.tsx
Delete Tasks
Hover over a task and hold down the delete button for 1.5 seconds:src/lib/todo-utils.ts
src/components/todo-list.tsx
Storage
Tasks and preferences are persisted to localStorage:- Tasks:
better-home-todos- Array of Todo objects - Sort Mode:
better-home-todo-sort- Current sorting preference - Filters:
better-home-todo-filters- Active filter settings
UI States
Progress Indicator
The card header shows completion progress:src/components/todo-list.tsx
Empty States
The component displays different messages based on context:- No tasks yet: When the list is empty and no filters are active
- No matching tasks: When filters exclude all tasks