[PR #13652] feat(app): localize "free usage exceeded" error & "Add credits" clickable link #14757

Closed
opened 2026-02-16 18:19:31 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/13652

State: closed
Merged: Yes


What does this PR do?

closes #13647, #13650

Previously, hitting the free usage limit error showed raw, untranslated error message and an unclickable link to add credits.

This PR fixes this:

When a user hits the free usage limit error, the UI now:

Shows a localized error message ("Free usage exceeded")
Displays a localized "Add credits" clickable link below the error that opens https://opencode.ai/zen

Before (russian, not localized)
image

After (russian)
image

After (english)
image

How did you verify your code works?

manual test

Files changed

File Change
packages/ui/src/components/session-turn.tsx Added FreeUsageLimitError detection + "Add credits" link UI
packages/ui/src/components/session-turn.css Added link styling
packages/ui/src/i18n/*.ts (16 files) Added translations for freeUsageExceeded and addCredits
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/13652 **State:** closed **Merged:** Yes --- ### What does this PR do? closes #13647, #13650 Previously, hitting the free usage limit error showed raw, untranslated error message and an unclickable link to add credits. This PR fixes this: When a user hits the free usage limit error, the UI now: Shows a localized error message ("Free usage exceeded") Displays a localized "Add credits" clickable link below the error that opens https://opencode.ai/zen Before (russian, not localized) <img width="712" height="198" alt="image" src="https://github.com/user-attachments/assets/fb2b7deb-f059-4d38-9715-738cdadf0f04" /> After (russian) <img width="835" height="209" alt="image" src="https://github.com/user-attachments/assets/a73b25a1-c67c-463d-bd30-033df86351b5" /> After (english) <img width="632" height="151" alt="image" src="https://github.com/user-attachments/assets/d88a2314-8565-424f-ac6a-2f0d3f993c33" /> ### How did you verify your code works? manual test ### Files changed | File | Change | |------|--------| | packages/ui/src/components/session-turn.tsx | Added FreeUsageLimitError detection + "Add credits" link UI | | packages/ui/src/components/session-turn.css | Added link styling | | packages/ui/src/i18n/*.ts (16 files) | Added translations for freeUsageExceeded and addCredits |
yindo added the pull-request label 2026-02-16 18:19:31 -05:00
yindo closed this issue 2026-02-16 18:19:31 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14757