Commit Graph

48 Commits

Author SHA1 Message Date
Codex ed3b34ce1c refactor(private-zoom): rename full feature surface 2026-07-22 18:21:47 +08:00
admin 37ff69020b feat(tip): support dynamic gift products 2026-07-21 13:19:45 +08:00
admin 17e5656f53 docs(architecture): consolidate domain protocols 2026-07-21 10:08:12 +08:00
admin 8580042c26 fix(auth): remove Facebook email permission 2026-07-20 17:04:59 +08:00
admin 4d1c85727a refactor(chat): remove guest history synchronization 2026-07-20 14:02:39 +08:00
admin b6fdc912ae feat(chat): sync multi-role backend APIs 2026-07-20 11:29:54 +08:00
admin 8bb1e21886 fix(chat): isolate pending flows and cancel stale requests 2026-07-20 10:31:27 +08:00
admin b3ebd5cf3b feat(characters): use local character catalog 2026-07-17 16:03:18 +08:00
admin ae97366a4a refactor(data): replace schema classes with readonly models 2026-07-17 13:21:40 +08:00
admin eac3d8f0a7 refactor(data): merge DTO models into schemas 2026-07-17 12:47:18 +08:00
admin 2796010971 feat(characters): support character-scoped conversations 2026-07-17 11:42:31 +08:00
admin 19d36ed5bf refactor(data): establish API contract guardrails
CI / Quality and Bundle Budgets (push) Has been cancelled
2026-07-16 20:09:30 +08:00
admin 37f45f0736 feat(feedback): add problem reporting flow 2026-07-16 18:30:34 +08:00
admin 836ae95940 refactor: canonicalize TypeScript and Tailwind syntax 2026-07-14 19:06:47 +08:00
admin 0033625866 perf(bundle): replace broad storage and utils imports 2026-07-14 18:13:55 +08:00
admin 759481b621 refactor(schemas): group network schemas by direction
Move request and response schemas into matching subdirectories, extract the shared chat lock type, and update barrels and imports without changing wire formats.
2026-07-14 15:12:19 +08:00
admin 538af6d45f feat(private-room): migrate to album APIs 2026-07-14 12:30:22 +08:00
admin 3a4f24cb06 feat(payment): implement coffee tip plans and update payment flow 2026-07-14 11:48:46 +08:00
admin 225d232763 fix(auth): handle logout and refresh results
Propagate storage Result failures through logout, guest restoration, token refresh, and user state actors. Clear invalid sessions after failed automatic refreshes and cover both business and guest flows.
2026-07-13 17:23:54 +08:00
admin 53801490e5 feat(auth): add facebook identity psid login 2026-07-10 17:10:55 +08:00
admin e421192560 feat(auth): rename external ids to asid psid 2026-07-10 11:54:10 +08:00
admin c46b9b4cdd feat(private-room): connect moments feed
Docker Image / Build and Push Docker Image (push) Successful in 9m29s
2026-07-08 16:29:08 +08:00
admin 9cb9534459 refactor(dto): group request and response models
Docker Image / Build and Push Docker Image (push) Successful in 2m50s
2026-07-07 16:43:08 +08:00
admin b5bf81de59 refactor(api): remove unused network endpoints 2026-07-07 16:29:21 +08:00
admin 8a586e4471 refactor(errors): classify auth and browser failures 2026-07-03 13:20:16 +08:00
admin 65d972fbb4 feat(errors): add centralized exception handling 2026-07-03 12:55:45 +08:00
admin 51987882eb fix(api): replay requests after token refresh 2026-07-02 12:08:56 +08:00
admin 5f94105bc6 fix(chat): update unlock response contract 2026-06-30 18:15:39 +08:00
admin 6e51cb7d16 Refactor: Remove original Dart references from comments across multiple files
- Updated comments in various components, schemas, and repositories to remove references to original Dart files.
- Ensured consistency in documentation while maintaining the context of the code.
2026-06-29 11:31:21 +08:00
admin 58cd2a7545 feat(user): sync entitlement snapshot 2026-06-29 10:37:37 +08:00
admin 455204e1e4 feat(chat): add history unlock api 2026-06-26 19:27:56 +08:00
admin 6bcc070ba1 refactor(chat): rely on server message limits 2026-06-23 11:20:48 +08:00
admin 1fc1635341 chore: wire release hook and service updates 2026-06-18 16:18:52 +08:00
admin 35c30ac31e feat(data): add paywall payment APIs 2026-06-18 14:55:54 +08:00
admin d190de4dda refactor(api): use dto barrel imports 2026-06-18 14:16:00 +08:00
admin 812a3e41b9 refactor(logging): centralize console output 2026-06-18 13:34:19 +08:00
admin 0a9abc2502 fix(auth): stop parsing logout response body (avoids ZodError on null data)
Root cause: backend `/auth/logout` returns `{ success: true, data: null }`
(no business payload for a fire-and-forget endpoint). The previous
`AuthApi.logout` ran `unwrap(env)` (which passes null through, since
null is defined) and then `LogoutResponse.fromJson(null)`, which
Zod-parses as `z.object(...)` and throws "Invalid input: expected
object, received null".

The error was caught in `AuthRepository.logout` with
`console.warn(... clearing local anyway)` — logout actually still
worked (local clear ran), but a noisy red ZodError hit the console on
every logout click.

Fix: align `AuthApi.logout` with the existing fire-and-forget pattern
used by `register` and `sendCode` — call `httpClient` and ignore the
response body. Drop the now-unused `LogoutResponse` import.

`AuthRepository.logout` already discards the return value, so the
`Promise<LogoutResponse> → Promise<void>` signature change is safe.

