docs(03-03): complete billing management page plan — paused at human-verify checkpoint

- Billing page at /billing with SubscriptionCard, status badge, agent count +/- adjuster
- BillingStatus component with 6 subscription states (none/trialing/active/past_due/canceled/unpaid)
- TanStack Query mutation hooks: useCreateCheckoutSession, useCreateBillingPortalSession, useUpdateSubscriptionQuantity
- Billing nav link added to dashboard sidebar (CreditCard icon)
- Past-due warning banner and Checkout success toast with session_id URL cleanup
- Stopped at Task 2 checkpoint:human-verify awaiting visual confirmation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-23 21:47:31 -06:00
parent e0342f8ec1
commit 67632c11ce
2 changed files with 153 additions and 5 deletions

View File

@@ -3,14 +3,14 @@ gsd_state_version: 1.0
milestone: v1.0
milestone_name: milestone
status: executing
stopped_at: Completed 03-01-PLAN.md
last_updated: "2026-03-24T03:37:56.910Z"
stopped_at: "Stopped at checkpoint:human-verify in 03-03-PLAN.md (Task 2)"
last_updated: "2026-03-24T03:47:11.921Z"
last_activity: 2026-03-23 — Completed 02-05 multimodal media support and WhatsApp outbound routing
progress:
total_phases: 3
completed_phases: 2
total_plans: 14
completed_plans: 11
completed_plans: 12
percent: 78
---
@@ -61,6 +61,7 @@ Progress: [████████░░] 78%
| Phase 02-agent-features P05 | ~25m | 2 tasks | 6 files |
| Phase 02-agent-features P06 | 9m 53s | 2 tasks | 3 files |
| Phase 03-operator-experience P01 | 22m | 3 tasks | 20 files |
| Phase 03-operator-experience P03 | ~8m | 1 tasks | 6 files |
## Accumulated Context
@@ -109,6 +110,9 @@ Recent decisions affecting current work:
- [Phase 03-operator-experience]: StripeClient(api_key=settings.stripe_secret_key) — new v14+ thread-safe API, not legacy stripe.api_key module-level approach
- [Phase 03-operator-experience]: Stripe webhook idempotency via StripeEvent INSERT + flush + IntegrityError catch — handles Stripe at-least-once delivery
- [Phase 03-operator-experience]: LLM key listing returns key_hint (last 4 chars only) — portal displays ...ABCD without decrypting Fernet ciphertext
- [Phase 03-operator-experience]: window.location.href for Stripe redirects (not router.push) — Stripe Checkout/Portal URLs are external domains
- [Phase 03-operator-experience]: use(searchParams) in client components for Next.js 15 — searchParams is a Promise, must be unwrapped with React.use()
- [Phase 03-operator-experience]: BillingStatus uses inline Tailwind color classes — existing Badge variants lack semantic blue/green/amber/red states needed for subscription status
### Pending Todos
@@ -120,6 +124,6 @@ None yet.
## Session Continuity
Last session: 2026-03-24T03:37:56.908Z
Stopped at: Completed 03-01-PLAN.md
Last session: 2026-03-24T03:47:11.918Z
Stopped at: Stopped at checkpoint:human-verify in 03-03-PLAN.md (Task 2)
Resume file: None