Files
Jyotisha/docs
ClaudeandClaude Fable 5.2 21ff01b283 feat(account): top-up admin switch, faster 账户与点数, user credit ledger API, avatar upload server side (BUG-2057)
- 「充值」 is an admin switch (billing.purchase on the 功能开关 page, off until
  turned on, existing permission and audit). Open = switch on and gateway
  usable; the answer rides on the account payload as paymentOpen. Closed: no
  packages request, no purchase tabs, empty product list, orders refused.
- The billing panel chunk is prefetched while idle and when a settings
  section opens; the packages route reads its three inputs in one round; a
  same-height line holds the place while the list is unknown.
- GET /api/account/credit-ledger: the caller's own rows (read as the user,
  filtered by the session id), 20 per page with a cursor, all/in/out/redeem,
  reader names only, free turns hidden, links only to owned reports/sessions.
- Avatar upload server side: PUT/GET/DELETE /api/account/avatar/image, JPEG
  or WebP, square up to 256, 200 KB, type and size read from the bytes,
  rate-limited; stored in profile_avatar_images (owner-only RLS, migration
  20261120100000); account payload carries only avatarImage.version.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-20 10:48:03 +08:00
..
…