Surface Studio Code payment-method requirement before the first prompt - #4422
Conversation
📊 Performance Test ResultsComparing b263d89 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
|
@shaun, thanks for the feedback 🙌. Here you go:
|
There was a problem hiding this comment.
I see the composer flashing before the payment method message, we might need a loading state @shaunandrews
Screen.Recording.2026-08-05.at.13.05.09.mov
|
Good catch! Let me see what I can do 🤔 . |
|
I think the loading is fast enough that we can avoid showing any loading. I just added a fade in of the elements. That fade in only appears the when Studio starts. card-ok-fade-in.mp4card-required.mp4 |
|
@bcotrim , could you take another look. |
bcotrim
left a comment
There was a problem hiding this comment.
LGTM, thanks for making the changes 👍
|
@sejas, it works as expected for new accounts, but I tried to use an account with payment methods, then remove those payment methods, and after opening Studio, I don't see the expected screen. |
|
Thanks for sharing that case. There is a 5 min cache in the backend when you have a valid payment and remove the credit card, so after 5 mins the user will see the lock screen. |




Related issues
How AI was used in this PR
The visual design, copy, and illustration come from the human-reviewed prototype in #4407. This PR ports that design onto the real account checks; the result was reviewed and tested manually in both apps, in light and dark mode.
Proposed Changes
Testing Instructions
npm start, open Studio Code — the payment requirement should replace the composer.npm run cli:build:ui && node apps/cli/dist/cli/main.mjs ui --no-open, open http://localhost:8081 — opening a chat should show the same requirement instead of the composer.https://my.wordpress.com/me/billing/payment-methods/addand Studio shows the waiting state.The transition from the no-card state to the card state is immediate. Removing the card has a 5-minute cache.
Pre-merge Checklist
npm test): gate, fail-open, hand-off, and re-check covered in both appsnpm run typecheck)