Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Comments

Close side panel

fix(tui): display human-readable duration for rate limit retry#6770

Open
dschenkelman wants to merge 2 commits intoanomalyco:devanomalyco/opencode:devfrom
dschenkelman:fix/human-readable-rate-limitdschenkelman/opencode:fix/human-readable-rate-limitCopy head branch name to clipboard
Open

fix(tui): display human-readable duration for rate limit retry#6770
dschenkelman wants to merge 2 commits intoanomalyco:devanomalyco/opencode:devfrom
dschenkelman:fix/human-readable-rate-limitdschenkelman/opencode:fix/human-readable-rate-limitCopy head branch name to clipboard

Conversation

@dschenkelman
Copy link

@dschenkelman dschenkelman commented Jan 3, 2026

Summary

  • Fix rate limit retry message to display human-readable durations (e.g., 45m 0s instead of 2700s)
  • Add decimalSeconds option to Locale.duration() to control whether seconds show decimals
  • Fix latent bug in days/hours calculation that would show 0d 25h instead of 1d 1h

Problem

When rate limits are hit, the retry message displays raw seconds which is hard to read for large values:
image

Solution

  • Use Locale.duration() for rate limit retry display with { decimalSeconds: false }
  • Keep decimal seconds for message duration display (existing behavior)
  • Examples:
    • 2700s45m 0s
    • 7140s1h 59m

Changes

File Change
packages/opencode/src/util/locale.ts Add decimalSeconds option, fix days/hours bug
packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx Use Locale.duration() for retry message
packages/opencode/test/util/locale.test.ts Add tests for duration formatting

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.