Repository navigation
feat(streaming): merge shows and movies into unified titles tab - #163
Conversation
Shows and movies previously occupied separate navigation tabs with split filters and grids. Merges both media types into a single Titles tab at canonical index 1 with a segment control (All, Shows, Movies), normalized sorting, composed watch-state and duration chips, while keeping index 2 reserved for launcher shortcuts and external requests. Impact - Navigation tabs: 6 -> 5 (-1 tab) Method: unmeasured; layout and navigation consolidation Verified - git diff --check - MainTabsTest, TitlesSortTest - CHANGELOG.md Unreleased entry
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Reviewer's GuideThis PR consolidates shows and movies into a five-tab Titles experience backed by a unified TitleItem model and shared filtering/sorting UI, while migrating legacy tab preferences and routing index 2 to Titles with Movies preselected; existing media cards, detail flows, layouts, and deletion behavior are retained. Sequence diagram for legacy Movies tab routingsequenceDiagram
participant Launcher
participant MainScreen
participant TitlesScreen
participant TitlesUI as Titles UI
Launcher->>MainScreen: requestTab(2)
MainScreen->>TitlesScreen: preselectFilter(TitlesTypeFilter.MOVIES)
MainScreen->>MainScreen: persistentSelectedTab = 1
MainScreen->>TitlesUI: open TitlesScreen at index 1
TitlesScreen->>TitlesUI: apply pending Movies filter
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 60a8c1e8d9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| val effectiveKeys = if ("SHOWS" in enabledKeys || "MOVIES" in enabledKeys) { | ||
| enabledKeys + TITLES.key | ||
| } else { |
There was a problem hiding this comment.
Normalize saved tab keys before deriving visibility
On an upgraded install whose bottom_nav_tabs still contains SHOWS or MOVIES, this branch keeps TITLES visible, but AppearancePreferencesScreen checks only for the exact TITLES key and displays its switch as off. Turning it off cannot hide the tab because the stale key keeps adding it to the visible tabs; migrate or remove the legacy keys when normalizing the preference.
AGENTS.md reference: AGENTS.md:L100-L101
Useful? React with 👍 / 👎.
| if (index == 2) { | ||
| TitlesScreen.preselectFilter(TitlesTypeFilter.MOVIES) | ||
| persistentSelectedTab = 1 | ||
| _tabRequest.value = 1 | ||
| return |
There was a problem hiding this comment.
Keep the series shortcut filtered to shows
The still-registered series shortcut in app/src/main/res/xml/shortcuts.xml sends extra_tab=1, but this branch only preselects a type for index 2. The series shortcut therefore opens Titles with the persisted filter—Movies if that was last selected, or All on a fresh install—instead of showing shows. Preserve the shortcut's intent by preselecting Shows for index 1 or updating the shortcut.
AGENTS.md reference: AGENTS.md:L100-L101
Useful? React with 👍 / 👎.
| override fun compare(a: TitleItem, b: TitleItem): Int { | ||
| return when { | ||
| a is TitleItem.Show && b is TitleItem.Show -> { | ||
| a.series.totalEpisodes.compareTo(b.series.totalEpisodes) |
There was a problem hiding this comment.
Compare shows and movies with a consistent length metric
In TitleLengthComparator, show-to-show comparisons use episode count, while show-to-movie comparisons use total duration. For example, a 3-episode, 90-minute show is ranked ahead of a 2-episode, 200-minute show, the 2-episode show ahead of a 150-minute movie, and the movie ahead of the 3-episode show. This cycle prevents Longest and Shortest from producing a consistent order for libraries with episodes of very different lengths; use one metric across comparisons.
Useful? React with 👍 / 👎.
The Titles screen referenced R.string.search which was not declared in strings.xml, causing a compile failure in CI. Adds the missing string resource. Method: unmeasured Verified - git diff --check
Replaces the separate segment control line by displaying All | Shows | Movies directly on the primary chip row. Watch-state filtering is now an icon button with a dropdown menu beside the sort button, matching the duration filter button pattern. Impact - Filter chip rows above the grid: 2 -> 1 (-1 row) Method: unmeasured; layout consolidation Verified - git diff --check - CHANGELOG.md Unreleased entry updated
Updates the Titles tab segment chip label from "Shows" to "TV Shows", along with result count nouns and empty state copy. Method: unmeasured; copy update Verified - git diff --check - CHANGELOG.md Unreleased entry updated
Sourcery withdrew this approval because the latest commits introduced blocking findings.
Summary
Icons.Filled.Tv) & Movies (Icons.Filled.Movie) tabs, with individual visibility toggles for each.All | TV Shows | Movies) placed directly on the primary filter chip bar above the grid/list on the unified Titles tab.TitleWatchFilterButton) and movie duration filter (MovieDurationFilterButton).All,TV Shows, orMovies) inStreamingPreferencesso choices persist across app restarts.Name,Recently added,Highest rated,Longest,Shortest) using episode counts for shows and duration for movies.requestTab(2)automatically open Titles with the Movies filter preselected (or direct Movies tab if separate tabs are enabled).Before / After
How measured
Unmeasured; structural navigation and UI consolidation.
Verification
git diff --checkpassed cleanly.MainTabsTest.kt,TitlesSortTest.kt).strings.xml.CHANGELOG.mdUnreleased entry added.Risks
None. Canonical index mapping and tab migration preserve backward compatibility for launcher shortcuts and existing user tab configurations.