Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Automatic Query Collection refetch still has no observable result-application settlement

Đang mở
#1,972 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
48/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
sqlite, typescript
Lĩnh vực
database

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
3.9k
Fork
268
Merge trung bình
1 ngày 3 giờ
Pull request đã merge (30 ngày)
148

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của TanStack/db

Tất cả issue của TanStack/db

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.