Fast startup via cached-first + async-refresh pattern. ## Runtime - `tokio` multi-thread runtime - Per-widget refresh task with its own `refresh_interval` timer - Shared `State` map: fetchers write, draw loop reads latest snapshot - Persist results to `~/.cache/splashboard/<widget-id>.json` with TTL metadata ## Startup flows **Default (cache-first, fast):** 1. Load cached payloads synchronously 2. Render immediately (<50ms target) 3. Spawn fetches in background; await completion with timeout before exit; persist 4. Next invocation reads the just-refreshed cache **`wait_for_fresh = true` / `--wait`:** 1. Kick off all fetches 2. Await first completion per widget (with per-widget timeout) 3. Render with fresh data → exit ## Hard requirement Default path MUST NOT block shell startup perceptibly. Blown timeouts render stale cache with a visual staleness indicator rather than hanging. ## Depends on - #18 (Payload), #5 (plugin subprocess needs the same timeout/IPC plumbing)
Activity
feat(config): TOML config loading with per-directory discovery (#2)
Merge pull request #28 from unhappychoice/feat/4-async-cache