Files
SubMiner/backlog/tasks/task-187.1 - Auto-expand-targeted-session-when-opening-media-detail.md
sudacode 48f10dbb03 chore(backlog): maintain task backlog and add changelog fragments
- Move completed tasks (85, 117, 118, 155) to backlog/completed/
- Delete superseded task files (166 verification, 172 drilldown)
- Add stats dashboard milestone m-1
- Add new tasks (190, 194)
- Update task metadata across remaining backlog items
- Add changelog fragments for stats, mpv args, and subtitle filtering
2026-03-18 02:25:07 -07:00

2.8 KiB

id, title, status, assignee, created_date, updated_date, labels, milestone, dependencies, references, parent_task_id, priority, ordinal
id title status assignee created_date updated_date labels milestone dependencies references parent_task_id priority ordinal
TASK-187.1 Auto-expand targeted session when opening media detail Done
codex
2026-03-18 01:32 2026-03-18 05:28
stats
ui
m-1
stats/src/lib/stats-navigation.ts
stats/src/App.tsx
stats/src/components/overview/RecentSessions.tsx
stats/src/components/library/MediaDetailView.tsx
stats/src/components/library/MediaSessionList.tsx
stats/src/lib/stats-navigation.test.ts
TASK-187 medium 117500

Description

When a navigation path opens episode/media detail with a known session ID, the matching session row in media detail should auto-expand so the user lands directly on the intended session details instead of only the episode history page.

Acceptance Criteria

  • #1 Media detail navigation state can carry an optional target session ID alongside the selected video.
  • #2 Any navigation path that opens media detail with a known session ID causes that session row to auto-expand when the episode history loads.
  • #3 Session-tab fallback for orphan sessions without a video still behaves as it does now.
  • #4 Media detail auto-expansion clears or stabilizes its one-shot navigation state so normal manual expand/collapse behavior still works after landing.
  • #5 Relevant navigation/component tests cover the targeted media-detail auto-expand behavior.

Implementation Plan

  1. Extend media-detail navigation state to optionally carry a target session ID while preserving the existing orphan-session fallback to the Sessions tab.
  2. Update app-level navigation helpers and overview recent-session click handling to pass session IDs into media-detail navigation whenever both video and session are known.
  3. Thread the one-shot target session ID into MediaDetailView and MediaSessionList so the matching accordion row auto-expands on load, then clear/stabilize that state so manual toggling still behaves normally.
  4. Update targeted stats navigation/component tests to cover media-detail auto-expansion and fallback behavior.

Implementation Notes

Extended media-detail navigation state to carry an optional initialSessionId, updated overview/app navigation to pass session IDs into media detail whenever a video-backed session is clicked, and wired MediaDetailView + MediaSessionList to auto-expand and then consume that one-shot session target.

Updated stats-navigation.test.ts to cover the new navigation-state shape. Validation not run in this pass, so acceptance criteria remain unchecked pending verification.