Commit Graph

33 Commits

Author SHA1 Message Date
admin bb99fa592b fix(subscription): refine plan price display 2026-06-24 17:11:37 +08:00
admin c280a3c1ea chore(app): add lan dev script 2026-06-24 12:05:27 +08:00
admin bfbf7ee91a feat(app): improve payment and paywall UX 2026-06-24 10:02:22 +08:00
admin a47038c46f fix(payment): guard ezpay redirect persistence 2026-06-23 17:59:16 +08:00
admin 9874cadb49 style(subscription): limit visible plan cards 2026-06-23 17:40:50 +08:00
admin 3e148f5c0d style(subscription): update payment section spacing 2026-06-23 16:55:34 +08:00
admin b40e6476bf refactor(subscription): move subscription helper functions to a separate file 2026-06-23 16:13:01 +08:00
admin a26dbec873 style(subscription): adjust agreement label font size to 12px 2026-06-23 15:48:27 +08:00
admin 24e52d6ead fix(payment): support updated plan pricing fields 2026-06-23 15:47:09 +08:00
admin c5eca65303 style(subscription): adjust back button spacing 2026-06-23 15:28:29 +08:00
admin e68cabdc54 fix(payment): confirm ezpay redirect before opening 2026-06-22 18:59:01 +08:00
admin 031bad376f fix(subscription): increase EZPAY development redirect delay to 10 seconds 2026-06-22 18:53:49 +08:00
admin 9a3c8f0d12 fix(payment): allow renewing active subscriptions 2026-06-22 18:48:21 +08:00
admin 2cfbaba058 fix(payment): resume ezpay orders only after return 2026-06-22 18:23:59 +08:00
admin 0b8bae5e5f fix(payment): enable ezpay debug delay outside production 2026-06-22 18:10:27 +08:00
admin dd95dd8a26 chore(payment): update ezpay dev redirect notice 2026-06-22 17:37:53 +08:00
admin 21b9954351 feat(payment): restore ezpay return orders 2026-06-22 17:31:04 +08:00
admin 890c955712 fix(payment): support ezpay cashier urls 2026-06-22 16:35:06 +08:00
admin 5ed43a37ce feat(subscription): add payment channel selector 2026-06-22 16:14:34 +08:00
admin 375091e828 fix(subscription): prefer Stripe payment dialog 2026-06-22 14:06:46 +08:00
admin d1228324ca fix(auth): enable dev email login testing 2026-06-22 11:27:13 +08:00
admin df7f673855 feat(subscription): support voice package mode 2026-06-22 09:53:35 +08:00
admin cf435e8fbb style(subscription): polish plan card styles 2026-06-18 19:42:00 +08:00
admin 52aad5b7f3 style(subscription): refine plan card layout 2026-06-18 19:20:35 +08:00
admin 5bf98e9452 feat(subscription): support Stripe payment element 2026-06-18 18:03:36 +08:00
admin 7354afe93d refactor(ui): extract auth and avatar components 2026-06-18 17:14:02 +08:00
admin a347b39001 feat(payment): connect payment service flow 2026-06-18 15:40:59 +08:00
admin 812a3e41b9 refactor(logging): centralize console output 2026-06-18 13:34:19 +08:00
admin 287affa34a refactor(app): move route screens out of components
Exclude test and spec files from generated barrels so page imports do not load test modules at runtime.
2026-06-17 14:13:42 +08:00
admin d41b3c4473 refactor(schemas): extract nullable-default helpers to shared file
The three defensive Zod helpers (stringOrEmpty, numberOrZero,
booleanOrFalse) used by user.ts are general-purpose Zod utilities
that any schema may need — they're not user-specific. The original
inline declaration in user.ts had two downsides:

1. Any new schema (chat, auth, metrics, etc.) that needs the same
   'null | undefined → default scalar' pattern would have to
   duplicate the helper.

2. The long defensive-parse comment block (11 lines) lived inside
   user.ts and didn't explain the helpers' general purpose.

Move them to src/data/schemas/nullable-defaults.ts (top-level
sibling of auth/, chat/, metrics/, user/ subdirs) so any schema
can import them. Keep the original explanation verbatim at the
top of the new file.

Bundled in this commit:
- user.ts imports the helpers from the new file (drops 11 lines
  of comment + 3 const declarations)
- 3 auto-generated barrel index files regenerated by barrelsby
  to pick up the new exports (chat/, subscription/, stores/user/)
2026-06-17 12:05:09 +08:00
admin e44cc7e2f3 feat(sidebar): redesign sidebar UI with three user states (light theme)
Replace the dark sidebar theme with a light-themed three-state UI
matching the design references:

- guest  : pink "login" pill in user row, no status pill on VIP card,
           "Activate VIP Membership" button shown
- member : "VIP membership not activated" subtitle, no status pill,
           "Activate VIP Membership" button shown
- vip    : pink "VIP Member" pill with diamond icon, "Activated" pill
           in VIP card header, no Activate button

Decompose into BackBar, UserHeader, VipBenefitsCard, and VoicePackageCard
under src/app/sidebar/components/. Delete obsolete GuestPanel,
UserInfoCard, and VipCta.

Lift VIP_BENEFITS to a shared src/data/constants/vip-benefits.ts so the
sidebar and subscription page render identical benefit copy.

Add five sidebar tokens (--color-card-surface, --color-voice-gradient-*
--border-card, --shadow-card, --color-pill-bg) to src/tokens/colors.css.

Includes barrelsby regeneration for src/app/sidebar/components and
side-effect barrel updates under src/stores/{auth,chat,sidebar,user},
plus package-lock.json from npm install (required for lint/typecheck).

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-16 10:30:21 +08:00
admin 0548a08cbb feat: integrate Stripe payment with subscription plans
Add Stripe payment integration across the project:

- Add @stripe/stripe-js dependency
- Configure Stripe environment variables (secret key, publishable key, webhook secret) for dev, local, and production environments
- Add Product/Price IDs for monthly, quarterly, and annual subscription tiers
- Extend subscription plan data with voiceMinutesPerDay quotas (30/45/60 minutes per tier)
- Update .gitignore to exclude implementation_plan.md
2026-06-16 10:21:02 +08:00
Claude e88a99626d feat(subscription): add VIP subscription page
Add a new /subscription route showing three VIP membership plans (Monthly,
Quarterly, Annual) with a pink→peach banner, per-plan gradient price bars,
a benefits card, a mock activate CTA, and an agreement checkbox.

- New reusable <Checkbox /> in src/app/_components/core for the legal
  agreement toggle
- Hardcoded SUBSCRIPTION_PLANS constant in src/data/constants
- New SubscriptionScreen composed of 7 colocated components (back link,
  user row, banner, plan card, benefits card, CTA button) with CSS
  Modules matching the existing design-token system
- Route registered as protected and reached from /sidebar "Membership"
- Mock CTA: window.alert + router.push(/chat) — no payment calls

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-15 17:49:15 +08:00