docs(pay-v2): 开发决策日志 step3-4(客户端落地 + 集成测试)
ci-pangolin / Lint — shellcheck (pull_request) Successful in 10s
ci-pangolin / Redline Scan — 脱敏 (UI 文案) (pull_request) Successful in 25s
ci-pangolin / Cleartext Scan — Android 禁明文 (pull_request) Successful in 16s
ci-pangolin / Portable SQL — 可移植性 (mysql/sqlite) (pull_request) Successful in 17s
ci-pangolin / OpenAPI Sync Check (pull_request) Successful in 57s
ci-pangolin / Flutter — analyze + test (pull_request) Successful in 37s
ci-pangolin / Codegen Drift — token 生成物未漂移 (pull_request) Successful in 4s
ci-pangolin / DS-flow — 原型/跨端同源/代码色单源闸 (pull_request) Successful in 3s
ci-pangolin / Go — build + test (pull_request) Failing after 12s
ci-pangolin / E2E Smoke — L4 进程级端到端 (pull_request) Failing after 11s
ci-pangolin / Go — integration (mysql/redis testcontainers) (pull_request) Failing after 4m49s
ci-pangolin / Golden — 视觉回归 (全量:components/auth/desktop/tablet) (pull_request) Failing after 20s
ci-pangolin / Lint — shellcheck (pull_request) Successful in 10s
ci-pangolin / Redline Scan — 脱敏 (UI 文案) (pull_request) Successful in 25s
ci-pangolin / Cleartext Scan — Android 禁明文 (pull_request) Successful in 16s
ci-pangolin / Portable SQL — 可移植性 (mysql/sqlite) (pull_request) Successful in 17s
ci-pangolin / OpenAPI Sync Check (pull_request) Successful in 57s
ci-pangolin / Flutter — analyze + test (pull_request) Successful in 37s
ci-pangolin / Codegen Drift — token 生成物未漂移 (pull_request) Successful in 4s
ci-pangolin / DS-flow — 原型/跨端同源/代码色单源闸 (pull_request) Successful in 3s
ci-pangolin / Go — build + test (pull_request) Failing after 12s
ci-pangolin / E2E Smoke — L4 进程级端到端 (pull_request) Failing after 11s
ci-pangolin / Go — integration (mysql/redis testcontainers) (pull_request) Failing after 4m49s
ci-pangolin / Golden — 视觉回归 (全量:components/auth/desktop/tablet) (pull_request) Failing after 20s
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013nMthbVEmQquxBRKb9Fj8u
This commit is contained in:
@@ -26,3 +26,21 @@
|
||||
- main.go:注册 `GET /v1/pay/orders`。
|
||||
- 测试:新增 List 越权/倒序/富字段、下单展示金额分币种、详情富字段;**修 3 个 pre-existing 迁移测试**(renumber 21→23 遗留)。`go test ./...` 全绿。
|
||||
- 决策:USDT 展示价放服务端 catalog($4.99/$12.99/$34.99),客户端 switch 直接读,不硬编码;实际扣款仍以 pay 侧为准。
|
||||
|
||||
## [step3] 客户端 Flutter 落地(2026-07-11)
|
||||
- 探查结论:购买/支付主干已存在(Riverpod + payment_api + payment_page 多态渲染);缺订单列表/详情整链 + 购买页 segswitch/分币种。
|
||||
- **锁定共享契约(主 agent 手写,防并行冲突)**:
|
||||
- models/payment.dart:`PayChannel{usdt,cny}`(.currency/.method);`PayCatalogItem.priceUsdtMicro` + `priceLabel(ch)`/`perMonthLabel(ch)`/`months`(**priceLabel 改带参**);新 `PayOrderSummary`;`PayOrderStatus.summary` 富字段。
|
||||
- payment_api.dart:`listOrders()`。
|
||||
- l10n:+19 getter(支付渠道 switch 4 + 订单 15)×6 语言,l10n 闸绿(209×6)。
|
||||
- StatusPill 复用(created→connecting/等待付款、paid→connected/已开通、canceled→neutral/已取消)。
|
||||
- **两 agent 并行建屏**:A=SegSwitch widget + purchase_page 重构(渠道 switch 置顶、分币种价、删底部弹窗) + payment_page 订单卡;B=orders_provider + orders_page(列表+详情) + 导航(NavView.orders + desktop_shell + account 入口)。
|
||||
- 决策:USDT 展示价由服务端 catalog 下发(不客户端硬编码);「继续支付」MVP 走购买页重下单(retry-resume 列为后续)。
|
||||
|
||||
## [step4] 集成 + 测试 + 提交(2026-07-12)
|
||||
- 整体 `flutter analyze` 0 error(3 个 pre-existing info:withOpacity×2 + unused import)。
|
||||
- `flutter test` 226 全绿:修 priceLabel 带参、假 API 补 listOrders、购买页测改成默认 USDT+切 CNY 断言、新增订单列表/空态/详情测试、golden 重录(icon 迁移+账户订单入口+连接键 loader)。
|
||||
- 服务端 `go test ./...` 全绿。
|
||||
- l10n 19 getter ×6 语言补 @override,check-l1-sync 绿(209×6)。check-ds 绿。
|
||||
- **提交**:a5adbf3 server / f6ce526 design / 272eca0 client。→ push + draft PR。
|
||||
- 遗留(非阻塞,明日可议):订单「继续支付」走重新下单(非 retry-resume);订单无 expired 本地态;`local-l13-start.sh` 是本地联调脚本(含 throwaway 密钥)不入 git。
|
||||
|
||||
Reference in New Issue
Block a user