You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Does Cup keep playing and saving the listening position through a long locked listen on a physical iPad? #375
On the operator's iPad Air (2022) with the latest iPadOS, does Cup keep playing a narration track and saving the listening position through a long locked listen? Do the lock-screen controls and a headphone disconnect behave as CUP-81's acceptance criteria require?
The agent prepares a debug build and a precise checklist; the operator runs it on the device. Cover:
Locked playback of a track of at least 60 minutes, past its end
Whether position saves sent through CapacitorHttp reach the server while locked (server logs)
Lock-screen title, artwork, duration, position, scrubbing, play and pause
A locked listen of at least 60 minutes over the real network, playing past what was buffered before locking.
Whether position saves keep reaching the server while locked, and when they stop; log stream filtered to runningboardd and audio.cup.app shows Cup's real process states. On the simulator RunningBoard marked Cup's app, page and network processes suspended about 30 s after locking but ignored it only because the process is simulated.
Lock-screen artwork, Control Center's Now Playing, and scrubbing with WebKit's defaults.
Headphones disconnecting, a phone or FaceTime call, and another app starting playback.
The variant without UIBackgroundModesaudio.
No need to re-check title, duration, position, Play/Pause and skips, the navigator.mediaSession handlers and setPositionState, or the 206 range responses, unless iPadOS behaves differently from iOS 27.2.
Both are debug builds of origin/main at 08b3d00d, including CUP-71's quiet retry of a failed save. They talk to production https://cup.audio and are signed for team 4GQ2V3WJW8. They sit next to this file, in the git-ignored apps/mobile-app/ios/App/build/ipad-probe-375/ of the linear-integration-e5fbe3 worktree:
default/App.app: the shell as it is, with UIBackgroundModesaudio.
no-background-audio/App.app: the same build without UIBackgroundModes, for run C only.
Cup saves the listening position at most every 5 seconds while the <audio> element fires timeupdate. So the PUT …/position requests in Workers Logs show whether page JavaScript and CapacitorHttp are still running. The narration track's GET …/narration-track.mp3 range requests show whether loading continues past the buffer.
Prepare
On the iPad, turn on Developer Mode (Settings > Privacy & Security > Developer Mode) and restart if asked. Connect it to the Mac by USB and trust the Mac.
Find its name with xcrun devicectl list devices, then install the default build:
If the install fails because the iPad is not in the provisioning profile, tell me while the iPad is connected, and I'll rebuild so Xcode registers it.
Open Cup, sign in, and choose an audiobook whose narration track is at least 60 minutes long, or convert one. Start it from the beginning so the listen goes well past what the WebView buffers.
Unplug the iPad from the Mac and use Wi-Fi only. Note the clock time as T0.
Run A: locked listen with the default build
Press Play, then lock the iPad with the top button. Leave it untouched, without waking the screen, until the track has ended, or for 65 minutes.
Listen now and then without touching the iPad. Note the time if the audio stops before the end.
After the end, wake the screen without unlocking. Note what the lock screen shows: title, artwork (shown, grey placeholder or none) and elapsed time.
Unlock and open Cup. Note the position the player shows, and any message about a position that could not be saved. Note the time as T1.
Run B: controls and interruptions with the default build (about 10 minutes)
Lock screen: play, then lock. Check Pause, Play, skip back 10 s, skip forward 10 s, and dragging the scrubber to a new point. Note what each one does.
Control Center (swipe down from the top right): does the Now Playing tile show title and artwork? Does Play/Pause work?
Headphones: play through headphones, then unplug them or disconnect them in Bluetooth. Does Cup pause?
Call: during playback, take a FaceTime audio call from another device. Does Cup pause? Does it resume after hanging up?
Another app: during playback, start something in Music or Podcasts. Does Cup pause? Does it resume after you stop the other app? Resuming is not required; just note it.
Run C: without background audio (about 5 minutes)
Install no-background-audio/App.app with the command from step 2, but with no-background-audio in place of default. It replaces Cup and keeps your sign-in. Play, lock, and note whether and when the audio stops within 3 minutes.
Reinstall default/App.app. Note the time as T2.
Collect
Connect the iPad by USB, unlocked, and collect its logs from T0:
sudo log collect --device-name "<iPad name>" --start "<T0 as YYYY-MM-DD HH:MM:SS>" --output ~/Desktop/cup-ipad-375.logarchive --predicate 'process == "runningboardd" OR process == "App" OR process BEGINSWITH "com.apple.WebKit" OR process == "mediaserverd" OR process == "audiomxd"'
In the Cloudflare dashboard, open Workers & Pages > create-audiobook-from-url > Logs. Set the timeframe from T0 to T2 and look at two filters, one after the other: URL contains /position, and URL contains narration-track.mp3. Export the events as JSON, or note the times and statuses. The Worker's development token can't tail or query production logs, so I can't read them myself.
Send me your notes from steps 6 to 15, the times T0, T1 and T2, the logarchive's path and the Workers Logs export. I'll analyze them, write the research doc and resolve the ticket.
What the results decide
Saves keep arriving about every 5 s through the locked hour: iOS needs no native code for saves.
Saves stop about 30 s after locking while audio plays: iOS suspends Cup's process, as the simulator's process manager logged. Then the locked listen saves nothing until Cup is opened again, and the engine decision has to weigh that.
Track requests stop with saves: audio would end when the buffer runs out. That would be the case to check in step 6.
Activity
patricktree commentedon Nov 14, 2026
Narrowed by How does Cup's WebView audio behave on the iOS simulator? (doc). Left for the iPad:
log streamfiltered torunningboarddandaudio.cup.appshows Cup's real process states. On the simulator RunningBoard marked Cup's app, page and network processes suspended about 30 s after locking but ignored it only because the process is simulated.UIBackgroundModesaudio.No need to re-check title, duration, position, Play/Pause and skips, the
navigator.mediaSessionhandlers andsetPositionState, or the206range responses, unless iPadOS behaves differently from iOS 27.2.patricktree commentedon Nov 14, 2026
iPad probe checklist
For Does Cup keep playing and saving the listening position through a long locked listen on a physical iPad?. It covers only what How does Cup's WebView audio behave on the iOS simulator? could not show. Plan for about 90 minutes, most of it waiting with the iPad locked.
Builds
Both are debug builds of
origin/mainat08b3d00d, including CUP-71's quiet retry of a failed save. They talk to productionhttps://cup.audioand are signed for team4GQ2V3WJW8. They sit next to this file, in the git-ignoredapps/mobile-app/ios/App/build/ipad-probe-375/of thelinear-integration-e5fbe3worktree:default/App.app: the shell as it is, withUIBackgroundModesaudio.no-background-audio/App.app: the same build withoutUIBackgroundModes, for run C only.Cup saves the listening position at most every 5 seconds while the
<audio>element firestimeupdate. So thePUT …/positionrequests in Workers Logs show whether page JavaScript andCapacitorHttpare still running. The narration track'sGET …/narration-track.mp3range requests show whether loading continues past the buffer.Prepare
On the iPad, turn on Developer Mode (Settings > Privacy & Security > Developer Mode) and restart if asked. Connect it to the Mac by USB and trust the Mac.
Find its name with
xcrun devicectl list devices, then install the default build:xcrun devicectl device install app --device "<iPad name>" /Users/pkerschbaum/.claude/pkerschbaum-worktrees/cup/linear-integration-e5fbe3/apps/mobile-app/ios/App/build/ipad-probe-375/default/App.appIf the install fails because the iPad is not in the provisioning profile, tell me while the iPad is connected, and I'll rebuild so Xcode registers it.
Open Cup, sign in, and choose an audiobook whose narration track is at least 60 minutes long, or convert one. Start it from the beginning so the listen goes well past what the WebView buffers.
Unplug the iPad from the Mac and use Wi-Fi only. Note the clock time as T0.
Run A: locked listen with the default build
Run B: controls and interruptions with the default build (about 10 minutes)
Run C: without background audio (about 5 minutes)
no-background-audio/App.appwith the command from step 2, but withno-background-audioin place ofdefault. It replaces Cup and keeps your sign-in. Play, lock, and note whether and when the audio stops within 3 minutes.default/App.app. Note the time as T2.Collect
Connect the iPad by USB, unlocked, and collect its logs from T0:
In the Cloudflare dashboard, open Workers & Pages >
create-audiobook-from-url> Logs. Set the timeframe from T0 to T2 and look at two filters, one after the other: URL contains/position, and URL containsnarration-track.mp3. Export the events as JSON, or note the times and statuses. The Worker's development token can't tail or query production logs, so I can't read them myself.Send me your notes from steps 6 to 15, the times T0, T1 and T2, the logarchive's path and the Workers Logs export. I'll analyze them, write the research doc and resolve the ticket.
What the results decide