Commit c90fcca
authored
fix(local-mcp): don't submit before local MCP servers finish loading
useTaskCreation read useLocalMcpCloudServers's data at submit time without
checking it had resolved. Submitting a cloud task before the (async,
~/.claude.json-backed) query settled silently shipped importedMcpServers and
relayedMcpServers empty, dropping the user's local servers with no error.
useLocalMcpCloudServers now returns { servers, isLoading } instead of a bare
array; isLoading tracks the query's own isLoading (false while disabled, so
it never blocks a caller that isn't waiting on it). useTaskCreation blocks
submit with a toast while loading; McpServersView takes the servers field
unchanged.1 parent cf5bff5 commit c90fcca
3 files changed
Lines changed: 23 additions & 4 deletions
File tree
- packages/ui/src/features
- local-mcp
- mcp-servers/components
- task-detail/hooks
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
12 | 19 | | |
13 | 20 | | |
14 | 21 | | |
15 | 22 | | |
16 | 23 | | |
17 | 24 | | |
18 | 25 | | |
19 | | - | |
| 26 | + | |
20 | 27 | | |
21 | 28 | | |
22 | 29 | | |
| |||
28 | 35 | | |
29 | 36 | | |
30 | 37 | | |
31 | | - | |
| 38 | + | |
32 | 39 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
| 198 | + | |
| 199 | + | |
199 | 200 | | |
200 | 201 | | |
201 | 202 | | |
| |||
240 | 241 | | |
241 | 242 | | |
242 | 243 | | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
243 | 254 | | |
244 | 255 | | |
245 | 256 | | |
| |||
534 | 545 | | |
535 | 546 | | |
536 | 547 | | |
| 548 | + | |
537 | 549 | | |
538 | 550 | | |
539 | 551 | | |
| |||
0 commit comments