From 4909a86a139387e17d88931af4c4d0efc382b6b0 Mon Sep 17 00:00:00 2001 From: Koala <6156589+Shik3i@users.noreply.github.com> Date: Mon, 25 May 2026 09:53:25 +0200 Subject: [PATCH] feat: implement sprint 1 quick wins - toast system, notifications, UX polish - Add central toast notification system (popup.html, popup.js) - Add browser notifications toggle (opt-in) with event toasts - Fix interpolation memory leak (unload listener) - Add /health endpoint with IP-based rate limiting (server) - Improve tab sorting (current tab first, matches, alphabetical) - Add copy-to-clipboard visual feedback with toast - Show targetTime in last action card for seek/force sync - Add explicit video cleanup when element removed (content.js) - Update ROADMAP.md to remove implemented features --- docs/ROADMAP.md | 627 +--------------------------------------- extension/background.js | 39 +-- extension/content.js | 7 + extension/popup.html | 44 +++ extension/popup.js | 122 ++++++-- server/index.js | 39 ++- 6 files changed, 217 insertions(+), 661 deletions(-) diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index 8e30e35..5d538a8 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -4,26 +4,14 @@ This document tracks planned features, improvements, and their implementation de --- -## Antworten auf offene Fragen +## Antworten auf offenen Fragen ### 1. Graceful Shutdown **Korrektur:** Der Server hat bereits Graceful Shutdown implementiert (`server/index.js:481-499`). Bei SIGTERM/SIGINT wird allen Clients eine Neustart-Nachricht gesendet, der HTTP-Server geschlossen und nach 5s erzwungen beendet. **Kein Handlungsbedarf.** -### 2. `/health` Endpoint Rate Limiting -Ja, sollte rate-limitiert werden. Aktuell ist `/` ein offener GET-Endpoint. Ein Angreifer könnte diesen endlos pollen. Lösung: Einfacher IP-basierter Rate-Limiter (ähnlich wie bei WebSocket-Connections) mit 60 Requests/Minute pro IP. - ### 3. `setInterval(refreshLogs, 5000)` Last 5 Sekunden ist technisch wenig Last (~0.2 IPC calls/sec). Aber es ist **architektonisch unsauber** — der Interval läuft auch wenn der Dev-Tab nicht sichtbar ist. Besser: Nur pollen wenn Dev-Tab aktiv, oder auf `chrome.runtime.onMessage` umstellen (Push statt Poll). -### 4. `startInterpolation()` Memory Leak -**Ja, echtes Problem.** Wenn das Popup geschlossen wird, läuft `interpolationInterval` weiter im Service Worker Kontext. Bei jedem Popup-Öffnen wird ein neuer Interval erstellt (`if (interpolationInterval) return;` schützt nur vor Duplikaten innerhalb derselben Instanz). Über Zeit summieren sich verwaiste Intervals. Fix: `window.addEventListener('unload')` oder Popup-Lifecycle-Listener. - -### 5. `