Skip to content

feat(dashboard): in-place quick-look modal for media tiles#61

Open
ndandan wants to merge 2 commits into
Shoshuo:mainfrom
ndandan:pr/dashboard-quicklook
Open

feat(dashboard): in-place quick-look modal for media tiles#61
ndandan wants to merge 2 commits into
Shoshuo:mainfrom
ndandan:pr/dashboard-quicklook

Conversation

@ndandan

@ndandan ndandan commented Jun 19, 2026

Copy link
Copy Markdown

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.

  • Two read-only fragment endpoints build a compact view-model and render a shared body partial that the modal swaps in:
    • Library items resolve from the already-cached 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.
    • TMDb items (trending / discover) resolve straight from TMDb.
  • Tiles carry data-ql-* hooks; both endpoints fail open to a small graceful body so a slow/unavailable source never leaves a broken modal.
  • The modal is Turbo-safe — declarative data-bs-toggle trigger (no new 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

This PR is stacked on #60 (Plex activity + health chips) — it edits the same DashboardController, dashboard/index.html.twig, DashboardControllerTest and i18n files, so it's cleanest to merge after #60. Until #60 merges, GitHub will show #60's commits in this PR's diff too; once #60 lands, this collapses to just the quick-look commit (feat(dashboard): in-place quick-look modal for media tiles).

Definition of Done

  • Tests: quick-look view-model builders (library + TMDb, including the 0-season TMDb show metaLine edge case) and both fragment endpoints, with a router provided to the hand-built controller. make check (lint + Twig + full PHPUnit) green.
  • Security: endpoints are read-only; item type is route-constrained (movie|tv / movie|series), id is \d+; values rendered server-side via the translator and escaped in the modal JS.
  • UI/UX: Turbo-safe inline JS, escHtml on dynamic values, dark + light + mobile viewport checked.
  • Docs: README.md (quick-look bullet) and CHANGELOG.md [Unreleased] updated.

ndandan added 2 commits June 19, 2026 06:50
…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.
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.

1 participant