From d2623c286c44722cc6f6d05791f66734adb1a410 Mon Sep 17 00:00:00 2001 From: Noah Date: Sat, 14 Nov 2026 02:01:22 +0100 Subject: [PATCH 1/2] Show proposals being planned in the taskbar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A proposal the planner worked on showed in Approvals as "Being planned…" but not in the taskbar, which only counted what an admin can decide: the operator expected something there for gs2's #26 (planned in about 2.5 minutes). The tray now says "1 being planned" (beside "N to approve"), its tooltip lists them and a single one opens selected. Co-Authored-By: Claude Opus 5.5 --- docs/OPERATIONS.md | 5 +++-- webui/src/components/Taskbar.svelte | 20 ++++++++++++++------ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/docs/OPERATIONS.md b/docs/OPERATIONS.md index 268379a..53f4036 100644 --- a/docs/OPERATIONS.md +++ b/docs/OPERATIONS.md @@ -161,8 +161,9 @@ instead, an admin confirms it there or in Approvals with their password. ### Approvals -Start → Approvals (and the "N to approve" in the taskbar, its tooltip -lists them) shows what waits for an admin, newest first: the plans of +Start → Approvals (and the "N to approve" in the taskbar, with "N being +planned" for proposals the planner still works on; its tooltip lists +them) shows what waits for an admin, newest first: the plans of the AI agents' proposals (`#12`, see [AI agents](#ai-agents); those the planner still works on are listed too) and the pending actions (`A12`): deletions of domains, databases, groups, mail domains and diff --git a/webui/src/components/Taskbar.svelte b/webui/src/components/Taskbar.svelte index ff93730..ae66f73 100644 --- a/webui/src/components/Taskbar.svelte +++ b/webui/src/components/Taskbar.svelte @@ -31,6 +31,9 @@ const attention = $derived(conversations.attention); const waiting = $derived(approvals.waiting); + // proposals the planner still works on show too, they come next + const open = $derived(approvals.undecided); + const planning = $derived(open.length - waiting.length); let time = $state(formatHour(Date.now())); @@ -70,19 +73,24 @@ ⚠ {attention.length} {/if} - {#if waiting.length} + {#if open.length} {/if} {#if connection.lost} From d838543e6b96bcd04893e582122ae8797970cee4 Mon Sep 17 00:00:00 2001 From: Noah Date: Sat, 14 Nov 2026 02:04:14 +0100 Subject: [PATCH 2/2] Move the taskbar's approvals label into the store The planning count came from undecided minus waiting, which relied on undecided being exactly those two statuses; the store now has a planning getter and builds the label itself, and the comments that still said the taskbar shows only the waiting ones are updated. Co-Authored-By: Claude Opus 5.5 --- webui/src/components/Taskbar.svelte | 11 ++--------- webui/src/lib/approvals.svelte.ts | 23 ++++++++++++++++++++--- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/webui/src/components/Taskbar.svelte b/webui/src/components/Taskbar.svelte index ae66f73..c4ebcea 100644 --- a/webui/src/components/Taskbar.svelte +++ b/webui/src/components/Taskbar.svelte @@ -30,10 +30,8 @@ } = $props(); const attention = $derived(conversations.attention); - const waiting = $derived(approvals.waiting); - // proposals the planner still works on show too, they come next + // proposals the planner still works on show too const open = $derived(approvals.undecided); - const planning = $derived(open.length - waiting.length); let time = $state(formatHour(Date.now())); @@ -85,12 +83,7 @@ }} > - {[ - waiting.length ? `${waiting.length} to approve` : '', - planning ? `${planning} being planned` : '', - ] - .filter(Boolean) - .join(', ')} + {approvals.summary} {/if} {#if connection.lost} diff --git a/webui/src/lib/approvals.svelte.ts b/webui/src/lib/approvals.svelte.ts index a282b53..e8f550f 100644 --- a/webui/src/lib/approvals.svelte.ts +++ b/webui/src/lib/approvals.svelte.ts @@ -2,7 +2,7 @@ import { get, type Approval, type PendingAction, type Plan } from './api'; // Start → Approvals: the AI agents' proposals and the pending actions // (deletions, the agent's remote backup changes); the taskbar shows the -// waiting ones, any admin decides +// undecided ones, any admin decides class ApprovalStore { list = $state([]); @@ -10,11 +10,28 @@ class ApprovalStore { this.list = await get('/approvals'); } - /** what an admin can decide on now, for the taskbar */ + /** what an admin can decide on now */ get waiting(): Approval[] { return this.list.filter(a => status(a) === 'pending'); } + /** the proposals the planner still works on */ + get planning(): Approval[] { + return this.list.filter(a => status(a) === 'planning'); + } + + /** "2 to approve, 1 being planned", each part only when there are some */ + get summary(): string { + const waiting = this.waiting.length; + const planning = this.planning.length; + return [ + waiting ? `${waiting} to approve` : '', + planning ? `${planning} being planned` : '', + ] + .filter(Boolean) + .join(', '); + } + /** also the proposals the planner works on */ get undecided(): Approval[] { return this.list.filter(a => undecided(a)); @@ -118,7 +135,7 @@ export function approvalTitle(a: Approval): string { return a.action.description.split('. ')[0].replace(/\.$/, ''); } -/** the taskbar's line of a waiting one */ +/** the taskbar's line of an undecided one */ export function approvalLine(a: Approval): string { const from = a.kind === 'proposal' ? `${a.proposal.from}: ` : ''; return `${approvalNumber(a)} ${from}${approvalTitle(a)}`;