Rust CLI for tangled
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: add missing optional fields to Issue struct for deserialization

Some issue records in the wild include optional fields that weren't
in the Issue struct, causing deserialization failures:
- createdAt: not present in all records
- $type: AT Protocol record type field
- owner: legacy field on some issues
- issueId: numeric ID on some issues
- cid: content identifier in listRecords response

This makes all these fields optional so the CLI can deserialize
any issue record regardless of which optional fields are present.

💖 Generated with Crush

Assisted-by: Claude Sonnet 4.5 via Crush <crush@charm.land>

dunkirk.sh 53768759 e5e84293

verified
+10 -2
+10 -2
crates/tangled-api/src/client.rs
··· 705 #[derive(Deserialize)] 706 struct Item { 707 uri: String, 708 value: Issue, 709 } 710 #[derive(Deserialize)] ··· 1346 pub title: String, 1347 #[serde(default)] 1348 pub body: String, 1349 - #[serde(rename = "createdAt")] 1350 - pub created_at: String, 1351 } 1352 1353 #[derive(Debug, Clone)]
··· 705 #[derive(Deserialize)] 706 struct Item { 707 uri: String, 708 + #[allow(dead_code)] 709 + cid: Option<String>, 710 value: Issue, 711 } 712 #[derive(Deserialize)] ··· 1348 pub title: String, 1349 #[serde(default)] 1350 pub body: String, 1351 + #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")] 1352 + pub created_at: Option<String>, 1353 + #[serde(rename = "$type", skip_serializing_if = "Option::is_none")] 1354 + pub record_type: Option<String>, 1355 + #[serde(skip_serializing_if = "Option::is_none")] 1356 + pub owner: Option<String>, 1357 + #[serde(rename = "issueId", skip_serializing_if = "Option::is_none")] 1358 + pub issue_id: Option<i64>, 1359 } 1360 1361 #[derive(Debug, Clone)]