Skip to content

Fix dashboard timer polling loop and sync updates#13

Merged
Fingolfin7 merged 1 commit intomasterfrom
codex/fix-polling-issues-on-home-page
Apr 13, 2026
Merged

Fix dashboard timer polling loop and sync updates#13
Fingolfin7 merged 1 commit intomasterfrom
codex/fix-polling-issues-on-home-page

Conversation

@Fingolfin7
Copy link
Copy Markdown
Owner

Motivation

  • The app polls the server for active timers so CLI-driven start/stop shows up in the UI, but the dashboard/home pages were reloading repeatedly because the polling logic assumed timer elements used id="timer-<id>" while the dashboard rendered different markup.
  • The reload loop made the home/dashboard not reflect new timers correctly and not remove stopped timers, so polling needed to compare IDs reliably and avoid forcing reloads when unnecessary.

Description

  • Updated dynamic_timers.js to use data-timer-id instead of parsing id="timer-<id>" by changing the selector to '#active-timers [data-timer-id]' and reading data('timer-id') in getLocalTimerIds().
  • Added DASHBOARD_PATH + guard logic in syncActiveTimers() so when the active-timers container is not present the page only reloads once if the server reports active timers (avoids reload loops when the dashboard initially has no timers).
  • Marked the dashboard active timers container as a partial list with `data-partial-list=

Codex Task

@Fingolfin7 Fingolfin7 merged commit f5edfa5 into master Apr 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant