Commit 725c20d
fix(assistant): guard against stuck loading state and fix useCallback deps
- Add else branch in refreshAssistants to set loading:false on null response,
preventing a stuck loading state if getAssistants() returns falsy.
- Add refreshAssistants to useCallback deps array with eslint-disable,
addressing the exhaustive-deps lint warning (zustand functions are stable).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 18e37d8 commit 725c20d
2 files changed
Lines changed: 4 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
229 | 228 | | |
230 | 229 | | |
231 | 230 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
| |||
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
74 | | - | |
| 73 | + | |
75 | 74 | | |
76 | 75 | | |
77 | 76 | | |
| |||
0 commit comments