feat(docker-watcher): phase 11 - frontend embed & SSE

Embed SvelteKit static build in Go binary via go:embed. Event bus
for pub/sub with deploy log, instance status, and deploy status events.
SSE endpoints for real-time streaming. Frontend SSE client with
exponential backoff reconnection. Makefile for build pipeline.
Update Phase 12 auth plan with OAuth2/OIDC support.
This commit is contained in:
2026-03-27 22:30:25 +03:00
parent d40cf10f88
commit 5558396bb7
16 changed files with 844 additions and 73 deletions
+21
View File
@@ -1,8 +1,11 @@
<script lang="ts">
import '../app.css';
import type { Snippet } from 'svelte';
import { onMount, onDestroy } from 'svelte';
import { page } from '$app/stores';
import Toast from '$lib/components/Toast.svelte';
import { connectGlobalEvents, type SSEConnection } from '$lib/sse';
import { instanceStatusStore } from '$lib/stores/instance-status';
interface Props {
children: Snippet;
@@ -21,6 +24,24 @@
if (href === '/') return pathname === '/';
return pathname.startsWith(href);
}
let sseConnection: SSEConnection | null = null;
onMount(() => {
sseConnection = connectGlobalEvents({
onInstanceStatus(payload) {
instanceStatusStore.update(payload);
},
onDeployStatus(payload) {
instanceStatusStore.notifyDeploy(payload);
}
});
});
onDestroy(() => {
sseConnection?.close();
sseConnection = null;
});
</script>
<div class="flex h-screen bg-gray-50">