Skip to content

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

Merged
jozef2svrcek merged 1 commit into
mainfrom
schedule-control-and-visibility-194
Jul 25, 2026
Merged

Sources: configurable daily update-check time + next-run visibility (#194)#200
jozef2svrcek merged 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
@jozef2svrcek
jozef2svrcek merged commit 727a6c7 into main Jul 25, 2026
6 checks passed
jozef2svrcek added a commit that referenced this pull request Jul 25, 2026
…jedrez, per-card metrics + incremental dedup

Lands the tested batch behind the 0.9.9 draft:

- #194 (PR #200): configurable daily update-check time + next-run visibility.
- #195 (PR #198): enabling a feed triggers an immediate sync.
- #196 (PR #199): Ajedrez one-shot "Download & import" action instead of a toggle.
- #197 (PR #201): per-source metrics moved into each card; aggregated blocks dropped.
- PR #203: crisp high-contrast toggle icon.

Plus follow-up work validated during testing:
- Incremental dedup_games via a `deduped` marker; unified single maintenance pass
  (supersedes the closed PR #204).
- Sync init shows the indeterminate bar instead of a stuck 100%.
- Enable-flag write persists before the sync is dispatched; toggle state derived
  from the job pipeline + a module-level intent store, so it survives navigation.
- FIDE card reflects background (scheduler / post-sync) refreshes.
- Coalesced maintenance is pinned to the queue tail the moment a feed is enabled.
@jozef2svrcek
jozef2svrcek deleted the schedule-control-and-visibility-194 branch July 25, 2026 22:59
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