fix(market): label installed MiniApps with their marketplace release - #1934
Merged
bobleer merged 1 commit intoJul 31, 2026
Merged
Conversation
An installed MiniApp card showed `v{app.version}`, but that counter is the
local edit counter, which `build_created_app` always starts at 1. Installing
release v2 from the marketplace therefore rendered as "v1", reading as if the
install had silently fetched an older release. The download itself was correct:
the client requests `/listings/{slug}/releases/{n}/download` for the listing's
latest release and rejects any package whose sha256, size, or permissions do
not match the reviewed release.
Add `miniapp_market_installed_origins`, which returns the marketplace origin of
every installed app, and let the gallery label market-installed apps with the
release number they actually carry. Apps from anywhere else keep the local
counter.
Also collapse the listing detail's version history to the newest release, with
a toggle for the older ones, so a listing with several releases no longer
presents them as equally current.
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.
Problem
Two issues reported against the MiniApp marketplace:
Diagnosis
The second one is a labeling bug, not a wrong download.
detail.latestReleaseand downloads/listings/{slug}/releases/{n}/download; the server resolves that row byrelease_number, and the desktop side rejects the package unless its sha256, size, and permissions match the reviewed release (miniapp_market_api.rs). The v2 package really is what lands on disk.v{app.version}, andapp.versionis the local edit counter.build_created_apphardcodes it to1, andinstall_strict_packagedeliberately discards the package's own version — the marketplace release number lives in the customization metadata's market origin and is documented as independent from the local counter.So a fresh install of any release always displayed
v1.Changes
miniapp_market_installed_originscommand returning each installed app's marketplace origin keyed by app id (LocalOnlyremote-workspace policy, registered ingenerate_handler!).miniapp_market_installed_statusnow shares its metadata lookup.miniAppStoretracks those origins, loaded alongside the catalog inuseMiniAppCatalogSyncand the gallery refetch, and recorded directly after a market install. A failed origins read degrades the labels to the local counter instead of taking the catalog down.MiniAppCardand the gallery detail modal show the marketplace release number when the app came from the marketplace; other apps keep the local counter.buildReleaseHistory, sorted newest-first so it does not depend on server ordering).Testing
vitest run src/app/scenes/miniapps— 15 files, 51 tests pass (includes newminiAppReleaseHistorycases and store coverage for origin pruning)tsc --noEmiton web-uieslinton the touched web-ui pathscargo clippy -p bitfun-desktop --all-targets— no new warningscargo test -p bitfun-desktop --lib remote_workspace_policy— 7 passpnpm run i18n:audit— 0 warnings