GeezerVison is showing github.com — feat(app): show a free limit panel in place of the composer by arvsrn · Pull Request #63531 · anomalyco/opencode
Conversation
arvsrn
commented
Nov 12, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
What
When a free user runs out of free usage, the composer is replaced by a panel that stays until usage resets:
Free limit reached
Free usage resets at 6:50 PM. Connect a provider or subscribe to Go to continue.
Subscribe to Go · $10/mo · Connect provider
This brings the TUI Q4 design ("Rate limits & errors") to desktop.
Why
- The popup shows at most once a day and can be dismissed permanently with "Don't show again". After that, hitting the limit only leaves a timeline line with no action. The panel keeps the next steps in front of the user every time.
- With no paid provider there's nothing the composer can send, so it's swapped for something persistent that shows the next steps.
How it works
- On a
provider.free-limit step failure from any session, the reset time is stored on the device (free usage is counted per network, not per session).
- Until that time passes, or a paid provider is connected, every session shows the panel instead of the composer. The composer comes back on its own.
- Connect provider opens the provider dialog. Subscribe to Go opens opencode.ai/go and the Go connect dialog, as the popup did.
- The existing once-a-day popup is unchanged; the panel sits under it as the persistent call to action.
- The reset time goes through the same bounds as the popup's reset text (
limitResetAt), and falls back to an hour when the delay is missing or out of range, so a bad value can't hide the composer for long.
Flag
None. This is the default experience.
Not covered yet
- Home's new-session composer.
- Free models with their own daily limit: the panel shows even if one of those could still be used.
- The paid-model picker for free users (the six provider tiles with no price).
Testing
bun typecheck in packages/app. composer.spec.ts:152 (updated to expect the panel in place of the composer) and settings.spec.ts:1903 pass. Checked in the desktop app in dark mode: layout, spacing, button styles, and both actions.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review only: I couldn't run this, since it needs the desktop app. tsc --noEmit passes for packages/app with the PR. Nearby tests: 255 pass and 3 fail with the PR, against 255 pass and 4 fail on the base. The errors I saw were Solid's "Client-only API called on the server side" on both, but I didn't compare the failing tests one by one. Could you add before/after screenshots or a short video of the panel and both actions?
Public API: unchanged. The only addition is the app-local general.freeLimitPanel setting (optional, off by default) and a free-limit device storage key.
The flag-gated approach looks sound. One thing is worth fixing before the flag is turned on: the reset time is saved without range checks (see inline). Because the panel replaces the composer and can't be dismissed, a bad value would hide the composer with no way back except connecting a provider or turning off the experimental setting.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
onCleanup(
|
|
|
location().event.on("session.step.failed", (event) => {
|
|
|
if (event.data.error.type !== "provider.free-limit") return
|
|
|
setState("resetAt", event.created + (event.data.error.retryAfterMs ?? FALLBACK_RESET_MS))
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
retryAfterMs is used here without the checks formatLimitReset already does (finite, ≥ 0, ≤ MAX_RETRY_AFTER_MS). The popup could live with a bad value because it can be dismissed. This panel replaces the composer, so an out-of-range value would keep the composer hidden until that time. Could you apply the same bounds here, e.g. by sharing a helper with formatLimitReset, and use the fallback when the value is out of range?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new commit only adds blank lines for lint, and behaviour is unchanged. The earlier point about the unchecked retryAfterMs in useFreeLimit hasn't been addressed yet, so that thread stays open. Public API: unchanged.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My earlier point is fixed: the reset time now goes through limitResetAt, with the same bounds as the popup, and falls back to an hour. I checked this by reading the code. tsc passes for packages/app. I couldn't run the desktop UI or the updated e2e test here. Public API: unchanged. The general.freeLimitPanel setting this PR added earlier has been removed again, and it was never released.
New: with the flag gone, the gap listed under "Not covered yet" now reaches every free user (see inline).
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
active: () => {
|
|
|
const at = resetAt()
|
|
|
|
|
|
return !paid() && at !== null && at > now()
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that this is the default with no flag, the case listed under "Not covered yet" affects every free user. Any provider.free-limit refusal hides the composer in all sessions until the reset time. That includes free models with their own daily limit that could still be used. With the composer gone, there's no way to switch to one of those models, run a slash or shell command, or try again if the 1-hour fallback guess is wrong. Could the panel keep a way back to the composer (e.g. a model switch or a dismiss), or stay behind the flag until that case is handled?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
Hona
Awaiting requested review from Hona
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|