Skip to content

Surface Studio Code payment-method requirement before the first prompt - #4422

Open
sejas wants to merge 7 commits into
trunkfrom
stu-2178-surface-credit-card-requirement-080318
Open

Surface Studio Code payment-method requirement before the first prompt#4422
sejas wants to merge 7 commits into
trunkfrom
stu-2178-surface-credit-card-requirement-080318

Conversation

@sejas

@sejas sejas commented Aug 3, 2026

Copy link
Copy Markdown
Member

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

  • Add gate screen when the user has no payment method added to their WPcom account.
Agentic UI Classic
Screenshot 2026-08-04 at 14 46 09 Screenshot 2026-08-04 at 14 45 49

Testing Instructions

  1. Log in with a WordPress.com account without a saved payment method.
  2. Desktop classic tab: run npm start, open Studio Code — the payment requirement should replace the composer.
  3. Agentic UI: run 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.
  4. Select Add payment method — the browser opens at https://my.wordpress.com/me/billing/payment-methods/add and Studio shows the waiting state.
  5. Add a card, return to Studio, and select Check again — the chat should unlock into the normal conversation view.
  6. With an entitled account, verify both chats load straight into the composer as before.
  7. Go offline (or block the quota request) and verify the chats still open normally (fail-open).
  8. Confirm layout and contrast in both light and dark mode.

The transition from the no-card state to the card state is immediate. Removing the card has a 5-minute cache.

Pre-merge Checklist

  • Unit tests pass (npm test): gate, fail-open, hand-off, and re-check covered in both apps
  • Type checks pass (npm run typecheck)
  • Lint passes on modified files
  • Verified visually in light and dark mode (classic tab and agentic UI)

@sejas sejas self-assigned this Aug 3, 2026
@sejas
sejas marked this pull request as ready for review August 4, 2026 13:57
@sejas
sejas requested review from bcotrim and nightnei August 4, 2026 13:57
@wpmobilebot

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 2da719b vs trunk

app-size

Metric trunk 2da719b Diff Change
App Size (Mac) 1402.83 MB 1402.85 MB +0.02 MB ⚪ 0.0%

site-editor

Metric trunk 2da719b Diff Change
load 1077 ms 1046 ms 31 ms ⚪ 0.0%

site-startup

Metric trunk 2da719b Diff Change
siteCreation 7548 ms 7541 ms 7 ms ⚪ 0.0%
siteStartup 2887 ms 2867 ms 20 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

@sejas
sejas requested a review from katinthehatsite August 4, 2026 15:01
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.

2 participants