Repository navigation
feat(detail): let Back leave a More Like This chain in two steps - #737
Conversation
Each title picked from a detail page's More Like This rail (Related Movies or Recommended Series on TV) used to push a new page, so following twenty recommendations took twenty Backs to get home. Now the first pick pushes and every later pick replaces the page a rail opened. Back goes to the title the chain started from, then to wherever that title was opened. Picking the starting title again goes back to it instead of stacking a copy. The rail-opened mark lives in the back-stack entry's SavedStateHandle, so it survives process death. Titles opened another way (search, rows, a person's page, links) still push. The TV's audiobook rails are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A second tap or Select on a More Like This card, or on the title a chain just went back to, can land while the page is still changing. It now opens nothing. On TV this restores the old exact-repeat guard, which the rail lost when it moved to the chain helper. On the phone, the artwork the tapped card handed off is cleared, since no page opens to take it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
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. |
Findings
|
| Layer / File(s) | Summary |
|---|---|
Android similar-item callback and navigation androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/navigation/AppNavigation.kt, androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/detail/* |
Similar-item selections use a dedicated callback. Navigation identifies the displayed detail, pushes the first related title, replaces later related titles, and returns to the starting title when selected again. If navigation does not occur, the callback clears pending hero artwork handoff state. |
TV related-item callback and navigation androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/navigation/TvAppNavigation.kt, androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/detail/TvItemDetailScreen.kt |
Related and recommended selections use a dedicated callback. Navigation pushes the first related title, replaces later related titles, and returns to the starting title when selected again. |
Priority:
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Feature
Sequence Diagram(s)
sequenceDiagram
participant SimilarRail
participant ItemDetailScreen
participant AppNavigation
participant DetailBackStack
SimilarRail->>ItemDetailScreen: Send selected content ID
ItemDetailScreen->>AppNavigation: Invoke similar-item callback
AppNavigation->>AppNavigation: Check displayed detail and related-entry marker
alt First related item
AppNavigation->>DetailBackStack: Push related detail
else Another related item
AppNavigation->>DetailBackStack: Replace current related detail
else Original detail selected
AppNavigation->>DetailBackStack: Pop to original detail
else Current detail selected
AppNavigation->>AppNavigation: Clear pending hero artwork handoff
end
sequenceDiagram
participant TvDetailContent
participant TvItemDetailScreen
participant TvAppNavigation
participant DetailBackStack
TvDetailContent->>TvItemDetailScreen: Invoke similar-item callback with content ID
TvItemDetailScreen->>TvAppNavigation: Route related-item selection
alt First related item
TvAppNavigation->>DetailBackStack: Push related detail
else Another related item
TvAppNavigation->>DetailBackStack: Replace current related detail
else Original detail selected
TvAppNavigation->>DetailBackStack: Pop to original detail
else Current detail selected
TvAppNavigation->>TvAppNavigation: Ignore selection
end
Possibly related issues
Silo-Server/silo-android#319— The issue concerns opening suggested titles, and this change adds dedicated navigation for selections from related-item rails.
Suggested labels: enhancement, impact: usability, size/M
Suggested reviewers: rxwatcher
Merge Risk: 
Low · up to 095b1
-
Returning to a starting title can leave stale artwork that appears on a later episode. This is a bounded visual issue.
Security architecture risk: 
Low · up to 095b1
-
The change remains within existing detail-navigation paths and does not appear to expand data-access authority. A TV replacement path can lose the new chain-ownership marker, making the promised navigation bound conditional.
Retained concerns
- Low · architecture · inferred: TV replacement transitions do not preserve related-chain ownership. When a marked detail is season-replaced or canonicalized to its parent series, the replacement entry lacks the marker. Subsequent related selections can push another chain instead of preserving the original two-step exit. Saved-state restoration cannot recover ownership metadata that was not transferred. This is a navigation-lifecycle limitation, not an established access-control vulnerability.
Security review details
-
Security Blast Radius
- inferred — The changed authority is limited to selecting, removing, and retaining entries in the client navigation stack. A selected recommendation still reaches the existing detail destination; the reviewed delta does not introduce a new privileged sink or service-level capability.
Trust Boundaries and Controls
- observed — Android external-route single-top matching uses the same saved-state-or-route-argument identity expression as before, now extracted into a helper. This change does not itself add an external entrypoint or weaken the existing identity comparison.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Title check
-
Explanation
The title "feat(detail): let Back leave a More Like This chain in two steps" matches the main change: More Like This rail picks on title pages now collapse into a bounded chain, so Back returns to the starting title in two steps. The summary, objectives, and diff all describe this behavior.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 9 functions across 6 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
|
Evidence is missing:
The Pixel 9 and Android TV build details identify validation devices but do not provide viewable evidence. The change reaches tablet and foldable layouts through the phone app's detail navigation. Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness. Posted via Macroscope — Visible change evidence |
|
That comment was on the first version of the body. The body now links the published evidence: https://evidence.siloserver.org/r/silo-android/pr-737/ 🤖 Claude Code (claude-opus-5-5) |
| } else { | ||
| navigateToTvItemDetail(contentId) | ||
| } | ||
| currentBackStackEntry?.takeIf { it !== current }?.savedStateHandle?.set(OPENED_FROM_RELATED_RAIL_KEY, true) |
There was a problem hiding this comment.
Recommendation-chain membership is lost when a recommended season or episode canonicalizes through onSeriesDetailReplace, which replaces the initial detail entry without preserving OPENED_FROM_RELATED_RAIL_KEY; the next recommendation pushes another page instead of replacing it, breaking the two-Back guarantee. Preserve the marker when replacing a related detail entry, including during series canonicalization.
Prompt for LLM
File androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/navigation/TvAppNavigation.kt:
Line 404:
Recommendation-chain membership is lost when a recommended season or episode canonicalizes through `onSeriesDetailReplace`, which replaces the initial detail entry without preserving `OPENED_FROM_RELATED_RAIL_KEY`; the next recommendation pushes another page instead of replacing it, breaking the two-Back guarantee. Preserve the marker when replacing a related detail entry, including during series canonicalization.
Talk to Kody by mentioning @kody
Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.
There was a problem hiding this comment.
This path can't run for a rail-opened page. The Related Movies and Recommended Series rail only gets movies and series: the server's similar-titles query filters to mi.type IN ('movie', 'series') (recommendableMediaTypes in silo-server's internal/recommendations/repo.go). onSeriesDetailReplace fires only from the series redirect, and tvSeriesDetailRedirect returns null unless the page is a season or episode (TvItemDetailScreen.kt:174). Season paging on a series page changes view-model state without navigating, so the mark stays.
If the rail ever starts returning seasons or episodes, carrying the mark through the redirect would be the fix. Leaving this open for the maintainer.
🤖 Claude Code (claude-opus-5-5)
There was a problem hiding this comment.
Agreed—the original suggestion assumes a rail can open a season or episode, which the server filter you cited excludes.
With that constraint:
- Rail-opened pages are movies or series.
tvSeriesDetailRedirectonly redirects seasons or episodes, so those pages cannot reachonSeriesDetailReplace.- Season paging changes view-model state without replacing the back-stack entry, preserving the marker.
This is not a reachable bug under the current rail contract, so no code change is warranted for this suggestion. Preserving the marker through canonicalization would become relevant if rails begin returning seasons or episodes.
I haven’t changed the suggestion’s status or persisted anything; the maintainer can decide how to close it out.
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
2bc45665-805c-42d3-9a18-0cb918c8d6a6
Files selected for processing: 6-
androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/navigation/AppNavigation.ktandroidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/detail/ItemDetailScreen.ktandroidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/detail/MovieDetailContent.ktandroidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/detail/SeriesDetailContent.ktandroidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/navigation/TvAppNavigation.ktandroidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/detail/TvItemDetailScreen.kt
Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.
-
…hain start Picking the title a More Like This chain started from pops back to it. The tapped card had already handed off its artwork for a new page, and nothing cleared it on that path. If the start page was still composed, for example mid-transition, the artwork could show on the next detail opened without a card. The helper now reports a new page only when one opened, so the caller clears the handoff after a pop as well. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Main's Silo-Server#737 renamed ItemDetailScreen's onItemDetailClick to onSimilarItemClick, so the box set row's default for onBoxSetMovieClick no longer compiled. The only caller passes onBoxSetMovieClick, so the parameter is now required, like onEpisodeDetailClick on main. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Brings in the three Silo commits the published Zidoo APKs already include (Silo-Server#736, Silo-Server#737, Silo-Server#745), so a build without the newest Silo code matches the APK in use. The merge had no conflicts. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_012qpc8JM4yNwzvTEA5WihWh
Problem
Related issue: N/A (community report)
Validation tasks: touches #319 C1, and #320 C1 and C6 (Back on Android TV; #320 is closed). Their results tables show every case not run yet; the v1.0 board itself wasn't readable from the account that opened this PR
Each title picked from a detail page's More Like This rail (Related Movies or
Recommended Series on TV) opens a new page on top of the last one. A viewer who
follows twenty recommendations has to press Back twenty times to get home. Detail
pages cover the phone's tab bar and the TV's top menu. So Back, one page at a time,
was the only way out.
This change caps the chain. The first pick from a title still opens a new page, so
Back returns to the title you came from. Each later pick replaces the page the rail
opened. From any depth, Back goes to the title the chain started from, then to
wherever that title was opened: Home, search, a row, a person's page. Picking the
starting title again goes back to it instead of opening a copy.
Approach
When a rail opens a detail entry, a key in that back-stack entry's
SavedStateHandlemarks it, so the mark survives process death. A rail pick from a marked entry either
pops back to the start title or replaces the entry with
popUpTo(ItemDetail). From anunmarked entry it pushes as before. A repeat tap or Select on the title already
showing does nothing. On TV this restores the exact-repeat guard the rail had before.
On the phone it also clears the artwork the card handed off for a page that won't
open.
The phone's rail callback is now
onSimilarItemClick, so it can't be mistaken forother detail navigation. The TV detail screen gets
onSimilarItemDetailfor the samereason. Titles opened any other way keep pushing as before: Home, search, rows, a
person's filmography, links. The TV's audiobook rails are unchanged, since Books are
beta.
Pairs with Silo-Server/silo-apple#959, which applies the same rule to iPhone,
iPad, Apple TV and Mac.
Validation
server, before on
mainand after on this branch. Four picks, then system Back toHome: 5 Backs before, 2 after, on both. On TV, focus lands on Play on a page that
replaced another, on the card that started the chain after Back, and on the
original card at Home. A double Select on the start card goes back once with no
copy. A series chain behaved the same way.
:androidApp:assembleDebugand:androidTvApp:assembleDebugpassed. The existingnavigation unit tests (ExternalRouteNavigationTest, TvItemDetailNavigationTest)
passed. No new tests, per AGENTS.md for small UI changes.
Evidence
Evidence: https://evidence.siloserver.org/r/silo-android/pr-737/
Surface and build: Pixel 9 emulator (API 36) and Android TV emulator (API 36), debug
builds of
mainand this branch. Tablet and foldable use the phone app's navigation,the same code as the phone run.
Risks
Aliens, Back now returns to Prometheus, not Terminator 2. The maintainer chose
this over keeping every page.
to chains started after the update.
Follow-ups
on both apps. It's left as is here; this change only touches title pages.
AI Disclosure
🤖 Generated with Claude Code
Note
Add two-step Back behavior for More Like This chains on detail screens
Adds a related-item navigation helper for phone and TV. The first rail selection pushes a new detail page. Later selections replace the current related page instead of stacking. Selecting the preceding item again pops Back to it, so Back leaves a More Like This chain in two steps.
NavBackStackEntry.displayedDetailContentIdaccessor that reads the detail ID from saved state, falling back to route arguments (AppNavigation.kt).onItemDetailClicktoonSimilarItemClickand passes it to the movie, series, and TV related-item rails.Macroscope summarized 0a68367.