Repository navigation
Commit aace71e
fix(signals): report isPending during refresh()/refetch of a resting optimistic source (closes #2799)
A resting `createOptimistic(asyncFn)` (no active override, `_overrideValue ===
NOT_PENDING`) reported `isPending` as `false` while a `refresh()`-driven refetch
was in flight, diverging from `createMemo` and `createOptimisticStore` which both
report `true`. The optimistic-capable identity was wrongly muting pendingness even
when no override was active.
`computePendingState` now excludes only a resting optimistic node from the
upstream "value held in transition" check (that held `_pendingValue` belongs to a
reverting optimistic write, not a refetch). A resting optimistic node otherwise
behaves like a plain async memo, reporting pending via the downstream
async-in-flight check. Muting pending remains the job of an active override.
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 26f443f commit aace71e
3 files changed
Lines changed: 51 additions & 5 deletions
File tree
- .changeset
- packages/solid-signals
- src/core
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1118 | 1118 | | |
1119 | 1119 | | |
1120 | 1120 | | |
1121 | | - | |
1122 | | - | |
1123 | | - | |
1124 | | - | |
1125 | | - | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
1126 | 1133 | | |
1127 | 1134 | | |
1128 | 1135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
905 | 905 | | |
906 | 906 | | |
907 | 907 | | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
908 | 942 | | |
909 | 943 | | |
910 | 944 | | |
| |||
0 commit comments