From 624c891a30acc3ada3dceadc147c0c0252c9a48b Mon Sep 17 00:00:00 2001 From: Inferencebot Date: Sun, 1 Nov 2026 17:16:35 +0000 Subject: [PATCH] agents table: show all-time spend instead of the resettable cycle counter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The agents table rendered the raw team spend field and labelled it 'Spend (30 days)', but that field is cycle-only and resets at budget_reset_at — for the agent teams, the 1st of the month. On 1 November both bot accounts therefore displayed as zeroed. It now prefers the all-time figure the portal supplies, and the label says what it shows. --- app/main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/main.py b/app/main.py index b838ea9..0e8516d 100644 --- a/app/main.py +++ b/app/main.py @@ -700,7 +700,9 @@ function setMemberMode(mode) { // Header label reflects the mode $('spend-mode-label').textContent = mode === 'all' ? 'All-time spend' : 'Spend'; const adminLabel = document.getElementById('spend-mode-label-admin'); - if (adminLabel) adminLabel.textContent = mode === 'all' ? 'All-time spend' : 'Spend (30 days)'; + // Agents always show all-time: their cycle counter resets on the 1st, so a cycle + // figure would read as zeroed for the co-op's own bot accounts every month. + if (adminLabel) adminLabel.textContent = 'All-time spend'; // Balance-only columns (Allowance/Credits/Remaining/Reset) hide in all-time mode $('table-members').parentElement.classList.toggle('members-all-time', mode === 'all'); const adminTable = document.getElementById('table-admins'); @@ -798,7 +800,7 @@ function renderMembers() { return '' + '' + esc(a.name || a.alias) + '' + '' + esc(kind) + '' + - '' + fmt(a.spend) + '' + + '' + fmt(a.all_time_spend ?? a.spend) + '' + '' + budget + '' + ''; }).join('');