โ– humdrum codex / soft

โ† issues

TASK-010 TUI: Cache-age-aware initial refresh timer

To Do tui priority: medium enhancement

created 2026-06-12 04:21

Description

On startup, the TUI always fires refresh_data() immediately even if the Next.js app's snapshots are only seconds old. Instead, read refreshedAt from each snapshot and compute how much of the TTL has already elapsed, then wait only the remaining time before the first refresh.

For example: if a source has a 5-minute TTL and its snapshot is 4 minutes old, the TUI should wait ~1 minute before its first fetch, not 5 minutes (or 0).

Implementation:

Acceptance Criteria