Ajedrez: one-shot "Download & import" action instead of a toggle (#196)#199
Merged
Conversation
Ajedrez is a one-time deep-history base (≤ 2012-12-31), not a subscription, so the enable/disable toggle didn't fit. Frontend: bulk-kind source cards now show a single **Download & import** button (with the licence acknowledgment inline for a first run) instead of a toggle. It enables the source, records the ack, and submits `sources_sync` — download + import + full maintenance (bulk → full, already the coalesced default). Idempotent: a re-run imports only parts not yet imported (the #191 registration dedupe), so it finishes a partial import and otherwise no-ops; the button reads "Re-run import" once imported and "Importing…" (disabled) while a sync is in flight, so it can't be double-fired. Backend: bulk sources are excluded from the recurring scheduler (`feeds_due_for_resync` is now feed-kind only), so Ajedrez is never auto-synced on the daily cadence — only via its explicit action. Deferred (the ticket's open question): a "remove Ajedrez data" action is out of scope here. Tests: bulk sources are never auto-synced; feeds still are. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019KdPPg7P3bZ5p2RRhZZcv2
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #196.
Ajedrez is a one-time deep-history base (≤ 2012-12-31), not a subscription — so the enable/disable toggle didn't fit.
Frontend
Bulk-kind source cards now show a single Download & import button (licence acknowledgment inline on a first run) instead of a toggle. It:
sources_sync— download + import + full maintenance (bulk already requests the full identity-first pass).Idempotent (the decided behaviour): a re-run imports only parts not yet imported — finishing a partial import, otherwise a cheap no-op. The button reads "Re-run import" once imported and "Importing…" (disabled) while a sync is in flight, so it can't be double-fired. Header shows a
one-timechip instead of a switch.Backend
Bulk sources are excluded from the recurring scheduler —
feeds_due_for_resyncis now feed-kind only — so Ajedrez is never auto-synced on the daily cadence; only its explicit action triggers it. (The wizard's first-run pipeline still imports it viaenabled_sources_ordered, unchanged.)Deferred
The ticket's open question — a "remove Ajedrez data" action on the card — is out of scope here; easy to add later if wanted.
Tests
feeds_due_for_resync; feeds still are.Build + clippy (
-D warnings) + 46 chess-db tests green; frontend builds.🤖 Generated with Claude Code
https://claude.ai/code/session_019KdPPg7P3bZ5p2RRhZZcv2