🤖 fix: disable gateway when onboarding credits are depleted#2789
🤖 fix: disable gateway when onboarding credits are depleted#2789ibetitsmike merged 4 commits intomainfrom
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a58d2d4d3b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Addressed feedback: added a 5-second timeout to the balance refresh calls in both desktop and browser flows. If the gateway endpoint stalls, the timeout resolves to |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0c0563346e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Addressed slow-response bypass: the refresh promise is now stored and, when the timeout wins the race, a |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c367db970e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Added login-attempt guard ( |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Auto-disable Mux Gateway routing and show a warning when a user logs in during onboarding with a $0 balance, preventing a broken experience with an unusable provider.
Closes #1964
Background
The onboarding wizard already displays the gateway balance after login, but there was no handling for depleted credits — the gateway stayed enabled even at $0, leading users to a dead end.
Implementation
refresh()inuseMuxGatewayAccountStatusnow returnsPromise<MuxGatewayAccountStatus | null>so callers can act on the result immediately.OnboardingWizardSplashnow await the balance check after login. When credits are $0: default gateway models are not applied, andgateway.toggleEnabled()disables routing.Generated with
mux• Model:anthropic:claude-opus-4-6• Thinking:xhigh• Cost:$2.91