From 60d10a282cfb386e625ca7e756238d395f95fd2a Mon Sep 17 00:00:00 2001 From: maxime Date: Tue, 17 Nov 2026 13:59:46 +0100 Subject: [PATCH] Sidebar: the range of an analysis on two lines, the days then the hours (too wide on one) Co-Authored-By: Claude Opus 5.5 --- app/web/src/App.jsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/web/src/App.jsx b/app/web/src/App.jsx index 4c21830..c09e991 100644 --- a/app/web/src/App.jsx +++ b/app/web/src/App.jsx @@ -51,10 +51,11 @@ function Header({ mobile, desktop, toggle }) { // The analyses of the Data page (labeling/auto/analyses/), read again every 3 s: one folder per station, open by default if // it has one running, and inside one analysis per range (a green tick: its labels validated); a click opens Data on its // station and its days, and shows its report there -// The range of an analysis on one line: "01.11 · 10:30–11:40" within the day, otherwise "04.11 21:12 – 07.11 14:12" (UTC) +// The range of an analysis on two lines, too wide for the sidebar on one: the days "04.11 – 07.11" ("01.11" within the day), +// under them the hours "21:12 – 14:12" (UTC) const dayMonth = t => `${t.slice(8, 10)}.${t.slice(5, 7)}`, hour = t => t.slice(11, 16); -const range = a => (a.start.slice(0, 10) === a.end.slice(0, 10) - ? `${dayMonth(a.start)} · ${hour(a.start)}–${hour(a.end)}` : `${dayMonth(a.start)} ${hour(a.start)} – ${dayMonth(a.end)} ${hour(a.end)}`); +const days = a => (a.start.slice(0, 10) === a.end.slice(0, 10) ? dayMonth(a.start) : `${dayMonth(a.start)} – ${dayMonth(a.end)}`); +const hours = a => `${hour(a.start)} – ${hour(a.end)}`; const STATE_COLOR = { done: "teal", error: "red", interrupted: "gray" }; // The state: a spinning wheel while running, otherwise a coloured dot (its name in the tooltip) const Dot = ({ state }) => (state === "running" ? @@ -83,7 +84,8 @@ function Analyses({ open }) { rightSection={a.validated ? : a.state === "done" && } - label={{range(a)}} /> + label={{days(a)}} + description={{hours(a)}} /> ))} );