pub fn load_viewed_state(cache_dir: &Path) -> ViewedStateExpand description
Load the viewed-state ledger from cache_dir, returning an empty default
when the file is missing, unreadable, or not valid JSON.
A missing ledger is the common first-run case, and a garbled one must never hard-error a render, so both collapse to the empty default rather than a caller-visible error. A version the reader does not understand is also treated as empty (forward-compat: a future writer’s shape never crashes an older render).