fix: mobile keyboard handlers killed on SSE reconnect — re-init after cleanup

handleInit() called KeyboardHandler.cleanup() and MobileDetection.cleanup()
on every SSE connect but never re-initialized them, breaking keyboard
scroll-into-view and the /init /clear accessory bar on mobile.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
arkon
2026-02-18 11:59:42 +01:00
co-authored by Claude Opus 4.6
parent ee22ef204f
commit c548c2d6ee
9 changed files with 619 additions and 126 deletions
+3 -3
View File
@@ -593,12 +593,12 @@ export class WebServer extends EventEmitter {
done();
});
// Serve static files with caching headers for immutable CDN-like assets
// Serve static files — versioned assets (?v=X) are immutable, cache aggressively
await this.app.register(fastifyStatic, {
root: join(__dirname, 'public'),
prefix: '/',
// Cache static assets for 1 hour (they change on deploy, not during session)
maxAge: '1h',
maxAge: '1y',
immutable: true,
});
// SSE endpoint for real-time updates