Commit Graph

46 Commits

Author SHA1 Message Date
admin 7bd5defa5e refactor(characters): drive shared UI from active character 2026-07-20 10:31:27 +08:00
admin 4e1f967e4a Revert "feat(payment): show Stripe logo in method selector"
This reverts commit 3aefbef259.
2026-07-17 18:33:21 +08:00
admin 3aefbef259 feat(payment): show Stripe logo in method selector 2026-07-17 18:32:37 +08:00
admin b22db6d147 feat(payment): share payment method selector 2026-07-17 18:27:24 +08:00
admin b3ebd5cf3b feat(characters): use local character catalog 2026-07-17 16:03:18 +08:00
admin 2394f9031a refactor(assets): relocate character avatars 2026-07-17 14:30:11 +08:00
admin 836ae95940 refactor: canonicalize TypeScript and Tailwind syntax 2026-07-14 19:06:47 +08:00
admin 5bec04a970 refactor(payment): share checkout dialogs 2026-07-14 18:23:08 +08:00
admin df6bb663c1 refactor(chat): reuse fullscreen back button 2026-07-14 16:54:26 +08:00
admin 81d6489978 feat(analytics): add behavior and payment funnel tracking 2026-07-14 16:54:13 +08:00
admin d8cd05b228 feat(ui): refine home and private room navigation
Replace the floating bottom navigation with a full-width tab bar. Add splash press feedback and a neutral private room background.
2026-07-13 18:16:17 +08:00
admin 19857e8b9b feat(back-button): add dark variant and update tests for BackButton component 2026-07-13 16:10:10 +08:00
admin 51462660a4 refactor(app): migrate shared styles to tailwind 2026-07-13 15:46:28 +08:00
admin 34c6f5523c refactor(app): remove unused components 2026-07-13 14:02:27 +08:00
admin b89bde1b55 style(app): normalize tailwind utility syntax 2026-07-13 13:17:16 +08:00
admin 8e0c4ef95f refactor(app): remove scaffold and migrate input styles 2026-07-13 10:43:18 +08:00
admin da04eaa372 refactor(app): migrate small components to tailwind 2026-07-13 10:22:10 +08:00
admin bbe1825bb3 refactor(components): migrate shared styles to tailwind 2026-07-11 13:25:58 +08:00
admin 37fbcfa68e refactor(core): migrate fallback styles to tailwind 2026-07-10 18:45:35 +08:00
admin 098b675f44 refactor(ui): add shared character avatar 2026-07-10 18:35:17 +08:00
admin 7d29dbd72f refactor(app): migrate small styles to tailwind 2026-07-10 18:18:44 +08:00
admin 89e0fb687a chore(ui): remove unused components 2026-07-10 18:16:12 +08:00
admin 3f1e4a0936 refactor(core): share modal portal logic 2026-07-09 12:58:49 +08:00
admin 41d0c121b2 refactor(app): split page orchestration flows 2026-07-09 11:59:03 +08:00
admin 75aa084095 feat(app-bottom-nav): update styles and add variant support; integrate dark variant in SplashScreen
Docker Image / Build and Push Docker Image (push) Has been cancelled
2026-07-08 17:15:06 +08:00
admin 2704c7f307 feat(splash): add latest message entry 2026-07-08 17:05:36 +08:00
admin e5bfb4e373 style(responsive): finish responsive token migration 2026-07-03 11:19:27 +08:00
admin bb6ebbae7e style(responsive): migrate fixed UI sizes to tokens 2026-07-03 10:22:37 +08:00
admin 38d31572dd Refactor chat component styles for responsiveness and consistency
- Updated padding and margin properties across various chat components to utilize responsive design tokens, ensuring better adaptability to different screen sizes.
- Replaced fixed sizes with responsive variables for buttons, avatars, and bubbles to enhance UI flexibility.
- Adjusted font sizes to use responsive tokens, improving text readability on various devices.
- Standardized border-radius and other dimensions using CSS variables for a cohesive design language.
- Enhanced dialog and screen components with safe area insets for better compatibility with modern devices.
2026-07-03 10:07:49 +08:00
admin 34c8e2db4e feat: Implement responsive page layout components and CSS variables
- Added PageScaffold component for shared page layout with safe-area padding and scroll management.
- Introduced ResponsiveMobileShell for mobile canvas layout with customizable backgrounds.
- Created ScrollablePage component for scrollable content areas.
- Updated CSS styles for coins rules screen, sidebar components, and subscription sections to use responsive design tokens.
- Added viewport CSS variables provider to synchronize CSS variables with the visual viewport.
- Refactored breakpoints and dimensions for better responsiveness across devices.
2026-07-03 10:06:22 +08:00
admin ba6ce57e62 refactor(app): tighten feature boundaries 2026-06-30 14:50:31 +08:00
admin ef18500de3 feat(back-button): enhance button styles and add variant support; refactor back navigation in sidebar and coins rules screen 2026-06-29 14:54:03 +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 038b207964 feat(ui): add responsive mobile design tokens 2026-06-25 10:50:46 +08:00
admin 08c954903f fix(chat): improve in-app keyboard avoidance 2026-06-24 15:13:11 +08:00
admin bfbf7ee91a feat(app): improve payment and paywall UX 2026-06-24 10:02:22 +08:00
admin 67dcf97edc refactor(pwa): migrate from @ducanh2912/next-pwa to @serwist/turbopack
Next.js 16 ships Turbopack as the default bundler, but
@ducanh2912/next-pwa is webpack-only — the previous PWA setup
required `--webpack` on dev/build/"dev:proxy" scripts, accepting
a perf regression in exchange for working PWA install.

