Keep Query collection errors visible until retry succeeds - #1940
KyleAMathews wants to merge 5 commits into
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (6)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthrough
ChangesQuery error retry
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix · Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to Query collection errors now stay visible until a successful result is applied, and failed retries count as another failure. No concrete merge-blocking issue was identified. The remaining gaps are untested scenarios, not known bugs. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The retry keeps errors visible until rows are applied, reducing premature recovery signals. No expanded access or weakened validation was identified in the reviewed path. Risk remains low because callers observe changed recovery timing, while concurrent-query and deferred-application behavior are not fully demonstrated. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (4 skipped: 4 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
More templates
@tanstack/angular-db
@tanstack/browser-db-sqlite-persistence
@tanstack/capacitor-db-sqlite-persistence
@tanstack/cloudflare-durable-objects-db-sqlite-persistence
@tanstack/db
@tanstack/db-ivm
@tanstack/db-sqlite-persistence-core
@tanstack/electric-db-collection
@tanstack/electron-db-sqlite-persistence
@tanstack/expo-db-sqlite-persistence
@tanstack/node-db-sqlite-persistence
@tanstack/offline-transactions
@tanstack/powersync-db-collection
@tanstack/query-db-collection
@tanstack/react-db
@tanstack/react-native-db-sqlite-persistence
@tanstack/react-router-with-db
@tanstack/rxdb-db-collection
@tanstack/solid-db
@tanstack/svelte-db
@tanstack/tauri-db-sqlite-persistence
@tanstack/trailbase-db-collection
@tanstack/vue-db
commit: |
|
Size Change: 0 B Total Size: 174 kB ℹ️ View Unchanged
|
|
Size Change: 0 B Total Size: 7.97 kB ℹ️ View Unchanged
|
🎯 Changes
clearError()now keeps the previous error visible until a successful Query result applies to the Collection. A terminal failed retry records another consecutive failure. Intermediate Query retry attempts do not recount the old error. This prevents the UI from appearing recovered before the rows are available.Previously,
clearError()setlastErrortoundefinedanderrorCountto zero before it started the refetch. A cached success notification or successful fetch could also clear an error before row application finished. The retry now starts first, and successful application clears the public error fields. A terminal failure advances the count, even when the same error returns at clock time zero.The ownership oracle checks initial, background, and Collection application failures. It holds a retry before fetch settlement and after fetch settlement, before row application. It also checks a repeated error object at clock time zero and an intermediate automatic Query retry. Each new case failed on the previous patch and passes now. The production diff adds eight net lines.
During a mutation handler,
clearError()can resolve at the documented fetch boundary before application clears the error. The oracle does not cover concurrent tracked Queries or deferred application.✅ Checklist
pnpm testsuite.🚀 Release Impact
Fixes #539.
Summary by CodeRabbit