Improve live timer sync on home and timers pages#10
Merged
Fingolfin7 merged 1 commit intomasterfrom Apr 13, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
.cardon the page which touched unrelated elements and performed unnecessary DOM work.Description
#active-timersby changing the selector to#active-timers .card[id^="timer-"]incore/static/core/js/dynamic_timers.jsto avoid touching unrelated cards.core/static/core/js/dynamic_timers.jsthat calls/api/list_active_sessions/every 5 seconds and compares server-side active session IDs with locally rendered timer IDs, triggeringwindow.location.reload()when they differ so CLI/API changes appear quickly.getLocalTimerIds()andsyncActiveTimers()in the same JS file to support the above comparison and run an initial sync on page load.list_active_sessionsincore/api.pyto applyfilter_by_active_context(...)so the polled API mirrors the UI's active-context filtering and avoids false positives when comparing IDs.Testing
python manage.py checkwhich failed in this environment because required environment variables are not set (SECRET_KEY), so the project-level Django system checks could not complete; no other automated tests were executed in this session.Codex Task