@serwist/turbopack (paired with the official 'serwist' package
and 'esbuild') is the Turbopack-native successor: it works with
the default bundler, no opt-out flag, and gives us a real TS
service worker source file we can read and edit.

What this commit does:

1. Swap deps in package.json:
   - Remove @ducanh2912/next-pwa
   - Add @serwist/turbopack, serwist, esbuild (all devDeps)
   - Drop --webpack flag from dev / dev:proxy / build scripts
     (Turbopack is restored as the bundler)

2. next.config.ts:
   - Replace withPWAInit wrapping with withSerwist named import
   - Update comment block to describe new architecture

3. New src/app/sw.ts: Serwist service worker source.
   skipWaiting + clientsClaim + navigationPreload + defaultCache.
   This file is compiled to a real SW at build time by Serwist.

4. New src/app/serwist/[[...slug]]/route.ts: catch-all Route
   Handler that serves the compiled SW at /serwist/sw.js plus
   Serwist's chunked runtime assets. Catch-all is required
   because Serwist serves multiple files under /serwist/.

5. src/app/layout.tsx: replace <SwRegister /> with
   <SerwistProvider swUrl="/serwist/sw.js"> from
   @serwist/turbopack/react. The provider handles registration
   + lifecycle internally.

6. Delete src/app/_components/core/sw-register.tsx: replaced
   by SerwistProvider.

7. .gitignore: add public/sw.js and public/workbox-*.js
   (defensive — these are build artifacts that change hash
   every build and shouldn't be committed).

8. Untrack public/workbox-3c9d0171.js: stale workbox runtime
   from the previous next-pwa build, hash is build-specific
   so it can never be regenerated correctly.

Not modified (intentionally):
- src/utils/pwa.ts: pure beforeinstallprompt browser-API wrapper,
  library-agnostic, stays as-is.
- pwa-install-overlay / pwa-install-dialog: install UI flow
  unchanged.
- public/manifest.json: still works; layout's metadata.manifest
  points at it.

Verification:
- pnpm install resolved cleanly (added 24 pkgs, removed 209)
- npx tsc --noEmit passes (EXIT=0)
- Serwist provides named exports, not default — withSerwist and
  createSerwistRoute are both named imports
2026-06-17 11:09:36 +08:00
admin 2acc005809 feat(pwa): wire up @ducanh2912/next-pwa + register SW in layout
PWA install flow was wired but unusable: pwaUtil.install() calls
deferred.prompt(), but Chrome only fires beforeinstallprompt when a
valid Service Worker is registered + a manifest is linked. The project
had both intent (manifest, usePwaInstall hook) but no live SW —
public/sw.js was a stale workbox build artifact from a previous
attempt with hardcoded chunk URLs that no longer matched any build.

What this commit does:

1. Add @ducanh2912/next-pwa@10.2.9 as devDependency.
2. Wrap nextConfig with withPWA({...}):
   - dest: "public" SW outputs to public/sw.js
   - disable: true skip SW generation in dev (HMR-friendly)
   - register: false don't auto-inject registration
   - workboxOptions.skipWaiting: true + clientsClaim: true — new SW
     takes over immediately
3. Add --webpack flag to dev/build/dev:proxy scripts.
   @ducanh2912/next-pwa is webpack-only; Turbopack (Next 16 default)
   doesn't load webpack plugins. Per user decision to accept the perf
   trade-off in exchange for a working PWA.
4. Delete stale public/sw.js (workbox will regenerate it at build
   time with the correct chunk URLs).
5. Add src/app/_components/core/sw-register.tsx: a no-UI client
   component that registers /sw.js in production. Mounted at the end
   of <body> in layout.tsx. disable: true means dev mode skips
   registration (no /sw.js to fetch anyway).

After this commit + pnpm build, public/sw.js is regenerated with
correct chunk URLs, registered on first prod load, and Chrome fires
beforeinstallprompt — usePwaInstall + pwaUtil.install() then trigger
the native install prompt end-to-end.
2026-06-16 19:36:03 +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
admin 674df49e24 style(sidebar): align /sidebar screen with Flutter original
Match the Dart lib/ui/sidebar/sidebar_screen.dart + profile_view.dart
exactly:
- White inner shell with 24px padding
- Back button row (arrow icon + "Back" text, no "Profile" header)
- Single "Other" section with one "Log out" row
- Drop profile card, Account/Data/Session sections, and Sign-in CTA

Match Flutter row visuals in the shared SettingsSection:
- Gray (#f5f5f5) rounded row pill on a white card
- 20px chevron, 1px rgba(61,49,74,0.5) divider
- Destructive color #ff6b6b, 14px/600 black section title

Add tokens: --color-settings-card-background, --color-settings-row-background,
--color-settings-divider, --color-chevron-icon, --color-destructive.

Wire the BlocConsumer listener equivalent: on currentUser transitioning to
null, dispatch ChatAuthStatusChanged + AuthReset and router.replace("/chat").

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-11 14:02:52 +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 0593920318 chore: cleanup unused exports and fix mobile shell background
- Remove unused CharacterIntro export from chat components index
- Drop stale JSDoc block from splash-screen server component
- Set mobile shell background to explicit black so the desktop area outside the 500px viewport is black instead of inheriting from parent
2026-06-10 18:18:03 +08:00
admin 90bb711a45 feat(auth): redesign auth UI to match Dart original
- Full-bleed bg_login.png background outside 500px MobileShell
- Facebook landing: logo + Facebook pill button + "Other Sign In Options" link
- Replace centered Dialog with true bottom sheet (drag handle, top radius 28px)
- Email panel: internal login/register toggle, no separate route
- Pink gradient primary button (#f96ADE → #f657A0)
- Pill input fields (46px, white, radius 24, pink 10% shadow)
- Pink circular checkbox + bold Privacy/Terms rich text (visual only, non-blocking)
- Floating 40x40 white back button (top:20/left:20)
- Wire AuthPanelModeChanged dispatch for panel switching
- New design tokens (--color-auth-*, --auth-*, --radius-bottom-sheet)
- New generic BottomSheet component
- Copy ic-logo-login.png (+@2x, +@3x) from Dart assets

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-10 14:29:30 +08:00
admin 199a14650e refactor(splash): encapsulate auth logic in SplashButton for SSR support 2026-06-09 18:59:34 +08:00
admin 50940961ec refactor(data): move dto and schemas out of services directory 2026-06-09 17:11:11 +08:00
admin cda55c8f9b refactor: relocate components to app directory structure 2026-06-09 14:43:10 +08:00