Symmetric date-range picker: 3 columns (Past / NOW / Future), each sorted by closeness to NOW #110
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
m's report (2026-05-25 16:36)
Reviewing atlas's #79 picker live:
Layout — three columns, closeness-to-NOW sort
-7dat top →-30d→-90d→Alle Vergangenheitat bottom. Sorted by closeness to NOW.Heute(today) +Alles(all-time). No title or just the ⌖ glyph.+7dat top →+30d→+90d→Alle Zukunftat bottom. Same closeness-to-NOW sort as past.The key insight m wants visualised: the picker is a spatial representation of time around NOW, not a horizontal list. Each column's top is closest to NOW; bottom is furthest.
What to do
frontend/src/client/date-range-picker.ts(atlas's main render) — restructure the popover body into a 3-column grid..drp-popoverbecomes a 3-column flex/grid container. Each column is a vertical chip stack..test.tstests fordate-range-picker-pure.tsmay need an update if column ordering matters in the chip list export.Hard rules
go build ./... && go test ./internal/... && cd frontend && bun run buildclean.mai/<worker>/date-picker-3col-layout.Out of scope
Reporting
mai report completedwith branch + SHAs + before/after layout description + verification: open any filter using the date picker → confirm 3-column layout → past chips closest-to-NOW at top → middle 'Heute' + 'Alles' → future chips closest-to-NOW at top.3-column layout shipped — Past / NOW / Future (closeness-to-NOW sort)
Branch:
mai/hermes/gitster-date-rangeCommit:
4f910e31eaBefore → After
What I changed
frontend/src/client/date-range-picker.ts—renderPanelnow builds a.date-range-gridwith three vertical.date-range-colchildren. Past iteratesPAST_HORIZONSreversed (past_1dat top →past_allat bottom). NOW hostsnext_1d("Heute") +any("Alles") plus a⌖glyph header. Future iteratesNEXT_HORIZONSminusnext_1d(which moved to NOW). Legacyallhorizon keeps lighting up Alles (saved-Custom-View back-compat). The oldrenderFan/renderCenterhelpers are gone.frontend/src/styles/global.css—.date-range-row / .date-range-fan / .date-range-center{,-btn,-glyph,-label}replaced with.date-range-grid(3-col CSS grid) +.date-range-col(vertical chip stack) +.date-range-col-heading(small caps label + ⌖ variant). Chips stretch to 100% column width for clean vertical alignment. Panel widened from 32rem → 34rem so "Ganze Vergangenheit" never wraps. Mobile (max-width: 540px) collapses the grid to a single column, preserving in-column sort.frontend/src/client/i18n.ts—date_range.horizon.next_1dfixed from "Morgen"/"Tomorrow" → "Heute"/"Today".next_1dbounds are[today, tomorrow)= single-day today, so the prior label was semantically wrong; this aligns label with bounds and matches m's NOW-column spec.frontend/src/client/filter-bar/axes.ts—DEFAULT_TIME_PRESETSupdated to m's spec (past_7d/30d/90d/all·next_1d·any·next_7d/30d/90d/all·custom).projects-detail.tscontinues to override viatimePresetsfor its past-only Verlauf surface.Horizon values preserved
All 12 fan horizons in the union stay (
past_1d/past_14d/next_14dincluded) — registries unchanged,parseURLstill accepts them for saved URLs. The default UI just no longer surfaces chips for them; surfaces wanting finer granularity opt back in viatimePresets.Verification
bun test src/client/date-range-picker-pure.test.ts— 38 pass, 0 failcd frontend && bun run build— clean (i18n codegen: 2873 keys (unchanged), branding clean)go build ./...— cleango test ./internal/...— passManual-verification steps (next eyes)
If the visual width feels off (e.g. "Ganze Vergangenheit" wraps on a specific theme), the 34rem panel width is the knob — bump to 36rem in
.date-range-panel.Sweep verdict (2026-07-29): ALREADY DONE.
frontend/src/client/date-range-picker.ts:194-222builds exactly the Past / NOW / Future grid described here, with the closeness-to-NOW ordering, plus a pure module and tests. Shipped in4f910e3(t-paliad-278) and31d7852.Full sweep:
docs/findings-issue-sweep-2026-07-29.md(commit4c39886). Not closing — that is m's call.