feat(dashboard): in-place quick-look modal for media tiles#61
Open
ndandan wants to merge 2 commits into
Open
Conversation
…alth chips Adds a read-only Tautulli integration (configured in /admin/settings, behind the per-service health circuit breaker) that surfaces current Plex activity: - Dashboard "Current Plex activity" widget — active streams, Direct Play / Direct Stream / Transcode counts, total/LAN/WAN bandwidth, per-session cards (quality, HDR/SDR badge, source->target codec on transcode). Hydrates async and refreshes every 10s; fails open so a down Tautulli never breaks the page. - Dedicated Plex Activity page (own sidebar entry): now-playing strip, watch stats with a 7/30/90-day toggle, plays-over-time graphs (Media/Stream-type toggle, by-hour, by-day-of-week, platform x stream-type problem-clients), dense history grid, per-library counts, and an in-app info modal per title. - API key stays server-side; every response is sanitised before the browser. - Chart.js self-hosted for CSP compliance, reused by the Radarr stats chart. Also reworks the dashboard service-health chips to show latency: HealthService::statusFor() returns a status word + round-trip ms (cached 10s, isHealthy() now delegates to it and keeps its old contract). Chips render five states (up / slow / very_slow / down / degraded) with a coloured dot. Tests: TautulliClient (HTTP + normalizers + edge cases), TautulliController (endpoints + route guard), HealthService statusFor/classifyLatency, and the relative_date Twig filter.
Clicking any dashboard media tile (hero, upcoming, trending, watchlist, latest additions) opens a read-only detail modal in place — poster, year, status, rating, genres, synopsis — with a deep-link to manage the item in Radarr/Sonarr or open it in Discover, instead of navigating away. - Two read-only fragment endpoints (library + TMDb) build a small view-model and render a shared body partial the modal swaps in. - Library items resolve from the already-cached movies()/series() aggregate (zero extra upstream calls on a warm dashboard), falling back to a direct per-instance fetch on a miss; TMDb items resolve straight from TMDb. - Tiles carry data-ql-* hooks; both fail open to a graceful body. - Turbo-safe modal (declarative data-API trigger, escHtml on dynamic values). Tests: quick-look view-model builders (library + TMDb, incl. 0-season show metaLine) and the fragment endpoints, with a router provided to the hand-built controller.
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.
What
Adds an in-place quick-look to the dashboard: clicking any media tile — hero spotlight, upcoming, weekly trending, watchlist or latest additions — opens a small read-only detail modal right there (poster, year, status, rating, genres, synopsis) with a deep-link to manage the item in Radarr/Sonarr or open it in Discover, instead of navigating away from the dashboard.
movies()/series()aggregate the dashboard widgets share — zero extra upstream calls on a warm dashboard — and fall back to a direct per-instance fetch only on a cache miss.data-ql-*hooks; both endpoints fail open to a small graceful body so a slow/unavailable source never leaves a broken modal.data-bs-toggletrigger (nonew bootstrap.Modal()),escHtml()on every dynamic value, body-level placement so re-renders don't strand it.Why
The dashboard tiles already deep-linked into the library/Discover pages, but a full navigation is heavy when you just want a glance at a synopsis or status. The quick-look keeps you on the dashboard.
Stacked on #60
Definition of Done
metaLineedge case) and both fragment endpoints, with a router provided to the hand-built controller.make check(lint + Twig + full PHPUnit) green.typeis route-constrained (movie|tv/movie|series),idis\d+; values rendered server-side via the translator and escaped in the modal JS.escHtmlon dynamic values, dark + light + mobile viewport checked.README.md(quick-look bullet) andCHANGELOG.md[Unreleased]updated.