Skip to content

fix(tvos): surf channels the way the list reads - #192

Open
0xashwin wants to merge 1 commit into
bilipp:mainfrom
0xashwin:fix/tvos-channel-surf-direction
Open

fix(tvos): surf channels the way the list reads#192
0xashwin wants to merge 1 commit into
bilipp:mainfrom
0xashwin:fix/tvos-channel-surf-direction

Conversation

@0xashwin

@0xashwin 0xashwin commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Pressing up on the Siri Remote while watching live TV tunes to the channel below the current one, and down tunes to the one above. Every other up/down handler in the app moves the way you'd expect — TVReorderableContentList, the EPG grid — so the player is the odd one out, and it's one left-press away from a channel browser that renders the very same list top-to-bottom.

The original intent was a TV remote's channel rocker, where "up" means a higher channel number. That doesn't survive contact with Lume: the surf list is whatever you launched from — Favorites, Recents, a category — in whatever sort is active. There's no higher channel to go up to. There's just a list on screen.

Why all four engines had it: each host turned the direction into a list offset itself (offset: direction == .up ? 1 : -1), four identical copies, all backwards. So the fix isn't the sign — it's that the hosts were doing arithmetic they had no business doing. Direction now resolves inside LiveChannelNavigator, next to the ordering it indexes into, and the hosts pass .up / .down.

That also makes it testable: MoveCommandDirection doesn't exist on iOS and the test target only runs on iOS sims, which is exactly why 20 existing navigator tests covered offset: 1 and none covered what "up" meant.

Tests: three new cases pinning up → the row above, down → the row below, and up-then-down returning where it started. Confirmed failing before the fix.

Up on the Siri Remote jumped to the channel *below* the current one in
the list, and down to the one above. Each of the four engine hosts
turned the direction into a list offset itself, and all four spelled it
backwards.

Resolve the direction in LiveChannelNavigator instead, next to the
ordering it indexes into, so the hosts pass a direction and never an
index — and the mapping is finally reachable from the test target.
@0xashwin
0xashwin force-pushed the fix/tvos-channel-surf-direction branch from c48b38b to 013c3ef Compare August 29, 2026 16:40
@bilipp

bilipp commented Aug 31, 2026

Copy link
Copy Markdown
Owner

This is actually intended. Would only do this with a setting.

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.

2 participants