Skip to content

bug: "This week" and "Completed" task groups do not render in All Tasks view #353

@Ridanshi

Description

@Ridanshi

Bug Description

In the All Tasks and Archived views, only the Due soon section is rendered. The This week and Completed task groups are never displayed even when matching tasks exist.

Additionally, extracted tasks can be added twice because addItemsBtn has a duplicate click listener registered outside the existing DOMContentLoaded handler.


Root Cause

Inside js/app.js in renderTasks(), a missing + operator between adjacent renderGroup(...) calls causes JavaScript Automatic Semicolon Insertion (ASI) to split the innerHTML assignment into separate statements.

As a result, only the first group is assigned while the remaining groups are evaluated and discarded.

// Broken behavior
tasksSection.innerHTML = actionBar +
    renderGroup('⚠ Due soon', ...);

renderGroup('This week', ...) +
renderGroup('Completed', ...) +
emptyState;

The duplicate event listener issue is caused by an additional addItemsBtn click handler registered at module level while the same logic already exists inside DOMContentLoaded.


Steps To Reproduce

  1. Add:

    • at least one upcoming task more than 3 days away
    • at least one completed task
  2. Open the All Tasks view

  3. Observe:

    • only Due soon is rendered
    • This week and Completed sections are missing
  4. Extract planner items and click:

    • Add items to planner
  5. Observe duplicated task insertion


Expected Behavior

  • All applicable task groups should render correctly:

    • Due soon
    • This week
    • Completed
  • Extracted tasks should only be added once per click.


Proposed Fix

  • Add the missing + operator between adjacent renderGroup(...) calls in renderTasks()
  • Remove the duplicate addItemsBtn click listener registered outside DOMContentLoaded

I would like to work on this issue as a GSSoC 2026 contributor.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions