Repository navigation
fix(platform): preserve custom API-key expiry dates - #4582
Merged
Merged
Conversation
A picked expiry day is the day the key stops working where its maker is, even across a clock change; the calendar offers only days a 24-hour to 365-day lifetime can end on, and a form left open is checked again when it is sent.
The server refuses a lifetime that is not whole seconds, so each DST case now checks it, with a clock reading in milliseconds as its own case; the cases name APIKEY-R10, the rule they hold.
dayjs isSame(…, 'day') ends a day at its first 23:59:59.999, so on a 25-hour day whose repeated hour follows a midnight clock change (Cairo, Santiago) a lifetime ending in that hour read as the next day and an offered date was refused. Compare the calendar dates instead; the two zones are cases of the DST table.
yannickmonney
force-pushed
the
fix/api-key-expiry-calendar
branch
from
October 13, 2026 10:56
a47ae7a to
8e4df10
Compare
yannickmonney
marked this pull request as ready for review
October 13, 2026 16:31
yannickmonney
enabled auto-merge
October 13, 2026 16:31
yannickmonney
added this pull request to the merge queue
Oct 13, 2026
yannickmonney
added this pull request to the merge queue
Oct 13, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 13, 2026
This was referenced Oct 13, 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.
A custom API-key expiry could land on the wrong local date across a daylight-saving change, and a dialog left open overnight used a stale lifetime. Resolve custom dates within the existing 24-hour to 365-day API interval, disable dates the interval cannot represent, and revalidate against the submission time. Presets and Never retain their behavior. Calendar guidance and the API-key guide agree in EN/DE/FR.
Validation: 32 focused helper/component tests, 685 docs checks, 33 locale checks, configured typed lint, formatting/manual guards and SAST pass. An isolated copy with the old calendar rounding fails three DST cases; the candidate passes all four controls. Real Chromium at a 390-pixel viewport in Europe/Zurich refuses the unrepresentable spring-forward date, previews the accepted date, and submits the expected 47-hour lifetime; the rendered dialog fits without overflow. Independent source/prose review accepted the patch.
This is a separate follow-up to #4495 and stays draft while the current release blockers finish. Creation still uses a relative expiresIn value; this client repair does not guarantee an absolute server timestamp under unbounded network delay or clock skew.