fix(store): defer multi-version app version choice (#129)
Demo images / Build & push demo images (push) Failing after 39s

This commit is contained in:
archipelago
2026-08-30 10:23:58 -04:00
parent d79ca54019
commit b4714f1773
3 changed files with 25 additions and 4 deletions
@@ -26,7 +26,8 @@
:class="tierLabel === 'core' ? 'tier-badge-core' : 'tier-badge-recommended'"
>{{ tierLabel }}</span>
</h3>
<p class="text-sm text-white/60">{{ app.version ? $ver(app.version) : 'latest' }}</p>
<p v-if="!isMultiVersion" class="text-sm text-white/60">{{ app.version ? $ver(app.version) : 'latest' }}</p>
<p v-else class="text-sm text-white/60">Choose version when installing</p>
<p v-if="app.author" class="text-xs text-white/50 mt-1">by {{ app.author }}</p>
</div>
</div>
@@ -175,7 +176,7 @@
<script setup lang="ts">
import { computed } from 'vue'
import { useI18n } from 'vue-i18n'
import type { MarketplaceApp, InstallProgress } from './marketplaceData'
import { MULTI_VERSION_APP_IDS, type MarketplaceApp, type InstallProgress } from './marketplaceData'
import { DEFAULT_APP_ICON } from '@/views/apps/appsConfig'
const { t } = useI18n()
@@ -200,6 +201,8 @@ defineEmits<{
launch: [app: MarketplaceApp]
}>()
const isMultiVersion = computed(() => MULTI_VERSION_APP_IDS.has(props.app.id))
const signatureLabel = computed(() => {
switch (props.app.signature?.status) {
case 'valid': return 'signed'
@@ -15,7 +15,7 @@ const app: MarketplaceApp = {
source: 'community',
}
function mountCard(installed: boolean, installBlockedReason?: string) {
function mountCard(installed: boolean, installBlockedReason?: string, appOverride: MarketplaceApp = app) {
const i18n = createI18n({
legacy: false,
locale: 'en',
@@ -29,7 +29,7 @@ function mountCard(installed: boolean, installBlockedReason?: string) {
return mount(MarketplaceAppCard, {
props: {
app,
app: appOverride,
index: 0,
stagger: false,
installed,
@@ -65,4 +65,16 @@ describe('MarketplaceAppCard', () => {
expect(wrapper.text()).toContain('Requires a full archive Bitcoin node before install.')
expect(wrapper.text()).toContain('Bitcoin Pruned')
})
it('does not present one catalog version as definitive for multi-version apps (#129)', () => {
const wrapper = mountCard(false, undefined, {
...app,
id: 'bitcoin-core',
title: 'Bitcoin Core',
version: '28.4.0',
})
expect(wrapper.text()).toContain('Choose version when installing')
expect(wrapper.text()).not.toContain('28.4')
})
})
@@ -57,6 +57,12 @@ export interface InstallProgress {
attempt: number
}
/** Apps that ask for their concrete version in InstallVersionModal. Their
* store tiles deliberately omit a single catalog version: showing “v28.4”
* there implies that is the only version immediately before asking the user
* to choose a different one. */
export const MULTI_VERSION_APP_IDS = new Set(['bitcoin-knots', 'bitcoin-core'])
/** Archipelago app registry — all app images are mirrored here */
const REGISTRY = 'source.archipelago-foundation.org/lfg2025'