Skip to content

fix(artist): split conjunctions correctly, resolve missing IDs, make artists clickable#3813

Open
kairosci wants to merge 13 commits into
MetrolistGroup:mainfrom
kairosci:fix/artist-conjunction-handling
Open

fix(artist): split conjunctions correctly, resolve missing IDs, make artists clickable#3813
kairosci wants to merge 13 commits into
MetrolistGroup:mainfrom
kairosci:fix/artist-conjunction-handling

Conversation

@kairosci
Copy link
Copy Markdown
Contributor

@kairosci kairosci commented May 26, 2026

Problem

Artist names joined by conjunctions (e.g., "Tiziano Ferro e Ariete") were not split correctly. Conjunction words like "e" (Italian for "and") appeared as separate clickable artists. Additionally:

  • When splitting a single run, all split parts received the same navigationEndpoint, making the second artist navigate to the wrong page (e.g., clicking "Ariete" opened Tiziano Ferro)
  • mapNotNull in fromMusicTwoRowItemRenderer filtered out artists with null IDs before resolveArtistIds() could resolve them
  • Artists were plain text across all list components — not individually tappable like in Spotify
  • Artist thumbnails on the artist page were not persisted in the database — they relied solely on the API response, causing them to appear late or flicker when navigating from a clickable artist name
  • DB version bump from 37→38 with manual migration crashed at runtime due to Room auto-migration conflict
  • With 3+ artists, every pair was separated by a conjunction (e.g., "A & B & C") instead of proper comma+conjunction formatting

Cause

  • splitArtistsByConjunction() only checked for standalone conjunction runs but did not split runs containing conjunction words
  • When splitting a single run, all split parts received the same navigationEndpoint
  • No mechanism existed to make artist names clickable with per-artist navigation
  • ArtistEntity was only created/updated when subscribing to an artist, not when simply viewing the artist page
  • Manual MIGRATION_37_38 conflicted with Room's auto-migration system; Room could not resolve the migration path from 37 to 38
  • ClickableArtistText and plain-text fallbacks used a single separator for all pairs, producing "A & B & C" for 3+ artists

Solution

Navigation fix (ef84c0a)

  • Split single runs like "Artist1 e Artist2" into separate runs
  • Only the first split part retains the original navigationEndpoint; subsequent parts get null so resolveArtistIds() handles them
  • Replaced mapNotNull with .map in fromMusicTwoRowItemRenderer so null-ID artists are preserved
  • Restored localized separator from metrolist_strings.xml via getArtistSeparator() instead of hardcoded strings

Clickable artists (5703c42)

  • Added ClickableArtistText composable in Items.kt with two overloads (ArtistEntity, MediaMetadata.Artist)
  • Builds an AnnotatedString with pushStringAnnotation("artist_$id", id) and renders via ClickableText
  • On tap, navigates to artist/${id} via NavController
  • Uses the localized separator from stringResource(R.string.and)
  • Uses LocalNavController CompositionLocal (following project's existing pattern) instead of threading navController through 40+ files
  • Updated SongListItem, SongGridItem, AlbumListItem, MediaMetadataListItem to render clickable artists via LocalNavController
  • Also converted menu composables (SongMenu, AlbumMenu, YouTubeSongMenu, QueueMenu, PlayerMenu, Library.kt, Dialog.kt) and screen composables to LocalNavController.current, removing ~177 lines of navController parameter boilerplate

Persistent artist thumbnails (9373e83)

  • In ArtistViewModel.fetchArtistsFromYTM(), save/update the ArtistEntity in the local database with thumbnail, name, and channelId after each successful API call
  • Ensures the artist image is immediately available from the database on subsequent visits, preventing thumbnail flicker

DB migration fix (9abbce6)

  • Replaced manual MIGRATION_37_38 with AutoMigration(from = 37, to = 38) — Room natively handles adding a nullable column with DEFAULT
  • Resolves the crash "A migration from 37 to 38 was required but not found"

Comma+conjunction for 3+ artists (077c89d)

  • ClickableArtistText now renders "A, B & C" for 3+ artists, "A & B" for 2, and just "A" for 1
  • Added joinToArtistString() extension function in Utils.kt for uniform string-based formatting
  • Updated MiniPlayer, MusicService, MediaLibrarySessionCallback, ListenTogetherManager to use the new formatter

Album page artist color (a3c5790)

  • ClickableArtistText on AlbumScreen now uses colorScheme.secondary instead of default onSurface, matching song item styling

CodeRabbit review fixes (a3c5790)

  • ArtistPageCache: toYTItem() now uses thumbnail.takeIf { it.isNotBlank() } for nullable thumbnail fields (playlist, artist, podcast), preserving null semantics for absent thumbnails
  • Items.kt/HomaScreen.kt: all plain-text artist fallback branches now use joinToArtistString() instead of raw joinToString(), ensuring consistent "A, B & C" formatting everywhere
  • ArtistViewModel: cache now stores unfiltered sections (resolvedPage.sections) instead of filteredSections, so hide-* settings toggles don't break offline cache content

Testing

  • Build: ./gradlew :app:assembleFossDebug — SUCCESS
  • APK: app/build/outputs/apk/foss/debug/app-foss-debug.apk
  • Verification: tapping individual artist names navigates to the correct artist page with correct thumbnail

Summary by CodeRabbit

  • New Features

    • Artist pages are now cached for faster loading and offline access.
  • Improvements

    • Artist names rendered as clickable links in many lists and detail views.
    • Artist lists and playback displays use localized conjunctions (e.g., "Artist1 and Artist2") app-wide.
    • Metadata separators updated from "•" to "|" for clearer display.
  • Chores

    • Database schema version bumped with an automatic migration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 26, 2026

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Localize artist-list joining (use localized “and”), add ClickableArtistText, migrate many composables to a LocalNavController, add artist-page caching with Room v38 and AutoMigration, and tighten innertube artist parsing and mapping.

Changes

Artist UI, navigation, cache, DB, and parser

Layer / File(s) Summary
Room schema v38 & setup
app/schemas/com.metrolist.music.db.InternalDatabase/38.json, app/src/main/kotlin/com/metrolist/music/db/MusicDatabase.kt
Adds schema JSON for DB version 38, views and setupQueries; bumps @Database version and registers AutoMigration 37→38.
Cached artist-page models & conversions
app/src/main/kotlin/com/metrolist/music/db/entities/ArtistPageCache.kt
Adds serializable cached types, JSON config, and functions to serialize/deserialize CachedArtistPage and map to/from YTItem/ArtistPage.
ArtistEntity field & ViewModel persistence
app/src/main/kotlin/com/metrolist/music/db/entities/ArtistEntity.kt, app/src/main/kotlin/com/metrolist/music/viewmodels/ArtistViewModel.kt
Adds cachedPageJson column to ArtistEntity; ViewModel loads cached page on init and persists fetched pages into DB asynchronously.
Innertube parser improvements
innertube/src/main/kotlin/com/metrolist/innertube/models/Runs.kt, innertube/src/main/kotlin/com/metrolist/innertube/pages/*
Trim conjunction text comparisons; preserve navigationEndpoint only for first split part; map artistRuns to Artist entries and return null when no artists remain.
Artist separator helpers
app/src/main/kotlin/com/metrolist/music/utils/Utils.kt, app/src/main/kotlin/com/metrolist/music/utils/StringUtils.kt, app/src/main/res/values-it/metrolist_strings.xml
Adds getArtistSeparator and List<T>.joinToArtistString, updates bullet join separator to `
ClickableArtistText & item updates
app/src/main/kotlin/com/metrolist/music/ui/component/Items.kt, app/src/main/kotlin/com/metrolist/music/ui/component/SongDropdownSelect.kt
Adds ClickableArtistText overloads and updates Song/Album/YouTube/MediaMetadata list/grid items and dropdowns to render clickable artist spans plus a pipe-separated duration/metadata segment and use localized joins.
LocalNavController provider & wiring
app/src/main/kotlin/com/metrolist/music/MainActivity.kt, many ui/menu/*, ui/screens/*, ui/component/Library.kt
Adds LocalNavController composition local and migrates numerous composables/menus/screens to read navController from it instead of parameter passing (call-site removals/parameter updates).
Playback & listen-together formatting
app/src/main/kotlin/.../playback/*, .../MusicService.kt, .../listentogether/*, .../ui/player/MiniPlayer.kt
Replace comma joins with joinToArtistString(getArtistSeparator(...)) for MediaMetadata, widget text, listen-together TrackInfo, and mini player UI.
Call-site & small UI adjustments
various ui/screens/*, ui/menu/*, ui/component/Library.kt, ui/screens/wrapped/*
Update call sites to new signatures, remove explicit navController arguments, add shimmer placeholder in ArtistScreen, and change some metadata separators from to `

Estimated code review effort:
🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • nyxiereal
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

@kairosci
Copy link
Copy Markdown
Contributor Author

This applies to Italian artists, but the same principle applies to artists of other nationalities as well

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
innertube/src/main/kotlin/com/metrolist/innertube/models/Runs.kt (1)

34-37: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Make conjunction splitting case-insensitive

conjunctionPattern is built without RegexOption.IGNORE_CASE, so in-text splitting remains case-sensitive while the standalone conjunction check is case-insensitive—mixed/upper-case conjunctions can bypass splitting.

Proposed fix
-    val conjunctionPattern = Regex(
-        if (words.isNotEmpty()) " (${words.joinToString("|") { Regex.escape(it) }}) | & "
-        else " & "
-    )
+    val conjunctionPattern = Regex(
+        if (words.isNotEmpty()) " (${words.joinToString("|") { Regex.escape(it) }}) | & "
+        else " & ",
+        options = setOf(RegexOption.IGNORE_CASE)
+    )
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@innertube/src/main/kotlin/com/metrolist/innertube/models/Runs.kt` around
lines 34 - 37, conjunctionPattern in Runs.kt is constructed without
case-insensitive matching so mixed/upper-case conjunctions aren't split; update
the Regex creation for conjunctionPattern to use case-insensitive matching
(e.g., pass RegexOption.IGNORE_CASE or embed (?i)) so the pattern built from
words and the standalone " & " are matched regardless of case, keeping the same
joinToString logic that escapes words.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/src/main/kotlin/com/metrolist/music/db/entities/SpeedDialItem.kt`:
- Line 80: Deserialization is still splitting artist strings using the
hard-coded ", " while serialization uses ARTIST_SEPARATOR (causing round-trip
failure); update the deserialization calls that currently use split(", ") to
split(ARTIST_SEPARATOR) (and preserve trimming if needed), i.e., change the code
that converts the subtitle back into artist names to use ARTIST_SEPARATOR
instead of the literal ", " in the SpeedDialItem deserialization logic so both
occurrences are fixed.

In `@app/src/main/kotlin/com/metrolist/music/ui/player/MiniPlayer.kt`:
- Around line 674-677: In MiniPlayer.kt update the logic that computes
displayArtists: stop filtering artists by it.id != null and instead only filter
by non-blank names (e.g., metadata.artists.filter { it.name.isNotBlank() }) so
the Text that joins names with ARTIST_SEPARATOR always shows valid names;
preserve any existing id checks where artist IDs are required for actions
(subscribe/navigation) rather than for rendering.

In `@app/src/main/kotlin/com/metrolist/music/utils/PlaylistExporter.kt`:
- Line 133: PlaylistExporter started using the ARTIST_SEPARATOR constant when
serializing artists but loadM3UOnline in BackupRestoreViewModel still splits
artist fields with a hardcoded ';', breaking round-trip imports; update
loadM3UOnline to use the same ARTIST_SEPARATOR constant (or split on
Regex.escape(ARTIST_SEPARATOR) if treating it as a regex) instead of split(';')
so both export (PlaylistExporter) and import (loadM3UOnline) use the identical
delimiter.

In `@app/src/main/kotlin/com/metrolist/music/utils/Utils.kt`:
- Line 12: Replace the hardcoded ARTIST_SEPARATOR constant with a locale-aware
retrieval and update callsites to use it: remove or stop using const val
ARTIST_SEPARATOR in Utils.kt and provide a way to get the separator from
resources (e.g., use context.getString(R.string.and) or
stringResource(R.string.and) in composables) so UI code that composes artists
(where ARTIST_SEPARATOR was used) builds the separator as "
${context.getString(R.string.and)} " rather than the literal " e "; update all
usages to call the new localized accessor or inline resource lookup (referencing
R.string.and and the former ARTIST_SEPARATOR symbol to find replacements).

---

Outside diff comments:
In `@innertube/src/main/kotlin/com/metrolist/innertube/models/Runs.kt`:
- Around line 34-37: conjunctionPattern in Runs.kt is constructed without
case-insensitive matching so mixed/upper-case conjunctions aren't split; update
the Regex creation for conjunctionPattern to use case-insensitive matching
(e.g., pass RegexOption.IGNORE_CASE or embed (?i)) so the pattern built from
words and the standalone " & " are matched regardless of case, keeping the same
joinToString logic that escapes words.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 39b94326-94e9-4d2d-a7cf-c9f6c8859fff

📥 Commits

Reviewing files that changed from the base of the PR and between d952e61 and cfaab15.

📒 Files selected for processing (20)
  • app/src/main/kotlin/com/metrolist/music/db/entities/SpeedDialItem.kt
  • app/src/main/kotlin/com/metrolist/music/listentogether/ListenTogetherManager.kt
  • app/src/main/kotlin/com/metrolist/music/playback/MediaLibrarySessionCallback.kt
  • app/src/main/kotlin/com/metrolist/music/playback/MusicService.kt
  • app/src/main/kotlin/com/metrolist/music/ui/component/Items.kt
  • app/src/main/kotlin/com/metrolist/music/ui/component/SongDropdownSelect.kt
  • app/src/main/kotlin/com/metrolist/music/ui/menu/AlbumMenu.kt
  • app/src/main/kotlin/com/metrolist/music/ui/menu/SongMenu.kt
  • app/src/main/kotlin/com/metrolist/music/ui/menu/YouTubeSongMenu.kt
  • app/src/main/kotlin/com/metrolist/music/ui/player/MiniPlayer.kt
  • app/src/main/kotlin/com/metrolist/music/ui/player/Player.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/HomeScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/wrapped/pages/WrappedTop5SongsScreen.kt
  • app/src/main/kotlin/com/metrolist/music/utils/PlaylistExporter.kt
  • app/src/main/kotlin/com/metrolist/music/utils/Utils.kt
  • app/src/main/kotlin/com/metrolist/music/viewmodels/BackupRestoreViewModel.kt
  • app/src/main/res/values-it/metrolist_strings.xml
  • innertube/src/main/kotlin/com/metrolist/innertube/models/Runs.kt
  • innertube/src/main/kotlin/com/metrolist/innertube/pages/ArtistItemsPage.kt
  • innertube/src/main/kotlin/com/metrolist/innertube/pages/ArtistPage.kt

Comment thread app/src/main/kotlin/com/metrolist/music/db/entities/SpeedDialItem.kt Outdated
Comment thread app/src/main/kotlin/com/metrolist/music/ui/player/MiniPlayer.kt Outdated
Comment thread app/src/main/kotlin/com/metrolist/music/utils/PlaylistExporter.kt Outdated
Comment thread app/src/main/kotlin/com/metrolist/music/utils/Utils.kt Outdated
@kairosci kairosci marked this pull request as draft May 26, 2026 21:05
@kairosci kairosci force-pushed the fix/artist-conjunction-handling branch 2 times, most recently from b83719f to 08a5f17 Compare May 26, 2026 21:35
kairosci added a commit to kairosci/metrolist that referenced this pull request May 26, 2026
When artists are separated by conjunctions in YouTube Music API responses,
all artists now maintain their navigationEndpoint, not just the first one.
This allows each artist to be individually clickable without showing commas.

Fixes: PR MetrolistGroup#3813
@kairosci kairosci marked this pull request as ready for review May 27, 2026 14:34
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@innertube/src/main/kotlin/com/metrolist/innertube/models/Runs.kt`:
- Line 44: The current split handling adds Run(part.trim(),
run.navigationEndpoint) for every split part, causing all parts to share the
same navigationEndpoint; change the logic so only the first split part keeps
run.navigationEndpoint and all subsequent parts use null — i.e., when building
Runs (see Run constructor and the variable run used in the split loop that calls
result.add(...)), pass run.navigationEndpoint for the first part and null for
others (use an index or a boolean firstPart flag) so secondary artists don't
route to the first artist's page.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: dbc3ec74-5be5-4d37-8d82-15a138952889

📥 Commits

Reviewing files that changed from the base of the PR and between cfaab15 and d589a5b.

📒 Files selected for processing (4)
  • app/src/main/kotlin/com/metrolist/music/ui/component/SongDropdownSelect.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/HomeScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/wrapped/pages/WrappedTop5SongsScreen.kt
  • innertube/src/main/kotlin/com/metrolist/innertube/models/Runs.kt
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/src/main/kotlin/com/metrolist/music/ui/screens/wrapped/pages/WrappedTop5SongsScreen.kt

Comment thread innertube/src/main/kotlin/com/metrolist/innertube/models/Runs.kt Outdated
@kairosci kairosci marked this pull request as draft May 27, 2026 14:50
@kairosci kairosci changed the title fix(artist): split conjunctions correctly and resolve missing artist IDs fix(artist): split conjunctions correctly, resolve missing IDs, and make artists clickable May 27, 2026
@kairosci kairosci force-pushed the fix/artist-conjunction-handling branch from 9c9d932 to 9abbce6 Compare May 27, 2026 16:56
@kairosci kairosci changed the title fix(artist): split conjunctions correctly, resolve missing IDs, and make artists clickable fix(artist): split conjunctions correctly, resolve missing IDs, make artists clickable May 27, 2026
@kairosci kairosci marked this pull request as ready for review May 27, 2026 17:12
@kairosci
Copy link
Copy Markdown
Contributor Author

Note regarding the first version: #3695
Please note that many lines relate to the JSON

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/src/main/kotlin/com/metrolist/music/db/entities/ArtistPageCache.kt`:
- Around line 169-170: The cached mapping is turning absent thumbnails into a
non-null blank string; update the mapping in ArtistPageCache (where thumbnail is
assigned alongside author = author?.let {
com.metrolist.innertube.models.Artist(it.name, it.id) }) to preserve null
semantics by assigning null when there is no thumbnail instead of using ""
(apply the same change to the other thumbnail assignment sites noted: the
occurrences around the author mapping and the other listed spots). Locate the
mapping functions/constructors in ArtistPageCache.kt that set the thumbnail
property and replace any "" fallback with a nullable assignment (e.g., keep
thumbnail as thumbnail or thumbnail?.takeIf { it.isNotBlank() } ?: null) so
restored items retain null for absent thumbnails.

In `@app/src/main/kotlin/com/metrolist/music/ui/component/Items.kt`:
- Around line 521-523: The plain-text branches are using joinToString with
stringResource(R.string.and) which causes inconsistent formatting vs
ClickableArtistText; replace the inline joinToString usage with the same
artist-formatting helper used by ClickableArtistText (instead of building "
${stringResource(R.string.and)} " yourself) so that joinByBullet(...) (or the
shared artist formatting function used by ClickableArtistText) receives the
already-formatted artist string; update occurrences around joinByBullet,
ClickableArtistText, and song.orderedArtists at the listed locations (521-523,
620-623, 788-792, 868, 1143-1159, 1226-1227, 1307-1308) to call that shared
helper rather than joinToString with the raw localized conjunction.

In `@app/src/main/kotlin/com/metrolist/music/ui/screens/HomeScreen.kt`:
- Line 371: The subtitle currently builds artists with
song.artists.joinToString(" ${stringResource(R.string.and)} ") which produces "A
and B and C"; replace that joinToString call in HomeScreen (and the similar
occurrences around the card subtitles) with the shared artist-formatting helper
used elsewhere (the centralized function that formats artist lists for 3+
artists) so subtitles use the "A, B & C" style; locate the joinToString usage
(song.artists.joinToString(...)) and swap it to call the existing helper (the
same helper already used in other screens) so all UI cards use the consistent
artist formatter.

In `@app/src/main/kotlin/com/metrolist/music/viewmodels/ArtistViewModel.kt`:
- Around line 160-162: The cache is being populated with filteredSections which
makes cached pages reflect current hide-* settings; change the
serializeArtistPage call in ArtistViewModel (where serializeArtistPage(...) is
invoked) to pass the original unfiltered sections (e.g., sections or
resolvedPage.sections) instead of filteredSections so the cache stores the full
dataset; keep using filteredSections only for UI rendering but serialize the
unfiltered source for caching.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: da645add-1727-4020-b741-9dec3fb450a4

📥 Commits

Reviewing files that changed from the base of the PR and between d589a5b and 077c89d.

📒 Files selected for processing (36)
  • app/schemas/com.metrolist.music.db.InternalDatabase/38.json
  • app/src/main/kotlin/com/metrolist/music/db/MusicDatabase.kt
  • app/src/main/kotlin/com/metrolist/music/db/entities/ArtistEntity.kt
  • app/src/main/kotlin/com/metrolist/music/db/entities/ArtistPageCache.kt
  • app/src/main/kotlin/com/metrolist/music/listentogether/ListenTogetherManager.kt
  • app/src/main/kotlin/com/metrolist/music/playback/MediaLibrarySessionCallback.kt
  • app/src/main/kotlin/com/metrolist/music/playback/MusicService.kt
  • app/src/main/kotlin/com/metrolist/music/ui/component/Items.kt
  • app/src/main/kotlin/com/metrolist/music/ui/component/Library.kt
  • app/src/main/kotlin/com/metrolist/music/ui/component/SongDropdownSelect.kt
  • app/src/main/kotlin/com/metrolist/music/ui/menu/AlbumMenu.kt
  • app/src/main/kotlin/com/metrolist/music/ui/menu/QueueMenu.kt
  • app/src/main/kotlin/com/metrolist/music/ui/menu/SongMenu.kt
  • app/src/main/kotlin/com/metrolist/music/ui/menu/YouTubeAlbumMenu.kt
  • app/src/main/kotlin/com/metrolist/music/ui/player/MiniPlayer.kt
  • app/src/main/kotlin/com/metrolist/music/ui/player/Queue.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/AlbumScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/HistoryScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/HomeScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/artist/ArtistScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/artist/ArtistSongsScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/library/LibraryMixScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/library/LibraryPodcastsScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/library/LibrarySongsScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/playlist/AutoPlaylistScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/playlist/CachePlaylistScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/playlist/LocalPlaylistScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/playlist/TopPlaylistScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/search/LocalSearchScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/wrapped/pages/WrappedTop5SongsScreen.kt
  • app/src/main/kotlin/com/metrolist/music/utils/Utils.kt
  • app/src/main/kotlin/com/metrolist/music/viewmodels/ArtistViewModel.kt
  • app/src/main/res/values-it/metrolist_strings.xml
  • innertube/src/main/kotlin/com/metrolist/innertube/models/Runs.kt
  • innertube/src/main/kotlin/com/metrolist/innertube/pages/ArtistItemsPage.kt
  • innertube/src/main/kotlin/com/metrolist/innertube/pages/ArtistPage.kt
✅ Files skipped from review due to trivial changes (1)
  • app/src/main/res/values-it/metrolist_strings.xml
🚧 Files skipped from review as they are similar to previous changes (3)
  • innertube/src/main/kotlin/com/metrolist/innertube/models/Runs.kt
  • app/src/main/kotlin/com/metrolist/music/ui/component/SongDropdownSelect.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/wrapped/pages/WrappedTop5SongsScreen.kt

Comment thread app/src/main/kotlin/com/metrolist/music/db/entities/ArtistPageCache.kt Outdated
Comment thread app/src/main/kotlin/com/metrolist/music/ui/component/Items.kt Outdated
Comment thread app/src/main/kotlin/com/metrolist/music/ui/screens/HomeScreen.kt Outdated
@kairosci kairosci marked this pull request as draft May 27, 2026 17:24
@kairosci kairosci marked this pull request as ready for review May 27, 2026 18:18
@kairosci
Copy link
Copy Markdown
Contributor Author

cc: @nyxiereal @adrielGGmotion

I've tested it and it works, but if you have any feedback or suggestions on how to improve it further, I'm open to them. This way, artist management becomes more stable, more user-friendly, and more reliable.

@kairosci kairosci force-pushed the fix/artist-conjunction-handling branch from a3cffbb to d849b66 Compare May 28, 2026 18:11
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/src/main/kotlin/com/metrolist/music/ui/menu/YouTubeSongMenu.kt`:
- Around line 97-103: YouTubeSongMenu reads LocalNavController.current but may
be shown from an overlay host that lives outside the NavController composition
local; either preserve the composition-local when showing the overlay or pass a
concrete NavController into the menu. Fix by capturing the current
LocalNavController (val navController = LocalNavController.current) at the call
site and then when invoking LocalMenuState.show { ... } ensure you re-provide it
via CompositionLocalProvider(LocalNavController provides navController) around
the YouTubeSongMenu content (or change YouTubeSongMenu signature to accept a
NavController param and use that for navController.navigate calls), so
navController.navigate(...) always resolves to the intended controller.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 400dd82c-09d9-4a37-9926-7d479a5cc1da

📥 Commits

Reviewing files that changed from the base of the PR and between ab19d2a and a3cffbb.

📒 Files selected for processing (46)
  • app/src/main/kotlin/com/metrolist/music/MainActivity.kt
  • app/src/main/kotlin/com/metrolist/music/ui/component/Dialog.kt
  • app/src/main/kotlin/com/metrolist/music/ui/component/Items.kt
  • app/src/main/kotlin/com/metrolist/music/ui/component/Library.kt
  • app/src/main/kotlin/com/metrolist/music/ui/menu/AlbumMenu.kt
  • app/src/main/kotlin/com/metrolist/music/ui/menu/PlayerMenu.kt
  • app/src/main/kotlin/com/metrolist/music/ui/menu/QueueMenu.kt
  • app/src/main/kotlin/com/metrolist/music/ui/menu/SongMenu.kt
  • app/src/main/kotlin/com/metrolist/music/ui/menu/YouTubeAlbumMenu.kt
  • app/src/main/kotlin/com/metrolist/music/ui/menu/YouTubeSongMenu.kt
  • app/src/main/kotlin/com/metrolist/music/ui/player/Player.kt
  • app/src/main/kotlin/com/metrolist/music/ui/player/Queue.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/AccountScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/AlbumScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/BrowseScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/ChartsScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/ExploreScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/HistoryScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/HomeScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/NavigationBuilder.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/NewReleaseScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/StatsScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/YouTubeBrowseScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/artist/ArtistAlbumsScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/artist/ArtistItemsScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/artist/ArtistScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/artist/ArtistSongsScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/equalizer/EqScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/library/LibraryAlbumsScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/library/LibraryArtistsScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/library/LibraryMixScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/library/LibraryPlaylistsScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/library/LibraryPodcastsScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/library/LibraryScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/library/LibrarySongsScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/playlist/AutoPlaylistScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/playlist/CachePlaylistScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/playlist/LocalPlaylistScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/playlist/OnlinePlaylistScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/playlist/TopPlaylistScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/podcast/OnlinePodcastScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/search/LocalSearchScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/search/OnlineSearchResult.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/search/OnlineSearchScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/search/SearchScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/wrapped/WrappedScreen.kt
💤 Files with no reviewable changes (22)
  • app/src/main/kotlin/com/metrolist/music/ui/screens/NewReleaseScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/ChartsScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/StatsScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/AccountScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/library/LibraryArtistsScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/library/LibrarySongsScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/artist/ArtistAlbumsScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/artist/ArtistItemsScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/BrowseScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/library/LibraryAlbumsScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/ExploreScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/library/LibraryPlaylistsScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/artist/ArtistSongsScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/AlbumScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/playlist/TopPlaylistScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/playlist/AutoPlaylistScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/library/LibraryMixScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/artist/ArtistScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/library/LibraryPodcastsScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/playlist/CachePlaylistScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/HistoryScreen.kt
  • app/src/main/kotlin/com/metrolist/music/ui/screens/YouTubeBrowseScreen.kt

Comment thread app/src/main/kotlin/com/metrolist/music/ui/menu/YouTubeSongMenu.kt
@kairosci
Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 31, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@nyxiereal
Copy link
Copy Markdown
Member

image

holy fucking shit

@kairosci
Copy link
Copy Markdown
Contributor Author

kairosci commented Jun 2, 2026

I've just realized that it might be a bit long, so maybe over the next few days I'll create a separate post for each point mentioned, to keep things cleaner.

I'll leave it open for now as a reference and for portability.
I'll mark it as a draft and come back to it later.

@kairosci kairosci marked this pull request as draft June 2, 2026 21:59
@nyxiereal
Copy link
Copy Markdown
Member

im just reviewing it rn 😭

@nyxiereal nyxiereal marked this pull request as ready for review June 2, 2026 22:05
Comment thread app/src/main/kotlin/com/metrolist/music/ui/component/Items.kt Outdated
Comment thread app/src/main/kotlin/com/metrolist/music/ui/component/Items.kt Outdated
Comment thread app/src/main/kotlin/com/metrolist/music/ui/screens/AlbumScreen.kt
Comment thread app/src/main/kotlin/com/metrolist/music/viewmodels/ArtistViewModel.kt Outdated
Comment thread app/src/main/res/values-it/metrolist_strings.xml
@kairosci kairosci force-pushed the fix/artist-conjunction-handling branch from 0493ff0 to cf5c568 Compare June 2, 2026 22:33
@kairosci kairosci requested a review from nyxiereal June 2, 2026 22:35
@kairosci kairosci force-pushed the fix/artist-conjunction-handling branch 2 times, most recently from ec88727 to 42c6bb3 Compare June 2, 2026 22:45
@kairosci kairosci force-pushed the fix/artist-conjunction-handling branch from 42c6bb3 to 8d22515 Compare June 2, 2026 22:47
@kairosci
Copy link
Copy Markdown
Contributor Author

kairosci commented Jun 2, 2026

all addressed, build passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants