Rust serializes `Option<String>` without `skip_serializing_if`, so absent fields arrive as `null`. Zod's `.optional()` accepts only `undefined`, so `safeParse` failed and three chains silently died: - `boundRuntimeEventSchema.sessionId/messageId`: desktop-v1 and mock events carry no session id, so every one of them was discarded; AstrBot error and heartbeat frames were discarded too. - `remoteChatSessionSchema.displayName/updatedAt`: one null field threw for the whole array, leaving the remote session list permanently empty. - `astrbotModelOptionSchema.name`: a null name failed capability parsing, which permanently disabled the file upload button. The sibling `slotRuntimeSnapshotSchema` in the same file already used `.nullish()` throughout, which is what makes this look like a miss during the de-enveloping change rather than a deliberate choice. `formatSessionTime` widens with it: `updatedAt` is now `string | null` and the existing falsy guard already handled null. Refs P1-7a / F-06. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| features | ||
| lib | ||
| pages | ||
| test | ||
| types | ||
| App.test.tsx | ||
| App.tsx | ||
| main.tsx | ||
| styles.css | ||
| vite-env.d.ts | ||