fix(quote): report missing change and volume as null, not zero

change, change_pct and volume were `unwrap_or(0)` when the provider
omitted them (MSN quotes and screener rows; Yahoo with no previous
close), so "unknown" read as "unchanged, zero volume". They are now
Option fields that serialize as null when missing. The table shows "-",
and the performers screens sort unknown changes last in both
directions. Present values are unchanged and cached entries still load.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ld3fDSDiBzAaQvgZJX5NKM
This commit is contained in:
Claude 2026-10-02 14:34:19 +00:00
commit 135034966c
No known key found for this signature in database
6 changed files with 106 additions and 62 deletions

View file

@ -49,8 +49,8 @@ mod tests {
let quote = parse_quote_from_str("BBCA.JK", &raw).expect("quote parsed");
assert_eq!(quote.symbol, "BBCA.JK");
assert_eq!(quote.price, 9875);
assert_eq!(quote.change, 117);
assert_eq!(quote.volume, 12_300_000);
assert_eq!(quote.change, Some(117));
assert_eq!(quote.volume, Some(12_300_000));
assert_eq!(quote.market_cap, Some(1_215_200_000_000_000));
assert_eq!(quote.avg_volume, Some(10_000_000));
}