Skip to content

feat(jellyseerr): read-only Seerr issues page + open-issue count on the dashboard (#133) - #134

Open
ndandan wants to merge 5 commits into
Shoshuo:mainfrom
ndandan:pr/seerr-issues
Open

ndandan wants to merge 5 commits into
Shoshuo:mainfrom
ndandan:pr/seerr-issues

Conversation

@ndandan

@ndandan ndandan commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Closes #133

What

A read-only Issues page under Seerr, plus an open-issue count on the dashboard, as the issue asks. JellyseerrClient already had getIssues() / getIssueCount(); nothing called them except the Seerr "About" settings page.

/jellyseerr/issues (new Issues button next to Requests):

  • One card per issue: poster and title (a click opens the app-wide quick-look), movie/TV, issue type (video / audio / subtitles / other), open/resolved, and the season/episode for shows ("S2 · E5", "Season 2", or "All seasons").
  • The reporter's description (Seerr stores it as the issue's first comment), the reporter, the date (prismarr_date, so it follows the Display date format) and the reply count.
  • An Open in Seerr ↗ link to {seerr}/issues/{id} for commenting or resolving. The page itself never writes.
  • Open / Resolved / All filters (open by default), newest / last-modified sort, pagination, and a counts row from /issue/count (open, resolved, video, audio, subtitles, other).
  • No JavaScript: filters and sort are plain links.

Dashboard: the Requests card gets one "N open issues reported · View →" row at the top, linking to the page, only when N > 0. It rides on the existing widget/requests fragment with one /issue/count call. If that call fails, the row is hidden instead of showing 0.

Details

  • Reporter avatars: only Seerr-hosted ones (/avatarproxy/...) are used. img-src allows the Seerr origin but not plex.tv or Gravatar, so an absolute avatar URL would be blocked by the CSP; those show the reporter's initial.
  • TMDb titles/posters come through Seerr's /movie / /tv proxy, same as the Requests page. The lookup is factored out of enrichRequest() into tmdbSummary() and memoized per page, since several issues often point at the same title. The memo is a local, not a property, so nothing carries over between requests in worker mode.
  • An unreachable Seerr shows the standard service banner, same probe as the Requests page.
  • EN + FR strings (ICU plurals for the reply and issue counts).

Tests

JellyseerrIssuesRenderTest renders the page for real. It seeds the Seerr settings and stubs the client before the container builds it, so the route guard passes. It covers:

  • every issue shape (movie/TV, all four types, open/resolved, season+episode / season / all, no comments, no media, no reporter) in EN and FR, with no untranslated key
  • the reporter's text is escaped
  • off-origin avatars are dropped
  • an unknown filter/sort falls back to open/added
  • one TMDb lookup per title
  • the unreachable banner
  • the dashboard row: shown with the right plural in EN/FR, hidden for zero, an empty answer, and a thrown exception

The test clears cache.app before and after: the stubbed ping() records Seerr as "up" in HealthService's shared pool, which outlives the SQLite reset and otherwise leaks into TopbarHealthServicesTest.

Full suite green on this branch (1,276 tests), Twig lint clean.

Verified live

Against a real Seerr, on a build of this feature:

  • a reported movie issue renders with poster, badges, description, reporter and date
  • the title opens the quick-look
  • the Seerr link points at the issue
  • the dashboard row reads "1 open issue reported"
  • the page fits at 375 px with no sideways scroll

That live check caught one bug, fixed here: on the selected (solid) filter button, the -lt count badge was the same colour as the button and invisible. The selected button now gets a white badge. The Requests filter row in _jellyseerr_nav.html.twig has the same problem; I left it alone to keep this PR to #133.

… dashboard (Shoshuo#133)

- New /jellyseerr/issues page (Issues button beside Requests): one card per
  reported issue with poster/title (opens the global quick-look), movie/TV,
  issue type, open/resolved, season/episode for shows, the reporter's
  description (Seerr's first comment), reporter, date and reply count.
  "Open in Seerr" links out for commenting/resolving; the page itself is
  read-only.
- Open / Resolved / All filters (open by default), newest / last-modified
  sort, pagination, and a counts row from /issue/count.
- Dashboard Requests card: a summary row "N open issues reported" linking to
  the page, only when N > 0; a failed count hides the row instead of
  showing a misleading zero.
- Off-origin reporter avatars (plex.tv, gravatar) fall back to an initial,
  since img-src only whitelists the Seerr origin.
- TMDb lookups are memoized per page (several issues often share a title);
  the TMDb summary is factored out of enrichRequest() and reused.
- EN + FR strings; render test covers both locales, escaping, filter
  fallback, the unreachable banner and the dashboard row.
The stubbed ping() records Seerr as "up" in HealthService's shared
cache.app pool, which outlives the per-test SQLite reset; on CI's run
order that verdict leaked into TopbarHealthServicesTest (asserts every
service is unconfigured). Clear the pool before and after each test.
The -lt badge tint matches the button colour, so on the selected (solid)
filter the count was amber-on-amber and invisible (seen live on :beta).
The selected button now gets a white badge in the button's colour.
…y class; changelog entry

The dashboard Requests empty state is a plain card-body upstream; assert
its message instead of a component class so the test holds on both.
… ?page=

- Issue-card titles come from cache.app for 6 h (keyed by Seerr instance,
  type and TMDb id): a page was up to 20 sequential Seerr lookups on every
  load. A failed lookup is not cached, so the next load retries it.
- A page past the last one redirects to the last page instead of showing
  "No open issues" under a pager that counts backwards.
- ?page= is capped at 10000, so a huge value no longer overflows the skip
  into a float (TypeError -> "Seerr unreachable" banner).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Display Seerr media issues in Prismarr

1 participant