Commit d379c0f
committed
fix: initialize git status atom with isPending: true to avoid false idle state on first render
The gitStatusStateAtom family was initialized with EMPTY_GIT_STATUS_STATE
(isPending: false), but useEffect (which triggers watchGitStatus and
markGitStatusPending) only fires after the first render. This caused a
single-frame flash where consumers saw { data: null, isPending: false },
incorrectly signaling that loading was complete.
Introduce PENDING_GIT_STATUS_STATE with isPending: true and use it as the
initial value for per-cwd atoms so the first render correctly indicates a
pending state.1 parent fc50e65 commit d379c0f
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
47 | 54 | | |
48 | 55 | | |
49 | | - | |
| 56 | + | |
50 | 57 | | |
51 | 58 | | |
52 | 59 | | |
| |||
0 commit comments