Skip to content

emrg: GUI task countdown re-fetches state on expiry (rant 2026-08-18T11:16:32) - #840

Merged
argszero merged 1 commit into
masterfrom
feature/gui-task-countdown-refresh
Aug 18, 2026
Merged

emrg: GUI task countdown re-fetches state on expiry (rant 2026-08-18T11:16:32)#840
argszero merged 1 commit into
masterfrom
feature/gui-task-countdown-refresh

Conversation

@argszero

Copy link
Copy Markdown
Owner

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), trigger renderTaskList() once — a per-entry expired flag prevents repeat triggers on the same entry
  • emrg/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

…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 argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle 708 (1/3). CI test + test-windows PASS (32103625200). Countdown expiry triggers state re-fetch; smoke test extended with stateful mock.

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle 709 (2/3). Head 2ee93d1, CI test + test-windows PASS (32103625200). Countdown expiry → state re-fetch with expired-flag loop guard verified.

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle 710 (3rd). Head 2ee93d1 unchanged, CI test + test-windows PASS (32103625200), MERGEABLE/CLEAN. Three consecutive LGTMs (708/709/710), no ❌ — merging.

@argszero
argszero merged commit 63342a0 into master Aug 18, 2026
2 checks passed
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>
@argszero
argszero deleted the feature/gui-task-countdown-refresh branch August 18, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant