From 5d0c7b297c37703e608a2db15b166c7a26a84f2c Mon Sep 17 00:00:00 2001 From: ethan Date: Fri, 21 Nov 2025 19:21:50 +1100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20fix:=20bump=20usageStore=20when?= =?UTF-8?q?=20MuxMessage=20is=20stored?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When compaction is interrupted, we don't receive usage metadata from the interruption event itself. However, we do have historical usage data from messages stored in the aggregator. Without bumping usageStore when MuxMessages are received, the UI doesn't re-render to display this historical usage, making it appear as if costs have reset. This single-line addition ensures the usage store stays in sync with message arrivals, so historical usage data is properly reflected in the UI. Fixes #695 _Generated with `mux`_ --- src/browser/stores/WorkspaceStore.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/browser/stores/WorkspaceStore.ts b/src/browser/stores/WorkspaceStore.ts index b2ecbd59f..86669a98a 100644 --- a/src/browser/stores/WorkspaceStore.ts +++ b/src/browser/stores/WorkspaceStore.ts @@ -816,6 +816,7 @@ export class WorkspaceStore { // Process live events immediately (after history loaded) aggregator.handleMessage(data); this.states.bump(workspaceId); + this.usageStore.bump(workspaceId); this.checkAndBumpRecencyIfChanged(); } return;