feat(sports): Follow teams, pool game info, Watch from start, and a score bar #17

Merged
namillis merged 1 commit from feat/sports-phone into main 2026-11-11 16:15:38 +00:00
Owner

Phase 3 of the iPhone Sports handoff: followed teams, the pool's game info, Watch from start, and a score bar in full screen. Stacked on #16 (Favorites spelling), which isn't merged yet, so this diff includes its commit. After #16 merges, the diff drops to this PR's own commit.

What changed

  • Followed teams (SportsStore.followed). The long-press menu on any game offers "Follow Commanders" and "Follow Giants", and the game page has Follow chips. Teams are saved in UserDefaults (sports.followed) as league:teamId, because ESPN team ids are only unique within a league.
    • A followed team's games show under My teams at the top and also stay in their own section.
    • A Following chip comes after All and shows only followed teams' games. It's hidden when no followed team has a game.
    • Settings → Favorites lists each followed team with an Unfollow button, including teams with no game today.
  • The pool's game info. pool_event.description (records, venue, networks) is a second line on More from the pool rows and sits under the networks on the game page for games the pool carries. Tonight 39 pool events had one.
  • Watch from start. For a live game whose channel keeps catch-up (hasArchive), the long-press menu and the game page offer "Watch from start · 8:15 PM". It plays the channel's archive from kickoff to now through playFromStart. Pool-only events get the same menu item, using their own event programme.
  • Score bar (LiveWire/Sports/ScoreBar.swift). In full screen it reads "WSH 14 – 10 NYG · Q3 4:12" next to the close button. It belongs to the transport controls, so it hides with them. It shows the game playback was started from on Sports, or else any live game the playing channel carries. It reloads the scores every 30 s, but only while it's on screen. It's hidden during catch-up so it can't spoil the game. Swiping still zaps through channels, as decided.
  • Tests. 4 new unit tests cover My teams, league-scoped ids, the Following chip and the from-start programme, for 65 in all. The UI tests now wait for matching to finish before tapping a row.
  • Debug launch arguments: -sportsFollow <league:id,…>, -sportsLeague follow, -sportsPlay <n> (add -fromStart), and -sportsFakeLive. The last one turns the first coming game live at 14–10 and adds a point on each reload, to try the bar when nothing is on.

Intent: the phone-only Sports features from the handoff. Not a goal: the Live Activity and widget (dropped), or porting these features back to the TV app.

Testing

iPhone 18 Pro Simulator, Debug build, tv3, Wednesday 11 November 11:00 AM ET. No ESPN game was live this morning, so the score bar and Watch from start were tried with -sportsFakeLive on Commanders @ Giants. It matched "NFL GAME 01 : WASHINGTON COMMANDERS @ NEW YORK GIANTS".

  • With the Giants followed (nfl:19), the game showed under My teams and On now, and the Following chip read 1.
  • Score bar: playing the game full screen, the bar went WSH 14 → 15 → 16 over two 30 s reloads without leaving full screen.
  • Watch from start: the menu item is only offered on catch-up channels. Tonight's matched channel for that game had no archive, so the item correctly didn't show. Playing from the start itself is the existing catch-up path, which was already tested.
  • More from the pool rows showed descriptions, for example "The No. 8 UCLA Bruins (8-0) face the Minnesota Golden Gophers (5-3) at Huntington Bank Stadium…".
  • xcodebuild test with the tv3 login: 65 unit tests and 3 UI tests pass.

Not checked on screen: the Followed teams rows in Settings, which sit below the fold and need a scroll the screenshot script can't do.

Screenshots

