Commit 6b2eef0
committed
🤖 fix: expose setWorkspaceMetadata from WorkspaceContext
App.tsx needs to optimistically update workspace metadata when creating/forking
workspaces to avoid race condition with validation effect. WorkspaceContext now:
- Exposes setWorkspaceMetadata to allow App.tsx to update metadata immediately
- Updates metadata map immediately in createWorkspace before returning
- Passes through setWorkspaceMetadata in AppLoader instead of no-op
This ensures metadata is available when setSelectedWorkspace is called, preventing
the validation effect from clearing the selection before the async subscription fires.1 parent 935f3bd commit 6b2eef0
2 files changed
+13
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
168 | | - | |
169 | | - | |
| 167 | + | |
170 | 168 | | |
171 | 169 | | |
172 | 170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
| |||
173 | 176 | | |
174 | 177 | | |
175 | 178 | | |
176 | | - | |
177 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
178 | 186 | | |
179 | 187 | | |
180 | 188 | | |
| |||
187 | 195 | | |
188 | 196 | | |
189 | 197 | | |
190 | | - | |
| 198 | + | |
191 | 199 | | |
192 | 200 | | |
193 | 201 | | |
| |||
298 | 306 | | |
299 | 307 | | |
300 | 308 | | |
| 309 | + | |
301 | 310 | | |
302 | 311 | | |
303 | 312 | | |
| |||
0 commit comments