Skip to content

UX: 'Maintenance → Automatic updates' duplicates the per-source model in Sources — unify the refresh schedule #160

Description

@jozef2svrcek

Summary

Two different screens now govern "keep my feed sources current," with overlapping backend jobs. Since the multi-source model (#40) moved sources into their own screen with per-source enable + auto-sync + manual sync, the older global Maintenance → Automatic updates schedule reads as duplicate functionality — e.g. it refreshes The Week in Chess, which is also managed under Sources.

Where they overlap

Maintenance → Automatic updates (MaintenancePanel.tsx ~L674):

  • A toggle + "Check daily at HH:MM", persisted to the schedule table (enabled, daily_minute).
  • Drives the daily update job (chess-db/src/jobs.rs ~L932), which loops every enabled feed (enabled_feeds), downloads + imports each, then indexes + normalises.

Sources (SourcesPanel.tsx):

  • Per-source enable (with attribution ack), date window, Sync now (sources_sync job), and per-source status. TWIC and the other feeds live here.
  • Enabling a source triggers auto-sync (scheduler C3), and thereafter the daily update keeps it current.

So the daily update job is essentially a scheduled batch of what sources_sync already does per source, and the cadence control lives on a different screen from where the sources themselves are managed.

Why it's confusing

Proposed direction

Unify to one refresh model with a single source of truth:

  • Reframe the "check daily at HH:MM" cadence as "how often enabled sources refresh" and surface it in (or linked from) the Sources screen, next to what it actually controls — not under generic Maintenance.
  • Fold the update job into the per-source sync / auto-sync path (loop enabled sources → sources_sync → the single coalesced maintenance pass, Jobs: smart-queue maintenance — coalesce dedup + position index + normalise to run ONCE after all pending imports drain #131), so there's one mechanism and one status model rather than two.
  • Keep Maintenance for genuine one-off DB operations (dedup/index/normalise/backup/resolve-fide), not recurring source refresh.

Related

Observed during testing: "Maintenance / Database / Automatic updates" looks like duplicate functionality with "Sources / The Week in Chess".

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions