fix: wait for the admin record heading in command palette tests
Summary
- The admin command palette tests wait for the record heading instead of
findByTexton the organization name. - A disabled organization is matched by the option's accessible name, which includes "Disabled".
- The palette test no longer asserts the custom-domain page's own
organizationIdquery.CustomDomain.test.tsxalready covers that. - This branch also carries the TanStack group bump (React Query 5.105.3, charts, react-hotkeys, react-virtual), the same updates as #8919.
Motivation
findByText only passes while exactly one element has that text. The organization page renders the name in the sidebar, the breadcrumb, the record heading, and the details row. React Query 5.105 paints all four in one commit, so the three record-page tests timed out. The heading is the one unique copy, and it appears once the organization query the palette shares with the record layout has resolved.
The other assertions in this file stay. The handoff form, the debounce, and the result counts are the behavior those tests exist to pin down.
Gutternote review steps
No visible change from the test edit.
The dependency bump matches #8919. Spot-check that surface:
- Open an organization (
/organizations/<slug>). - Press Cmd+K or Ctrl+K. Search for that organization, and while you are on its record confirm Billing is offered.
- Open that organization's spend or usage chart and confirm it still draws.
Also check: a search for a disabled organization shows Disabled and does not offer Open in Dashboard.


Summary by cubic
Fixes the admin command palette tests so they wait for the record heading instead of the organization name, which renders in four places and caused timeouts after React Query 5.105 painted them in one commit. Also bumps the TanStack group dependencies and moves spend breakdown validation into the query function.
- The spend breakdown sections now validate responses in
queryFninstead ofselect, so invalid responses are rejected before caching and refresh alerts show the last successful estimates. - Automatic query retries are preserved for ordinary failures; invalid spend responses still skip retrying.
- Match disabled organization options by their accessible name, including "Disabled", instead of reading
textContent. - Drop the custom-domain test's assertion on the
organizationIdquery, already covered byCustomDomain.test.tsx.
Dependencies
- Bump
@tanstack/react-queryto 5.105.3, plus@tanstack/charts,@tanstack/react-hotkeys,@tanstack/react-virtual, and the TanStack lockfile.
🚀 Preview Environment (PR #9089)
Preview URL: https://pr-9089.dev.getgram.ai
| Component | Status | Details | Updated (UTC) |
|---|---|---|---|
| ✅ Database | Ready | Existing database reused | 2026-11-16 22:13:44. |
| ✅ Images | Available | Container images ready | 2026-11-16 22:14:45. |
Gram Preview Bot