Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request implements a robust, per-job progress tracking system to replace the previous global progress counters. The implementation adds support for concurrent job management, progress updates, and job cancellation, whilst also updating the htmx library from version 1.8.2 to 2.0.8.
Changes:
- Introduces a thread-safe
JobTrackersystem with support for multiple concurrent jobs, progress tracking, and cancellation - Refactors movies, TV, and music modules to use the new job tracking interface instead of global variables
- Updates all external lookup modules (Amazon, Cinema Paradiso, Spotify, MusicBrainz) to accept context for cancellation support
- Updates htmx from 1.8.2 to 2.0.8 across all HTML files
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| web/server.go | Implements the core JobTracker infrastructure with mutex-protected job management, cleanup routines, and HTTP handlers for progress and cancellation |
| web/movies/movies.go | Refactored to use JobTracker interface, removes global state variables, passes context to lookup functions |
| web/tv/tv.go | Refactored to use JobTracker interface, removes global state variables, passes context to lookup functions |
| web/music/music.go | Refactored to use JobTracker interface, removes global state variables, adds validation helper function |
| types/types.go | Defines the JobTracker interface for dependency injection |
| amazon/amazon.go | Updated to accept context and progress callback, adds cancellation checks in parallel operations |
| cinemaparadiso/cinemaparadiso.go | Updated to accept context and progress callback, adds cancellation checks in parallel operations |
| spotify/spotify.go | Updated to accept context and progress callback with two-phase progress reporting (artists 0-50%, albums 50-100%) |
| musicbrainz/musicbrainz.go | Updated to accept context parameter and handle cancellation |
| web/movies/movies.html | Updated htmx version from 1.8.2 to 2.0.8 |
| web/tv/tv.html | Updated htmx version from 1.8.2 to 2.0.8 |
| web/music/music.html | Updated htmx version from 1.8.2 to 2.0.8 |
| web/settings/settings.html | Updated htmx version from 1.8.2 to 2.0.8 |
| web/index.html | Updated htmx version from 1.8.2 to 2.0.8 |
| spotify/spotify_test.go | Updated tests to use t.Context() instead of context.Background() |
| musicbrainz/musicbrainz_test.go | Updated tests to use t.Context() instead of context.Background() |
| amazon/amazon_test.go | Updated tests to use context.Background() and nil progress callback |
| cinemaparadiso/cinemaparadiso_test.go | Updated tests to use t.Context() instead of manually created context |
| cmd/amazon.go | Updated to pass context.Background() and nil progress callback to lookup functions |
| cmd/cinemaparadiso.go | Updated to pass context.Background() and nil progress callback to lookup functions |
| TODO | Marked "Implement Robust, Per-Job Progress Tracking" as done |
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.
No description provided.