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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
test: flush UsagePage date commit with awaited act instead of a 1s waitFor race (#10323)
[._.]/ Adam Eivy2fec7132f46c
diff --git a/client/src/pages/UsagePage.test.jsx b/client/src/pages/UsagePage.test.jsxindex 54fc5f86f0..7a73e7e6a3 100644--- a/client/src/pages/UsagePage.test.jsx+++ b/client/src/pages/UsagePage.test.jsx@@ -586,8 +586,10 @@ describe('UsagePage custom date range inputs', () => {expect(from.value).toBe('0002-09-29');expect(api.getUsage.mock.calls.length).toBe(callsBefore);- fireEvent.change(from, { target: { value: '2026-09-29' } });- await waitFor(() => expect(api.getUsage.mock.calls.length).toBeGreaterThan(callsBefore));+ // The commit has no debounce: it updates the URL param, and an effect then refetches.+ // Awaiting act flushes that whole chain, so the assertion never races a wall-clock timeout.+ await act(async () => { fireEvent.change(from, { target: { value: '2026-09-29' } }); });+ expect(api.getUsage.mock.calls.length).toBeGreaterThan(callsBefore);expect(from.value).toBe('2026-09-29');});});