Discover: vee-plugins built-in store by default, live store refresh, screenshot zoom, stable card heights - #149
Merged
Merged
Conversation
…t on fresh installs vee-plugins publishes a curated vee-catalog.json manifest, so it's added as a manifest-backed .http built-in (not .github — that kind skips its manifest probe for isBuiltIn stores, a fallback meant for xbar's zero-config git-tree convention) and listed before xbar in Discover's default order. xbar stays enabled for existing installs but ships disabled on a genuinely fresh one, via a one-shot StoreRegistry.seedDefaultStoresIfNeeded() gated on VeePreferences' hasCompletedFirstRun still being false — called from AppController before first-run onboarding flips that flag. disabledIDs() alone can't distinguish "never touched Stores" from "fresh install", hence the separate vee.didSeedDefaultStores one-shot flag. vee.disablePublicStore now hides both built-ins, and add/remove/update/dedup guard against both built-in ids, not just xbar's.
PluginBrowserModel.stores/clients were private let, so an enable/disable/ add/remove in the Stores tab never reached an already-open Discover tab — only reopening the window rebuilt it. StoresSettingsModel now takes an onStoresChanged closure (fired by every mutator, not init — a fresh StoresSettingsModel is built on every window open, and firing there too would defeat the browser model's no-refetch-on-reopen caching). AppController wires it to PluginBrowserModel.reload(stores:), a new async method that swaps in the new store set and re-fetches in place on the same retained instance the live view observes — no window close/reopen needed.
…load PluginCard.preview only rendered its AsyncImage's .success phase, so a card with a declared screenshot was 0pt tall while the image was loading/failed, then jumped to its full height once .success landed mid-scroll. Factored the phase rendering into PluginPreviewPhaseView, which reserves the same fixed height across .empty (a loading placeholder)/.failure (reserved but blank)/ .success, so a card's height never changes after the image settles. The loaded image is now a plain-style Button opening a sheet with a large resizable AsyncImage and a close control (?/Esc) — the card itself stays non-interactive outside its own Install/Update/View source controls.
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.
Four changes to the Discover/store system:
vee-catalog.json, listed before xbar) and the xbar catalog ships disabled by default on fresh installs only — a one-shot seed (vee.didSeedDefaultStores) runs before first-run completes, so existing users' store settings are untouched.vee.disablePublicStore(MDM) now hides both built-ins.StoresSettingsModel.onStoresChangedclosure wired throughAppControllertoPluginBrowserModel.reload(stores:); no more relaunch.Gate: build clean, 1,273 tests / 0 failures across all 12 bundles, swiftlint --strict clean. New tests cover seeding (fresh-only, once-only, existing-install-untouched), built-in ordering/immutability, live reload, and fixed card heights.