Skip to content

bug: Daily/weekly summary always shows "0 tasks" regardless of actual task count #459

@Ridanshi

Description

@Ridanshi

Summary

The daily/weekly summary section displays 0 tasks even when tasks are successfully created and visible elsewhere in the application.

The UI does not re-render with updated task counts after task creation, completion changes, or deletion operations.


Context

Affected area:

  • summary/dashboard statistics rendering
  • task state synchronization logic

Current behavior:

  • tasks are added successfully,
  • task lists update correctly,
  • but the summary counters remain stale and continue showing 0.

This creates inconsistent dashboard behavior and makes progress tracking unreliable.


Steps to Reproduce

  1. Create multiple tasks
  2. Verify tasks appear in the task list
  3. Navigate to or refresh the summary/dashboard section
  4. Observe:
    • daily summary shows 0 tasks
    • weekly summary shows 0 tasks
    • counters do not match actual stored tasks

Expected Behavior

The summary section should:

  • automatically reflect the correct task count,
  • update after task creation/deletion,
  • and stay synchronized with the current application state.

Root Cause

The summary component appears to calculate totals from stale state or from an initialization-only render path rather than reacting to updated task data.

As a result, task statistics are not recalculated after state mutations.


Proposed Fix

  • ensure summary calculations derive from the latest task state
  • trigger summary recomputation on task add/update/delete
  • remove stale cached summary values if present
  • ensure UI re-renders correctly after task mutations

Tasks

  • Identify stale summary state source
  • Recompute totals from latest task data
  • Ensure summary updates after task mutations
  • Verify daily and weekly counts remain synchronized
  • Add regression validation for summary rendering

Acceptance Criteria

  • Daily summary shows correct task count
  • Weekly summary shows correct task count
  • Summary updates immediately after task changes
  • No stale values remain after refresh/navigation
  • Existing task behavior remains unaffected

Area

frontend

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions