Skip to content

Add Jellyfin as a commented-out Plex alternative - #57

Merged
joshdev8 merged 14 commits into
mainfrom
feat/jellyfin-variant
Aug 7, 2026
Merged

Add Jellyfin as a commented-out Plex alternative#57
joshdev8 merged 14 commits into
mainfrom
feat/jellyfin-variant

Conversation

@joshdev8

@joshdev8 joshdev8 commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Closes #56.

Adds Jellyfin as a drop-in, opt-in alternative to Plex without changing the default experience. A user switches by commenting out the plex: service and uncommenting jellyfin:.

What's in here

  • docker-compose.yml — a fully-formed but commented jellyfin: service directly under plex: (linuxserver/jellyfin, host network, :8096, no claim token, container_name: jellyfin).
  • dashboard — a Jellyfin entry in the service catalog (server/src/services.ts) so its panel self-heals the moment the service is enabled; renders absent for Plex users until then.
  • docs — a README "Using Jellyfin instead of Plex" section with an honest works/doesn't-work companions table, a comment-only pointer in .env.example (no new var), and a CLAUDE.md note.

Companion compatibility (documented in the README)

  • Works as-is: Radarr, Sonarr, Prowlarr, Bazarr, Transmission, Seerr (seerr-team/seerr natively supports a Jellyfin backend).
  • Plex-only: Tautulli, Watchlistarr, Kometa/Plex Meta Manager, Maintainerr — and therefore the dashboard's Tautulli-fed now-playing/poster panels.

Explicitly out of scope

Wiring Jellyfin-native companions (Jellystat, Seerr backend reconfig). Left as a follow-up.

Verification

  • docker compose config --quiet passes on the default file, and on a scratch copy with the Jellyfin block uncommented and Plex commented.
  • npm ci && npm run typecheck && npm run lint && npm test && npm run build pass in dashboard/ (50/50 tests).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added optional Jellyfin support as an alternative media server.
    • Added Jellyfin to the dashboard service catalog.
    • Improved dashboard search, service discovery, and launching.
    • Added Bazarr API-key discovery from its configuration.
  • Bug Fixes

    • Prevented unavailable or uninstalled services from showing unusable links.
    • Improved dashboard behavior during temporary service-status outages.
    • Improved request-service link handling when service status is unknown.
  • Documentation

    • Added setup guidance and documented Plex-specific integration limitations.

Copilot AI lite review requested due to automatic review settings August 6, 2026 20:57
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR adds an optional Jellyfin Compose service, registers Jellyfin in the dashboard, centralizes state-aware launch URLs, adds dashboard tests, implements Bazarr YAML credential discovery, and documents setup and compatibility details.

Changes

Jellyfin variant

Layer / File(s) Summary
Variant design and constraints
docs/superpowers/specs/..., docs/superpowers/plans/...
Defines the commented Jellyfin swap model, Compose settings, dashboard metadata, compatibility limits, and validation scope.
Compose service and dashboard catalog
docker-compose.yml, dashboard/server/src/services.ts
Adds the optional host-networked Jellyfin service on port 8096 and removes Tautulli’s Plex dependency.
Health state and launch-link contracts
dashboard/server/src/sources/docker.ts, dashboard/web/src/types.ts, dashboard/server/src/sources/docker.test.ts
Adds statesKnown, optional-service metadata, launchUrl, and isMissing. Tests distinguish observed states from cold-start placeholders.
Dashboard navigation and search integration
dashboard/web/src/app/..., dashboard/web/src/components/CommandSearch.tsx, dashboard/web/src/views/Launcher.tsx, dashboard/web/src/search.ts
Passes stateKnown through the dashboard and uses resolved URLs for navigation, Seerr requests, and search results.
Dashboard test coverage and setup
dashboard/web/package.json, dashboard/web/src/*.test.ts
Adds test execution support and coverage for URL generation, missing services, search behavior, optional services, and unknown state.
Setup guidance and compatibility documentation
.env.example, README.md, CLAUDE.md
Documents Jellyfin setup, access details, claim-token differences, Plex-only integrations, dashboard behavior, and testing guidance.

Bazarr credential discovery

Layer / File(s) Summary
Bazarr YAML parsing and dispatch
dashboard/server/src/discovery.ts
Adds section-scoped YAML discovery for auth.apikey and general.base_url, with waiting states and dedicated Bazarr dispatch.
Bazarr discovery validation
dashboard/server/src/discovery.test.ts
Tests YAML section lookup, missing and empty values, quote removal, and base_url parsing.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Operator
  participant DockerCompose
  participant Jellyfin
  participant Dashboard
  Operator->>DockerCompose: Enable Jellyfin and disable Plex
  DockerCompose->>Jellyfin: Start the jellyfin container
  Dashboard->>Jellyfin: Check service availability on port 8096
  Jellyfin-->>Dashboard: Report service state
Loading
sequenceDiagram
  participant Dashboard
  participant DockerConfig
  participant BazarrDiscovery
  Dashboard->>DockerConfig: Read bazarr/config/config.yaml
  DockerConfig-->>BazarrDiscovery: Return YAML content
  BazarrDiscovery->>BazarrDiscovery: Extract auth.apikey and general.base_url
  BazarrDiscovery-->>Dashboard: Return discovered credentials or waiting state
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The Bazarr discovery changes are unrelated to the Jellyfin variant and add scope beyond issue #56. Move the Bazarr discovery fix to a separate pull request or link an issue that explicitly requires it.
Docstring Coverage ⚠️ Warning Docstring coverage is 58.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the primary change: adding Jellyfin as an optional, commented-out Plex alternative.
Linked Issues check ✅ Passed The changes implement the Jellyfin alternative requested in issue #56, including Compose configuration, dashboard support, and compatibility documentation.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/jellyfin-variant

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🧹 Nitpick comments (3)
docs/superpowers/plans/2026-08-06-jellyfin-variant.md (3)

202-218: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add language identifiers to the environment code fences.

Static analysis reports MD040 at Line [202] and Line [211]. Use dotenv or another valid language identifier after both opening fences.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/superpowers/plans/2026-08-06-jellyfin-variant.md` around lines 202 -
218, Add a valid language identifier, preferably dotenv, to both opening
environment-variable code fences surrounding the Plex configuration in the
Jellyfin variant plan, resolving the MD040 reports while leaving the
configuration content unchanged.

Source: Linters/SAST tools


81-87: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use a portable scratch directory.

Line [81] hard-codes an absolute path from one development environment. Use mktemp -d and a cleanup trap so other contributors can run this validation step without editing the plan.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/superpowers/plans/2026-08-06-jellyfin-variant.md` around lines 81 - 87,
Update the scratch-directory setup in the validation commands around SCRATCH to
create a portable temporary directory with mktemp -d, and add a cleanup trap
that removes it on exit. Preserve the existing copy, sed transformation, and
docker compose validation steps while eliminating the hard-coded
development-specific path.

84-87: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Restrict the uncommenting rewrite to the Jellyfin block.

The sed expression runs over the entire copied file. Any unrelated commented section with the same indentation can also become active. Bound the substitution between the Jellyfin header and the monitoring header.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/superpowers/plans/2026-08-06-jellyfin-variant.md` around lines 84 - 87,
The sed rewrite should only uncomment lines within the Jellyfin section, bounded
by the Jellyfin header and the monitoring header. Update the command while
preserving the existing handling of Jellyfin service lines and leaving all prose
and unrelated commented sections unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@CLAUDE.md`:
- Around line 74-76: Update the host-network inventory entry near the
architecture notes to state that Plex or optional Jellyfin may use host
networking, one at a time, matching the commented service description near the
Jellyfin note.

In `@docs/superpowers/plans/2026-08-06-jellyfin-variant.md`:
- Around line 62-71: Update the validation setup around the .env generation
block to avoid copying over or deleting the user's .env. Create a uniquely named
temporary environment file, append the CI values there, pass it explicitly via
--env-file to validation commands, and add a trap to remove only that temporary
file on success or failure.

In `@docs/superpowers/specs/2026-08-06-jellyfin-variant-design.md`:
- Around line 59-64: Update
docs/superpowers/specs/2026-08-06-jellyfin-variant-design.md lines 59-64 to
state that Jellyfin adds no environment variables while preserving
RADARR_API_KEY and SONARR_API_KEY as post-first-boot exceptions not consumed by
Compose. Update docs/superpowers/plans/2026-08-06-jellyfin-variant.md lines
11-18 to remove the universal claim that every .env.example variable is consumed
by Compose, while retaining the existing exception contract.
- Around line 15-20: Make the Jellyfin swap valid without a Plex service by
removing or replacing the tautulli.depends_on: plex dependency and documenting
any required Tautulli handling. Apply the corresponding change in
docs/superpowers/specs/2026-08-06-jellyfin-variant-design.md (15-20),
docs/superpowers/plans/2026-08-06-jellyfin-variant.md (37-44),
docker-compose.yml (20-26), README.md (147-151), and CLAUDE.md (74-81), keeping
Plex as the default and Jellyfin as the commented-out alternative.

In `@README.md`:
- Line 151: Update the Jellyfin URL in the setup instructions to render the host
placeholder literally as code, wrapping the complete http://<host>:8096 address
in backticks or replacing the placeholder with HOST.
- Around line 149-151: Update the Jellyfin swap instructions to explicitly stop
and remove the existing Plex container, unblock port 8096 if necessary, then
enable Jellyfin before running docker compose up -d. Apply the corresponding
guidance in README.md (149-151), docker-compose.yml (20-22),
docs/superpowers/specs/2026-08-06-jellyfin-variant-design.md (15-18),
docs/superpowers/plans/2026-08-06-jellyfin-variant.md (38-40), and CLAUDE.md
(74-77); each site requires the cleanup-and-enable instruction.

---

Nitpick comments:
In `@docs/superpowers/plans/2026-08-06-jellyfin-variant.md`:
- Around line 202-218: Add a valid language identifier, preferably dotenv, to
both opening environment-variable code fences surrounding the Plex configuration
in the Jellyfin variant plan, resolving the MD040 reports while leaving the
configuration content unchanged.
- Around line 81-87: Update the scratch-directory setup in the validation
commands around SCRATCH to create a portable temporary directory with mktemp -d,
and add a cleanup trap that removes it on exit. Preserve the existing copy, sed
transformation, and docker compose validation steps while eliminating the
hard-coded development-specific path.
- Around line 84-87: The sed rewrite should only uncomment lines within the
Jellyfin section, bounded by the Jellyfin header and the monitoring header.
Update the command while preserving the existing handling of Jellyfin service
lines and leaving all prose and unrelated commented sections unchanged.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f5a6e077-210f-4a09-8ccb-badac337ad28

📥 Commits

Reviewing files that changed from the base of the PR and between 4fb3853 and 43a2ad9.

📒 Files selected for processing (7)
  • .env.example
  • CLAUDE.md
  • README.md
  • dashboard/server/src/services.ts
  • docker-compose.yml
  • docs/superpowers/plans/2026-08-06-jellyfin-variant.md
  • docs/superpowers/specs/2026-08-06-jellyfin-variant-design.md

Comment thread CLAUDE.md
Comment thread docs/superpowers/plans/2026-08-06-jellyfin-variant.md Outdated
Comment thread docs/superpowers/specs/2026-08-06-jellyfin-variant-design.md
Comment thread docs/superpowers/specs/2026-08-06-jellyfin-variant-design.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds Jellyfin as an opt-in (commented-out) alternative to Plex, updates the dashboard’s service catalog to recognize it, and documents swap steps + companion compatibility caveats.

Changes:

  • Added a commented-out jellyfin service block to docker-compose.yml for a manual Plex↔Jellyfin swap.
  • Added Jellyfin to the dashboard server’s static SERVICES catalog.
  • Documented the swap and limitations in README.md, .env.example, and CLAUDE.md (plus added spec/plan docs).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
docs/superpowers/specs/2026-08-06-jellyfin-variant-design.md New spec describing the Jellyfin swap approach and compatibility constraints.
docs/superpowers/plans/2026-08-06-jellyfin-variant.md New implementation plan detailing steps/commands to apply the change set.
docker-compose.yml Adds a commented Jellyfin service block to swap in for Plex.
dashboard/server/src/services.ts Adds a Jellyfin entry to the dashboard service catalog.
README.md Documents “Using Jellyfin instead of Plex” with swap steps + compatibility table.
CLAUDE.md Adds an architecture note about the Jellyfin swap and Plex-only companions.
.env.example Adds a comment pointing Jellyfin users to the compose block/README (no new vars).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
Comment on lines +156 to +161
| Works with Jellyfin as-is | Plex-only (won't work against Jellyfin) |
|---------------------------|------------------------------------------|
| Radarr, Sonarr, Prowlarr, Bazarr | Tautulli (Plex analytics) |
| Transmission | Watchlistarr (syncs the *Plex* watchlist) |
| Seerr (supports a Jellyfin backend) | Kometa / Plex Meta Manager |
| | Maintainerr |

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not reproducing this. The rows are | | Kometa / Plex Meta Manager | — a single leading pipe followed by an empty first cell, which is a valid 2-column row. No || appears in the file (grep -n "^||" README.md is empty).

Comment on lines +81 to +87
SCRATCH="/tmp/claude-1000/-home-ongo-Desktop-projects-AutoPlexx/455cc4a1-500d-4c6a-8a27-2296ec5f36d5/scratchpad"
mkdir -p "$SCRATCH"
cp docker-compose.yml "$SCRATCH/docker-compose.jellyfin.yml"
# Uncomment ONLY the jellyfin service lines (the `# ` / `# jellyfin:` forms),
# leaving the `# ----`/prose comment lines alone.
sed -i -E 's/^ # (jellyfin:)/ \1/; s/^ # (.*)$/ \1/' "$SCRATCH/docker-compose.jellyfin.yml"
docker compose -f "$SCRATCH/docker-compose.jellyfin.yml" --env-file .env config --quiet && echo "JELLYFIN BLOCK OK"

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 65f022e. The validation steps now use mktemp -d with a cleanup trap, and pass a throwaway env file via --env-file instead of writing the repo's .env — which also covers CodeRabbit's separate finding that cp .env.example .env / rm -f .env would clobber a contributor's real credentials.

@@ -0,0 +1,104 @@
# Jellyfin as a Plex alternative

**Issue:** #56 ("JellyFin Variant")

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 65f022e — "JellyFin" → "Jellyfin" in the issue reference line.

joshdev8 and others added 2 commits August 7, 2026 09:35
`tautulli` declared `depends_on: - plex`, and compose rejects a project
whose depends_on names an undefined service. So step 1 of the documented
swap — comment out `plex:` — made every compose command fail:

    service "tautulli" depends on undefined service "plex":
    invalid compose project

Not a degraded Tautulli: `config`, `up -d` and `down` all failed, for all
25 services. The dependency bought nothing anyway, since Plex is
host-network and Tautulli is on monitoring_network, so compose can
neither link nor meaningfully order them.

Verified by reconstructing the swap: `docker compose config` went from
exit 1 to exit 0, resolving 27 services with `jellyfin` and no `plex`.

Also corrects the compatibility table, which listed Seerr as working
"as-is". Seerr does support a Jellyfin backend, but the media server is
chosen during its setup and doesn't follow the compose swap — so a user
who onboarded against Plex would have had requests silently going
nowhere.

Surfaces Jellyfin in the README beyond the one collapsed block: a badge,
a Media Server table row, a Why bullet, and a note on the claim-token
prerequisite. The compatibility section is promoted from <details> to a
real heading because GitHub generates anchors only from headings, so the
new links to #using-jellyfin-instead-of-plex would otherwise be dead.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The catalog lists Jellyfin, which ships commented out of compose, so
every default (Plex) install rendered a Media tile reading "Not
installed" whose Open affordance linked to :8096 and connection-refused.

Three of the four link sites decided openability from `port === null`
alone, which can't distinguish "publishes no UI" from "isn't here".
CommandSearch had it worse than the tiles: an absent service was a
keyboard-navigable result, so Enter opened a dead tab.

Adds `launchUrl()` as the single place that decision is made, returning
null for both reasons, and routes Launcher, Sidebar, CommandSearch and
Header's Request button through it. Header already had the check inline
and now shares the helper.

`down` still yields a URL on purpose — the container exists and the user
may be about to start it. Only `absent` suppresses the link.

CommandSearch's `uiless` bucket becomes `unopenable` since it now holds
two different reasons, and its footer reads "nothing to open" rather than
"no web UI", which would have been wrong for an uninstalled service that
does publish a port.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
dashboard/web/src/components/CommandSearch.tsx (1)

240-249: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Do not show “No matching service” when unopenable matches exist.

If a query matches only an absent or UI-less service, openable.length is zero and unopenable.length is positive. The menu then shows both No matching service and Also matched, nothing to open: .... Render the no-match row only when both arrays are empty.

Proposed fix
-            {openable.length === 0 && (
+            {openable.length === 0 && unopenable.length === 0 && (
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@dashboard/web/src/components/CommandSearch.tsx` around lines 240 - 249,
Update the no-match row rendering in the CommandSearch component so “No matching
service” appears only when both openable and unopenable arrays are empty.
Preserve the existing unopenable notice when unopenable matches exist.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@dashboard/web/src/components/CommandSearch.tsx`:
- Around line 240-249: Update the no-match row rendering in the CommandSearch
component so “No matching service” appears only when both openable and
unopenable arrays are empty. Preserve the existing unopenable notice when
unopenable matches exist.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e74c459f-289e-4c9a-805c-e2d90960fbf5

📥 Commits

Reviewing files that changed from the base of the PR and between 43a2ad9 and e9bbb81.

📒 Files selected for processing (8)
  • CLAUDE.md
  • README.md
  • dashboard/web/src/app/Header.tsx
  • dashboard/web/src/app/Sidebar.tsx
  • dashboard/web/src/components/CommandSearch.tsx
  • dashboard/web/src/types.ts
  • dashboard/web/src/views/Launcher.tsx
  • docker-compose.yml
🚧 Files skipped from review as they are similar to previous changes (2)
  • docker-compose.yml
  • README.md

Running the dashboard against a real host showed the previous commit's
rule was too broad. Suppressing every `absent` service assumed absent
means "not installed", but a catalog entry also goes absent when its
container is simply renamed. On a host running plexms, transmission-vpn
and grafana-grafana-1, five services reported absent while up and
serving, and lost working launch links.

Adds `optional: true` in the catalog, set on plex and jellyfin — the two
halves of the swap, where exactly one is uncommented and the other's port
genuinely leads nowhere. Only those lose a link when absent. Everything
else keeps it: an absent Radarr is a real problem, and hiding its link
would hide the problem too.

Also fixes a regression this rule introduced. `buildReport` reports every
service absent on a cold start with the socket proxy unreachable, so
suppression keyed on `absent` alone would strip both media links exactly
when the launcher matters most — a dead upstream blanking the page, which
this app does not do. `stateKnown` threads the report's `reachable` flag
down so absent only counts when Docker was actually reached.

Gives the web workspace a test suite; it had no test script at all, so
none of this behavior was covered. That meant extracting the pure ranking
logic to search.ts, since anything importing the component tree reaches
import.meta.glob in ServiceIcon, which node --test cannot evaluate.
50 server + 16 web tests pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@joshdev8

joshdev8 commented Aug 7, 2026

Copy link
Copy Markdown
Owner Author

Code review

Found 1 issue:

  1. RequestButton renders a live "Request" link to a dead port when Seerr is absent. Commit e2ade2d narrowed launchUrl to suppress links only for services flagged optional: true, and only plex and jellyfin carry that flag — so launchUrl(seerr, stateKnown) now returns a URL for an absent Seerr instead of null. The guard on line 101 therefore passes, and the only other branch checks state === 'down' rather than 'absent', so no disabled fallback catches it either. Before this branch the code read if (!seerr || seerr.state === 'absent' || seerr.port === null) return null; and hid the control entirely, so this is a regression. The comment on lines 98-99 still describes the old behavior ("absent from the host ... there is nothing to link to, so no control is shown").

// Not in the catalog, absent from the host, or published without a UI port —
// in each case there is nothing to link to, so no control is shown.
const href = seerr ? launchUrl(seerr, stateKnown) : null;
if (!seerr || href === null) return null;

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

joshdev8 and others added 2 commits August 7, 2026 10:50
Two regressions from the previous commit's narrowing of `launchUrl`.

RequestButton had delegated its own absence check to `launchUrl`, so
narrowing suppression to `optional` services silently un-hid it: Seerr
isn't optional, so an absent Seerr yielded a live href, the null guard
passed, and the only other branch tests `down` rather than `absent`. The
result was an active Request link to a dead :5055 where previously no
control was shown at all.

"Can I link to this?" and "is this service actually here?" are different
questions, and the second now has its own predicate — `isMissing()` —
rather than being inferred from a null `launchUrl`. `launchUrl` returning
a URL for an absent non-optional service is correct and deliberate; the
Launcher tile keeps its link so a renamed container stays visible as a
problem. The header shortcut is the one place that should step aside.

Second, `stateKnown` was derived from `reachable`, which conflates the
two failure modes `buildReport` is careful to distinguish. An outage
after a successful poll returns the last good report — real states, just
stale — while only the cold path has never observed anything. Keying off
`reachable` meant every transient blip re-linked every absent optional
service for the duration. The report now carries `statesKnown` explicitly
so the client stops inferring it: true whenever the states were observed,
false only on the cold path.

Both are covered: docker.test.ts now asserts statesKnown on each failure
mode, and types.test.ts pins the two questions apart. 50 server + 18 web.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…writes

Bazarr's panel could not work on any install. `discoverArr` handled it
alongside Sonarr/Radarr/Prowlarr and read `/discover/bazarr/config.xml`,
but Bazarr is Python rather than .NET and writes no such file anywhere in
its tree. Discovery therefore always missed, leaving the integration
permanently `waiting` behind the hint "Start Bazarr and open it once" —
advice that could never help, since Bazarr had already written the config
we weren't reading.

Its key lives at `config/config.yaml`, nested one level inside the config
directory, so the existing ${USERDIR}/bazarr/config mount already exposes
it and no compose change is needed.

Adds `yamlValue`, scoped to a top-level section for the same reason
`iniValue` is: Bazarr records an `apikey` under a dozen sections,
including `radarr:` and `sonarr:` holding those services' credentials.
A document-wide search for the first `apikey` happens to work today only
because sections are alphabetised and `auth` sorts early — it would hand
back someone else's key the moment a provider sorting before it gained
one. Verified against a real config that the key selected differs from
both the Radarr and Sonarr keys in the same file.

Found by auditing the out-of-the-box path rather than the wired-up test
instance, which had masked it. All six sources now discover: 56 server +
18 web tests.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@dashboard/server/src/discovery.ts`:
- Around line 156-158: Update the value parsing logic near the rawLine
extraction to remove YAML inline comments only when the value is unquoted, while
preserving # characters inside quoted values; ensure the example produces
bazarrkey123. Add a regression test covering an unquoted value followed by an
inline comment.
- Around line 175-194: Update Bazarr discovery and the integration response
boundary to use the existing Result<T> shape, wrapping _discoverOne and
_discoverAll with safely(). Return { available, reason, hint } for failures, and
update getCredentials() so failed refreshes are cached as Unavailable only
without replacing the last good Bazarr credential. Preserve the live credential
when a subsequent discovery attempt fails.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ebed3577-821f-474e-9116-9a1b9baee772

📥 Commits

Reviewing files that changed from the base of the PR and between a010344 and 7d8ca12.

📒 Files selected for processing (3)
  • CLAUDE.md
  • dashboard/server/src/discovery.test.ts
  • dashboard/server/src/discovery.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • CLAUDE.md

Comment thread dashboard/server/src/discovery.ts Outdated
Comment thread dashboard/server/src/discovery.ts
joshdev8 and others added 4 commits August 7, 2026 13:13
Only Transmission implemented `hintFor`. Every other source passed no
hint at all, so a failure surfaced a bare reason — "upstream timed out",
"host not found" — with no next step, and the natural guess is to go
re-check an API key that was never at fault. CLAUDE.md requires a hint to
name the actual fix; five sources named nothing.

This was not hypothetical. Debugging the live instance, every card read
"upstream timed out" while the cause was that the dashboard shared no
network with the containers it was calling. The reason was accurate and
useless. With this change that same failure reads:

  Nothing resolved Seerr's hostname. It has to be defined in
  docker-compose.yml and share a network with the dashboard — or set
  SEERR_URL in .env to reach it another way.

`upstreamHint` generalises Transmission's per-service version: a rejected
credential points at the API key, an unresolved host points at compose
networking, a refused connection points at a service still starting, and
a timeout points at both reachability and the URL override. `safely` now
takes a hint function as well as a fixed string, because the useful next
step depends on how the call failed.

Prometheus previously had a fixed hint that named node-exporter whatever
went wrong; it now gets the same treatment as the rest.

Verified end to end by pointing SEERR_URL at an unresolvable host against
the live instance. 64 server + 18 web tests.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A first `docker compose up` on this stack is a couple of dozen pulls at
once, which is exactly when Docker Hub's anonymous rate limit is most
likely to bite and least likely to be understood — the failure reads as a
broken compose file, not a quota. On the host used to test this branch,
anonymous Hub pulls were refused outright and had to be worked around
twice.

lscr.io is LinuxServer's own registry serving the same images, and is
what they recommend. Each of the six tags was confirmed to resolve there
before switching.

Worth being clear about the limits of this: it moves 6 of 28 images.
Everything else — tautulli, grafana, telegraf, watchtower, portainer,
prom/*, watchlistarr, transmission-openvpn, cleanarr, requestrr,
timescale, redis — has no equivalent mirror and still comes from Hub, so
this reduces exposure rather than removing it. Prometheus and
node-exporter also publish to quay.io if that trade is wanted later.

Compose validates in both the default and Jellyfin-swapped states.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Bazarr's config.yaml is round-tripped by ruamel, so a comment a user adds
by hand survives every rewrite. `apikey: bazarrkey123 # generated key` was
parsed as the whole string including the comment, and every Bazarr call
then authenticated with a credential that could never match.

Strip a trailing comment only from the unquoted form — inside quotes a `#`
is data, and the previous unconditional quote-stripping also mangled a
quoted value that carried a comment after it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`docker compose up -d` only manages services it can still see. Once
`plex:` is commented out the old container is an orphan: it keeps running
on host networking, and the user ends up with both media servers indexing
one library — exactly what the README's "pick one media server" warning
exists to prevent.

Put `docker compose rm -sf plex` first, before the file is edited, in
every place the swap is described: README, the compose block's own header
comment, CLAUDE.md, and the spec/plan.

Also from review: use a throwaway `--env-file` under `mktemp -d` in the
plan's validation steps rather than writing the contributor's real `.env`,
label the bare code fences, and fix the "JellyFin" spelling and the
overbroad "every var is consumed by compose" claim, which drops the
documented RADARR_API_KEY / SONARR_API_KEY exception.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@joshdev8
joshdev8 merged commit 05f9755 into main Aug 7, 2026
6 checks passed
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.

JellyFin Variant

2 participants