Design exploration: AI credit usage, limits, and purchase flows - #4446
Draft
shaunandrews wants to merge 11 commits into
Draft
Design exploration: AI credit usage, limits, and purchase flows#4446shaunandrews wants to merge 11 commits into
shaunandrews wants to merge 11 commits into
Conversation
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.
Related issues
None yet — this PR is the design artifact. If the direction is accepted, follow-up implementation issues should define the production data source, billing integration, rollout, and final copy.
How AI was used in this PR
AI was used to implement and iterate on the prototype during a live design-review loop. The resulting interfaces were manually reviewed in both light and dark themes, and the state logic is covered by focused tests.
Executive summary
Important
This is a design exploration, not a merge recommendation. It is intentionally broader and more prototype-oriented than production code should be. The goal is to make the pricing, usage, limit, lockout, and purchase states tangible enough to evaluate together.
Individual pieces are deliberately easy to cherry-pick or reimplement. If the team decides the whole direction is close enough to productionize and ship, that would be great too—but this PR should not be treated as ready to ship in its current form.
This exploration asks how Studio’s agentic UI should communicate AI credit consumption before, during, and after a user reaches their allowance. It covers the settings surface, persistent sidebar messaging, an in-composer warning, hard lockout states, a simulated credit-purchase handoff, and purchase confirmation.
Proposed Changes
Review guide
The most valuable review is on the product and interaction decisions:
Okay to skim
docs/design-explorations/usage-interfaces/.Screenshots
Purchase UI variants
These are intentionally competing directions presented together for design review, not three interfaces intended to ship.
Core journey
Complete 17-state gallery
Monthly allowance states
Extra-credit states
Chat states
Purchase flow
Known tradeoffs and follow-ups
Safety checklist
Testing Instructions
http://localhost:8081/settings?tab=usage.Validation completed:
npx eslint --fixon all modified TypeScript filesnpm run typechecknpm test -- apps/ui/src/components/settings-view/usage-panel.test.tsx apps/ui/src/data/queries/use-app-messages.test.tsx apps/ui/src/ui-classic/components/session-view/index.test.tsx apps/ui/src/ui-classic/components/session-view/session-chat-actions.test.tsx— 39 tests passednpm run cli:build:uiPre-merge Checklist