Bundled in this commit (unrelated):
- chat-machine.actors.ts / user-machine.ts: removed stale design-doc
  comment blocks (IDE/linter cleanup)
- user-machine.actors.ts: removed redundant `userStorage.clearUserData()`
  from `userLogoutActor` — `authRepo.logout` already clears local
  user data, so this was a no-op duplicate.
- sidebar-screen.tsx: removed one stale comment line.
2026-06-16 18:34:55 +08:00
admin 1449acd6c9 chore(barrels): regenerate barrel files via barrelsby
- Fix chat components barrel to properly export all component modules
- Remove interceptor exports from API services barrel
- Regenerate store barrel files (auth, chat, sidebar, user) using barrelsby
2026-06-15 17:53:15 +08:00
admin 7bc21c1864 chore(auth): add debug logging to guest login flow
Add console.log instrumentation across the guest login pipeline (auth-machine, authRepository, authApi) to trace request lifecycle and surface Zod parsing failures with detailed issue info. Useful for diagnosing lastMessageAt schema mismatches.
2026-06-12 16:21:21 +08:00
admin 0660b90809 fix:无法设置token的问题 2026-06-12 15:55:50 +08:00
admin d4cb40a74b chore: migrate contexts to stores and refresh barrel exports
- Move state management from `src/contexts` to `src/stores` (zustand-based)
- Update barrelsby config to include new stores directory
- Add bottom-sheet and auth-background components
- Auto-open browser on dev server ready in VS Code launch config
- Refresh generated barrel index files
2026-06-11 09:35:26 +08:00
admin a4b902893e refactor(auth): migrate social login to next-auth 2026-06-10 10:26:45 +08:00
admin 016bc6fd2c fix:修复所有的包导入错误问题 2026-06-09 18:30:49 +08:00
admin 6e64ed35f4 chore(deps): add unstorage and migrate ChatStorage to use SpAsyncUtil 2026-06-09 18:13:55 +08:00
admin 50940961ec refactor(data): move dto and schemas out of services directory 2026-06-09 17:11:11 +08:00
admin 372b93fe45 chore: regenerate barrel files for contexts and services
Add auto-generated barrel index files for auth, chat, sidebar, and user contexts, and update the services barrel with comprehensive exports for api, dto, and schema modules to streamline imports across the application.
2026-06-09 16:54:13 +08:00
admin 661e417619 refactor(data): consolidate data layer under services namespace
- Move src/data/{api,dto,schemas} directories to src/data/services/*
- Update all relative imports across the codebase to reference new paths
- Use CSS color tokens for splash button gradient in splash-button.module.css
- Add responsive sizes attribute to splash background image
- Add JSDoc documentation to splash-background component referencing original Dart implementation
2026-06-09 16:44:05 +08:00
Claude b362945195 feat(auth): migrate Flutter IAuthPlatform to Next.js 16 SDK service layer
Adds the third-party social login SDK integration layer (Google + Facebook),
mirroring the Flutter `IAuthPlatform` interface from
`lib/data/services/auth/`. The platform produces identity tokens only; callers
use the existing `authRepository.googleLogin / facebookLogin /
facebookIdLogin` (already migrated) to complete the login.

Architecture (event-bridge pattern):
  - `IAuthPlatform` is plain TypeScript (no React dependency)
  - `WebAuthPlatform` dispatches DOM `CustomEvent`s; `AuthPlatformBridge`
    ("use client" component) hosts the React SDK hooks and resolves promises
  - `MockAuthPlatform` returns hardcoded tokens when
    `NEXT_PUBLIC_USE_MOCK_AUTH=true` (mirrors Dart `kDebugMode` branch)

SDK choices:
  - `@react-oauth/google@0.13.5` for Google
  - `@greatsumini/react-facebook-login@3.4.0` (maintained fork of
    archived `react-facebook`, React 19 compatible) for Facebook
  - For Google: uses raw GIS `google.accounts.id.initialize` + `prompt` API
    since `@react-oauth/google` does not expose an `id_token` flow variant
    (existing `GoogleLoginRequest.idToken` field expects JWT id_token)

Files added:
  - src/data/services/auth/{auth_platform,web_auth_platform,
    mock_auth_platform,auth_event_bridge,auth_bridge_component,
    initialize_google_auth,initialize_facebook_auth,global.d.ts,index}.ts(x)
  - src/data/schemas/auth/facebook_user_data.ts (Zod schema)
  - src/data/dto/auth/facebook_user_data.ts (DTO class)

Files modified:
  - package.json, pnpm-lock.yaml: added 2 deps
  - .env.example: 4 new NEXT_PUBLIC_* env vars
  - barrelsby.json: registered src/data/services[/auth] directories
  - implementation_plan.md: appended third-party auth section
  - src/data/dto/{auth,chat,metrics,user}/index.ts: regenerated barrels
  - src/data/schemas/{auth,chat,metrics,user}/index.ts: regenerated barrels

Files deleted:
  - src/data/storage/index.ts: pre-existing TS2308 conflict (sync + async
    `AuthStorage` both re-exported from auto-generated barrel; no consumer
    uses the barrel — all imports use direct paths)

Scope (per user direction):
  - Client SDK integration only; no React hook/context, no UI, no Apple
  - Platform produces tokens; caller drives `authRepository` / `authApi`
  - v1 single-popup semantics (concurrent popups overwrite)
  - Bridge component is code-ready but NOT mounted in
    `src/app/layout.tsx`; next-step UI migration wires the provider chain

Verified: `npx tsc --noEmit` (0 errors), `pnpm lint` (0 errors),
`pnpm build` (Next.js 16.2.7 + Turbopack compiled successfully).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-09 11:13:14 +08:00