emrg: GUI task countdown re-fetches state on expiry (rant 2026-08-18T11:16:32) - #840
Merged
Merged
Conversation
…11:16:32) The tasks-panel countdown tick (updateTaskCountdowns) only decremented the remaining-time text and clamped at 0s — when a pending task's deadline passed, the UI never flipped to the running badge until a manual action re-rendered. Now a countdown hitting 0 triggers renderTaskList() once (per-entry expired flag prevents re-trigger loops), so pending → running transitions appear automatically. Smoke test extended: stateful mock flips waiting-task to running after the deadline and asserts the refresh.
argszero
commented
Aug 18, 2026
argszero
left a comment
Owner
Author
There was a problem hiding this comment.
✅ LGTM — cycle 708 (1/3). CI test + test-windows PASS (32103625200). Countdown expiry triggers state re-fetch; smoke test extended with stateful mock.
argszero
pushed a commit
that referenced
this pull request
Aug 18, 2026
This was referenced Aug 18, 2026
argszero
added a commit
that referenced
this pull request
Aug 18, 2026
v0.2.47 -> v0.2.48 across 8 files / 9 refs (standard release bump): - emrg/__init__.py, pyproject.toml, uv.lock (emrg entry) - emrg/gui/package.json + package-lock.json (x2) - packaging/build-runtime.sh, make-installer.sh, make-run-installer.sh Covers 4 commits since v0.2.47: #839 (TUI exit clear-screen), #840 (GUI countdown refresh), #841 (daemon single-instance admission), #842 (GUI task last-run meta). Rant 2026-08-18T14:46:47. Co-authored-by: EMRG Evolution <emrg@argszero.dev>
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.
The tasks-panel countdown stopped at "0s" and never reflected a task's pending → running transition — the UI only refreshed on manual actions (edit/delete) or panel reopen.
Root cause:
updateTaskCountdowns()in dialogs.js only wrote the remaining-time text (clamped at 0) every second; it never re-pulled task state, so a 60s task that went running right after its countdown ended stayed "待运行 0s" indefinitely.Changes
emrg/gui/renderer/js/dialogs.js: when a countdown hits 0 (deadline passed), triggerrenderTaskList()once — a per-entryexpiredflag prevents repeat triggers on the same entryemrg/gui/test/renderer.smoke.test.js: extended the 10:36:39 countdown test — the mock now flips waiting-task to running after the deadline; asserts the UI auto-refreshes to the running badge