Repository navigation
feat(web): add retry button for pending and failed themes - #692
Conversation
Show a Retry button on library items that need attention or are in ThemerrDB but not downloaded yet. The button posts to a new /api/tasks/retry endpoint, which reuses the existing retry_items checks (cached item, enabled server and updates, ignored libraries) and queues the item for processing.
5b4f78e to
e7fb3df
Compare
ReenigneArcher
left a comment
There was a problem hiding this comment.
The retry flow looks sound; I found no functional defect. Please address the repository formatting requirement called out inline before merge. I also included the requested UI adjustment to keep Retry beside its status badge when space allows.
Verified locally: 152 focused Python tests (test_server_ui.py, test_mcp.py, and media-server processing tests), all 115 browser tests, npm run build, flake8 on the changed Python files, and no whitespace errors in the PR diff.
Verification limits: CI, CodeQL, common lint and localization workflows await maintainer approval. Sonar and the hosted documentation check passed. The local Dockle build stops because Doxygen is unavailable; live Plex/Jellyfin processing was not exercised.
Review completed by Codex | Model: gpt-6.1-sol | Thinking: xhigh
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #692 +/- ##
==========================================
+ Coverage 89.11% 89.13% +0.02%
==========================================
Files 77 77
Lines 6355 6368 +13
Branches 903 904 +1
==========================================
+ Hits 5663 5676 +13
Misses 478 478
Partials 214 214
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
|
Looks like the commit hook may not have ran? https://github.com/LizardByte/Themerr/actions/runs/41130567979/job/124555947694?pr=692 |
|



Description
Adds a Retry button to library rows on the Overview page, so a single item can be queued again without running a full theme scan.
The button appears for items that:
failed/unresolvedstatus), orpending).It isn't shown for items that already have a theme and no error, or for items missing from ThemerrDB.
How it works:
POST /api/tasks/retryendpoint incommon/server_ui.py, with body{"server_id": "...", "item_id": "..."}.themerr.mcp_tools.retry_items, so the web UI and the MCP tool apply the same rules. The item must be in the cached snapshot for that server. Theme updates and the server must be enabled. Items in ignored libraries are rejected. Items already queued or being processed are not queued twice.202and a toast message ("Retry queued. Follow progress in Activity." or "This item is already queued.").400message. Auth, CSRF and body limits come from the existingBrowserSecurityMiddleware.defaultserver, becauseretry_itemsonly knows about saved servers.retry_itemslog message now says "Retry requested…" instead of "MCP retry requested…", since it has two callers.Retrying an item whose Themerr theme is unchanged but flagged "Outdated" queues it as usual. Processing still skips the upload unless the ThemerrDB source has changed, which is the existing overwrite behaviour.
Screenshot
Library list (light and dark). Retry shows on the pending, failed, outdated and unresolved items:
After clicking Retry:
Phone width (390px). Retry wraps beside its badge:
"Needs attention" filter:
Issues Fixed or Closed
Roadmap Issues
Testing
New tests in
tests/functional/test_server_ui.py:202and is queued. An item that is already queued returns the "already queued" message.New test in
tests/web/dashboard.test.mjs:retryItemposts the selected server and item and shows the response message.pytest -o addopts='' -p no:cacheprovider(excludingtests/unit/test_notification_build.py, which needs PyInstaller locally): 1052 passed, 19 skippedflake8andgit diff --check: cleannpm test: 115 passed.npm run build: OKpython scripts/localize.py --extract: addsRetryandRetry theme fortolocale/themerr.poManual: built a linux/amd64 image from this branch, deployed it in Docker against a real Plex and Jellyfin setup, and used Retry from the Overview page.
Type of Change
Checklist
AI Usage
See our AI usage policy.
Claude Code helped explore the codebase, implement the change and tests, and capture the screenshots. I reviewed the changes and tested them on my own server.