From 64c846861b62927a2b6c6c957ea22b4d697bbf0b Mon Sep 17 00:00:00 2001 From: Sucukdeluxe Date: Sat, 15 Aug 2026 01:00:36 +0200 Subject: [PATCH] fix(downloads): show remaining volume before total Place the current unfinished download volume ahead of the historical total in the downloads status sidebar. Lock the user-facing metric order with a renderer regression test. --- src/renderer/views/downloads/DownloadsView.tsx | 2 +- tests/downloads-view.test.tsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/renderer/views/downloads/DownloadsView.tsx b/src/renderer/views/downloads/DownloadsView.tsx index 86c65a0..523ac4d 100644 --- a/src/renderer/views/downloads/DownloadsView.tsx +++ b/src/renderer/views/downloads/DownloadsView.tsx @@ -109,8 +109,8 @@ export function DownloadsSidebarStatus({ model }: { model: DownloadsViewModel }) { label: "Pakete", metric: "packages", numericValue: model.status.packages, value: integerFormatter.format(model.status.packages) }, { label: "Links", metric: "links", numericValue: model.status.links, value: integerFormatter.format(model.status.links) }, { label: "Sitzung", metric: "session", numericValue: model.status.sessionBytes, value: model.status.session }, - { label: "Gesamt", metric: "total", numericValue: model.status.totalBytes, value: model.status.total }, { label: "Verbleibend", metric: "remaining", numericValue: model.status.remainingBytes, value: model.status.remaining }, + { label: "Gesamt", metric: "total", numericValue: model.status.totalBytes, value: model.status.total }, { label: "Hoster", metric: "hosters", numericValue: model.status.hosters, value: integerFormatter.format(model.status.hosters) } ]; return
{entries.map((entry) =>
{entry.label}
)}
Geschwindigkeit{speed}
ETA{eta}
; diff --git a/tests/downloads-view.test.tsx b/tests/downloads-view.test.tsx index 3219509..ee37c08 100644 --- a/tests/downloads-view.test.tsx +++ b/tests/downloads-view.test.tsx @@ -114,6 +114,7 @@ describe("rollende Downloadkennzahlen", () => { const html = renderToStaticMarkup(); expect(html.match(/class="downloads-rolling-value"/g)).toHaveLength(6); expect(html).toContain("Verbleibend"); + expect(html.indexOf("Verbleibend")).toBeLessThan(html.indexOf("Gesamt")); expect(html).toContain('data-status-metric="speed"'); expect(html).toContain('data-status-metric="eta"'); });