From 7bc71cef8d49a1fd75e5596fbf8cbba94371ea4d Mon Sep 17 00:00:00 2001 From: Zaldimmar Date: Sat, 26 Sep 2026 17:22:40 -0500 Subject: [PATCH] Send events oldest first so the carousel's past sits behind it 25e592b ordered /events upcoming-first, then past latest-first. The carousel shows the list as it arrives and opens on the first upcoming event, so past events landed after the upcoming ones and "previous" no longer went back in time. Plain chronological order (undated last) puts them before it again; the grid splits upcoming from past itself, so it reads the same either way. Org pages share the order and the carousel. Co-Authored-By: Claude Opus 5.5 --- server/src/routes/content.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/server/src/routes/content.js b/server/src/routes/content.js index 92b74c8..5000a90 100644 --- a/server/src/routes/content.js +++ b/server/src/routes/content.js @@ -438,17 +438,14 @@ function attachAwards(db, orgs) { Flat, with the event scopes alongside. Retreats.tsx owns the band titles and colours and filters this list by scope_id. - By date, the way the cards split them: upcoming soonest first, - then past most recent first, undated at the end of each. There - is no hand-typed order; a tie falls to the title. + Oldest first, undated last. The carousel shows the list as it + comes and opens on the first upcoming event, so past events + have to sit before it for "previous" to go back in time; the + grid splits upcoming from past itself. There is no hand-typed + order; a tie falls to the title. ───────────────────────────────────────────────────────────── */ -const EVENT_ORDER = ` - effective_status = 'past', - starts_on IS NULL, - CASE WHEN effective_status = 'past' THEN NULL ELSE starts_on END, - starts_on DESC, - title`; +const EVENT_ORDER = `starts_on IS NULL, starts_on, title`; content.get("/events", (c) => { const db = c.get("db");