diff --git a/src/web/public/app.js b/src/web/public/app.js index c27c7f48..8036f532 100644 --- a/src/web/public/app.js +++ b/src/web/public/app.js @@ -1433,6 +1433,25 @@ class CodemanApp { for (const event of [SSE_EVENTS.SESSION_CREATED, SSE_EVENTS.SESSION_DELETED]) { addListener(event, () => this._onSessionListMaybeChanged()); } + + // Docker export/import: toast + refresh the Manage-tab exports list on completion. + addListener(SSE_EVENTS.DOCKER_EXPORT_COMPLETE, (e) => { + try { + const d = e.data ? JSON.parse(e.data) : {}; + this.showToast(`Docker export ready: ${d.bundle} (${Math.round((d.sizeBytes || 0) / 1e6)} MB)`, 'success'); + this.refreshDockerExports?.(); + } catch (err) { + console.error('[SSE] docker export complete:', err); + } + }); + addListener(SSE_EVENTS.DOCKER_EXPORT_FAILED, (e) => { + try { + const d = e.data ? JSON.parse(e.data) : {}; + this.showToast(`Docker export failed: ${d.error || 'unknown error'}`, 'error'); + } catch (err) { + console.error('[SSE] docker export failed:', err); + } + }); } // ═══════════════════════════════════════════════════════════════ diff --git a/src/web/public/index.html b/src/web/public/index.html index db780445..d61b2fc7 100644 --- a/src/web/public/index.html +++ b/src/web/public/index.html @@ -1864,6 +1864,10 @@ +
+ + One click: creates the case folder AND a hardened container with default settings, then starts the session inside it. Requires the base image (node scripts/build-agent-image.mjs). +
+ ${ + c.location === 'docker' + ? `` + : '' + }