Skip to content

feat(detail): show one Cast & Crew row on movie and series pages - #8

Open
blurbery wants to merge 3 commits into
mainfrom
feat/cast-and-crew-row
Open

blurbery wants to merge 3 commits into
mainfrom
feat/cast-and-crew-row

Conversation

@blurbery

@blurbery blurbery commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Problem

The Silo web app now shows one "Cast & Crew" row on movie and series pages (blurbery/silo-server#86 and Silo-Server#87): director or creator first, then writers, then the main cast. The Android phone and TV apps still showed a cast-only row under that heading, so directors and writers had no card and no route to their person page.

What changed

  • New shared function castCrewCredits in android-shared (common/ui/CastCrewCredits.kt), used by both apps:
    • Lead group: crew with job Director, de-duplicated by person id (or name), max 2. Captioned "Director" on movies and "Creator" on series, because Silo stores series creators as Director credits.
    • Writers: job Writer or Screenplay, de-duplicated, excluding anyone already in the lead group, max 3. Captioned "Writer".
    • Cast: sorted by billing order, max 12, captioned with the character.
    • Jobs match exactly (trimmed, case-insensitive), so "Director of Photography" and "Story" don't count.
    • Each group after the first shown one gets a divider label ("Writers", "Cast"). Empty groups and their dividers are skipped. With no matching crew it's just the cast with no dividers.
  • Phone (CastCrewSection) and TV (TvCastCrewSection) render every credit with the existing cast card, so crew and cast cards are the same size. A thin rule with a small vertical uppercase label sits before each later group. Cards without a headshot now show initials.
  • Crew cards open the person page like cast cards: by person_id on phone, and on TV through openPerson, which now takes a name and optional person id and keeps the existing name-search fallback.
  • On TV the divider is drawn inside the next card's rail item rather than as its own item. It has no click handler, so it can't take D-pad focus, and the rail's focus-restore and pin-on-focus indices still map one to one to cards.
  • The row now appears when a title has crew but no cast.
  • Episode pages share these screens and keep their plain cast row unchanged: no grouping, sorting or new cap.

What I left alone

  • The TV Details table still lists Director and Written by. The web PRs removed a separate Crew box, which Android never had, and left the details panel alone, so I kept parity.
  • Photo sizes: no client change needed. CatalogV2Api.itemDetail (shared/.../network/apiv2/CatalogV2Api.kt) never sends image_size, nothing rewrites TMDB URLs, and the cast cards don't pass a decode size to Coil. Once the server change in fix: raise typography, touch, and focus accessibility floors Silo-Server/silo-android#87 is deployed, these cards pick up the sharper h632 headshots. image_size is only sent for catalogue browse and history, which don't carry person credits.

User-visible effect

Movie and series pages on phone and Android TV show directors (or creators) and writers as tappable cards ahead of the cast in one horizontally scrolling Cast & Crew row. The cast list is trimmed to the top 12 billed actors.

Testing

  • Added CastCrewCreditsTest in android-shared covering group order, caps, de-duplication, exact job matching, writer-director exclusion, the series "Creator" caption, the cast-only fallback, the episode passthrough and initials.
  • Local Gradle: not run. The Gradle dependency cache on this machine is empty, so an offline run wasn't possible, and another heavy build was running.
  • CI, Android Builds workflow (testDebugUnitTest, then lint including lintVitalRelease) on 5f746dc: Unit tests passed, Lint passed. Media3 FFmpeg AAR and Sideload APKs were skipped, as they always are on pull requests.
  • The first push (55665a3) failed TvTypographyReadabilityTest: the TV divider label was 12sp, below the 14sp TV floor. 5f746dc raises it to 14sp.
  • Manual check on a phone or Android TV device or emulator: not run, so there are no before-and-after screenshots yet.

Benchmarks: not applicable, UI layout change.

Risks

  • Producers and other crew stay off the row on purpose, matching web.
  • The vertical divider label and initials sizing still need a visual check on a real TV and phone.

AI disclosure

AI-assisted with Claude Opus. I directed the task and designed the work.

Match the Silo web layout on phone and TV. The row now leads with up to
two directors (captioned "Creator" on series, since Silo stores series
creators as Director credits), then up to three writers, then up to
twelve cast members by billing order. Thin vertical dividers labelled
WRITERS and CAST separate the groups, and empty groups are skipped.

The grouping lives in android-shared so both apps use the same
function. Crew cards reuse the existing cast card, route to the person
page the same way, and fall back to initials without a headshot. On TV
the dividers sit inside the following card's rail item, so they never
take D-pad focus and the rail's focus restore indices stay correct.

Episode pages keep their plain cast row unchanged.
TvTypographyReadabilityTest rejects hard-coded TV text below 14sp.
- Build the writer exclusion from every director before the two-card lead
  cap, so a third director with a writing credit isn't shown as a writer.
  Adds a regression test with three directors.
- On TV, only open a person from a name search on an exact name match.
  Opening the first result could land on someone unrelated, and crew cards
  without a person ID now reach this path too.
- A divider widens the first card of its group, so the TV Cast & Crew rail
  no longer has uniform items. tvRailPinItem gains a uniformItems flag;
  when it's false, offscreen targets use animateScrollToItem instead of a
  distance extrapolated from a neighbour's width. Other rails are unchanged.
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