Skip to content

feat: Add task tracking panel with todo list and checklist support#80

Open
AdamJ wants to merge 1 commit intomainfrom
claude/add-task-tracking-panel-iZacz
Open

feat: Add task tracking panel with todo list and checklist support#80
AdamJ wants to merge 1 commit intomainfrom
claude/add-task-tracking-panel-iZacz

Conversation

@AdamJ
Copy link
Copy Markdown
Owner

@AdamJ AdamJ commented Mar 30, 2026

Summary

Introduces a persistent task tracking panel that combines a standalone to-do list (synced across devices for authenticated users) with GitHub Flavored Markdown (GFM) checklist items extracted from task descriptions. The panel appears as a sticky sidebar on the main dashboard.

Key Changes

  • New TaskTrackingPanel component (src/components/TaskTrackingPanel.tsx)

    • Displays active and completed to-do items with add/toggle/delete functionality
    • Extracts and displays GFM checklist items (- [ ] / - [x]) from current-day task descriptions
    • Provides visual separation between standalone todos and task-embedded checklists
  • Checklist utilities (src/utils/checklistUtils.ts)

    • parseTaskChecklist(): Extracts GFM task-list items from markdown descriptions
    • toggleDescriptionChecklistItem(): Toggles checkbox state within task descriptions
  • Todo item persistence

    • Added TodoItem interface to TimeTrackingContext with id, text, completed status, and timestamps
    • Implemented saveTodos() and getTodos() in both SupabaseService and LocalStorageService
    • New todo_items table in Supabase with RLS policies and proper indexing
    • Todo operations (add, toggle, delete, clear completed) integrated into context
  • Layout restructuring (src/pages/Index.tsx)

    • Converted main content to a two-column grid layout (1fr + 300px sidebar on lg screens)
    • TaskTrackingPanel positioned as sticky sidebar on the right
    • Dashboard stats now display only when day hasn't started
    • Improved responsive design with proper spacing
  • Report integration (src/utils/reportUtils.ts, src/hooks/useReportSummary.ts)

    • Extended serializeWeekForPrompt() to include completed todos from the week
    • Updated buildSummaryPrompt() to accept optional todos parameter
    • Todos completed within a week's date range are now included in AI-generated summaries
  • Data service updates

    • Added saveTodos() and getTodos() abstract methods to DataService interface
    • Migration logic updated to handle todos during localStorage→Supabase transitions
    • LocalStorage schema versioning applied to todos

Implementation Details

  • Todo items use ISO timestamp strings for createdAt and optional completedAt fields
  • Checklist parsing uses regex to match both checked ([x]) and unchecked ([ ]) states (case-insensitive)
  • Line indices are preserved during checklist parsing to enable precise toggling within descriptions
  • All todo operations trigger immediate database saves via the data service
  • Panel remains visible whether day is started or not, providing persistent task tracking

…gration

- Add TodoItem type to TimeTrackingContext with id, text, completed,
  createdAt, and completedAt fields; expose addTodoItem, toggleTodoItem,
  deleteTodoItem, clearCompletedTodos from context
- Persist todos via DataService (localStorage for guests, Supabase for
  authenticated users) for cross-device consistency; add todo_items table
  DDL with RLS policies to supabase/schema.sql; update both migration
  methods to include todos on login/logout
- Add checklistUtils.ts to parse and toggle GFM task-list items
  (- [ ] / - [x]) inside task descriptions without storing them separately
- Add TaskTrackingPanel component: standalone to-do list with active and
  completed sections, plus a "From Tasks" section that surfaces checklist
  items from current-day task descriptions as interactive checkboxes;
  toggling a task-description item updates the task's description string
- Update serializeWeekForPrompt and buildSummaryPrompt in reportUtils.ts
  to accept TodoItem[]; todos completed during the report week are appended
  to the AI prompt so weekly summaries reflect completed to-dos
- Thread todos through useReportSummary.generate and Report.tsx
- Update Index.tsx to a responsive two-column grid (lg+): tasks on the
  left, TaskTrackingPanel sticky on the right; panel also visible when
  day is not started
@AdamJ AdamJ force-pushed the claude/add-task-tracking-panel-iZacz branch from cfeb60c to 375b91e Compare March 30, 2026 17:35
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Mar 30, 2026

Deploying timetrackerpro with  Cloudflare Pages  Cloudflare Pages

Latest commit: 375b91e
Status: ✅  Deploy successful!
Preview URL: https://b30e51c9.timetrackerpro.pages.dev
Branch Preview URL: https://claude-add-task-tracking-pan.timetrackerpro.pages.dev

View logs

@AdamJ AdamJ self-assigned this Mar 30, 2026
@AdamJ AdamJ added the enhancement New feature or request label Mar 30, 2026
@AdamJ AdamJ linked an issue Mar 30, 2026 that may be closed by this pull request
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add task tracking

2 participants