v2.1.3: Fix debug report showing oldest logs instead of newest

This commit is contained in:
Timo
2026-06-07 00:38:35 +02:00
parent a1e882cfa7
commit 0a34d804fb
4 changed files with 11 additions and 4 deletions
+7
View File
@@ -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
+1 -1
View File
@@ -12,7 +12,7 @@
<a href="https://chromewebstore.google.com/detail/koalasync/obbnmkmlaaddodakcbdljknjpagklifc"><img src="https://img.shields.io/badge/Chrome-Download-blue?logo=googlechrome&logoColor=white" alt="Chrome Extension"></a>
</p>
<p align="center"><a href="CHANGELOG.md"><b>New v2.1.2 Release!</b> — See what's changed</a></p>
<p align="center"><a href="CHANGELOG.md"><b>New v2.1.3 Release!</b> — See what's changed</a></p>
<p align="center"><i>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 <b>Data Sovereignty</b> and <b>Performance</b>.</i></p>
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "koalasync",
"version": "2.1.2",
"version": "2.1.3",
"description": "KoalaSync Build Scripts",
"private": true,
"scripts": {