Fix timeline group sort: localeCompare → numeric Date comparison (#820)

* Initial plan

* Fix timeline sort to use numeric datetime comparison instead of string localeCompare

* chore: remove accidentally committed root package-lock.json

Agent-Logs-Url: https://github.com/ThePlenkov/hindsight/sessions/d02f10c5-cc48-4977-84a9-48870f9460ec

Co-authored-by: ThePlenkov <6381507+ThePlenkov@users.noreply.github.com>

* chore: restore package-lock.json to its original state from main

Agent-Logs-Url: https://github.com/ThePlenkov/hindsight/sessions/2ede4783-55ef-4f36-8ea7-7d65c5362a0a

Co-authored-by: ThePlenkov <6381507+ThePlenkov@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ThePlenkov <6381507+ThePlenkov@users.noreply.github.com>
This commit is contained in:
Petr Plenkov 2026-03-31 21:53:08 +02:00 committed by GitHub
parent 6f7437be21
commit f3f2c6b023
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1003,7 +1003,7 @@ function TimelineView({
}); });
return Object.entries(groups) return Object.entries(groups)
.sort(([a], [b]) => a.localeCompare(b)) .sort(([, a], [, b]) => a.date.getTime() - b.date.getTime())
.map(([key, { items, date }]) => ({ .map(([key, { items, date }]) => ({
key, key,
label: getGroupLabel(key, date), label: getGroupLabel(key, date),