Commit df30cbc
authored
🤖 fix: use ResultSchema for sendMessage output to prevent field stripping (#773)
## Summary
- Fix workspace creation failing with "Unexpected response from server"
due to Zod schema union ordering
- `z.union()` was matching `ResultSchema(z.void())` first, which
stripped `workspaceId`/`metadata` as "extra keys"
- Replaced with single `ResultSchema` using optional fields for
consistent response shape
## Test plan
- [x] `make typecheck` passes
- [x] `useCreationWorkspace.test.tsx` tests pass
- [x] Manual test: create new workspace from scratch - should navigate
to workspace instead of showing error toast
_Generated with `mux`_
Signed-off-by: Thomas Kosiewski <[email protected]>1 parent 41c77ef commit df30cbc
File tree
6 files changed
+31
-31
lines changed- src
- browser/components/ChatInput
- common/orpc/schemas
- node
- orpc
- services
- tests/integration
6 files changed
+31
-31
lines changedLines changed: 9 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
142 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
143 | 145 | | |
144 | 146 | | |
145 | 147 | | |
146 | 148 | | |
147 | 149 | | |
148 | | - | |
| 150 | + | |
149 | 151 | | |
150 | 152 | | |
151 | 153 | | |
| |||
357 | 359 | | |
358 | 360 | | |
359 | 361 | | |
360 | | - | |
361 | | - | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
362 | 366 | | |
363 | 367 | | |
364 | 368 | | |
| |||
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
132 | | - | |
133 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
140 | | - | |
| 141 | + | |
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
171 | | - | |
| 170 | + | |
172 | 171 | | |
173 | | - | |
174 | | - | |
175 | | - | |
| 172 | + | |
| 173 | + | |
176 | 174 | | |
177 | | - | |
| 175 | + | |
| 176 | + | |
178 | 177 | | |
179 | 178 | | |
180 | 179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
| 202 | + | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | 205 | | |
209 | 206 | | |
210 | 207 | | |
211 | 208 | | |
212 | 209 | | |
213 | 210 | | |
214 | 211 | | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | 212 | | |
221 | | - | |
| 213 | + | |
222 | 214 | | |
223 | 215 | | |
224 | 216 | | |
225 | | - | |
226 | | - | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
227 | 221 | | |
228 | 222 | | |
229 | 223 | | |
230 | | - | |
| 224 | + | |
| 225 | + | |
231 | 226 | | |
232 | 227 | | |
233 | 228 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
| 456 | + | |
456 | 457 | | |
457 | 458 | | |
458 | 459 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
136 | | - | |
| 135 | + | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| |||
0 commit comments