Skip to content

Sources: configurable daily update-check time + next-run visibility (#194)#200

Open
jozef2svrcek wants to merge 1 commit into
mainfrom
schedule-control-and-visibility-194
Open

Sources: configurable daily update-check time + next-run visibility (#194)#200
jozef2svrcek wants to merge 1 commit into
mainfrom
schedule-control-and-visibility-194

Conversation

@jozef2svrcek

Copy link
Copy Markdown
Contributor

Closes #194.

Restores the scheduling surface removed in #180. The scheduler already runs feeds on a daily off-peak check with automatic catch-up after downtime — this re-exposes and lets you control it, and surfaces the monthly FIDE refresh too.

Backend

GET/POST /schedule:

  • GET{ daily_minute, next_check (local ISO), fide_last_refreshed, fide_due }
  • POST { daily_minute } → sets the daily check time (wrapped to 0–1439)

New scheduler::next_scheduled(daily_minute) computes the next occurrence.

Frontend

  • Sources page — a schedule control at the top: "Check feeds for updates daily at [HH:MM]" with a "Next check in Nh · a missed check (machine off) runs at the next start" readout. One global time for all feeds (TWIC + Lichess).
  • Maintenance → FIDE — the FIDE list is scheduled housekeeping on the same tick, so its section now shows "Last refreshed <date>" and flags "update due" (per the note that FIDE belongs here, not a Sources card).

Verified

Live round-trip: GET /schedule{daily_minute:240, next_check:"…T04:00:00", …}; POST {daily_minute:390} → next_check becomes …T06:30:00.

Build + clippy (-D warnings) + 48 chess-db tests green; frontend builds.

🤖 Generated with Claude Code

https://claude.ai/code/session_019KdPPg7P3bZ5p2RRhZZcv2

…194)

Restores the scheduling surface removed in #180. The scheduler already
runs feeds on a daily off-peak check with automatic catch-up after
downtime; this re-exposes and controls it.

Backend: GET/POST `/schedule` — read the daily check time (minutes past
local midnight), the next occurrence, and the FIDE-list refresh status
(last refreshed + whether one's due); set the time. A new
`scheduler::next_scheduled` computes the next run.

Frontend:
- Sources page gains a schedule control: "Check feeds for updates daily at
  [HH:MM]" with a "next check in Nh · a missed check runs at the next
  start" readout. One global time for all feeds (TWIC + Lichess).
- Maintenance -> FIDE section now shows "Last refreshed <date>" and flags
  when a refresh is due (same scheduled housekeeping).

Tests: next_scheduled keeps the clock time and is always in the future;
daily-minute clock wrapping. Verified live: GET/POST round-trip.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019KdPPg7P3bZ5p2RRhZZcv2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sources: configurable daily update-check time + next-run visibility (with catch-up)

1 participant