React Query Devtools retains detached transition targets through bundled Kobalte registry
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript, react
- Lĩnh vực
- frontend, performance
Hướng nghiên cứu
The retention is in the published Devtools bundle, where transitionsByElement and the bundled Kobalte utils 0.9.2 track transition targets on the body. Start from the linked repro's /react/ entry and window.repro.countAliveTargets() after a forced GC, then compare against the standalone Kobalte example. Done means the stopped-event run drops to 0 after GC without breaking active transitions on connected elements, which depends on the upstream Kobalte fix being released into Devtools.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
React Query Devtools 5.107.1 embeds Kobalte's global transition tracking. If an application element stops a native transitionend event from bubbling and is removed after the transition completes, the bundled registry can retain the detached element. The body-level registry tracks application elements outside the Devtools UI too.
In a minimal React app with one stable query and the Devtools panel mounted, 1,000 completed and removed transition targets remain alive after manual Chrome garbage collection. In the normal-event control, 0 remain alive after GC.
The underlying Kobalte issue and proposed fix are:
This report tracks the downstream Devtools impact and eventual inclusion of the upstream fix. The tested published @tanstack/query-devtools bundle includes transitionsByElement and the affected utils 0.9.2 code. Updating an application's separate Kobalte dependency will not replace code already embedded in that bundle.
Your minimal, reproducible example
https://github.com/whatisyourname0/kobalte-transition-retention-repro/tree/e26a70a/react
The repository includes both a standalone Kobalte example at / and the React Query Devtools example at /react/. The React entry does not execute a direct Kobalte import or use a patched dependency. It mounts QueryClientProvider, one stable sample query, and ReactQueryDevtools with initialIsOpen: true.
Steps to reproduce
git clone https://github.com/whatisyourname0/kobalte-transition-retention-repro.git
cd kobalte-transition-retention-repro
git checkout e26a70a
npm ci
npm run dev
- Open
/react/on the displayed local origin. Wait until the Devtools panel andSample query readyappear. - Click Run stopped events. Wait for completion: 1,000 started, 1,000 ended, 1,000 removed, 0 cancelled. These are real CSS transitions; each target stops
transitionendpropagation, then is removed after completion. - Open Chrome DevTools → Memory → Collect garbage.
- Evaluate
window.repro.countAliveTargets()in Console: 1000. - Reload, wait for the panel, click Run control, wait for completion, and collect garbage again. The same expression returns 0.
- To inspect ownership, take a heap snapshot after the stopped case and inspect detached
retention-probetargets andtransitionsByElementin the Devtools bundle.
The fixture keeps only WeakRefs once the async run settles and never logs/exports individual targets. A count before GC is not evidence of retention. callbackRan: null on the React page is intentional: it does not import Kobalte's private callback helper. The standalone page separately demonstrates the blocked callback and Map retaining path.
Expected behavior
Removed application elements are released even when completion events do not reach the body-level listener. Active transitions on connected elements continue to be respected.
How often does this bug happen?
Reproduced in the stopped-event run; the normal-event control released all targets.
Screenshots or Videos
Reproduction UI (not a Memory-panel capture):

Platform
macOS 26.7; Chrome 157.0.8103.78.
Tanstack Query adapter
react-query
TanStack Query version
@tanstack/react-query and @tanstack/react-query-devtools: 5.107.1. React / React DOM: 19.3.1. Exact dependencies are locked. Node >=24 to run the fixture.
TypeScript version
Not applicable; the reproduction uses JavaScript.
Additional context
Both React-page cases completed all 1,000 native transitions and removed all targets with no cancellation events. The affected transition has already ended before removal, so removal cannot be expected to emit transitioncancel for it.
The Kobalte-only reproduction has also been compared against the proposed upstream fix (1,000 retained → 0 after GC). The React Devtools reproduction uses the unmodified published Devtools bundle; that candidate comparison has not been repeated against a rebuilt Devtools bundle. This report concerns the demonstrated DOM retention condition, not a claim that Query cache retention or all application memory growth has this cause.
Could you track incorporating the Kobalte fix into a Devtools release once upstream review/release is complete, or advise on a suitable interim mitigation?
- Ngôn ngữ chính
- TypeScript
- Star
- 50.6k
- Fork
- 4.2k
- Merge trung bình
- 8 giờ 37 phút
- Pull request đã merge (30 ngày)
- 450
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của TanStack/query
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
TanStack/query#12466 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
solid-query: STRICT_READ_UNTRACKED on Solid 2 — client()/options() read in component body (useMutation, useBaseQuery)Có thể làm lại được @LeonxLJX đã nhận 74 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
TanStack/query#11358 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Infinite render loop when select maps keepPreviousData to undefined in v5.105.2+Có thể đã có người làm @mooxl đã nhận 6 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
TanStack/query#12574 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
infiniteQuery throws "getNextPageParam is not a function" when 2+ stale pages are cachedCó thể đã có người làm @abu-tahir-0 đã nhận 7 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của TanStack/query
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
vercel-labs/ui#809 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bot:ai-assisted component:platform-js status:untriaged
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 74/100
midnightntwrk/platform-js#38 ·
-
[bug] Second false positive on high-cost plugin alert: detection only compares patch entry id, community plugin dsh-auto | [bug] 高成本插件告警第二次误报:检测只比对 patch 条目 id,社区插件 dsh-auto-review 被认成 @deepseek-ai/dsh-experimental-auto-reviewCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
ranxianglei/billion-context#7068 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
vendor: bump whisper.cpp past 6a8addd — the current pin aborts the app on a failed Metal initĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
mybigday/whisper.rn#348 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
six-group/six-webcomponents#600 ·