Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: settle mount-time fetches in UsagePage date input test (#10389)

Adam Eivy3d2fc2f4cbb2
diff --git a/client/src/pages/UsagePage.test.jsx b/client/src/pages/UsagePage.test.jsx
index 7a73e7e6a3..c3cdb209a9 100644
--- a/client/src/pages/UsagePage.test.jsx
+++ b/client/src/pages/UsagePage.test.jsx
@@ -577,6 +577,10 @@ describe('UsagePage custom date range inputs', () => {
it('keeps a half-typed date instead of resetting it, and commits once complete', async () => {
api.getUsage.mockResolvedValue(usage);
render(<MemoryRouter><UsagePage /></MemoryRouter>);
+ // Settle mount-time fetches before interacting with the form. ClaudeCodeModelTokensCard
+ // calls getClaudeCodeModelUsage on mount; waiting here ensures all mount effects complete
+ // before we read the input value, avoiding act warnings from deferred state updates.
+ await act(async () => {});
const from = await screen.findByLabelText('From date');
const callsBefore = api.getUsage.mock.calls.length;