feat: add any-buddy preview --all gallery#26
Merged
Conversation
Dumps all 23 preset builds to stdout in a scrollable gallery — each entry shows the preset name, rarity, species, star tier, eyes/hat, a one-line description, and the full ASCII sprite, separated by rules. any-buddy preview --all No preflight or binary required: the gallery is entirely static so it works even before any-buddy is applied. Useful for picking a preset before committing to the salt search. Also adds --all to the CliFlags type and to the help text.
e513ae6 to
880bfc4
Compare
Co-Messi
added a commit
to Co-Messi/any-buddy
that referenced
this pull request
Apr 4, 2026
Hook install gaps (from code review of PR cpaczek#31): - apply.ts: hook was only installed in the ORIGINAL_SALT fallthrough path; the previousSalt and ORIGINAL_SALT early-return branches inside !oldSalt both returned before reaching it. Extract autoInstallHook() helper and call it before every successful-patch return. - apply.ts: --no-hook flag was silently dropped — runApply() had no noHook param so the flag was ignored. Add noHook param and pass it from cli.ts. - buddies.ts: runBuddies() patched the binary but never installed the hook. Stale-snapshot write (missed in PR cpaczek#24): - buddies.ts isDefault branch: config was the snapshot from the top of runBuddies(), read before saveProfile(outgoing) wrote to disk. Reload fresh immediately before savePetConfigV2 to avoid clobbering that write. - buddies.ts incoming profile read: after switchToProfile() writes to disk, reload fresh config to read the incoming profile rather than the stale pre-switch snapshot. preview.ts edge case (from code review of PR cpaczek#26): - cols - 4 can be negative when stdout.columns < 4 (piped output, very narrow TTY). String.repeat throws RangeError on negative values. Wrap with Math.max(0, cols - 4).
Co-Messi
added a commit
to Co-Messi/any-buddy
that referenced
this pull request
Apr 4, 2026
Hook install gaps (from code review of PR cpaczek#31): - apply.ts: hook was only installed in the ORIGINAL_SALT fallthrough path; the previousSalt and ORIGINAL_SALT early-return branches inside !oldSalt both returned before reaching it. Extract autoInstallHook() helper and call it before every successful-patch return. - apply.ts: --no-hook flag was silently dropped — runApply() had no noHook param so the flag was ignored. Add noHook param and pass it from cli.ts. - buddies.ts: runBuddies() patched the binary but never installed the hook. Stale-snapshot write (missed in PR cpaczek#24): - buddies.ts isDefault branch: config was the snapshot from the top of runBuddies(), read before saveProfile(outgoing) wrote to disk. Reload fresh immediately before savePetConfigV2 to avoid clobbering that write. - buddies.ts incoming profile read: after switchToProfile() writes to disk, reload fresh config to read the incoming profile rather than the stale pre-switch snapshot. preview.ts edge case (from code review of PR cpaczek#26): - cols - 4 can be negative when stdout.columns < 4 (piped output, very narrow TTY). String.repeat throws RangeError on negative values. Wrap with Math.max(0, cols - 4).
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
any-buddy preview --allflag that dumps all 23 preset builds to stdout in a scrollable gallery--alltoCliFlagsand help textExample
Test plan
any-buddy preview --all— prints all 23 presets with sprites and scrolls cleanlyany-buddy previewwithout--all— unchanged interactive behaviorpnpm test— all 203 tests pass