Multi-source Phase C3: background-activity dashboard + enable→auto-sync (#99)#103
Open
jozef2svrcek wants to merge 1 commit into
Open
Multi-source Phase C3: background-activity dashboard + enable→auto-sync (#99)#103jozef2svrcek wants to merge 1 commit into
jozef2svrcek wants to merge 1 commit into
Conversation
…nc (#99) Two parts of multi-source Phase C3 (#40): Enable→auto-sync (backend): enabling a source no longer requires "Sync now". The scheduler's ~60s tick now picks up enabled-but-never-synced sources and submits a background sources_sync for each — works with the GUI closed. - sources::auto_sync_candidates = enabled AND last_run IS NULL (+ has a feed driver), so a source that synced/failed/was cancelled is excluded (last_run set) while one interrupted by a restart resumes (still NULL). - sources_sync now records its terminal status (ok / error / cancelled) so a failed or cancelled sync isn't auto-retried; errors still propagate for the #82 recovery path. - De-duped against an in-flight sync (and any manual "Sync now") via the job's source param; skipped entirely while a full daily update is running, since that update syncs every enabled feed itself. Activity dashboard (frontend): a header indicator that expands into a panel showing the daemon's whole job pipeline — active job, queue, and recent finishes — across all job types (source syncs, the scheduled update, manual maintenance). Running interruptible jobs can be cancelled. Source cards keep their own inline progress (C1); this is the global view, reading GET /jobs. To support both, JobSnapshot now carries the job's params (so the scheduler can de-dupe by source and the UI can label jobs by what they touch). Adds an auto_sync_candidates unit test. cargo test/clippy clean; client builds. Relates to #40. Closes #99. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018gaUhu1KVkdxAjSJBLgbbk
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.
Phase C3 of multi-source (#40). Two parts.
enable → auto-background-sync (backend)
Enabling a source in Maintenance → Sources no longer requires pressing Sync now. The scheduler's ~60s tick now imports enabled-but-not-yet-synced sources in the background (works with the GUI closed).
sources::auto_sync_candidates=enabled AND last_run IS NULL(and has a feed driver). A source that synced ok, failed, or was cancelled haslast_runset → not auto-retried (manual "Sync now" stays); a sync interrupted by a crash/restart never recorded a run → resumes.sources_syncnow records its terminal status (ok/error/cancelled). Errors still propagate via?so a DuckDB invalidation triggers in-process recovery (Server: a failed --fast import can invalidate the live DB (fatal index error takes the server down until restart) #82).sourceparam; skipped while a full dailyupdateis running, since that update syncs every enabled feed itself.Background activity dashboard (frontend)
A header indicator that expands into a panel showing the daemon's whole job pipeline — active job + queue + recent finishes — across all job types (source syncs, the scheduled update, manual maintenance like dedup/index/backup). Running, interruptible jobs can be cancelled. Source cards keep their own inline per-source progress (C1); this is the global view, reading
GET /jobs.Supporting change
JobSnapshotnow carries the job'sparams, so the scheduler can de-dupe by source and the UI can label jobs by what they operate on.Notes
sources_syncsubmit becomes redundant (and harmless — it's de-duped). This resolves the C2 review follow-ups Bump vite and @vitejs/plugin-react in /chess-client #6/Bump postcss from 8.5.8 to 8.5.15 in /chess-client #7.cargo test -p chess-db(14 passed, incl. newauto_sync_candidatestest) andcargo clippy -- -D warningsclean; clientnpm run buildclean.Relates to #40. Closes #99.
🤖 Generated with Claude Code