Repository navigation
Conversation
TanStack Query v6 removes ensureQueryData, ensureInfiniteQueryData and prefetchQuery, which are already deprecated in 5.x. The ensure* calls become query()/infiniteQuery() with staleTime: "static", so loaders keep returning cached data instead of refetching it once it is older than the client's default stale time. The prefetchQuery calls become query().catch(noop): prefetchQuery never rejected, and some loaders rely on that to not fail when an optional endpoint errors.
@types/react deprecates FormEvent since it doesn't map to a real event type: form submit handlers now take SubmitEvent, and the room search input handler takes InputEvent. The MAS site-config mock no longer sets registration_token_required. It is deprecated in favour of password_registration_token_required, optional in the API type, and nothing in the app reads it.
Catches deprecated APIs ahead of major upgrades, such as the TanStack Query methods removed in v6.
Nothing reads .browserslistrc since browserslist-to-esbuild and eslint-plugin-compat were removed, so the config file, the helper script and the direct dependency only add noise. browserslist stays as a transitive dependency.
Deploying admin-beta-element-dev with
|
| Latest commit: |
3d8618e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://7fcac542.admin-beta-element-dev.pages.dev |
| Branch Preview URL: | https://quenting-tanstack-query-v6-p.admin-beta-element-dev.pages.dev |
sandhose
force-pushed
the
quenting/tanstack-query-v6-prep
branch
3 times, most recently
from
November 23, 2026 10:18
b5e037b to
ae3ce04
Compare
TanStack Query v6 plans to drop `enabled` in favour of `skipToken`, which makes the query function exist only once its inputs do, so no placeholder arguments are needed to satisfy the types. mediaThumbnailQuery already takes an optional mxc, and skips the query itself when there is none. The personal token page renders the owner-dependent regenerate button in a child component that only mounts when the token has an owner, and passes the owner ID straight to its user card. The room info components replace their conditionally enabled members query with conditional rendering: unnamed rooms render components that always fetch the members, and named rooms never mount them. The login page keeps `enabled` on its three chained discovery queries: each depends on the previous one's result, and the page shows a per-step error from the first failed attempt.
Every loader and component under _console rediscovered the homeserver base URL through the well-known query, and shared cells and cards took a server name only to do the same. The _console beforeLoad now awaits the well-known after the login guard and exposes synapseRoot in the route context, so loaders and components read it from there and shared components take it as a prop.
sandhose
force-pushed
the
quenting/tanstack-query-v6-prep
branch
from
November 23, 2026 10:40
ae3ce04 to
3d8618e
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adopts the parts of the TanStack Query v6 roadmap that already work on 5.x, so the eventual upgrade is a version bump. Best reviewed commit by commit.
Imperative query methods
v6 removes
ensureQueryData,ensureInfiniteQueryDataandprefetchQuery, all already deprecated. The 80 call sites move toqueryClient.query()/infiniteQuery():ensureQueryData(opts)→query({ ...opts, staleTime: "static" }). Without"static", loaders would block on refetching data older than the default stale time instead of returning the cache.prefetchQuery(opts)→query(opts).catch(noop).prefetchQuerynever rejected, and some loaders rely on that for optional endpoints.typescript/no-deprecatedis now an error so these can't come back. Enabling it also flagged React's deprecatedFormEvent(nowSubmitEvent/InputEvent) and a deprecated field in the MAS site-config mock that nothing reads.enabled→skipTokenUpstream is still discussing whether
enabledgets removed, but where a query's inputs may be missing, making the query function exist only once they do removes the|| ""placeholder arguments.mediaThumbnailQueryalready took an optionalmxc, so it skips inside the factory.room-info.tsxhad all inputs present and just didn't always want the data. It now renders conditionally: unnamed rooms mount components that always fetch the members, named rooms never do.The login page keeps
enabledon its three chained discovery queries. Each depends on the previous one's result and the page shows a per-step error from the first failed attempt; the alternatives tried (one query chaining the steps, serial suspense queries) were either awkward or lost that feedback. It can be revisited once upstream settles.Query keys are unchanged.
Browserslist
.browserslistrchas had no consumer sincebrowserslist-to-esbuildandeslint-plugin-compatwere removed, so it goes away along with its script and direct dependency.Synapse root in the route context
Not required by v6, but it removes most of the remaining well-known plumbing.
_console'sbeforeLoadawaits the well-known once and exposessynapseRootin the route context; loaders and route components read it from there, and the shared user cells and cards take it as a prop.wellKnownQuerygoes from 33 call sites to 6, the ones that run outside the_consolecontext (login, callback, token refresh, MAS query functions, the root error page).A failing well-known still ends on the same error page with the sign-out option. The console layout keeps a
useQueryobserver on the well-known so it stays in memory for the whole session, as it did when the layout read it withuseSuspenseQuery.