feat: Implement dynamic domain-based PWA manifest

- Added /manifest.webmanifest server-side route.
- Implemented hostname-based branding lookup using Agent API Key.
- Updated app.html to use the dynamic manifest route.
- Added manifest verification tool to the System Testing dashboard.
This commit is contained in:
Scott Idem
2026-01-19 15:44:27 -05:00
parent f565857e20
commit 79e8411842
3 changed files with 315 additions and 81 deletions

View File

@@ -168,6 +168,12 @@
return 'Local cache cleared successfully';
});
const test_manifest = () => run_test('PWA Manifest Lookup', async () => {
const response = await fetch('/manifest.webmanifest');
if (!response.ok) throw new Error(`HTTP ${response.status}: ${response.statusText}`);
return await response.json();
});
</script>
<!-- Outer wrapper to enable scrolling if parent is overflow-hidden -->
@@ -381,16 +387,18 @@
{/if}
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div class="card p-6 space-y-4 border border-gray-500 shadow-lg transition-all group hover:bg-surface-500/5">
<header class="flex items-center gap-2 text-primary-500 border-b border-gray-500 pb-2">
<Server size={20}/>
<h4 class="h4 font-bold uppercase tracking-widest">Infrastructure</h4>
</header>
<button class="btn variant-filled-primary p-4 w-full shadow-md transition-all hover:scale-[1.02] flex items-center justify-center gap-2" onclick={test_site_domain_lookup} title="Test guest site domain lookup.">
<Globe size={16}/> Site Domain Lookup
</button>
</div>
<div class="card p-6 space-y-4 border border-gray-500 shadow-lg transition-all group hover:bg-surface-500/5">
<div class="card p-6 space-y-4 border border-gray-500 shadow-lg transition-all group hover:bg-surface-500/5">
<header class="flex items-center gap-2 text-primary-500 border-b border-gray-500 pb-2">
<Server size={20}/>
<h4 class="h4 font-bold uppercase tracking-widest">Infrastructure</h4>
</header>
<button class="btn variant-filled-primary p-4 w-full shadow-md transition-all hover:scale-[1.02] flex items-center justify-center gap-2" onclick={test_site_domain_lookup} title="Test guest site domain lookup.">
<Globe size={16}/> Site Domain Lookup
</button>
<button class="btn variant-filled-primary p-4 w-full shadow-md transition-all hover:scale-[1.02] flex items-center justify-center gap-2" onclick={test_manifest} title="Verifies the dynamic PWA manifest returns correct branding for this domain.">
<Code size={16}/> PWA Manifest Lookup
</button>
</div> <div class="card p-6 space-y-4 border border-gray-500 shadow-lg transition-all group hover:bg-surface-500/5">
<header class="flex items-center gap-2 text-secondary-500 border-b border-gray-500 pb-2">
<Database size={20}/>
<h4 class="h4 font-bold uppercase tracking-widest">Core V3</h4>