Skip to content

Commit bdbfb08

Browse files
alltomatosclaude
andcommitted
fix(app): pin locale for formatMinutes so unit tests aren't runner-dependent
formatMinutes() called mins.toLocaleString() with no locale, so its output silently depended on the process's default locale. Every other formatter on the stats page (numFmt, compactFmt, the session date/time formatters) already threads through language.intl() explicitly -- formatMinutes was the one holdout. Its unit test hardcoded the pt-BR-style output ("60.327 min", period as thousands separator) that this fork's default locale produces locally, but GitHub's ubuntu-latest runners default to a locale that renders it as "60,327 min" -- so unit (linux) fails on every PR regardless of what it touches (confirmed failing on dev's own latest commits too, e.g. https://github.com/alltomatos/opencode/actions/runs/34911995346). Now formatMinutes accepts an explicit locale (passed as language.intl() from stats.tsx, matching the rest of the file), and the test pins "pt-BR" so it's deterministic on any runner. Closes #236 Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_015KrFrdVEmx7apnofWUViJw
1 parent 291ba33 commit bdbfb08

3 files changed

Lines changed: 3 additions & 935 deletions

File tree

0 commit comments

Comments
 (0)