Skip to content

Commit 372884b

Browse files
AVADSA25Mikarina13claude
authored
Activity: say "running for" only while a project runs (#445)
A project waiting for approval, paused or blocked showed "running for N min" (the time since it started). Now only a running project shows that; a finished one shows "took", and the others keep "started ...". Co-authored-by: Mickael Farina <farina.mickael@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 2e7e136 commit 372884b

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎codec_tasks.html‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,9 @@ <h2 id="actFilesTitle">Files</h2>
10131013
}
10141014
var meta = [];
10151015
if (total) meta.push(Math.min(idx, total) + ' of ' + total + ' checkpoints');
1016-
if (p.elapsed_s != null) meta.push((live ? 'running for ' : 'took ') + _actDur(p.elapsed_s));
1016+
// "running for" only while it runs; a waiting, paused or blocked project shows when it started.
1017+
var running = p.status === 'running' || p.status === 'crashed_resumed';
1018+
if (p.elapsed_s != null && (running || !live)) meta.push((running ? 'running for ' : 'took ') + _actDur(p.elapsed_s));
10171019
if (p.created_at) meta.push('started ' + _actWhen(p.created_at));
10181020
if (p.silenced) meta.push('notifications off');
10191021
h += '<div class="act-meta">' + meta.map(function (m) { return '<span>' + escHtml(m) + '</span>'; }).join('') + '</div>';

‎docs/known-issues.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ you copy a web link") from the skill's `SKILL_OBSERVATION_TRIGGER`, falling back
436436
to the skill's name. Found in the Mac merge pass. Revisit: the next item that
437437
touches triggers.
438438

439-
## The Activity board says "running for" a project that is waiting (2026-10-07)
439+
## The Activity board says "running for" a project that is waiting (2026-10-07) — FIXED (only while it runs)
440440

441441
Tasks > Activity (P3.8) shows "running for N min" under every project, including
442442
one waiting for approval or paused, where it is the time since it started. Fix:

‎tests/test_activity.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,8 @@ def _jsdom_available() -> bool:
253253
const bar = d.querySelector('.act-card[data-agent="run1"] .act-bar');
254254
out.bar = [bar.getAttribute('aria-valuenow'), bar.getAttribute('aria-valuemax'), bar.firstChild.style.width];
255255
out.meta = d.querySelector('.act-card[data-agent="run1"] .act-meta').textContent;
256+
out.metaPaused = d.querySelector('.act-card[data-agent="bud1"] .act-meta').textContent;
257+
out.metaDone = d.querySelector('.act-card[data-agent="old1"] .act-meta').textContent;
256258
out.last = d.querySelector('.act-card[data-agent="run1"] .act-last').textContent;
257259
out.crews = [...d.querySelectorAll('#actCrews .act-card')].map(c => [c.querySelector('.act-title').textContent,
258260
c.querySelector('.act-state').textContent, [...c.querySelectorAll('button')].map(b => b.textContent)]);
@@ -287,6 +289,8 @@ def test_the_activity_tab_renders_projects_crews_and_grants_under_jsdom():
287289
assert d["buttons"]["old1"] == ["Files"], "a finished project only lists its files"
288290
assert d["bar"] == ["2", "5", "40%"]
289291
assert "2 of 5 checkpoints" in d["meta"] and "running for 2 min" in d["meta"]
292+
assert "running for" not in d["metaPaused"] and "started" in d["metaPaused"], "a paused project is not running"
293+
assert "took 10 min" in d["metaDone"]
290294
assert d["last"] == "Checkpoint 2 done"
291295
assert d["crews"][0] == ["Daily briefing", "Running", ["Stop"]] and d["crews"][1][:2] == ["Deep research", "Interrupted"]
292296
assert d["chips"] == ["example.com", "web_search"]

0 commit comments

Comments
 (0)