Repository navigation
perf(app): drop luxon for the three date operations that used it - #49876
Merged
Merged
Conversation
luxon added 68 KB to the renderer's main chunk and its locale machinery ran at boot, for an ISO parse with a six-month window, same-local-day grouping of sessions, and one medium date-time format. Date.parse, a local calendar-day key and Intl.DateTimeFormat with the fields DATETIME_MED passed to Intl do the same; the format output was verified byte-identical across 16 locales.
Hona
enabled auto-merge (squash)
September 19, 2026 02:00
Hona
disabled auto-merge
September 19, 2026 02:00
jinhuang712
pushed a commit
to jinhuang712/opencode
that referenced
this pull request
Sep 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
luxon is 68 KB of the renderer's 494 KB
mainchunk (source-map attribution) and initialises its locale machinery at boot. The app used it in three places:providers/models/models.tsx— "released in the last six months"DateTime.fromISO(...).diffNow().as("months")Date.parse+ a six-average-month window; unparseable dates areNaNand stay visible, as beforehome/sessions/controller.tsx— today / yesterday / older groupinghasSame(now, "day")in local timey*10000 + m*100 + d); yesterday vianew Date(y, m, d - 1)so DST is handled byDatesession/files/session-context-format.ts— medium date-timetoLocaleString(DateTime.DATETIME_MED)Intl.DateTimeFormat(locale, { year: numeric, month: short, day: numeric, hour: numeric, minute: numeric })— the exact fields luxon's preset passes to IntlThe formatter output was verified byte-identical to luxon across 16 locales (en-US, en-GB, de, fr, es, pt-BR, ru, pl, tr, ja, ko, zh-CN, hi, ar-EG, th, vi) × 4 times of day, including the 24-hour midnight padding case.
luxonand@types/luxonare removed frompackages/app(web and enterprise still depend on it). The one failing test insrc/homeis pre-existing (a client-only Solid API called in a server-side test) and identical without this change.