Commit f78edb7
Handle null upload target fields (#10959)
## Description
Use `serde_with::DefaultOnNull` on `UploadTarget::fields` so the Rust
client treats an explicit JSON `null` the same as a missing field and
deserializes it as an empty vector. This keeps local-to-cloud handoff
snapshot uploads from failing when the server returns `"fields": null`.
## Linked Issue
N/A - Slack request from `#pod-oz-handoff`.
- [ ] The linked issue is labeled `ready-to-spec` or
`ready-to-implement`.
- [ ] Where appropriate, screenshots or a short video of the
implementation are included below (especially for user-visible or UI
changes).
## Testing
- `cargo fmt --manifest-path /workspace/warp/app/Cargo.toml --check`
- `CARGO_BUILD_JOBS=1 cargo nextest run --manifest-path
/workspace/warp/Cargo.toml -p warp -E
'test(upload_target_deserializes_null_fields_as_empty)'`
- `CARGO_BUILD_JOBS=1 cargo check --manifest-path
/workspace/warp/Cargo.toml -p warp --lib`
- [ ] I have manually tested my changes locally with `./script/run`
### Screenshots / Videos
N/A - no UI changes.
## Agent Mode
- [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode
CHANGELOG-OZ: Fixed local-to-cloud handoff snapshot upload allocation
when the server returns no upload form fields.
_Conversation:
https://staging.warp.dev/conversation/d49e5635-e39d-46d4-b6fd-12f04271a381_
_Run:
https://oz.staging.warp.dev/runs/019e2875-6204-77b7-9d97-70b6a9e871d8_
_This PR was generated with [Oz](https://warp.dev/oz)._
Co-authored-by: Oz <oz-agent@warp.dev>1 parent 3f0337d commit f78edb7
2 files changed
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
3 | 18 | | |
4 | 19 | | |
5 | 20 | | |
| |||
0 commit comments