My teams and Following Score bar Pool info
My teams Score bar Pool info
Phase 3 of the iPhone Sports handoff: followed teams, the pool's game info, Watch from start, and a score bar in full screen. **Stacked on #16** (Favorites spelling), which isn't merged yet, so this diff includes its commit. After #16 merges, the diff drops to this PR's own commit. ## What changed - **Followed teams** (`SportsStore.followed`). The long-press menu on any game offers "Follow Commanders" and "Follow Giants", and the game page has Follow chips. Teams are saved in UserDefaults (`sports.followed`) as `league:teamId`, because ESPN team ids are only unique within a league. - A followed team's games show under **My teams** at the top and also stay in their own section. - A **Following** chip comes after All and shows only followed teams' games. It's hidden when no followed team has a game. - Settings → Favorites lists each followed team with an Unfollow button, including teams with no game today. - **The pool's game info.** `pool_event.description` (records, venue, networks) is a second line on More from the pool rows and sits under the networks on the game page for games the pool carries. Tonight 39 pool events had one. - **Watch from start.** For a live game whose channel keeps catch-up (`hasArchive`), the long-press menu and the game page offer "Watch from start · 8:15 PM". It plays the channel's archive from kickoff to now through `playFromStart`. Pool-only events get the same menu item, using their own event programme. - **Score bar** (`LiveWire/Sports/ScoreBar.swift`). In full screen it reads "WSH 14 – 10 NYG · Q3 4:12" next to the close button. It belongs to the transport controls, so it hides with them. It shows the game playback was started from on Sports, or else any live game the playing channel carries. It reloads the scores every 30 s, but only while it's on screen. It's hidden during catch-up so it can't spoil the game. Swiping still zaps through channels, as decided. - **Tests.** 4 new unit tests cover My teams, league-scoped ids, the Following chip and the from-start programme, for 65 in all. The UI tests now wait for matching to finish before tapping a row. - **Debug launch arguments:** `-sportsFollow <league:id,…>`, `-sportsLeague follow`, `-sportsPlay <n>` (add `-fromStart`), and `-sportsFakeLive`. The last one turns the first coming game live at 14–10 and adds a point on each reload, to try the bar when nothing is on. Intent: the phone-only Sports features from the handoff. Not a goal: the Live Activity and widget (dropped), or porting these features back to the TV app. ## Testing iPhone 18 Pro Simulator, Debug build, tv3, Wednesday 11 November 11:00 AM ET. No ESPN game was live this morning, so the score bar and Watch from start were tried with `-sportsFakeLive` on Commanders @ Giants. It matched "NFL GAME 01 : WASHINGTON COMMANDERS @ NEW YORK GIANTS". - With the Giants followed (`nfl:19`), the game showed under My teams and On now, and the Following chip read 1. - **Score bar:** playing the game full screen, the bar went WSH 14 → 15 → 16 over two 30 s reloads without leaving full screen. - **Watch from start:** the menu item is only offered on catch-up channels. Tonight's matched channel for that game had no archive, so the item correctly didn't show. Playing from the start itself is the existing catch-up path, which was already tested. - More from the pool rows showed descriptions, for example "The No. 8 UCLA Bruins (8-0) face the Minnesota Golden Gophers (5-3) at Huntington Bank Stadium…". - `xcodebuild test` with the tv3 login: 65 unit tests and 3 UI tests pass. Not checked on screen: the Followed teams rows in Settings, which sit below the fold and need a scroll the screenshot script can't do. ## Screenshots | My teams and Following | Score bar | Pool info | |---|---|---| | ![My teams](https://git.namillis.me/namillis/LiveWireiOS/raw/branch/feat/sports-phone/design/pr-shots/sports-phone/1-my-teams.jpg) | ![Score bar](https://git.namillis.me/namillis/LiveWireiOS/raw/branch/feat/sports-phone/design/pr-shots/sports-phone/2-score-bar.jpg) | ![Pool info](https://git.namillis.me/namillis/LiveWireiOS/raw/branch/feat/sports-phone/design/pr-shots/sports-phone/3-pool-info.jpg) |
namillis deleted branch feat/sports-phone 2026-11-11 16:15:38 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
namillis/LiveWireiOS!17
No description provided.