Skip to content

Commit bcc16db

Browse files
Tiwasclaude
andcommitted
fix(flow-doctor): make 'Installed' state explicit on app cards
The public App Store at homey.app/a/<id> always shows an Install button because it can't see the user's Homey state. Apps already on the user's Homey looked indistinguishable from never-installed apps when the user followed the App Store ↗ link. my.homey.app has no /apps/<id> route — verified live, it silently falls back to the dashboard — so a deep-link to the user's own Homey isn't viable. Instead, make the "Installed" label on the app card visually unmissable: a green ✓ Installed prefix on the version line. Capitalize the i18n strings in en/no/de/nl so it reads as a label rather than a passing modifier. The App Store ↗ link still points at the public store page; the user no longer needs that page to confirm install state. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent a5d6d91 commit bcc16db

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

docs/tools/flow-doctor.html

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ <h3 class="font-bold text-red-800 mb-2" data-i18n="error.title">Something went w
226226
'apps.unused': 'Unused by any flow',
227227
'apps.usedBy': 'flows',
228228
'apps.devices': 'devices',
229-
'apps.installed': 'installed',
229+
'apps.installed': 'Installed',
230230
'apps.store': 'store',
231231
'apps.crashed': 'Crashed',
232232
'apps.disabled': 'Disabled',
@@ -299,7 +299,7 @@ <h3 class="font-bold text-red-800 mb-2" data-i18n="error.title">Something went w
299299
'apps.unused': 'Ikke brukt av noen flow',
300300
'apps.usedBy': 'flows',
301301
'apps.devices': 'enheter',
302-
'apps.installed': 'installert',
302+
'apps.installed': 'Installert',
303303
'apps.store': 'butikk',
304304
'apps.crashed': 'Krasjet',
305305
'apps.disabled': 'Deaktivert',
@@ -372,7 +372,7 @@ <h3 class="font-bold text-red-800 mb-2" data-i18n="error.title">Something went w
372372
'apps.unused': 'Von keinem Flow verwendet',
373373
'apps.usedBy': 'Flows',
374374
'apps.devices': 'Geräte',
375-
'apps.installed': 'installiert',
375+
'apps.installed': 'Installiert',
376376
'apps.store': 'Store',
377377
'apps.crashed': 'Abgestürzt',
378378
'apps.disabled': 'Deaktiviert',
@@ -445,7 +445,7 @@ <h3 class="font-bold text-red-800 mb-2" data-i18n="error.title">Something went w
445445
'apps.unused': 'Door geen enkele flow gebruikt',
446446
'apps.usedBy': 'flows',
447447
'apps.devices': 'apparaten',
448-
'apps.installed': 'geïnstalleerd',
448+
'apps.installed': 'Geïnstalleerd',
449449
'apps.store': 'store',
450450
'apps.crashed': 'Gecrasht',
451451
'apps.disabled': 'Uitgeschakeld',
@@ -684,6 +684,14 @@ <h3 class="font-bold text-red-800 mb-2" data-i18n="error.title">Something went w
684684
return type === 'advanced' ? `${base}/flows/advanced/${flow.id}` : `${base}/flows/${flow.id}`;
685685
}
686686

687+
appUrl(appId) {
688+
// my.homey.app has no /apps/<id> route — it silently falls back to the dashboard.
689+
// The public App Store page is the only reliable target; it always shows an
690+
// "Install" button regardless of whether the user already has the app, but the
691+
// page is otherwise informative (description, version history, store version).
692+
return `https://homey.app/a/${encodeURIComponent(appId)}`;
693+
}
694+
687695
switchTab(name) {
688696
document.querySelectorAll('#tab-nav .tab-btn').forEach(btn => {
689697
const active = btn.getAttribute('data-tab') === name;
@@ -1088,10 +1096,11 @@ <h3 class="font-bold text-red-800 mb-2" data-i18n="error.title">Something went w
10881096
const resourceHtml = (memMb != null || cpuPct != null)
10891097
? `<div class="text-xs text-gray-600 mt-1 flex gap-3">${memMb != null ? `<span>${this.t('apps.memory')}: <strong>${memMb} MB</strong></span>` : ''}${cpuPct != null ? `<span>${this.t('apps.cpu')}: <strong>${cpuPct}%</strong></span>` : ''}</div>`
10901098
: '';
1099+
const installedTag = `<span class="text-green-700 font-semibold">✓ ${this.t('apps.installed')}</span> <code class="bg-white px-1 rounded border border-gray-200">${this.escape(a.version)}</code>`;
10911100
const versionInfo = a.storeVersion
1092-
? `${this.t('apps.installed')} <code class="bg-white px-1 rounded border border-gray-200">${this.escape(a.version)}</code> · ${this.t('apps.store')} <code class="bg-white px-1 rounded border border-gray-200">${this.escape(a.storeVersion)}</code>`
1093-
: `${this.t('apps.installed')} <code class="bg-white px-1 rounded border border-gray-200">${this.escape(a.version)}</code>`;
1094-
const storeLink = `https://homey.app/a/${encodeURIComponent(a.id)}`;
1101+
? `${installedTag} · ${this.t('apps.store')} <code class="bg-white px-1 rounded border border-gray-200">${this.escape(a.storeVersion)}</code>`
1102+
: installedTag;
1103+
const storeLink = this.appUrl(a.id);
10951104
const showUsageLink = a.usage > 0;
10961105
const flowsHtml = showUsageLink
10971106
? `<a href="#" data-app-id="${this.escape(a.id)}" class="filter-by-app text-xs text-blue-600 hover:underline">${a.usage} ${this.t('apps.usedBy')} →</a>`

0 commit comments

Comments
 (0)