Commit 9d80f0e
committed
Fix silent fetch activeQueryId not being set (v1.0.14)
CRITICAL BUG FOUND: Silent fetches were not setting activeQueryId!
The Issue:
When _startItemFetch is called with loud=false (silent fetch), it was only
setting activeLevelQueryIds but NOT activeQueryId (line 1603). This caused
finalizeItemMeta to fail query ID matching, leaving isLoading=true.
Timeline:
1. Silent fetch starts: activeLevelQueryIds set, but activeQueryId NOT set
2. Fetch completes: finalizeItemMeta called with qid
3. Query matching: prevActiveQueryId is null, matchedActiveQuery = false
4. Result: isLoading stays true because query IDs don't match
The Fix:
Always set activeQueryId when starting a fetch, regardless of loud/silent.
Only the isLoading flag should differ between loud and silent fetches.
Before (line 1603):
assignRef(ref, { meta: { ...ref.meta, error: null, activeLevelQueryIds: nextActiveLevels } })
After:
assignRef(ref, { meta: { ...ref.meta, error: null, activeQueryId: qid, activeLevelQueryIds: nextActiveLevels } })
This matches the collection fetch behavior which ALWAYS sets activeQueryId
(line 1532), ensuring query ID matching works correctly in finalizeItemMeta.
Version: 1.0.13 → 1.0.141 parent c7c0a51 commit 9d80f0e
2 files changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1596 | 1596 | | |
1597 | 1597 | | |
1598 | 1598 | | |
1599 | | - | |
| 1599 | + | |
1600 | 1600 | | |
1601 | 1601 | | |
1602 | 1602 | | |
1603 | | - | |
| 1603 | + | |
1604 | 1604 | | |
1605 | 1605 | | |
1606 | 1606 | | |
| |||
0 commit comments