Skip to content

AI credits: Warn at 80% usage in the sidebar and above the Classic composer - #4722

Draft
gcsecsey wants to merge 3 commits into
gcsecsey/composer-credit-warning-statesfrom
gcsecsey/ai-credits-usage-notices
Draft

AI credits: Warn at 80% usage in the sidebar and above the Classic composer#4722
gcsecsey wants to merge 3 commits into
gcsecsey/composer-credit-warning-statesfrom
gcsecsey/ai-credits-usage-notices

Conversation

@gcsecsey

@gcsecsey gcsecsey commented Aug 28, 2026

Copy link
Copy Markdown
Member

Related issues

How AI was used in this PR

I used Opus 5 for implementation and tests.

Proposed Changes

This PR adds a dismissible warning at 80% to the sidebar, with a purchase CTA. It is also shown again at these points:

Event Result
Dismiss at 80%, keep spending stays hidden
A top-up drops usage, then it climbs back warns again
App restart warns again
Usage passes 90% the composer strip from #4714 takes over

Classic has no sidebar cards, so its warning sits above the composer instead. It has no composer strip either, so that one slot covers the 90% step as well.

The copy is the approved wording from the exploration in #4446. Still I'd appreciate a final look @shaunandrews.

Testing Instructions

Use the balance setup steps in 236947-ghe-Automattic/wpcom.

  1. Set usage to about 83%. Confirm the sidebar shows At 83% usage with Add AI credits, and the composer shows no strip.
  2. Set usage to about 92%. Confirm the composer strip shows At 92% usage, and the sidebar shows nothing. This is the duplication the issue is about.
  3. Set usage below 80%, and to 100%. Confirm neither surface warns, and that at 100% the composer locks out.
  4. Dismiss at 83% and reload the window. Confirm it comes back.
  5. Switch to Classic, open Studio Code, and repeat steps 1–4. The notice sits above the composer, and covers 90% too.

Check both color schemes, a narrow window, and an RTL locale such as Arabic.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@gcsecsey
gcsecsey marked this pull request as draft August 28, 2026 17:44
@gcsecsey
gcsecsey force-pushed the gcsecsey/ai-credits-usage-notices branch from 7e845fe to cb27ce7 Compare August 31, 2026 11:57
@gcsecsey gcsecsey changed the title Agentic UI: Warn in the sidebar at 80% AI credit usage and confirm top-ups AI credits: Warn at 80% usage in the sidebar and above the Classic composer Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant