From 482bec1fd1c9e2d4bac0805bb268b1d5daabd84f Mon Sep 17 00:00:00 2001 From: Joshua Higgins Date: Mon, 15 Jun 2026 15:29:01 -0400 Subject: [PATCH] fix: all headers hopefully are fixed --- apps/mobile/app/(app)/(tabs)/_layout.tsx | 10 +- apps/mobile/app/(app)/(tabs)/home/_layout.tsx | 18 ++- .../(app)/{ => (tabs)/home}/album/[id].tsx | 12 +- .../(app)/{ => (tabs)/home}/artist/[id].tsx | 0 .../home/browse}/albums.tsx | 0 .../home/browse}/artists.tsx | 6 +- .../{library => (tabs)/home/browse}/songs.tsx | 0 .../(app)/{ => (tabs)/home}/playlist/[id].tsx | 2 +- .../{ => (tabs)/home}/playlist/favorites.tsx | 20 ++- .../app/(app)/{ => (tabs)/home}/queue.tsx | 0 .../{ => (tabs)/home}/recently-added.tsx | 0 .../{ => (tabs)/home}/recently-played.tsx | 0 .../app/(app)/{ => (tabs)/home}/settings.tsx | 0 .../app/(app)/(tabs)/library/_layout.tsx | 18 ++- .../app/(app)/(tabs)/library/album/[id].tsx | 1 + .../app/(app)/(tabs)/library/artist/[id].tsx | 1 + .../(app)/(tabs)/library/browse/albums.tsx | 1 + .../(app)/(tabs)/library/browse/artists.tsx | 1 + .../app/(app)/(tabs)/library/browse/songs.tsx | 1 + .../mobile/app/(app)/(tabs)/library/index.tsx | 17 ++- .../(app)/(tabs)/library/playlist/[id].tsx | 1 + .../(tabs)/library/playlist/favorites.tsx | 1 + .../(app)/(tabs)/library/playlists/index.tsx | 56 ++++++++ .../mobile/app/(app)/(tabs)/library/queue.tsx | 1 + .../(app)/(tabs)/library/recently-added.tsx | 1 + .../(app)/(tabs)/library/recently-played.tsx | 1 + .../app/(app)/(tabs)/library/settings.tsx | 1 + apps/mobile/app/(app)/(tabs)/more/index.tsx | 18 +-- .../app/(app)/(tabs)/playlists/_layout.tsx | 29 ---- .../app/(app)/(tabs)/playlists/index.tsx | 31 ----- .../app/(app)/(tabs)/search/_layout.tsx | 18 ++- .../app/(app)/(tabs)/search/album/[id].tsx | 1 + .../app/(app)/(tabs)/search/artist/[id].tsx | 1 + .../app/(app)/(tabs)/search/browse/albums.tsx | 1 + .../(app)/(tabs)/search/browse/artists.tsx | 1 + .../app/(app)/(tabs)/search/browse/songs.tsx | 1 + apps/mobile/app/(app)/(tabs)/search/index.tsx | 125 ++---------------- .../app/(app)/(tabs)/search/playlist/[id].tsx | 1 + .../(tabs)/search/playlist/favorites.tsx | 1 + apps/mobile/app/(app)/(tabs)/search/queue.tsx | 1 + .../(app)/(tabs)/search/recently-added.tsx | 1 + .../(app)/(tabs)/search/recently-played.tsx | 1 + .../app/(app)/(tabs)/search/settings.tsx | 1 + apps/mobile/app/(app)/_layout.tsx | 101 ++++++++------ apps/mobile/app/(app)/player.tsx | 8 +- apps/mobile/components/auth-form.tsx | 12 +- .../components/convex-auth-recovery.tsx | 114 ++++++++++++++++ apps/mobile/components/media-cards.tsx | 18 +-- apps/mobile/components/mini-player.tsx | 97 ++++++-------- apps/mobile/components/search-results.tsx | 114 ++++++++++++++++ apps/mobile/contexts/add-to-playlist.tsx | 8 +- apps/mobile/contexts/convex-app.tsx | 33 +++-- apps/mobile/contexts/convex-auth-session.tsx | 31 +++++ apps/mobile/hooks/use-debounced-search.ts | 43 ++++++ apps/mobile/lib/app-navigation.ts | 34 +++++ apps/mobile/lib/auth-errors.ts | 63 +++++++++ apps/mobile/lib/auth-storage.ts | 20 +++ apps/mobile/lib/navigation.ts | 40 +++--- apps/mobile/lib/session.ts | 6 +- 59 files changed, 782 insertions(+), 362 deletions(-) rename apps/mobile/app/(app)/{ => (tabs)/home}/album/[id].tsx (94%) rename apps/mobile/app/(app)/{ => (tabs)/home}/artist/[id].tsx (100%) rename apps/mobile/app/(app)/{library => (tabs)/home/browse}/albums.tsx (100%) rename apps/mobile/app/(app)/{library => (tabs)/home/browse}/artists.tsx (92%) rename apps/mobile/app/(app)/{library => (tabs)/home/browse}/songs.tsx (100%) rename apps/mobile/app/(app)/{ => (tabs)/home}/playlist/[id].tsx (99%) rename apps/mobile/app/(app)/{ => (tabs)/home}/playlist/favorites.tsx (87%) rename apps/mobile/app/(app)/{ => (tabs)/home}/queue.tsx (100%) rename apps/mobile/app/(app)/{ => (tabs)/home}/recently-added.tsx (100%) rename apps/mobile/app/(app)/{ => (tabs)/home}/recently-played.tsx (100%) rename apps/mobile/app/(app)/{ => (tabs)/home}/settings.tsx (100%) create mode 100644 apps/mobile/app/(app)/(tabs)/library/album/[id].tsx create mode 100644 apps/mobile/app/(app)/(tabs)/library/artist/[id].tsx create mode 100644 apps/mobile/app/(app)/(tabs)/library/browse/albums.tsx create mode 100644 apps/mobile/app/(app)/(tabs)/library/browse/artists.tsx create mode 100644 apps/mobile/app/(app)/(tabs)/library/browse/songs.tsx create mode 100644 apps/mobile/app/(app)/(tabs)/library/playlist/[id].tsx create mode 100644 apps/mobile/app/(app)/(tabs)/library/playlist/favorites.tsx create mode 100644 apps/mobile/app/(app)/(tabs)/library/playlists/index.tsx create mode 100644 apps/mobile/app/(app)/(tabs)/library/queue.tsx create mode 100644 apps/mobile/app/(app)/(tabs)/library/recently-added.tsx create mode 100644 apps/mobile/app/(app)/(tabs)/library/recently-played.tsx create mode 100644 apps/mobile/app/(app)/(tabs)/library/settings.tsx delete mode 100644 apps/mobile/app/(app)/(tabs)/playlists/_layout.tsx delete mode 100644 apps/mobile/app/(app)/(tabs)/playlists/index.tsx create mode 100644 apps/mobile/app/(app)/(tabs)/search/album/[id].tsx create mode 100644 apps/mobile/app/(app)/(tabs)/search/artist/[id].tsx create mode 100644 apps/mobile/app/(app)/(tabs)/search/browse/albums.tsx create mode 100644 apps/mobile/app/(app)/(tabs)/search/browse/artists.tsx create mode 100644 apps/mobile/app/(app)/(tabs)/search/browse/songs.tsx create mode 100644 apps/mobile/app/(app)/(tabs)/search/playlist/[id].tsx create mode 100644 apps/mobile/app/(app)/(tabs)/search/playlist/favorites.tsx create mode 100644 apps/mobile/app/(app)/(tabs)/search/queue.tsx create mode 100644 apps/mobile/app/(app)/(tabs)/search/recently-added.tsx create mode 100644 apps/mobile/app/(app)/(tabs)/search/recently-played.tsx create mode 100644 apps/mobile/app/(app)/(tabs)/search/settings.tsx create mode 100644 apps/mobile/components/convex-auth-recovery.tsx create mode 100644 apps/mobile/components/search-results.tsx create mode 100644 apps/mobile/contexts/convex-auth-session.tsx create mode 100644 apps/mobile/hooks/use-debounced-search.ts create mode 100644 apps/mobile/lib/app-navigation.ts create mode 100644 apps/mobile/lib/auth-errors.ts diff --git a/apps/mobile/app/(app)/(tabs)/_layout.tsx b/apps/mobile/app/(app)/(tabs)/_layout.tsx index bd5f1ae..6bca97e 100644 --- a/apps/mobile/app/(app)/(tabs)/_layout.tsx +++ b/apps/mobile/app/(app)/(tabs)/_layout.tsx @@ -96,15 +96,7 @@ export default function TabsLayout() { Library - - - Playlists - - - + Search diff --git a/apps/mobile/app/(app)/(tabs)/home/_layout.tsx b/apps/mobile/app/(app)/(tabs)/home/_layout.tsx index 8d84403..438f058 100644 --- a/apps/mobile/app/(app)/(tabs)/home/_layout.tsx +++ b/apps/mobile/app/(app)/(tabs)/home/_layout.tsx @@ -1,7 +1,21 @@ import { Stack } from "expo-router" -import { useStackScreenOptions } from "@/lib/navigation" +import { tabStackScreenTitles, useStackScreenOptions } from "@/lib/navigation" + +export const unstable_settings = { + initialRouteName: "index", +} export default function HomeLayout() { - return + const baseOptions = useStackScreenOptions({ title: "Home" }) + + return ( + ({ + ...baseOptions, + title: tabStackScreenTitles[route.name] ?? "Home", + })} + /> + ) } diff --git a/apps/mobile/app/(app)/album/[id].tsx b/apps/mobile/app/(app)/(tabs)/home/album/[id].tsx similarity index 94% rename from apps/mobile/app/(app)/album/[id].tsx rename to apps/mobile/app/(app)/(tabs)/home/album/[id].tsx index e585698..d4159c8 100644 --- a/apps/mobile/app/(app)/album/[id].tsx +++ b/apps/mobile/app/(app)/(tabs)/home/album/[id].tsx @@ -1,6 +1,6 @@ import { useQuery } from "convex/react" import { Image } from "expo-image" -import { Stack, useLocalSearchParams, useRouter } from "expo-router" +import { Stack, useLocalSearchParams } from "expo-router" import { useState } from "react" import { Pressable, ScrollView, StyleSheet, Text, View } from "react-native" import { Ionicons } from "@expo/vector-icons" @@ -16,15 +16,19 @@ import { api } from "@otunes/convex/_generated/api" import type { Id } from "@otunes/convex/_generated/dataModel" import type { BrowseAlbumTrack } from "@otunes/convex/types" import { formatDuration, formatMetadata } from "@/lib/format" +import { useAppNavigation } from "@/lib/app-navigation" import { albumCoverUrl } from "@/lib/urls" import { radius, spacing, useThemeColors } from "@/lib/theme" export default function AlbumScreen() { const { id } = useLocalSearchParams<{ id: string }>() - const router = useRouter() + const { push } = useAppNavigation() const colors = useThemeColors() const { config } = useServerConfig() - const album = useQuery(api.library.browseAlbumDetail, { id: id as Id<"albums"> }) + const album = useQuery( + api.library.browseAlbumDetail, + typeof id === "string" ? { id: id as Id<"albums"> } : "skip" + ) const { playAlbum, playAlbumShuffled, playFromSong } = usePlayback() const { isAlbumFavorite, toggleAlbumFavorite } = useFavorites() const { openAddAlbumToPlaylist } = useAddToPlaylist() @@ -84,7 +88,7 @@ export default function AlbumScreen() { contentFit="cover" /> {album.title} - router.push(`/artist/${album.artist.id}`)}> + push(`/artist/${album.artist.id}`)}> {album.artist.name} {metadata ? ( diff --git a/apps/mobile/app/(app)/artist/[id].tsx b/apps/mobile/app/(app)/(tabs)/home/artist/[id].tsx similarity index 100% rename from apps/mobile/app/(app)/artist/[id].tsx rename to apps/mobile/app/(app)/(tabs)/home/artist/[id].tsx diff --git a/apps/mobile/app/(app)/library/albums.tsx b/apps/mobile/app/(app)/(tabs)/home/browse/albums.tsx similarity index 100% rename from apps/mobile/app/(app)/library/albums.tsx rename to apps/mobile/app/(app)/(tabs)/home/browse/albums.tsx diff --git a/apps/mobile/app/(app)/library/artists.tsx b/apps/mobile/app/(app)/(tabs)/home/browse/artists.tsx similarity index 92% rename from apps/mobile/app/(app)/library/artists.tsx rename to apps/mobile/app/(app)/(tabs)/home/browse/artists.tsx index 9a86866..e46ab8c 100644 --- a/apps/mobile/app/(app)/library/artists.tsx +++ b/apps/mobile/app/(app)/(tabs)/home/browse/artists.tsx @@ -1,18 +1,18 @@ import { useQuery } from "convex/react" -import { useRouter } from "expo-router" import { Pressable, ScrollView, StyleSheet, Text } from "react-native" import { Image } from "expo-image" import { LoadingView } from "@/components/ui/primitives" import { contentBottomInset } from "@/components/player" import { useServerConfig } from "@/contexts/server-config" +import { useAppNavigation } from "@/lib/app-navigation" import { api } from "@otunes/convex/_generated/api" import type { BrowseArtist } from "@otunes/convex/types" import { artistCoverUrl } from "@/lib/urls" import { radius, spacing, useThemeColors } from "@/lib/theme" export default function ArtistsScreen() { - const router = useRouter() + const { push } = useAppNavigation() const colors = useThemeColors() const { config } = useServerConfig() const artists = useQuery(api.library.browseArtists) @@ -31,7 +31,7 @@ export default function ArtistsScreen() { router.push(`/artist/${artist.id}`)} + onPress={() => push(`/artist/${artist.id}`)} > ( setMenuOpen(true)} hitSlop={8}> diff --git a/apps/mobile/app/(app)/playlist/favorites.tsx b/apps/mobile/app/(app)/(tabs)/home/playlist/favorites.tsx similarity index 87% rename from apps/mobile/app/(app)/playlist/favorites.tsx rename to apps/mobile/app/(app)/(tabs)/home/playlist/favorites.tsx index 5bc42c8..c6f33d9 100644 --- a/apps/mobile/app/(app)/playlist/favorites.tsx +++ b/apps/mobile/app/(app)/(tabs)/home/playlist/favorites.tsx @@ -1,7 +1,7 @@ import { useQuery } from "convex/react" import { Image } from "expo-image" import { useState } from "react" -import { ScrollView, StyleSheet, Text, View } from "react-native" +import { Pressable, ScrollView, StyleSheet, Text, View } from "react-native" import { MediaActionsSheet, type MediaAction } from "@/components/media-actions-sheet" import { Button, LoadingView } from "@/components/ui/primitives" @@ -14,6 +14,8 @@ import { api } from "@otunes/convex/_generated/api" import type { BrowseSong } from "@otunes/convex/types" import { playlistCoverUrl } from "@/lib/urls" import { radius, spacing, useThemeColors } from "@/lib/theme" +import { Ionicons } from "@expo/vector-icons" +import { Stack } from "expo-router" export default function FavoritesScreen() { const colors = useThemeColors() @@ -54,6 +56,12 @@ export default function FavoritesScreen() { return ( <> + - {favorites.title} + + {favorites.title} +