Automatic Query Collection refetch still has no observable result-application settlement
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 48/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- sqlite, typescript
- 領域
- database
研究方向
Start in the Query Collection implementation where pendingResultApplications is tracked, then inspect collection.utils and the existing utils.refetch barrier. Use the linked downstream patch and regression test as behavioral references, including automatic invalidation/revalidation and unchanged results. Done means a public observable settlement signal covers every automatic query result without changing the explicit refetch barrier.
由索引模型根據 Issue 內容生成。
描述
Versions
@tanstack/[email protected], @tanstack/[email protected], @tanstack/[email protected], @tanstack/[email protected], @tanstack/[email protected].
Problem
#1828 was closed after utils.refetch() became an awaitable result-application barrier. That fixes an explicit refetch. An automatic Query Collection refetch (Query invalidation/revalidation) still has no public way for a reactive consumer to tell whether its result has finished applying to collection rows.
With an existing persisted row, hold the SQLite commit that applies a newer fetched result. The Query cache already reports a successful, idle fetch with a newer dataUpdatedAt, while collection.get(key) still returns the old row. The pending application is tracked internally by pendingResultApplications, but collection.utils does not expose it. When the result is identical to existing rows, application completion emits no collection change event, so observing collection changes cannot close the gap either.
Our status hook needs this distinction before it treats collection rows as authoritative for a user decision. We currently patch 1.3.1 to expose isApplyingResult and subscribeResultApplications (start, invalidation, and settlement, including empty diffs): downstream patch and regression test.
Expected
Either a public application-phase state with a subscription, or an observable successful-application event/revision that advances for every automatic query result, including an unchanged result. The explicit utils.refetch() barrier can remain as it is; the missing case is work initiated by the Query Collection itself.
- 主要語言
- TypeScript
- 星號
- 4k
- 分支
- 277
- 平均合併
- 1 天 11 小時
- 30 天內合併 PR
- 148
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
TanStack/db 的其他 Issue
-
難度 1/5 1-3 小時 新手友好度 88/100
維護者通常 1 天內回覆
-
OfflineExecutor.dispose() never settles pendingTransactionPromises可能重新可做 @Claire-ovo 於 11 天前認領,目前沒有進行中的 PR。 未關閉
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
Two @tanstack/db tests time out under CPU load because a cold module import counts against the 5 s default timeout可能已有人在做 @jp-knj 於 9 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 48/100
維護者通常 1 天內回覆
相似的 Issue
-
Navbar avatar and name stay stale after saving profile changes可能已有人在做 @alexechoi 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 76/100
marmelab/atomic-crm#416 ·
維護者通常 1 天內回覆
-
feature-request
難度 2/5 1-3 小時 新手友好度 66/100
bluesky-social/social-app#12343 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
lucide-icons/lucide#5165 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 64/100
marktext/marktext#6033 · 1 則留言 ·
維護者通常 1 天內回覆
-
area:desktop bug has repro platform:macos
難度 2/5 1-3 小時 新手友好度 62/100
anthropics/claude-code#107903 ·