Without a connection, oTunes shows broken or endlessly loading pages, and on web the browser replaces the whole app with its own "You're offline" page, which also stops playback. Downloaded music is there, but hard to reach.
What changed
No connection screen. When the network or server can't be reached, page content is replaced with "No connection" and a link to Downloads. Downloads, Other Downloaded Songs, albums and playlists opened from Downloads (?from=downloads), and the player are never covered. The screen clears on its own when the connection returns.
Detection lives in packages/convex/client/connectivity.ts: offline when the platform says so, or when the Convex socket stays closed for more than 5 seconds.
Web: OfflineGate in the app layout, also using Next's useOffline() (experimental.useOffline), so a failed navigation waits for the connection instead of reloading the page.
Mobile: an overlay in the shared tab screenLayout, using expo-network for device connectivity. Screens stay mounted underneath, so you land back where you were. Settings stays reachable so you can switch servers. Needs a dev client rebuild for expo-network.
Web works after reloads and launches while offline.downloads-sw.js now also, in production builds only:
keeps the last good copy of each page (network first) and falls back to Downloads for pages never saved
keeps app code from /_next/static (cache first) and deletes code unused for a month
saves Downloads and each downloaded album and playlist page ahead of time, and clears saved pages on sign-out
Links to Downloads are fully prefetched, and fall back to a full page load if an offline navigation stalls.
Testing
Ran a production build locally against the test server's backend in headless Chrome, then stopped the Next server: saved pages reload with the no-connection screen, unsaved pages redirect to Downloads, "Go to Downloads" works, and the app recovers when the server comes back. Not yet tested: real downloaded albums offline, sign-out clearing, installed PWA mode, the mobile apps on a device.
Made by Claude Opus 5.5 (claude-opus-5-5) in Claude Code, running in T3 Code.
Without a connection, oTunes shows broken or endlessly loading pages, and on web the browser replaces the whole app with its own "You're offline" page, which also stops playback. Downloaded music is there, but hard to reach.
## What changed
**No connection screen.** When the network or server can't be reached, page content is replaced with "No connection" and a link to Downloads. Downloads, Other Downloaded Songs, albums and playlists opened from Downloads (`?from=downloads`), and the player are never covered. The screen clears on its own when the connection returns.
- Detection lives in `packages/convex/client/connectivity.ts`: offline when the platform says so, or when the Convex socket stays closed for more than 5 seconds.
- Web: `OfflineGate` in the app layout, also using Next's `useOffline()` (`experimental.useOffline`), so a failed navigation waits for the connection instead of reloading the page.
- Mobile: an overlay in the shared tab `screenLayout`, using `expo-network` for device connectivity. Screens stay mounted underneath, so you land back where you were. Settings stays reachable so you can switch servers. **Needs a dev client rebuild** for `expo-network`.
**Web works after reloads and launches while offline.** `downloads-sw.js` now also, in production builds only:
- keeps the last good copy of each page (network first) and falls back to Downloads for pages never saved
- keeps app code from `/_next/static` (cache first) and deletes code unused for a month
- saves Downloads and each downloaded album and playlist page ahead of time, and clears saved pages on sign-out
Links to Downloads are fully prefetched, and fall back to a full page load if an offline navigation stalls.
## Testing
Ran a production build locally against the test server's backend in headless Chrome, then stopped the Next server: saved pages reload with the no-connection screen, unsaved pages redirect to Downloads, "Go to Downloads" works, and the app recovers when the server comes back. Not yet tested: real downloaded albums offline, sign-out clearing, installed PWA mode, the mobile apps on a device.
---
Made by Claude Opus 5.5 (`claude-opus-5-5`) in Claude Code, running in T3 Code.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
- Replace page content with a no-connection screen linking to Downloads when
the network or server is unreachable; Downloads and the player stay usable
- Detect it from the Convex socket plus Next's useOffline on web and
expo-network on mobile, and recover on reconnect
- Keep pages and app code in the service worker so reloads and launches work
offline instead of showing the browser's offline page
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.
Without a connection, oTunes shows broken or endlessly loading pages, and on web the browser replaces the whole app with its own "You're offline" page, which also stops playback. Downloaded music is there, but hard to reach.
What changed
No connection screen. When the network or server can't be reached, page content is replaced with "No connection" and a link to Downloads. Downloads, Other Downloaded Songs, albums and playlists opened from Downloads (
?from=downloads), and the player are never covered. The screen clears on its own when the connection returns.packages/convex/client/connectivity.ts: offline when the platform says so, or when the Convex socket stays closed for more than 5 seconds.OfflineGatein the app layout, also using Next'suseOffline()(experimental.useOffline), so a failed navigation waits for the connection instead of reloading the page.screenLayout, usingexpo-networkfor device connectivity. Screens stay mounted underneath, so you land back where you were. Settings stays reachable so you can switch servers. Needs a dev client rebuild forexpo-network.Web works after reloads and launches while offline.
downloads-sw.jsnow also, in production builds only:/_next/static(cache first) and deletes code unused for a monthLinks to Downloads are fully prefetched, and fall back to a full page load if an offline navigation stalls.
Testing
Ran a production build locally against the test server's backend in headless Chrome, then stopped the Next server: saved pages reload with the no-connection screen, unsaved pages redirect to Downloads, "Go to Downloads" works, and the app recovers when the server comes back. Not yet tested: real downloaded albums offline, sign-out clearing, installed PWA mode, the mobile apps on a device.
Made by Claude Opus 5.5 (
claude-opus-5-5) in Claude Code, running in T3 Code.🤖 Generated with Claude Code
e017fc8d6btoe5d6beb781