Repository navigation
Conversation
Picking a page in the rail while Now Playing was open routed behind the stage, so the user had to close it by hand to see the page. Every rail row and a new playlist now raise `navigated`, also onto the current page, and App closes the stage.
Going from one playlist straight to another (likewise album, artist and list pages) could run onParamsChanged before the id binding saw the new params. load() then fetched the page being left, its reply was dropped as stale, and the new page never got a request, so it sat on "Loading playlist…". The load is now deferred with Qt.callLater, which also folds the repeat calls on open into one.
The first follow ran while the list was still hidden behind the loading state, in a zero-high view, so it stayed at the top until the next line began and it looked as if the song had no synced lyrics. The first jump now waits until the list has lines and a height, then re-centres for 400 ms while the real line heights settle; a manual scroll ends that at once.
The sidebar fix left the other doors open: a title-bar search, its suggestions, Ctrl+K, a menu's go-to-artist or album, the downloads button and back still opened the page behind the stage. App now closes the stage on every route change; the sidebar's `navigated` stays for clicks onto the current page, which change no route.
create_playlist answers with YouTube's bare playlist id (PL…), and the sidebar opened that as the page id, so the browse call failed with 400 Bad Request. The new Ids.playlistBrowseId adds the VL prefix the way the Svelte UI does and leaves device and Spotify ids untouched.
…brary YouTube's library browse answers with the old list for a few seconds after a create or a delete, so a new playlist appeared and a deleted one vanished only after a restart. A small LibraryEdits singleton lays the pending edits over every get_library answer, drops each once YouTube's list reflects it, and reloads the lists every 3 s (up to six times) meanwhile. Every create path notes its playlist: the sidebar, the Library page, Add to playlist and the imports.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Six small fixes to the native QML client, one commit each:
62fc9b5,5205662). Picking a page while the Now Playing stage was open routed behind it, so the stage had to be closed by hand to see the page. App now closes the stage on every route change (sidebar, title-bar search and its suggestions, Ctrl+K, a menu's go-to-artist or album, the downloads button, back). The sidebar also raises anavigatedsignal, so a click onto the page you are already on closes the stage too.97adfc8). Going from one playlist straight to another (and the same for album, artist and list pages) could runonParamsChangedbefore theplaylistIdbinding saw the new params.load()then fetched the page being left, its reply was dropped as stale, and the new page never sent a request, so it stayed on "Loading playlist…". The load is now deferred withQt.callLater, which also folds the duplicate calls on open into one.1868b34). The first follow ran while the list was still hidden behind the loading state, at height 0, so the view stayed at the top until the next line began. It looked as if the song had no synced lyrics. The first jump now waits until the list has lines and a height, then re-centres for 400 ms while the real line heights settle. A manual scroll ends that at once.881086c).create_playlistreturns YouTube's barePL…id, and the sidebar opened that as the page id, sobrowsefailed with400 Bad Request. The newIds.playlistBrowseIdaddsVLthe wayui/src/lib/player.svelte.tsalready does, and leaves device and Spotify ids untouched.e571b83). YouTube's library browse still returns the old list for a few seconds after a create or delete, so a new playlist appeared, and a deleted one vanished, only after a restart. A smallLibraryEditssingleton lays the pending edits over everyget_libraryanswer (sidebar and Library page), drops each one once YouTube's list reflects it, and reloads the lists every 3 s (up to six times) in the meantime. Every create path records its playlist: sidebar, Library page, Add to playlist, and both imports.Why
Each of these was hit in daily use. The Now Playing and loading issues made the app look stuck or broken, and with the lyrics issue you couldn't tell missing synced lyrics from a view that hadn't caught up yet.
Surface area
QML client only: Now Playing / navigation, playlist, album, artist and list pages, lyrics (sidebar panel, Now Playing, mini player), sidebar and Library playlists. No daemon, Tauri or Svelte changes. The Svelte UI already closes Now Playing on navigation (
NowPlaying.sveltebeforeNavigate), runs its lyrics scroll after the DOM update, and addsVLon create.Validation
./scripts/release-check.sh(all green, including the Rust tests)cd ui && pnpm check && pnpm build(via release-check)cargo fmt --all -- --checktest_playlist_browse_idtoclient/tests/tst_ids.qml.qmltestrunnerexits silently in my environment onmainas well, so I checkedplaylistBrowseIdand theLibraryEditsoverlay/reconcile logic with node instead.qs -p clientagainst the installedryotunesd).Regression contracts
ryoku-desktopsafetyLibraryEdits' 3 s timer runs only after a create or delete, and stops once YouTube catches up or after six tries. The lyrics settle timer fires once, 400 ms after the lines land.Evidence
loadstill read the old id, and its reply was dropped as stale.get_playlistin 0.0–0.7 s, so the daemon was never the cause.h=0, sopositionViewAtIndexgavegoal=0. One line later it hadh=593and the follow worked.Follow-up
delete_playlistemits nolibrary-changed, and YouTube's list lags. Left for a separate change.