Skip to content

Commit dced39c

Browse files
🤖 fix: bump usageStore when MuxMessage is stored (#696)
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. ## Changes - Added `this.usageStore.bump(workspaceId)` after live MuxMessage storage in WorkspaceStore ## Testing - Verified typecheck passes - Change follows existing pattern from stream-end/stream-abort handlers Relates to #695 _Generated with `mux`_
1 parent e4646a2 commit dced39c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/browser/stores/WorkspaceStore.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,7 @@ export class WorkspaceStore {
818818
// Process live events immediately (after history loaded)
819819
aggregator.handleMessage(data);
820820
this.states.bump(workspaceId);
821+
this.usageStore.bump(workspaceId);
821822
this.checkAndBumpRecencyIfChanged();
822823
}
823824
return;

0 commit comments

Comments
 (0)