Skip to content

Bug: Duplicate event listeners stacking in yearly budget UI #13

Description

@davidchris

Description

In web/pages/settings_page.py (line ~1292), container.addEventListener('click', ...) is called inside renderBudgetList(), which is invoked repeatedly. Each call stacks another click listener on the same container, leading to duplicate prompts and API calls after each refresh.

Impact

  • Priority: High (non-critical but real)
  • Duplicate dialog prompts when clicking budget items
  • Multiple redundant API calls per user action
  • Worsens with each re-render of the budget list

Expected Behavior

A single click listener should handle events, regardless of how many times renderBudgetList() is called.

Suggested Fix

Either:

  1. Register the event listener once outside renderBudgetList(), or
  2. Remove existing listeners before re-adding, or
  3. Use event delegation with a single persistent listener

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions