15746893a9e9f7ddcc991e71e5e47a79807462ad
Two bugs Kyle reported, both in what a session restore does NOT bring back. THE LANE AND THE STREAM BADGE. Kyle: after the machine sleeps, "the playbar waveform goes away and the track says streming even though its cashed". The trigger is not sleep — it is the frontend restarting with a track loaded, which WebView2 does on its own under memory pressure (and which a page reload does too). Neither survives it: the waveform is measured out of the audio bytes and was never re-requested, so the lane rested as dots while ALSO flagged complete; and streamReceived/streamTotal reset to 0, which is what the Now Playing header picks between "transferring", "Cached · size" and "Streaming from <peer>" with — both at zero fell through to the last, for a file that finished downloading sessions ago. His read was exactly right: it WAS cached and the label was lying. Both are now rebuilt from the BACKEND's truth rather than the snapshot. The restore fires the same final-quality waveform request the stream-completion path uses (it answers from whatever the cache holds — full, partial or nothing, each rendering honestly) and asks stream_cache_len for the real cached byte count, setting the counters only when the cache is COMPLETE so "Cached" is never claimed for a prefix. Local tracks get their waveform re-requested too; they had the same dotted-lane bug. Note the guard compares path+peer, not object identity: player.queue is a $state proxy, so the item read back is never === the snapshot object the closure holds. THE BREADCRUMB'S ARTIST PORTRAIT. Reaching an album directly (search -> album, skipping the artist page) left a bare glyph where the artist's picture belongs: trail() synthesises that crumb from the record's own artist NAME, and metadata::CatalogAlbum carries only the name — no id, no picture. openCatalogAlbum now resolves the artist seed after the page lands and re-records the crumb in place (same key), so trail() reads artistArt/artistId out of it. The resolver shares the album header's own cache and in-flight dedupe, so this is the lookup the page mounting already pays for. It also heals the crumb's CLICK, which had artistId null on every direct arrival. Verified live: reloading the app in its broken state restored a 2000-peak waveform and flipped the header to "Cached · 14.6 MB"; Daft Punk's portrait shows on a direct-from-search album arrival. 98/98 tests.
Languages
Rust
48.3%
Svelte
38.1%
JavaScript
13.4%
CSS
0.2%