Merge dev into main: CREEM payment, performance optimization, deploy updates #8

Merged
qzl merged 32 commits from dev into main 2026-05-11 19:16:18 +08:00
Owner

Summary

  • CREEM web payment integration for credits purchase
  • Web performance optimization pass
  • Deploy documentation updates
  • Multiple bug fixes and UI improvements

Key Changes

  • feat: integrate CREEM web payment for credits purchase
  • perf: optimize web data resources and performance
  • fix: redirect root to /en/ instead of /zh/
  • fix: resolve legal/about pages in production
  • fix: infinite session creation loop, sign image animation
  • feat: add settings sub-pages and authenticated app shell
  • feat: rebuild web with Astro 6 + React 19 + Tailwind 4

Test plan

  • CI/CD build passes
  • Backend image deploys to production
  • Health check returns {"status":"ok"}
  • CREEM payment flow works on production
## Summary - CREEM web payment integration for credits purchase - Web performance optimization pass - Deploy documentation updates - Multiple bug fixes and UI improvements ## Key Changes - feat: integrate CREEM web payment for credits purchase - perf: optimize web data resources and performance - fix: redirect root to /en/ instead of /zh/ - fix: resolve legal/about pages in production - fix: infinite session creation loop, sign image animation - feat: add settings sub-pages and authenticated app shell - feat: rebuild web with Astro 6 + React 19 + Tailwind 4 ## Test plan - [ ] CI/CD build passes - [ ] Backend image deploys to production - [ ] Health check returns `{"status":"ok"}` - [ ] CREEM payment flow works on production
qzl added 32 commits 2026-05-11 19:16:13 +08:00
- Add PrivacyInfo.xcprivacy for Apple privacy manifest requirement
- Remove debug permissions (NSLocalNetworkUsageDescription, NSBonjourServices)
- Replace launch image with custom branding
- Update StoreKit config with real Apple ID and team ID
- Remove placeholder disclaimer from login screen, fix checkbox alignment
- Add ExportOptions.plist for IPA export
Update .gitignore to only exclude xcuserdata instead of entire
Runner.xcodeproj directory, ensuring pbxproj is version-controlled.
Static HTML product site for MeeYao with violet brand theme.
Supports EN/简中/繁體 via client-side i18n with localStorage persistence.
Includes index.html (landing page) and privacy.html (App Store compliance).
Hosted on meeyao.com, deployed to ~/deploy/web on EC2.
- Remove legacy .opencode/ directory and configuration
- Update .trellis/ to v0.5.0-rc.6 structure
- Refactor scripts: modularize common/, remove multi_agent/
- Add new common modules: git.py, io.py, log.py, types.py, etc.
- Update workflow.md and AGENTS.md
- Archive completed migration tasks
Replace static HTML website with Astro SSG framework:
- Astro 6 + React 19 (client islands) + Tailwind CSS 4 + shadcn/ui
- i18n: zh/zh_Hant/en with URL prefix routing
- Pages: Landing, Features, Pricing, About, Privacy, Terms (3 locales)
- Responsive full-width layout with scroll reveal animations
- Cyber gradient theme with particle effects inspired by Kimi
- Features page: alternating layout with hexagram illustrations
- Legal pages: markdown rendering with side info card
- Language switcher preserves current page path
- Assets shared via symlinks to web/design/assets/ (no duplication)

Tech decisions documented in .trellis/spec/web/index.md
Task: .trellis/tasks/05-08-web-astro-react-tailwind-shadcn-ui
- Add GeneralSettingsPage for language, privacy, and notification settings
- Add FeedbackPage for user feedback submission with image upload
- Connect settings to backend PATCH /users/me/settings API
- Implement language preference sync between frontend and backend
- Update login flow to pass language preference and redirect based on user settings
- Add Astro entry pages for /settings/general and /settings/feedback routes
- Update sidebar navigation: language button links to general settings
- Fix account data card to link to profile page
- Remove "deletion" text from account data description
- 二级页面返回按钮导航到设置页而非路由栈上一页
- 通用设置开关等待后端响应后再更新 UI,失败时显示 toast
- 删除用户名/邮箱的硬编码默认值,使用 auth token 邮箱作为 fallback
- AppShell 侧边栏显示真实头像和用户名
- 页面加载时检查 URL 语言与用户偏好是否一致,不一致则重定向
- 老阳显示 ○ 符号,老阴显示 × 符号
- 未确认的爻显示灰色线,确认后显示紫色线
- 移除"待录入"/"老阴/少阳"等文字,改用符号显示
- 移除硬币选择区域的结果显示
- 修复硬币翻转动画:从 @keyframes 改为 CSS transition 实现双向动画
- 修复教程自动显示:将 setTutorialChecked 移入 setTimeout 回调,
  避免 useEffect cleanup 提前清除 timer 导致 setGuideStep 不执行
- 添加 AppShell UserSettingsContext 共享 userProfile
- 实现教程结束后调用 updateUserSettings 标记 manual_divination_shown
- 添加点击已确认爻进行编辑的功能 (editingIndex 状态)
- 确认爻后不再重置硬币状态
- 积分显示从硬编码改为读取 API 返回值
- 手机端教程使用 absolute 定位替代 fixed 避免滚动偏移
- 添加 isMobile 响应式状态追踪窗口大小变化
- 合并 DivinationResultPage 和 HistoryResultPage 为统一结果页
- 重写 HistoryFollowUpPage:API 加载历史消息、SSE 流式追问、配额管理
- 追问免费且限一次,输入框 UI 对齐设计稿(圆角容器+配额徽章+圆形发送按钮)
- 结果页追问状态根据线程消息数动态判断
- 历史列表筛选改为 9 类独立类型
- 提取 historyMessageToResultData 为共享函数,新增 enqueueFollowUpRun API
- 新增 auto_awesome/search/arrow_upward 图标
- 新增三语言 [id].astro、[id]/followup.astro、divination/result.astro 页面
主要更改:
- 重写 AutoDivinationPage 与 ManualDivinationPage 设计一致
  - 每爻单独摇卦(3秒/爻)
  - 完整教程系统(首次进入自动触发)
  - 确认弹窗显示积分信息
  - 统一时间选择组件样式
  - 移除返回按钮

- ManualDivinationPage 添加确认弹窗
  - 点击开始解卦显示积分确认
  - 添加中英文翻译

- 修复干支信息和空亡信息解析
  - 完善 HistoryAgentOutput 类型定义
  - 重写 historyMessageToResultData 正确解析嵌套 ganzhi 对象
  - 修复 DivinationProcessingOverlay SSE 数据解析

- 统一历史列表图标
  - 添加 hexagram 图标(六爻卦象抽象)
  - Dashboard 和 HistoryListPage 使用相同图标

- 修复 DivinationResultPage 追问导航 threadId
- 更新 AGENTS.md
- 添加 pnpm workspace 配置
- 归档任务文件
- AboutPage now reads from public/legal/{locale}/about_us.md
- LegalPage no longer depends on about translations, uses local maps
- Fixed email in LegalPage from ann@xunmee.com to feedback@xunmee.com
- Removed ICP number and wrong email from utils.ts about section
- Removed unused about section from Translations interface and all locales
- Fix DivinationProcessingOverlay infinite re-render loop by using refs
  for params/yaoStates/onError instead of direct effect dependencies
- Remove column headers from hexagram detail card (matching Flutter)
- Keep domain-specific terms (六神, 六亲, etc.) in Chinese for all locales
- Translate ganZhiInfo/wuXingWangShuai/ganZhiKongWang section titles to English
- Add sign image overlay animation on fresh divination result (scale + translate)
Replace abandoned iOS App Store route with CREEM Merchant of Record
payment integration for web-based credits purchase.

Backend changes:
- Add CreemClient for CREEM API communication
- Add CreemService for checkout creation and webhook handling
- Add creem_transactions table for payment tracking
- Fix webhook payload parsing (id, order.id, customer.id structure)
- Integrate with existing points ledger system

Frontend changes:
- Display dynamic prices from CREEM API
- Support decimal price formatting (e.g., $1.00)
- Add checkout flow with redirect to CREEM hosted page
- Change default locale from zh to en for international audience
- Update .env.example with production CREEM API URL
- Set SUCCESS_URL to meeyao.com/en/store
- Fix markdown file path resolution for SSR production builds
- Try multiple paths (public/legal, client/legal) for dev and prod
- Update deploy/README.md with frontend deployment instructions
- Document PM2, Nginx configuration, and port mapping
qzl merged commit 13b8e047c2 into main 2026-05-11 19:16:18 +08:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: qzl/eryao#8