From 0a34d804fbe28d26e948e8dc196487315ba600af Mon Sep 17 00:00:00 2001 From: Timo <6156589+Shik3i@users.noreply.github.com> Date: Sun, 7 Jun 2026 00:38:35 +0200 Subject: [PATCH] v2.1.3: Fix debug report showing oldest logs instead of newest --- CHANGELOG.md | 7 +++++++ README.md | 2 +- extension/popup.js | 4 ++-- package.json | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fff5e2d..b9608a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to the KoalaSync browser extension and relay server. --- +## [v2.1.3] — 2026-06-06 + +### Fixed +- **Debug report showing wrong logs**: Fixed `logs.slice(-50)` and `history.slice(-20)` in the "Copy Debug Report" feature. Since `addLog()` and `addToHistory()` use `unshift` (inserting entries at index 0), the arrays are ordered newest-first. `slice(-N)` took the N **oldest** entries instead of the N **newest**. Changed to `slice(0, N).reverse()` to correctly include the most recent logs and display them chronologically. + +--- + ## [v2.1.2] — 2026-06-06 ### Fixed diff --git a/README.md b/README.md index c12ceb3..3a11f46 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Chrome Extension

-

New v2.1.2 Release! — See what's changed

+

New v2.1.3 Release! — See what's changed

KoalaSync is a lightweight Browser Extension and Relay Server for synchronized video playback on almost any website with a video element—YouTube, Twitch, Netflix, Emby, Jellyfin, and beyond. Built with a focus on Data Sovereignty and Performance.

diff --git a/extension/popup.js b/extension/popup.js index 014452f..56f886a 100644 --- a/extension/popup.js +++ b/extension/popup.js @@ -1684,7 +1684,7 @@ elements.copyLogs.addEventListener('click', () => { // ── Action History (last 20) ── lines.push('## Action History (last 20)'); if (history && history.length > 0) { - const recent = history.slice(-20); + const recent = history.slice(0, 20).reverse(); lines.push('```'); for (const h of recent) { if (!h) continue; @@ -1703,7 +1703,7 @@ elements.copyLogs.addEventListener('click', () => { // ── Logs (last 50) ── lines.push('## Logs (last 50)'); if (logs && logs.length > 0) { - const recent = logs.slice(-50); + const recent = logs.slice(0, 50).reverse(); lines.push('```'); for (const l of recent) { if (!l) continue; diff --git a/package.json b/package.json index 2f2df48..e022045 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "koalasync", - "version": "2.1.2", + "version": "2.1.3", "description": "KoalaSync Build Scripts", "private": true, "scripts": {