fix: stabilize narrow-window telemetry UI

Collect bandwidth history for the full running session, keep responsive service and status labels readable, repair nested menu overflow, and correct semantic state colors.

Update active queue counters immediately for terminal items, add localized integer formatting, eliminate progress label overlap, and cover the regressions with focused tests.
This commit is contained in:
Sucukdeluxe
2026-08-10 21:06:09 +02:00
parent b670b92147
commit 7dce19119f
15 changed files with 195 additions and 69 deletions
@@ -2,6 +2,7 @@ import { memo, useEffect, useLayoutEffect, useRef, useState, type CSSProperties,
import type { DownloadItem } from "../../../shared/types";
import {
compactProviderLabels,
compactDownloadServiceLabel,
extractHoster,
formatAudioStripSummary,
formatDateTime,
@@ -147,6 +148,17 @@ function DownloadStatusCell({ status, title }: { status: string; title?: string
);
}
function DownloadServiceCell({ label }: { label: string }): ReactElement {
const full = normalizeDownloadServiceLabel(label);
const compact = compactDownloadServiceLabel(label);
return (
<span aria-label={full} className="downloads-cell downloads-service-cell" title={label}>
<span aria-hidden="true" className="downloads-service-full">{full}</span>
<span aria-hidden="true" className="downloads-service-compact">{compact}</span>
</span>
);
}
function itemCell(item: DownloadItem, column: string, sessionRunning: boolean): ReactElement | null {
const displayStatus = displayedStatus(item, sessionRunning);
const retrySuffix = item.retries > 0 ? ` (R${item.retries})` : "";
@@ -174,7 +186,7 @@ function itemCell(item: DownloadItem, column: string, sessionRunning: boolean):
}
if (column === "account") {
const full = item.providerLabel || (item.provider ? providerLabels[item.provider] : "");
return <span className="downloads-cell" title={full}>{normalizeDownloadServiceLabel(full)}</span>;
return <DownloadServiceCell label={full} />;
}
if (column === "prio") return <span className="downloads-cell" />;
if (column === "status") return <DownloadStatusCell status={displayStatus} title={statusTitle} />;
@@ -393,7 +405,7 @@ function packageCell(row: DownloadPackageRow, column: string, packageSpeedBps: n
}
if (column === "account") {
const full = compactProviderLabels(row.items.map((item) => item.providerLabel || (item.provider ? providerLabels[item.provider] : "")).filter(Boolean));
return <span className="downloads-cell" title={full}>{normalizeDownloadServiceLabel(full)}</span>;
return <DownloadServiceCell label={full} />;
}
if (column === "prio") return <span className="downloads-cell">{entry.priority === "high" ? "Hoch" : entry.priority === "low" ? "Niedrig" : ""}</span>;
if (column === "status") {