Repository navigation
feat(app): show the Go limit in a tray that grows out of the composer - #58008
Draft
kitlangton wants to merge 3 commits into
Draft
kitlangton wants to merge 3 commits into
kitlangton wants to merge 3 commits into
Conversation
core now classifies the Console's GoUsageLimitError 429 as provider.go-limit (keeping retryAfterMs) and ChatGPT's subscription_sharing_usage_limit_exceeded as provider.chatgpt-limit. Desktop opens 'Go limit reached' with the reset time, leaves a muted timeline line and hands the prompt back; the ChatGPT dialog matches the typed error instead of a stale copied string. The TUI restores the prompt and shows a muted Go-limit notice instead of a red error and failure toast.
…pe the Go notice to the status line
Replaces the Go limit dialog with a tray above the composer: when Go is back, Use credits, and Switch to a free model, which keeps the prompt. If free models run out too while the Go limit holds, the tray says so with both reset times instead of opening the free-tier upsell.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
▶ Pitch (phone, 64 s):
pr-58008-phone.mp4
Desktop: https://github.com/user-attachments/assets/ae325f30-6f7a-4279-94ba-4b03f88d4e5f
Head:
c70d6f28190466e8d187d4fdbd5facbc99a4f96eRisk: Based on
beta(where the grow animation lives) with #57897's commits underneath. I'd merge #57897 first. The Go limit is kept in memory, so after a reload a free-limit error opens the Subscribe dialog again. Beta's app e2e legs and typecheck were already red, andbuild (windows)failed on apkg.pr.new404.Not verified: Use credits opening the Console (not clicked on camera). Recorded against a mock gateway that returns
GoUsageLimitErrorandFreeUsageLimitError, not the real Go service. Also, on a brand-new session's first message the error can arrive before the session screen mounts, so neither the old dialog nor the tray shows. That was already true before this change.What it does. When a Go subscriber hits their Go limit, Desktop no longer opens a dialog. A tray grows out from under the composer instead. It says when Go is back, with two buttons: Use credits and Switch to a free model, which keeps the prompt. If they switch to a free model and run out of free messages too, the tray says both limits are reached, shows when each comes back, and leaves only Use credits.
Stacks on #57897's two commits (typed Go and ChatGPT limit errors), cherry-picked onto
betabecause the grow animation (#57559) only exists there.How it works.
session.step.failedwithprovider.go-limitopensSessionGoLimitTrayand records the session ingoLimitedwith its reset time.Grow(fade) as the queue panel and tucks under the composer the same way. A small ring empties as the reset nears.provider.free-limitin a session whose Go limit still holds goes to the tray (both limits) instead of the free-tier Subscribe dialog.Risk. Desktop UI only. The Go-limit dialog and its "don't show again" state are gone for this path. Free-tier users without Go still get the free-limit dialog.
goLimitedlives in memory, so after a reload a free-limit error shows the normal dialog until the next Go-limit error.Proof.
bunx playwright test e2e/regression/composer.spec.ts -g 'Go usage limit': pass. Covers the tray, the free-model switch keeping the prompt, and the both-limits state.bun test src/session/usage-exceeded-dialogs.test.ts: 4 pass.tsc -binpackages/app: clean exceptactivity-chips.fixture.tsx(@opencode/ui/context/marked), which already fails onbeta.the free usage limit opens the Go dialog once…also fails on the untouched base (it times out waiting for "Continue in the browser"). Running e2e locally onbetaalso needs a one-line fix inpackages/app/vite.js:bundleNestedWorkerDepsonly matches bare@pierre/highlights, so@pierre/highlights/themes/loaderfrom feat(app): highlight code with @pierre/highlights instead of Shiki #57937 fails to resolve in the dev server. That fix isn't in this PR.