Repository navigation
Demo Analyzer: players of a folder read before show at once, and cloud demos aren't downloaded to list them (#992) - #996
Conversation
…che all's (#992) A folder's demos are sorted in one lookup_demo_players call that opens no demo: players already cached come back together, demos on a cloud drive with no cache entry are left unread, and only the rest are walked one by one. While Cache all runs, the demos it has queued are left to it and their players are taken from the entry it writes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ast demo by full path - initDemoCache returned nothing when the Cache all button exists (the real app), so analyzer_pane's destructure threw and the rest of initAnalyzerPane never ran. app-boot.spec.js (from #1004) caught it. - demo_cache_progress's `last` was a bare file name, so the player read's `paths.includes(last)` never matched and players only filled in when Cache all ended. It is now the full path given (nothing else reads it). - CloudCheck looks a folder's volume up once, not once per demo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review (unattended pass)Merged Fixed
Small improvement
Checked, no change needed
Judgement calls left for you
Tests run (worktree, after the merge)
🤖 Generated with Claude Code |
The "Players not read for N demos on a cloud drive" line already leaves out demos Cache all has queued, but nothing redrew it until the first demo was cached, which on a cloud drive is after that demo's whole download. The run's first event now redraws it once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Live test (dev build, real Studio, isolated appdata)Merged Measured
FixedWhile Cache all ran, the cloud line stayed up until the first demo was cached (14 s here; on a real cloud drive, that demo's whole download). Tests
Saved formatsNo change. Not tested
🤖 Generated with Claude Code |
Release note: Fixed: the Demo Analyzer shows the players of a folder it has read before at once, and no longer downloads a whole cloud folder (OneDrive, Google Drive) just to list its players.
Closes #992
What changes
lookup_demo_playerscommand sorts the folder's demos in one call without opening any: demos whose players file is current come back together, so there is no "Reading players" pass. A lookup that takes over 300 ms shows "Looking up players…".RECALL_ON_DATA_ACCESS,RECALL_ON_OPEN,OFFLINE, used by OneDrive, Dropbox, Box and Google Drive's mirror mode), or a volume labelled "Google Drive" (Drive for desktop's streaming drive, which sets none of them). A demo that has a cache entry is read as before, from the cache.lastindemo_cache_progress). If a read was already going when Cache all started, it stops. When Cache all ends (finished or stopped), whatever is still missing gets looked up again and read here, unless it's in the cloud.studio/src/folder_players.js(createFolderPlayers),native::player_index::lookup_playersandnative::sys::cloud_file. main.js is untouched.Decisions
index_demo_playersas before.SCHEMA_VERSIONbump.Test done
cargo test -p native --lib -- player_index cloud_file: 4 new tests pass. They cover the lookup sorting cached, cloud and to-read demos against a real cache store, the attribute masks, the volume label, and a local file reading as not online-only.cargo clippy --workspace --exclude goldsrc-hooks --exclude web-analyzer --all-targets --locked -D warnings(1.98.1): clean.cargo fmt --all: clean.npm run test:unit: 95 files / 853 tests pass, including 8 new ones infolder_players.test.jsandmain_js_budget.analyzer-tree(2 new tests: a folder opened twice only reads the uncached demo the first time and nothing the second time with an empty status line; a cloud folder reads nothing and says so), plusdemo-cache,players,player-filter,analyzer-loading: all pass.I:\My Drive\...with Drive running (nothing downloads, the status line points to Cache all), then press Cache all there (players fill in as it goes).🤖 Generated with Claude Code