A local-first multi-agent app development platform, built on PenguinHarness
fix(web): the background-task mark and its count are green again (#713)
Yaowei Zhengbace18aa614e
diff --git a/changelog/unreleased/2026-09-12-background-mark-green.md b/changelog/unreleased/2026-09-12-background-mark-green.mdnew file mode 100644index 00000000..f9b572d8--- /dev/null+++ b/changelog/unreleased/2026-09-12-background-mark-green.md@@ -0,0 +1,16 @@+# The background-task mark and its count are green again++- **Date:** 2026-09-12+- **Type:** fix+- **Scope:** `web`, `docs`+- **PR:** [#713](https://github.com/Prism-Shadow/penguin-harness/pull/713)++[中文版](2026-09-12-background-mark-green.zh.md)++The activity trace that marks a session with background tasks, and the count beside the chat header's stats, went back to the busy emerald — the colour the app uses for live work — after [#677](https://github.com/Prism-Shadow/penguin-harness/pull/677) had muted them along with the scheduled-task mark.++## Details++- `BackgroundTasksMark` (the session row and a tool row's background call) draws in the `busy` ink.+- The chat header's background count uses the same ink, so glyph and number read alike wherever they appear; the tooltip still names the count in words.+- The scheduled-task mark keeps its muted tone.diff --git a/changelog/unreleased/2026-09-12-background-mark-green.zh.md b/changelog/unreleased/2026-09-12-background-mark-green.zh.mdnew file mode 100644index 00000000..73c3753c--- /dev/null+++ b/changelog/unreleased/2026-09-12-background-mark-green.zh.md@@ -0,0 +1,16 @@+# 后台任务标记与其计数改回绿色++- **Date:** 2026-09-12+- **Type:** fix+- **Scope:** `web`, `docs`+- **PR:** [#713](https://github.com/Prism-Shadow/penguin-harness/pull/713)++[English](2026-09-12-background-mark-green.md)++标记会话仍有后台任务的活动波形,以及对话页头统计旁的后台任务计数,改回运行态同款的绿色(应用用来表示正在进行的工作的颜色)——此前 [#677](https://github.com/Prism-Shadow/penguin-harness/pull/677) 把它们和定时任务标记一起调成了灰色。++## 细节++- `BackgroundTasksMark`(会话行与工具行的后台调用标记)使用 `busy` 墨色。+- 对话页头的后台任务计数用同一墨色,图标与数字在各处颜色一致;悬停提示仍以文字说明数量。+- 定时任务标记保持灰色不变。diff --git a/packages/docs/content/web-app.en.md b/packages/docs/content/web-app.en.mdindex a77cdcb4..c02d4f26 100644--- a/packages/docs/content/web-app.en.md+++ b/packages/docs/content/web-app.en.md@@ -48,7 +48,7 @@ A row's actions come at two levels:- **Hovering** a row replaces the trailing last-active time with two icon buttons — archive and delete. They are reachable from the keyboard too: tabbing onto either one reveals it;- **Right-clicking** a row opens the full menu at the pointer: pin, rename, remote control, archive, copy Session ID, delete. A **long press** on touch and **Shift+F10** on the keyboard open the same menu, since neither hover nor a secondary click exists there. Escape, a click elsewhere, or scrolling the list dismisses it; the browser's own context menu is taken over on conversation rows only, and stays as usual everywhere else on the page.-Beside a row's title sit its status marks: a turning hourglass while the Session runs (a squeezing bar while it compacts), a green dot once a run finished that you have not looked at yet, and a small activity trace while the Session still owns **background tasks** — commands running on past their yield window and background subagents mid-round. Its tooltip counts them ("2 background tasks"). The mark is independent of the others: an idle conversation whose dev server is still up keeps it, and it disappears the moment the last task ends, pushed live without a refresh.+Beside a row's title sit its status marks: a turning hourglass while the Session runs (a squeezing bar while it compacts), a green dot once a run finished that you have not looked at yet, and a small green activity trace while the Session still owns **background tasks** — commands running on past their yield window and background subagents mid-round. Its tooltip counts them ("2 background tasks"). The mark is independent of the others: an idle conversation whose dev server is still up keeps it, and it disappears the moment the last task ends, pushed live without a refresh.Pinning is offered only in the active list — the archived, subagent and scheduled folders leave it out — and a pinned conversation sorts to the top of its group. The choice is remembered per Project in the browser.diff --git a/packages/docs/content/web-app.zh.md b/packages/docs/content/web-app.zh.mdindex 4c9662c0..19a70217 100644--- a/packages/docs/content/web-app.zh.md+++ b/packages/docs/content/web-app.zh.md@@ -48,7 +48,7 @@ penguin web- **悬停**一行时,行尾的最近活跃时间让位给两个图标按钮——归档与删除;键盘同样够得到:Tab 到其中任意一个,该按钮即显形;- **右键点击**一行,在指针处打开完整菜单:置顶、重命名、远程控制、归档、复制 Session ID、删除。触屏**长按**、键盘 **Shift+F10** 打开同一个菜单(触屏没有悬停,也没有右键)。按 Esc、点击别处或滚动列表都会关闭它;系统右键菜单只在会话行上被接管,页面其他位置照常。-会话行标题旁是它的状态标记:Session 运行中是翻转的沙漏(压缩中是向中线合拢的压缩标),有一条你还没看过的回复时是一枚绿点,会话仍有**后台任务**——超过 yield 窗口继续运行的命令、正在跑一轮的后台子智能体——时另有一枚小小的活动波形标记,悬停显示数量(「2 个后台任务」)。这枚标记与其他标记互不影响:dev server 还开着的空闲对话照样带着它,最后一项后台任务结束的那一刻它即消失,由服务端实时推送、无需刷新。+会话行标题旁是它的状态标记:Session 运行中是翻转的沙漏(压缩中是向中线合拢的压缩标),有一条你还没看过的回复时是一枚绿点,会话仍有**后台任务**——超过 yield 窗口继续运行的命令、正在跑一轮的后台子智能体——时另有一枚小小的绿色活动波形标记,悬停显示数量(「2 个后台任务」)。这枚标记与其他标记互不影响:dev server 还开着的空闲对话照样带着它,最后一项后台任务结束的那一刻它即消失,由服务端实时推送、无需刷新。置顶只在活跃列表里出现(已归档、子智能体与定时任务的折叠夹中没有这一项),置顶的会话排在所属分组的最前面,该状态按 Project 记在浏览器本地。diff --git a/packages/web/src/components/layout/sidebar.tsx b/packages/web/src/components/layout/sidebar.tsxindex 88b85fd1..6fd758b2 100644--- a/packages/web/src/components/layout/sidebar.tsx+++ b/packages/web/src/components/layout/sidebar.tsx@@ -2699,9 +2699,9 @@ function SessionRow({the schedules panel says how often and what. A paused task, or one past its endtime, draws nothing — nothing more will fire from it, and a mark would be noise. */}{scheduled && <ScheduleMark size={ICON_SIZE.rowMark} />}- {/* Background work the conversation owns while sitting idle: parked, not running,- so it reads as an arrangement rather than as a turn in progress. The mark leaves- with the last task (live via session_background). */}+ {/* Background work the conversation owns while sitting idle: still running, only+ outside the turn, so it reads as live work rather than as a standing arrangement.+ The mark leaves with the last task (live via session_background). */}{background > 0 && (<BackgroundTasksMarklabel={S.chat.backgroundTasks(background)}diff --git a/packages/web/src/components/ui/session-activity-icon.tsx b/packages/web/src/components/ui/session-activity-icon.tsxindex 9bac848c..bae102e1 100644--- a/packages/web/src/components/ui/session-activity-icon.tsx+++ b/packages/web/src/components/ui/session-activity-icon.tsx@@ -70,10 +70,10 @@ export function sessionActivityLabel(activity: Activity): string {* The background-task mark: "work is going on behind this" wherever the app says so — a* session row and the chat header, where it stands for the conversation's whole set of* background command processes and subagents, and a tool row, where it marks the one call- * that was made with `run_in_background`. `muted` ink: background work is parked, not a turn in- * progress, so it joins the row's dim cluster of standing arrangements rather than reading as- * the conversation being busy. `muted` may only mark a state already spelled out in text, which- * the required label below is.+ * that was made with `run_in_background`. `busy` ink, the tone for "executing right now": a+ * background command process or a mid-round subagent is still working — it has only left the+ * turn. The chat header's count wears the same tone, so the glyph and the number read alike+ * wherever they appear. The required label below still carries the state in words.** Both props are the caller's to decide, because the two placements genuinely differ: the* label names a count in one place and a single call in the other, and the size is the rung@@ -88,7 +88,7 @@ export function BackgroundTasksMark({ label, size }: { label: string; size: numbrole="img"aria-label={label}title={label}- className={`flex shrink-0 items-center ${toneInk.muted}`}+ className={`flex shrink-0 items-center ${toneInk.busy}`}><GlyphIcon d={BACKGROUND_TASKS_ICON} size={size} /></span>diff --git a/packages/web/src/features/chat/chat-page.tsx b/packages/web/src/features/chat/chat-page.tsxindex 76fc6c09..bc4db3e9 100644--- a/packages/web/src/features/chat/chat-page.tsx+++ b/packages/web/src/features/chat/chat-page.tsx@@ -1928,14 +1928,14 @@ export function ChatPage() {reading is, and a glyph beside a number is how every other chip in thisrow says what its number counts. Bare ink like the chips beside it, nota tinted pill: this is one more reading in the stat row, not a badge- that should out-weigh them. Muted rather than the live-status green:- background work is a fact about the conversation, not the live run this- row is otherwise reporting — and `muted` may recede here because the- title names the count in words, so the colour carries nothing alone. */}+ that should out-weigh them. In the live-status green (`busy`), the same+ tone as the session row's mark: background work is work still running+ behind this conversation, and glyph and number wear that colour together+ wherever they appear; the title still names the count in words. */}{backgroundCount > 0 && (<spantitle={S.chat.backgroundTasks(backgroundCount)}- className={`flex shrink-0 items-center ${ICON_GAP.tight} font-mono text-xs ${toneInk.muted}`}+ className={`flex shrink-0 items-center ${ICON_GAP.tight} font-mono text-xs ${toneInk.busy}`}><GlyphIcon d={BACKGROUND_TASKS_ICON} />{backgroundCount}diff --git a/packages/web/test/session-activity.test.ts b/packages/web/test/session-activity.test.tsindex d5313345..3e5a1727 100644--- a/packages/web/test/session-activity.test.ts+++ b/packages/web/test/session-activity.test.ts@@ -65,7 +65,7 @@ describe("sessionBackgroundTasks", () => {});/**- * The background-task mark: one glyph in the `muted` tone, standing for a count in both of+ * The background-task mark: one glyph in the `busy` tone, standing for a count in both of* its placements — a session row and the chat header. Rendered only when there is background* work to report (the caller's decision), and always naming what it means in the accessible* name and tooltip, so the glyph is never the only carrier. A tool row says the same thing in@@ -84,16 +84,17 @@ describe("BackgroundTasksMark", () => {expect(S.chat.backgroundTasks(3)).toContain("3");});- it("draws the activity trace in the muted tone, at the rung its caller passes", () => {+ it("draws the activity trace in the busy emerald, at the rung its caller passes", () => {expect(render(S.chat.backgroundTasks(1), ICON_SIZE.rowMark)).toMatch(/width="12"/);expect(render(S.chat.backgroundTasks(1), ICON_SIZE.inlineGlyph)).toMatch(/width="13"/);const markup = render(S.chat.backgroundTasks(1), ICON_SIZE.rowMark);expect(markup).toContain(`d="${BACKGROUND_TASKS_ICON}"`);- // Parked work is a fact about the Session, not a turn in progress: the mark recedes with- // the pin and the relay glyph instead of borrowing the tone the running hourglass wears.- expect(markup).toContain(toneInk.muted);- expect(markup).not.toContain(toneInk.busy);- // Not one of the activity glyphs, and no motion, for the same reason.+ // Work still running, only outside the turn: the mark takes the live tone rather than+ // receding with the pin and the relay glyph.+ expect(markup).toContain(toneInk.busy);+ expect(markup).not.toContain(toneInk.muted);+ // A facet beside the row's activity state rather than a fourth state of it: it takes the+ // live tone but neither the activity glyphs nor their motion.expect(markup).not.toContain(ACTIVITY_GLYPH.running);expect(markup).not.toContain("hourglass-turn");});