fix(models): add serde rename for durationMs field

RawEntry.duration_ms was not decorated with #[serde(rename = "durationMs")]
so the camelCase field from JSONL was silently dropped, causing
sessions transcribe to always show Duration: 0ms.

Closes claudbg-nqxz

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main
Elijah Voigt 2 months ago
parent 01afe4d804
commit b6ef138aae

@ -1,11 +1,11 @@
---
# claudbg-nqxz
title: Duration shows 0ms — RawEntry.duration_ms field name mismatch (durationMs vs duration_ms)
status: todo
status: completed
type: bug
priority: high
created_at: 2026-03-30T04:44:06Z
updated_at: 2026-03-30T04:44:06Z
updated_at: 2026-03-30T05:02:50Z
parent: claudbg-8vpb
---
@ -49,3 +49,7 @@ Running against session `21fae0a8`: `grep '"durationMs":[0-9]'` finds entries li
- `src/models/session.rs``RawEntry`, `duration_ms` field (line 33)
- `src/models/stats.rs``compute_stats`, accumulates `entry.duration_ms`
## Summary of Changes
Added `#[serde(rename = "durationMs")]` to the `duration_ms` field on `RawEntry` in `src/models/session.rs`. No other changes needed — `compute_stats` already reads `entry.duration_ms` correctly.

@ -30,6 +30,7 @@ pub struct RawEntry {
/// Timestamp string (ISO 8601).
pub timestamp: Option<String>,
/// Unix milliseconds of the conversation turn duration.
#[serde(rename = "durationMs")]
pub duration_ms: Option<u64>,
/// Raw JSON for any fields this struct doesn't explicitly model.
#[serde(flatten)]

Loading…
Cancel
Save