Tidy up after the Home tab: one Home state, shared row scaffolding, media keys in one place

Open
#62 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
kotlin
Domain
mobile-dev

Research direction

Start with the HomeViewModel and HomeScreen state flow, then inspect ChannelRow, MoviePosterRow, SeriesPosterRow, ChannelCard, and PosterCard for shared scaffolding. Follow the listed call sites in VodViewModel, HomeViewModel, OpenTvViewModels.kt, ViewerLibrary, and MainScreen; check existing tests and screenshots after each refactor. Done means all six tidy-ups are completed or declined with reasons, with behavior unchanged.

Written by the indexing model from the issue text.

Description

enhancement ready-for-agent

What to build

Tidy-ups the #16 code review (PR #61) found but left alone. None of them changes what a viewer sees.

  • One Home state (already done, see the agent brief): HomeViewModel exposes four nullable lists that HomeScreen null-checks together. One HomeState? built with combine would replace them, and with them the stateIn repeated four times.
  • Shared row and card scaffolding: ChannelRow repeats the MoviePosterRow/SeriesPosterRow shape (SectionHeader and a padded LazyRow). ChannelCard repeats PosterCard's focus scale and border.
  • Pass-through wrapper: VodViewModel.resolveResume only calls the top-level resumeItem, so callers could call it directly.
  • Types in the wrong place: VodViewModel.ResumeItem and SeasonEpisode are used by HomeViewModel too, so they belong at the top level.
  • Media keys built by hand: "movie:${id}" and "ep:${id}" are written in OpenTvViewModels.kt and again as ViewerLibrary's private prefixes. One place should build and parse them, so a format change happens once.
  • Leftover alias: val homeTab = Tab.HOME in MainScreen.

Acceptance criteria

The agent brief in the comments replaces this list where they differ.

  • Each item above is done, or noted here as declined with a reason
  • No behaviour change; existing tests and screenshots pass unchanged
Dominant language
Kotlin
Stars
0
Forks
0
Avg merge
2h 13m
Merged PRs (30d)
59

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from neutraltone/settee

All issues in neutraltone/settee

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.