Skip to content

Show "1m 0s" rather than "60s" for a time left just under a minute - #149

Merged
anmolkapil merged 1 commit into
anmolkapil:mainfrom
Arpit-Khandelwal:fix/eta-60s
Oct 15, 2026
Merged

anmolkapil merged 1 commit into
anmolkapil:mainfrom
Arpit-Khandelwal:fix/eta-60s

Conversation

@Arpit-Khandelwal

Copy link
Copy Markdown
Collaborator

A tiny one I noticed while working on #146: formatEta rounds seconds up below a minute, so any time left between 59.01s and 59.99s showed as "60s".

Now anything that rounds up to 60 takes the minutes form, clamped so it reads "1m 0s" (not "0m 59s"). Everything else is unchanged.

Testing: added a case to e2e/format.spec.ts (0.2s → 1s, 58.2s → 59s, 59.01s and 59.5s → 1m 0s, 61s → 1m 1s). It fails on main and passes here, 4/4 in the spec. Lint and typecheck are clean.

formatEta rounded seconds up below 60, so anything from 59.01s to 59.99s
read "60s". Those now take the minutes form, which is clamped so they read
"1m 0s" rather than "0m 59s".
@Arpit-Khandelwal

Copy link
Copy Markdown
Collaborator Author

this one was so unnecessary ffs

@anmolkapil anmolkapil left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Such little things makes the experience production level!!!

Great catch again!

@anmolkapil
anmolkapil merged commit fd22a88 into anmolkapil:main Oct 15, 2026
3 checks passed
alisinaee referenced this pull request in alisinaee/Lightning Nov 6, 2026
…149)

formatEta rounded seconds up below 60, so anything from 59.01s to 59.99s
read "60s". Those now take the minutes form, which is clamped so they read
"1m 0s" rather than "0m 59s".

(cherry picked from commit fd22a886055757842d68dd337598b5f3b10281c4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants