The mobile player re-rendered twice a second while audio played. The 500 ms playback clock lived in the broad usePlayback() value, so the player, tablet player, queue and intent bridge all re-rendered on every tick. seekTo also depended on duration, so every playback action changed identity on each track change, which re-rendered every album row through useMediaMenuActions.
Fix
currentTime and duration move to usePlaybackProgress(). Only the new PlayerProgress (slider and time labels) reads it. usePlayback() is removed; seekTo and waitForPlaybackReady join usePlaybackActions().
seekTo reads duration from a ref, so all actions are stable.
Dismiss gestures, now playing colors, the queue header and the queue renderItem are memoized. AlbumTrackRow gets a stable onPlay.
The phone volume listener lives in a VolumeSlider child, so the tablet player no longer registers it twice.
One visible change: tablet time labels now highlight while scrubbing, matching the phone.
Render counts
Temporary counters, iPhone Duo simulator, per 10 s window while playing:
Scenario
Before
After
Player open
PlayerScreen 20, SongMeta 20, AppIntentBridge 26
PlayerProgress 20, AppIntentBridge 6
Player with queue
+ NowPlayingQueue 20
PlayerProgress 20, AppIntentBridge 6
Album screen, play + 3 skips (30 s)
AlbumTrackRow 144
AlbumTrackRow 0
Tablet player (unfolded Duo), with queue
not measured
PlayerProgress 20, AppIntentBridge 6
Verified
On the iPhone Duo simulator, folded (phone player) and unfolded (tablet player): playback, skip, auto-advance, seeking, tapping a queued song, the side-by-side queue, and swipe-to-dismiss from every gesture area. Android was not run. Mobile typecheck passes.
Model: Claude Opus 5.5 via Claude Code in T3 Code.
The mobile player re-rendered twice a second while audio played. The 500 ms playback clock lived in the broad `usePlayback()` value, so the player, tablet player, queue and intent bridge all re-rendered on every tick. `seekTo` also depended on `duration`, so every playback action changed identity on each track change, which re-rendered every album row through `useMediaMenuActions`.
## Fix
- `currentTime` and `duration` move to `usePlaybackProgress()`. Only the new `PlayerProgress` (slider and time labels) reads it. `usePlayback()` is removed; `seekTo` and `waitForPlaybackReady` join `usePlaybackActions()`.
- `seekTo` reads duration from a ref, so all actions are stable.
- Dismiss gestures, now playing colors, the queue header and the queue `renderItem` are memoized. `AlbumTrackRow` gets a stable `onPlay`.
- The phone volume listener lives in a `VolumeSlider` child, so the tablet player no longer registers it twice.
One visible change: tablet time labels now highlight while scrubbing, matching the phone.
## Render counts
Temporary counters, iPhone Duo simulator, per 10 s window while playing:
| Scenario | Before | After |
| --- | --- | --- |
| Player open | PlayerScreen 20, SongMeta 20, AppIntentBridge 26 | PlayerProgress 20, AppIntentBridge 6 |
| Player with queue | + NowPlayingQueue 20 | PlayerProgress 20, AppIntentBridge 6 |
| Album screen, play + 3 skips (30 s) | AlbumTrackRow 144 | AlbumTrackRow 0 |
| Tablet player (unfolded Duo), with queue | not measured | PlayerProgress 20, AppIntentBridge 6 |
## Verified
On the iPhone Duo simulator, folded (phone player) and unfolded (tablet player): playback, skip, auto-advance, seeking, tapping a queued song, the side-by-side queue, and swipe-to-dismiss from every gesture area. Android was not run. Mobile typecheck passes.
Model: Claude Opus 5.5 via Claude Code in T3 Code.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
The playback clock lived in the broad usePlayback() value, so the player,
tablet player, queue and intent bridge re-rendered twice a second. seekTo
also depended on duration, which changed every playback action's identity
on each track change and re-rendered every album row.
- Move currentTime and duration into usePlaybackProgress(), read only by
the new PlayerProgress slider and time labels. Drop usePlayback().
- Read duration from a ref in seekTo so all actions stay stable.
- Memoize dismiss gestures, now playing colors, the queue header and the
queue renderItem. Pass a stable onPlay to AlbumTrackRow.
- Keep the phone volume listener in its own VolumeSlider so the tablet
player no longer registers it twice.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The mobile player re-rendered twice a second while audio played. The 500 ms playback clock lived in the broad
usePlayback()value, so the player, tablet player, queue and intent bridge all re-rendered on every tick.seekToalso depended onduration, so every playback action changed identity on each track change, which re-rendered every album row throughuseMediaMenuActions.Fix
currentTimeanddurationmove tousePlaybackProgress(). Only the newPlayerProgress(slider and time labels) reads it.usePlayback()is removed;seekToandwaitForPlaybackReadyjoinusePlaybackActions().seekToreads duration from a ref, so all actions are stable.renderItemare memoized.AlbumTrackRowgets a stableonPlay.VolumeSliderchild, so the tablet player no longer registers it twice.One visible change: tablet time labels now highlight while scrubbing, matching the phone.
Render counts
Temporary counters, iPhone Duo simulator, per 10 s window while playing:
Verified
On the iPhone Duo simulator, folded (phone player) and unfolded (tablet player): playback, skip, auto-advance, seeking, tapping a queued song, the side-by-side queue, and swipe-to-dismiss from every gesture area. Android was not run. Mobile typecheck passes.
Model: Claude Opus 5.5 via Claude Code in T3 Code.
🤖 Generated with Claude Code