From 9d69bac73b032b93cf66eb4519091d05b28778c2 Mon Sep 17 00:00:00 2001 From: Alexander Heldt Date: Mon, 31 Aug 2026 22:27:36 +0000 Subject: [PATCH] Read the walks list newest first too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Needed, on the evidence: the history log, the notes log, the weigh-in list and now sleep & wake all run newest first, so the walks list was the only one in the app reading the other way. A short list makes the inconsistency cheap rather than absent — two panels of the same rows in the same shape should not have to be checked for direction before they can be read. Reversed at the point of display rather than in walkWindowsForDay. Its other two callers — the day's total and the history rails — read the windows as a set, and giving a shared helper a display order would only make them harder to follow. --- src/app.js | 6 +++++- src/changelog.json | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app.js b/src/app.js index df38581..18880cf 100644 --- a/src/app.js +++ b/src/app.js @@ -1054,9 +1054,13 @@ function renderWalks(events) { const day = selectedDay(); const windows = walkWindowsForDay(events, day); + // Newest first, like every other list in the app, so a walk in progress is + // the first row. Reversed here rather than in walkWindowsForDay, whose + // other callers — the day's total and the history rails — read the windows + // as a set and would only be made harder to follow by a display order. renderWindowList( "walk-list", "walk-empty", - windows, + [...windows].reverse(), "Walking", "walk-ww", ); diff --git a/src/changelog.json b/src/changelog.json index 0acadaa..f072a9f 100644 --- a/src/changelog.json +++ b/src/changelog.json @@ -1,4 +1,5 @@ [ + { "date": "2026-08-31", "text": "The Walks list reads newest first as well, so a walk in progress is the top row and every list in the app now runs the same way" }, { "date": "2026-08-31", "text": "The Walks panel and its two charts have moved down the page, below “Pees, poos & meals”" }, { "date": "2026-08-31", "text": "Sleep windows and Wake windows are one “Sleep & wake” panel now, with the two interleaved into a single list, newest first — awake since 12:30, asleep 11:40–12:30, awake since 09:15, and so on back through the day. A wake window is just the gap between two sleeps, so the two lists were always halves of the same sequence, and reading them together makes “only a 45-minute nap after two and a half hours up” obvious in a way two separate lists never did. Whatever is happening right now is the first row, as in the history and notes logs. Each row says which it is and carries a stripe in its colour; whichever one is still running keeps the highlight" }, { "date": "2026-08-31", "text": "The list of weigh-ins under the Weight chart folds away on its own now — tap “History” inside the panel to collapse just the rows and keep the latest figure and the curve on screen. It remembers the choice like the panels do, and folding the whole Weight panel still takes everything with it" },