Skip to main content

Module walkthrough_state

Module walkthrough_state 

Source
Expand description

Local, account-free viewed-state for fallow review --walkthrough.

Per-file “I’ve looked at this” marks live in a small JSON ledger inside the resolved cache dir (.fallow/walkthrough-state.json, already gitignored). The ledger is purely local: no account, no network, human/git-readable.

Staleness is keyed on the guide’s graph_snapshot_hash. A mark is honored ONLY when the stored hash matches the current guide hash, so a tree that moved silently un-views every file for that render without deleting the marks (a no-op carry-forward keeps them if the user reverts). Rendering is read-only and idempotent; marks are written ONLY on an explicit --mark-viewed mutation, never as a side effect of a render.

Structs§

ViewedEntry
One viewed entry: when the file was marked viewed (RFC 3339-ish UTC).
ViewedState
The on-disk viewed-state ledger.

Functions§

load_viewed_state
Load the viewed-state ledger from cache_dir, returning an empty default when the file is missing, unreadable, or not valid JSON.
mark_viewed
Record each path in files as viewed against current_hash, atomically.