From e3dbdf9985904110dea35ca83da4af5697504b74 Mon Sep 17 00:00:00 2001 From: Martin Donadieu Date: Thu, 15 Jan 2026 18:47:12 +0000 Subject: [PATCH 1/2] Add manifest diff tab UX --- messages/de.json | 10 + messages/en.json | 10 + messages/es.json | 10 + messages/fr.json | 10 + messages/hi.json | 10 + messages/id.json | 10 + messages/it.json | 10 + messages/ja.json | 10 + messages/ko.json | 10 + messages/pl.json | 10 + messages/pt-br.json | 10 + messages/ru.json | 10 + messages/tr.json | 10 + messages/vi.json | 10 + messages/zh-cn.json | 10 + src/constants/bundleTabs.ts | 2 + .../[package].bundle.[bundle].manifest.vue | 514 ++++++++++++++++++ src/pages/app/[package].bundle.[bundle].vue | 29 +- src/typed-router.d.ts | 13 + 19 files changed, 681 insertions(+), 27 deletions(-) create mode 100644 src/pages/app/[package].bundle.[bundle].manifest.vue diff --git a/messages/de.json b/messages/de.json index 9b2d5d179e..0652e50a86 100644 --- a/messages/de.json +++ b/messages/de.json @@ -885,6 +885,16 @@ "making-this-channel-": "Um diesen Kanal \"normal\" zu machen, müssen Sie einen anderen Kanal als Standard konfigurieren oder das Gerät selbst zuweisen lassen.", "manage-default-channel": "Verwalten Sie in den App-Einstellungen", "manifest": "Manifest", + "manifest-compare-label": "Compare with bundle", + "manifest-compare-none": "All files (no comparison)", + "manifest-compare-latest": "Latest bundles", + "manifest-compare-results": "Search results", + "manifest-summary-files": "Files", + "manifest-download-estimate-note": "Sizes shown are the maximum possible download for this comparison; actual downloads can be smaller.", + "manifest-status-full": "Showing full manifest for this bundle.", + "manifest-status-diff": "Showing {count} files that differ from {bundle}.", + "manifest-status-compare-empty": "We could not find any files for {bundle}.", + "manifest-diff-empty": "We found files in both bundles, but none differ — devices would download 0 files.", "mau": "Monatlich aktive Nutzer", "mau-limit-exceeded": "MAU-Limit überschritten", "mau-trend": "MAU-Trend", diff --git a/messages/en.json b/messages/en.json index a8672f744e..f0e8e0a52e 100644 --- a/messages/en.json +++ b/messages/en.json @@ -1396,6 +1396,16 @@ "your-usage": "Your usage:", "zip-bundle": "Zip app bundle", "manifest": "Manifest", + "manifest-compare-label": "Compare with bundle", + "manifest-compare-none": "All files (no comparison)", + "manifest-compare-latest": "Latest bundles", + "manifest-compare-results": "Search results", + "manifest-summary-files": "Files", + "manifest-download-estimate-note": "Sizes shown are the maximum possible download for this comparison; actual downloads can be smaller.", + "manifest-status-full": "Showing full manifest for this bundle.", + "manifest-status-diff": "Showing {count} files that differ from {bundle}.", + "manifest-status-compare-empty": "We could not find any files for {bundle}.", + "manifest-diff-empty": "We found files in both bundles, but none differ — devices would download 0 files.", "no-manifest-bundle": "No manifest", "no-zip-bundle": "No zip bundle", "of": "of", diff --git a/messages/es.json b/messages/es.json index 718c532853..47b754802b 100644 --- a/messages/es.json +++ b/messages/es.json @@ -885,6 +885,16 @@ "making-this-channel-": "Hacer este canal \"normal\" requerirá que configures otro canal predeterminado o dejes que el dispositivo se asigne automáticamente.", "manage-default-channel": "Administrar en la configuración de la aplicación", "manifest": "Manifiesto", + "manifest-compare-label": "Compare with bundle", + "manifest-compare-none": "All files (no comparison)", + "manifest-compare-latest": "Latest bundles", + "manifest-compare-results": "Search results", + "manifest-summary-files": "Files", + "manifest-download-estimate-note": "Sizes shown are the maximum possible download for this comparison; actual downloads can be smaller.", + "manifest-status-full": "Showing full manifest for this bundle.", + "manifest-status-diff": "Showing {count} files that differ from {bundle}.", + "manifest-status-compare-empty": "We could not find any files for {bundle}.", + "manifest-diff-empty": "We found files in both bundles, but none differ — devices would download 0 files.", "mau": "Usuarios activos mensuales", "mau-limit-exceeded": "Límite de MAU excedido", "mau-trend": "Tendencia MAU", diff --git a/messages/fr.json b/messages/fr.json index 24c0afea8f..d08a3fbf94 100644 --- a/messages/fr.json +++ b/messages/fr.json @@ -885,6 +885,16 @@ "making-this-channel-": "Pour rendre cette chaîne \"normale\", vous devrez configurer une autre chaîne par défaut ou laisser l'appareil s'attribuer lui-même.", "manage-default-channel": "Gérer les paramètres dans l'application", "manifest": "Manifeste", + "manifest-compare-label": "Compare with bundle", + "manifest-compare-none": "All files (no comparison)", + "manifest-compare-latest": "Latest bundles", + "manifest-compare-results": "Search results", + "manifest-summary-files": "Files", + "manifest-download-estimate-note": "Sizes shown are the maximum possible download for this comparison; actual downloads can be smaller.", + "manifest-status-full": "Showing full manifest for this bundle.", + "manifest-status-diff": "Showing {count} files that differ from {bundle}.", + "manifest-status-compare-empty": "We could not find any files for {bundle}.", + "manifest-diff-empty": "We found files in both bundles, but none differ — devices would download 0 files.", "mau": "Utilisateurs actifs mensuels", "mau-limit-exceeded": "Limite MAU dépassée", "mau-trend": "Tendance MAU", diff --git a/messages/hi.json b/messages/hi.json index 7191712634..3bfe2bf4d4 100644 --- a/messages/hi.json +++ b/messages/hi.json @@ -885,6 +885,16 @@ "making-this-channel-": "इस चैनल को \"सामान्य\" बनाने के लिए आपको किसी अन्य चैनल को डिफ़ॉल्ट सेट करने की या डिवाइस को स्वत: सेट होने की ज़रुरत पड़ेगी.", "manage-default-channel": "ऐप सेटिंग्स में प्रबंधन करें", "manifest": "मैनिफ़ेस्ट", + "manifest-compare-label": "Compare with bundle", + "manifest-compare-none": "All files (no comparison)", + "manifest-compare-latest": "Latest bundles", + "manifest-compare-results": "Search results", + "manifest-summary-files": "Files", + "manifest-download-estimate-note": "Sizes shown are the maximum possible download for this comparison; actual downloads can be smaller.", + "manifest-status-full": "Showing full manifest for this bundle.", + "manifest-status-diff": "Showing {count} files that differ from {bundle}.", + "manifest-status-compare-empty": "We could not find any files for {bundle}.", + "manifest-diff-empty": "We found files in both bundles, but none differ — devices would download 0 files.", "mau": "मासिक सक्रिय उपयोगकर्ता", "mau-limit-exceeded": "MAU सीमा पार हो गई", "mau-trend": "MAU प्रवृत्ति", diff --git a/messages/id.json b/messages/id.json index c77b55b9b2..7fed91a78c 100644 --- a/messages/id.json +++ b/messages/id.json @@ -885,6 +885,16 @@ "making-this-channel-": "Membuat saluran ini \"normal\" akan memerlukan Anda untuk mengkonfigurasi saluran default lain atau membiarkan perangkat menetapkan sendiri.", "manage-default-channel": "Kelola di Pengaturan Aplikasi", "manifest": "Manifest", + "manifest-compare-label": "Compare with bundle", + "manifest-compare-none": "All files (no comparison)", + "manifest-compare-latest": "Latest bundles", + "manifest-compare-results": "Search results", + "manifest-summary-files": "Files", + "manifest-download-estimate-note": "Sizes shown are the maximum possible download for this comparison; actual downloads can be smaller.", + "manifest-status-full": "Showing full manifest for this bundle.", + "manifest-status-diff": "Showing {count} files that differ from {bundle}.", + "manifest-status-compare-empty": "We could not find any files for {bundle}.", + "manifest-diff-empty": "We found files in both bundles, but none differ — devices would download 0 files.", "mau": "Pengguna aktif bulanan", "mau-limit-exceeded": "Batas MAU telah terlampaui", "mau-trend": "Tren MAU", diff --git a/messages/it.json b/messages/it.json index 2236cc836f..3246d6928a 100644 --- a/messages/it.json +++ b/messages/it.json @@ -885,6 +885,16 @@ "making-this-channel-": "Per rendere questo canale \"normale\", sarà necessario configurare un altro canale predefinito o lasciare che il dispositivo si assegni autonomamente.", "manage-default-channel": "Gestisci nelle impostazioni dell'app", "manifest": "Manifesto", + "manifest-compare-label": "Compare with bundle", + "manifest-compare-none": "All files (no comparison)", + "manifest-compare-latest": "Latest bundles", + "manifest-compare-results": "Search results", + "manifest-summary-files": "Files", + "manifest-download-estimate-note": "Sizes shown are the maximum possible download for this comparison; actual downloads can be smaller.", + "manifest-status-full": "Showing full manifest for this bundle.", + "manifest-status-diff": "Showing {count} files that differ from {bundle}.", + "manifest-status-compare-empty": "We could not find any files for {bundle}.", + "manifest-diff-empty": "We found files in both bundles, but none differ — devices would download 0 files.", "mau": "Utenti attivi mensilmente", "mau-limit-exceeded": "Limite MAU superato", "mau-trend": "Tendenza MAU", diff --git a/messages/ja.json b/messages/ja.json index 0d156582d9..421055be3c 100644 --- a/messages/ja.json +++ b/messages/ja.json @@ -885,6 +885,16 @@ "making-this-channel-": "このチャンネルを「通常」にするためには、他のチャンネルをデフォルトに設定するか、デバイスが自己割り当てを行う必要があります。", "manage-default-channel": "アプリ設定を管理する", "manifest": "マニフェスト", + "manifest-compare-label": "Compare with bundle", + "manifest-compare-none": "All files (no comparison)", + "manifest-compare-latest": "Latest bundles", + "manifest-compare-results": "Search results", + "manifest-summary-files": "Files", + "manifest-download-estimate-note": "Sizes shown are the maximum possible download for this comparison; actual downloads can be smaller.", + "manifest-status-full": "Showing full manifest for this bundle.", + "manifest-status-diff": "Showing {count} files that differ from {bundle}.", + "manifest-status-compare-empty": "We could not find any files for {bundle}.", + "manifest-diff-empty": "We found files in both bundles, but none differ — devices would download 0 files.", "mau": "月間アクティブユーザー", "mau-limit-exceeded": "MAU制限を超えました", "mau-trend": "MAUトレンド", diff --git a/messages/ko.json b/messages/ko.json index d9bc43fdb2..9bf3c9dcf6 100644 --- a/messages/ko.json +++ b/messages/ko.json @@ -885,6 +885,16 @@ "making-this-channel-": "이 채널을 \"정상\"으로 만들려면 다른 채널을 기본값으로 설정하거나 장치가 자체 할당하도록 해야 합니다.", "manage-default-channel": "앱 설정 관리", "manifest": "매니페스트", + "manifest-compare-label": "Compare with bundle", + "manifest-compare-none": "All files (no comparison)", + "manifest-compare-latest": "Latest bundles", + "manifest-compare-results": "Search results", + "manifest-summary-files": "Files", + "manifest-download-estimate-note": "Sizes shown are the maximum possible download for this comparison; actual downloads can be smaller.", + "manifest-status-full": "Showing full manifest for this bundle.", + "manifest-status-diff": "Showing {count} files that differ from {bundle}.", + "manifest-status-compare-empty": "We could not find any files for {bundle}.", + "manifest-diff-empty": "We found files in both bundles, but none differ — devices would download 0 files.", "mau": "월간 활성 사용자", "mau-limit-exceeded": "MAU 한도 초과", "mau-trend": "MAU 추세", diff --git a/messages/pl.json b/messages/pl.json index bfc5339d6c..58a6c6d216 100644 --- a/messages/pl.json +++ b/messages/pl.json @@ -885,6 +885,16 @@ "making-this-channel-": "Aby uczynić ten kanał \"normalnym\", musisz skonfigurować inny domyślny kanał lub pozwolić urządzeniu na samodzielne przypisanie.", "manage-default-channel": "Zarządzaj w ustawieniach aplikacji", "manifest": "Manifest", + "manifest-compare-label": "Compare with bundle", + "manifest-compare-none": "All files (no comparison)", + "manifest-compare-latest": "Latest bundles", + "manifest-compare-results": "Search results", + "manifest-summary-files": "Files", + "manifest-download-estimate-note": "Sizes shown are the maximum possible download for this comparison; actual downloads can be smaller.", + "manifest-status-full": "Showing full manifest for this bundle.", + "manifest-status-diff": "Showing {count} files that differ from {bundle}.", + "manifest-status-compare-empty": "We could not find any files for {bundle}.", + "manifest-diff-empty": "We found files in both bundles, but none differ — devices would download 0 files.", "mau": "Miesięczni aktywni użytkownicy", "mau-limit-exceeded": "Przekroczono limit MAU", "mau-trend": "Trend MAU", diff --git a/messages/pt-br.json b/messages/pt-br.json index 5a72bc1e3c..b6877a5888 100644 --- a/messages/pt-br.json +++ b/messages/pt-br.json @@ -885,6 +885,16 @@ "making-this-channel-": "Tornar este canal \"normal\" exigirá que você configure outro canal como padrão ou permita que o dispositivo se auto atribua.", "manage-default-channel": "Gerenciar nas configurações do aplicativo", "manifest": "Manifesto", + "manifest-compare-label": "Compare with bundle", + "manifest-compare-none": "All files (no comparison)", + "manifest-compare-latest": "Latest bundles", + "manifest-compare-results": "Search results", + "manifest-summary-files": "Files", + "manifest-download-estimate-note": "Sizes shown are the maximum possible download for this comparison; actual downloads can be smaller.", + "manifest-status-full": "Showing full manifest for this bundle.", + "manifest-status-diff": "Showing {count} files that differ from {bundle}.", + "manifest-status-compare-empty": "We could not find any files for {bundle}.", + "manifest-diff-empty": "We found files in both bundles, but none differ — devices would download 0 files.", "mau": "Usuários ativos mensais", "mau-limit-exceeded": "Limite do MAU excedido", "mau-trend": "Tendência MAU", diff --git a/messages/ru.json b/messages/ru.json index 12e5547d4c..3faad7d385 100644 --- a/messages/ru.json +++ b/messages/ru.json @@ -885,6 +885,16 @@ "making-this-channel-": "Чтобы сделать этот канал \"нормальным\", вам потребуется настроить другой канал по умолчанию или позволить устройству самостоятельно назначить его.", "manage-default-channel": "Управление в настройках приложения", "manifest": "Манифест", + "manifest-compare-label": "Compare with bundle", + "manifest-compare-none": "All files (no comparison)", + "manifest-compare-latest": "Latest bundles", + "manifest-compare-results": "Search results", + "manifest-summary-files": "Files", + "manifest-download-estimate-note": "Sizes shown are the maximum possible download for this comparison; actual downloads can be smaller.", + "manifest-status-full": "Showing full manifest for this bundle.", + "manifest-status-diff": "Showing {count} files that differ from {bundle}.", + "manifest-status-compare-empty": "We could not find any files for {bundle}.", + "manifest-diff-empty": "We found files in both bundles, but none differ — devices would download 0 files.", "mau": "Ежемесячно активные пользователи", "mau-limit-exceeded": "Превышен лимит MAU", "mau-trend": "Тренд MAU", diff --git a/messages/tr.json b/messages/tr.json index c77d3f83c5..c3ee5a87fd 100644 --- a/messages/tr.json +++ b/messages/tr.json @@ -885,6 +885,16 @@ "making-this-channel-": "Bu kanalı \"normal\" yapmak için başka bir kanalı varsayılan olarak yapılandırmanız veya cihazın kendisine atamasına izin vermeniz gerekecektir.", "manage-default-channel": "Uygulama ayarlarını yönetin", "manifest": "Manifest", + "manifest-compare-label": "Compare with bundle", + "manifest-compare-none": "All files (no comparison)", + "manifest-compare-latest": "Latest bundles", + "manifest-compare-results": "Search results", + "manifest-summary-files": "Files", + "manifest-download-estimate-note": "Sizes shown are the maximum possible download for this comparison; actual downloads can be smaller.", + "manifest-status-full": "Showing full manifest for this bundle.", + "manifest-status-diff": "Showing {count} files that differ from {bundle}.", + "manifest-status-compare-empty": "We could not find any files for {bundle}.", + "manifest-diff-empty": "We found files in both bundles, but none differ — devices would download 0 files.", "mau": "Aylık aktif kullanıcılar", "mau-limit-exceeded": "MAU limiti aşıldı", "mau-trend": "MAU Trendi", diff --git a/messages/vi.json b/messages/vi.json index bbe0a7ea42..51956d0668 100644 --- a/messages/vi.json +++ b/messages/vi.json @@ -886,6 +886,16 @@ "making-this-channel-": "Để làm cho kênh này \"bình thường\", bạn sẽ cần cấu hình một kênh mặc định khác hoặc để thiết bị tự gán.", "manage-default-channel": "Quản lý trong cài đặt ứng dụng", "manifest": "Manifest", + "manifest-compare-label": "Compare with bundle", + "manifest-compare-none": "All files (no comparison)", + "manifest-compare-latest": "Latest bundles", + "manifest-compare-results": "Search results", + "manifest-summary-files": "Files", + "manifest-download-estimate-note": "Sizes shown are the maximum possible download for this comparison; actual downloads can be smaller.", + "manifest-status-full": "Showing full manifest for this bundle.", + "manifest-status-diff": "Showing {count} files that differ from {bundle}.", + "manifest-status-compare-empty": "We could not find any files for {bundle}.", + "manifest-diff-empty": "We found files in both bundles, but none differ — devices would download 0 files.", "mau": "Người dùng hoạt động hàng tháng", "mau-limit-exceeded": "Vượt quá giới hạn MAU", "mau-trend": "Xu hướng MAU", diff --git a/messages/zh-cn.json b/messages/zh-cn.json index 3f5dc7b9a0..93efd201dc 100644 --- a/messages/zh-cn.json +++ b/messages/zh-cn.json @@ -885,6 +885,16 @@ "making-this-channel-": "使此频道\"正常\"将需要您配置其他默认频道或让设备自行分配。", "manage-default-channel": "在应用设置中管理", "manifest": "清单", + "manifest-compare-label": "Compare with bundle", + "manifest-compare-none": "All files (no comparison)", + "manifest-compare-latest": "Latest bundles", + "manifest-compare-results": "Search results", + "manifest-summary-files": "Files", + "manifest-download-estimate-note": "Sizes shown are the maximum possible download for this comparison; actual downloads can be smaller.", + "manifest-status-full": "Showing full manifest for this bundle.", + "manifest-status-diff": "Showing {count} files that differ from {bundle}.", + "manifest-status-compare-empty": "We could not find any files for {bundle}.", + "manifest-diff-empty": "We found files in both bundles, but none differ — devices would download 0 files.", "mau": "月活跃用户", "mau-limit-exceeded": "超过MAU限制", "mau-trend": "MAU趋势", diff --git a/src/constants/bundleTabs.ts b/src/constants/bundleTabs.ts index 3259fbd536..9ff7a8d094 100644 --- a/src/constants/bundleTabs.ts +++ b/src/constants/bundleTabs.ts @@ -1,11 +1,13 @@ import type { Tab } from '~/components/comp_def' import IconHistory from '~icons/heroicons/clock' +import IconManifest from '~icons/heroicons/clipboard-document-list' import IconEye from '~icons/heroicons/eye' import IconInfo from '~icons/heroicons/information-circle' import IconPuzzle from '~icons/heroicons/puzzle-piece' export const bundleTabs: Tab[] = [ { label: 'info', icon: IconInfo, key: '' }, + { label: 'manifest', icon: IconManifest, key: '/manifest' }, { label: 'dependencies', icon: IconPuzzle, key: '/dependencies' }, { label: 'history', icon: IconHistory, key: '/history' }, { label: 'preview-tab', icon: IconEye, key: '/preview' }, diff --git a/src/pages/app/[package].bundle.[bundle].manifest.vue b/src/pages/app/[package].bundle.[bundle].manifest.vue new file mode 100644 index 0000000000..ff6721061f --- /dev/null +++ b/src/pages/app/[package].bundle.[bundle].manifest.vue @@ -0,0 +1,514 @@ + + + + + +meta: + layout: app + diff --git a/src/pages/app/[package].bundle.[bundle].vue b/src/pages/app/[package].bundle.[bundle].vue index 5bf11f694a..e569145b74 100644 --- a/src/pages/app/[package].bundle.[bundle].vue +++ b/src/pages/app/[package].bundle.[bundle].vue @@ -40,7 +40,6 @@ const channel = ref<(Database['public']['Tables']['channels']['Row'])>() const version_meta = ref() const showBundleMetadataInput = ref(false) const hasManifest = ref(false) -const manifestSize = ref(null) const showChecksumTooltip = ref(false) // Channel chooser state @@ -151,12 +150,6 @@ const zipSizeLabel = computed(() => { return t('metadata-not-found') }) -const manifestSizeLabel = computed(() => { - if (manifestSize.value !== null) - return bytesToMbText(manifestSize.value) - return t('metadata-not-found') -}) - const checksumInfo = computed(() => { return getChecksumInfo(version.value?.checksum) }) @@ -389,7 +382,6 @@ async function getVersion() { if (!id.value) return try { - manifestSize.value = null const { data } = await supabase .from('app_versions') .select() @@ -409,23 +401,6 @@ async function getVersion() { version_meta.value = dataVersionsMeta hasManifest.value = data.manifest_count > 0 - if (hasManifest.value) { - const { data: manifestEntries } = await supabase - .from('manifest') - .select('file_size') - .eq('app_version_id', data.id) - if (manifestEntries && manifestEntries.length > 0) { - let total = 0 - let hasSize = false - for (const entry of manifestEntries) { - if (typeof entry.file_size === 'number' && entry.file_size > 0) { - total += entry.file_size - hasSize = true - } - } - manifestSize.value = hasSize ? total : null - } - } version.value = data if (version.value?.name) displayStore.setBundleName(String(version.value.id), version.value.name) @@ -878,10 +853,10 @@ async function deleteBundle() { - +