Sort by downloads, fix CLI sync scoping and spinner output#27
Merged
Conversation
Sort: - Upgrades @open-audio-stack/core to 0.1.55 for the new per-package `downloads` rollup field. - Adds sortByDownloads() and wires it into list/search/filter so every command ranks most-downloaded packages first, falling back to name for ties or packages with no download data. Mirrors the same default sort applied in studiorack-app and studiorack-site. - Fixes list.ts's manager.listPackages() call, whose signature (installed, incompatible: boolean) predates a core release that changed it to (installed, architecture, system) - a break the core bump surfaced. --incompatible now means "skip the architecture/system filter" via the machine's real getArchitecture()/getSystem(). CLI feedback: - Fixes ora's spinner.succeed()/fail() splicing the checkmark/cross into the first line of multi-line output (e.g. a rendered table), which misaligned the box-drawing border. Multi-line payloads now get a plain succeed/fail followed by a separate console.log. - The upfront registry sync in index.ts is now scoped to only the registry type actually being invoked, instead of syncing all four on every command (verified safe: installDependency/installDependencies in core already create their own manager per type when they need one). Also wrapped in its own spinner that starts immediately, so the real (network-bound) wait is visible instead of happening silently before a near-instant command-specific spinner flashes by. - Snapshots updated for the new sort order; open.test.ts's snapshot is now keyed by architecture (steinberg/validator only ships x64 binaries, so "installed successfully" vs "no compatible files" is a legitimately different, correct expectation on x64 vs arm64, not one clobbering the other via -u). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
filter, get, list, and search tests asserted an "Installed" column that silently depended on install.test.ts having already run and left surge-synthesizer/surge on disk. Vitest doesn't guarantee alphabetical file order, so whenever the scheduler ran one of these before install.test.ts (or after uninstall.test.ts), the snapshot flipped from ✓ to - and failed. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
execaSync blocks the whole worker event loop for as long as a spawned command runs. On the slower mac CI runner, the steinberg/validator install took 30s+, and that much uninterrupted blocking prevented Vitest's worker<->main RPC heartbeat (onTaskUpdate) from being serviced within its 60s timeout, failing the run with an "Unhandled Error" even though every test passed. Switching to async execa keeps the event loop free during spawns. Explicitly ignore stdin so commands that prompt via inquirer (e.g. `create`) still force-close deterministically instead of hanging, since execaSync incidentally closed its stdin pipe immediately after the sync call returned while the async API leaves it open by default. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
Sort by downloads (default)
@open-audio-stack/coreto0.1.55for the new per-packagedownloadsrollup field.sortByDownloads()helper wired intolist,search, andfiltercommands - most-downloaded first, falling back to name for ties/no data. Same default sort asstudiorack-app/studiorack-site(companion PRs).list.ts'smanager.listPackages()call, whose old(installed, incompatible: boolean)signature predates a core release that changed it to(installed, architecture, system)- a break the core bump surfaced.--incompatiblenow means "skip the architecture/system filter", using the machine's realgetArchitecture()/getSystem().CLI feedback fixes (found while testing the above interactively)
ora'sspinner.succeed()/fail()was splicing the checkmark/cross into the first line of multi-line output (e.g. a rendered table), misaligning the box-drawing border. Multi-line payloads now get a plain succeed/fail followed by the content on its own line(s).index.tssynced all four registry types on every single command invocation, with no feedback while it happened (confirmed via timing:--helptook as long aslist, ~1.3s). Now scoped to only the registry type actually being invoked - verified safe sinceinstallDependency/installDependenciesin core already spin up their own manager per type when they need cross-type data. Wrapped in a spinner that starts immediately so the real (network-bound) wait is visible, instead of it happening silently before a near-instant command-specific spinner flashes by too fast to see.open.test.ts's snapshot is now keyed by architecture:steinberg/validatoronly ships x64 binaries, so "installed successfully" (x64) vs "no compatible files found" (arm64) are both legitimately correct, architecture-dependent results - not one clobbering the other via-u.Test plan
npm run build- cleannpm run lint- cleannpm test- 13/13 files, 19/19 tests passinglist/search/filterrank by downloads descending; table alignment is correct with the spinner fix;plugins listdropped from ~1.3s to ~0.4s wall time after scoping sync to one registry type;--jsonoutput stays clean (no sync-status noise)🤖 Generated with Claude Code