Commit Graph

53 Commits

Author SHA1 Message Date
浅念 91c85e196a feat(viewer,ui04): E05 realtime hearts + effect-demo alignment (initial offset, heart params, decode gate, bidirectional manual scroll)
- reactions.ts pure fns: delta->hearts sampling, burstId dedupe (TTL/capacity), pending-visible cache (5s/50), 250ms emission throttle with merge
- useEmbedReactions: read-only RealtimeClient subscription on album.publicToken (no viewer-page side effects, A15), rebind teardown, 10s grace disconnect, no fake bubbles on WS failure
- ReactionLayer: demo-frozen heart effect (12/16/20 sizes, two colors, 110px rise, 1.6s ease-out, 300ms stagger, max 8, drop-shadow) in unscoped block (created elements lack scoped hash)
- demo alignment: initial offset 32px, decode+500ms startup gate, 1:1 drag, arrows +-40, focus-tip, bidirectional manual scroll (manualScroll), loader handle 100x44 exact styles, <=599px offset default 12
- tests: +8 reactions unit (244 viewer), e2e E05: real cross-context like -> heart on correct photo (EMB-A09), zero likes/visits submission (EMB-A15), 16s hearts recording

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-22 17:38:02 +08:00
浅念 ccf0c29659 docs(g4): test-server deployment evidence (230 users synced, ops notes)
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-22 17:14:31 +08:00
浅念 3a8a1cf69e docs(g4): real-key live sync evidence (230 users, idempotent, V1.1 credentials verified)
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-22 16:58:09 +08:00
浅念 e583575702 docs(g4): acceptance record for uniservice user source integration
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-22 16:51:58 +08:00
浅念 42878f115b docs(g4): uniservice open/v1/users API contract + implementation plan
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-22 16:21:26 +08:00
浅念 b353a3de06 fix(viewer): replace text arrow share icon with SVG share glyph
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-22 13:55:37 +08:00
浅念 9dbdb0084e docs(ui04): E04 acceptance record entry
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-22 13:28:26 +08:00
浅念 998565e439 feat(viewer,ui04): E03 continuous scroll engine — pure state machine, rAF orchestration, boundary continuity
- stream.ts: advanceStream (per-frame, dt cap 50ms), loop generation keys, window math (DOM<=16, queue<=30, 480px buffer), anchorRebuild (photo-position preserving), removePhoto, single-photo static
- useVerticalPhotoStream: rAF integration, direct transform writes (no per-frame Vue reactivity), low-frequency item sync, ResizeObserver re-anchor, stepForTest hook
- EmbedStream wired to engine; cycle copies aria-hidden; img error -> controlled drop
- tests: 14 unit cases (236 viewer total), e2e: 32px/2s speed, boundary continuity <2.5px, DOM<=16 over 20s, 32s recording with loop boundaries

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-22 13:19:21 +08:00
浅念 1d1979f540 feat(viewer,ui04): E02 static fidelity — real photo fixtures, measured shell/photo/collapse specs, edge fade
- fixtures: 8 picsum-seeded real photos (mixed ratios); seedPhoto thumbBytes/browseBytes injection
- e2e E02 block: wrapper shell (195x280/radius/border/#10161E), photo strip (193w, ratio-height, 3px gap), collapse (44/44 hit, 24 visual, sole button), desktop+mobile screenshots
- EmbedStream: top/bottom 12px dark fade (0.12, §2.3 optional item)
- fix(admin): pre-existing eslint globals gap for ElNotification (template drift, blocks lint gate)

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-22 13:01:34 +08:00
浅念 66d1eb3e9f feat(embed,ui04): E01 v2 contract skeleton — displayMode/scrollSpeed/reactionsEnabled, v2 loader entry and fixed 195x280 shell
- contracts: EmbedSlotSettings optional v2 fields (carousel default) + SlotSettingsPayload; gen + redocly green
- api: DTO validation + normalization full-set (cn manage + ov public projection share normalizeStoredSettings)
- embed-loader: params v2 parse/merge/url family, loader-v2.js fixed shell (border/radius/#10161E/safe-area, resize ignored, stack gap 12), dual-artifact build+sync; v1 source frozen
- viewer: EmbedPage v=2 branch, EmbedStream (viewport/track/real anchors/collapse/empty), stream.ts pure fns, i18n zh/en
- admin: types + utils (create default vertical-stream, clampScrollSpeed, v1/v2 snippet selection)
- tests: loader 36 (+9 v2), viewer 222, admin 82, api unit 51, v1 embed e2e 20, v2 E01 gate 2 (195x280 desktop+mobile cross-origin, no footer)

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-22 12:50:28 +08:00
浅念 f8dbc3ab9b docs(ui04): E00 baseline — design refs, plan, v1 measurements and record skeleton
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-22 12:08:40 +08:00
浅念 f435d7bfc3 docs: UI-03 acceptance record
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-22 03:16:21 +08:00
浅念 9d521ff9da docs(ui03): baseline screenshots and acceptance skeleton
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-22 00:10:50 +08:00
浅念 18c4c3cfbc docs(plan): UI-03 app redesign implementation plan
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-21 23:45:34 +08:00
浅念 2a489aa16a docs: UI-02 acceptance record and visual verification
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-21 23:10:58 +08:00
浅念 2cbd167cc0 docs(ui02): baseline screenshots and acceptance skeleton
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-21 21:09:03 +08:00
浅念 3327551f6b docs(plan): UI-02 viewer redesign implementation plan
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-21 21:01:59 +08:00
浅念 f31388c0c1 docs: UI-01 acceptance record and visual verification
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-21 20:15:36 +08:00
浅念 3b5f8d2d77 docs(ui01): baseline screenshots and acceptance record skeleton
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-21 13:08:57 +08:00
浅念 6754cd4d44 docs(plan): UI-01 implementation plan from spec analysis
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-21 12:56:35 +08:00
浅念 52d8a57751 docs(deploy): single-server dual-stack test deployment plan
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-21 10:27:02 +08:00
浅念 5cdf828ff5 docs: G1 gate closure recorded in master plan and P5 draft
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-21 10:17:16 +08:00
浅念 d01cecd2f6 docs: p5 preparation complete and implementation draft
- docs/plans/2026-09-21-P5-真实环境接入.md 草案(头部标注待 G5 凭证评审
  转正):T1-T12 任务序(每任务 产出/依赖用户输入/关口)——G1 OSS 冒烟→
  国内起栈→ov 部署+bootstrap 对账→域名证书→CDN(含图片加速三选一)→
  跨境 MySQL 通道定案(白名单+SSL/隧道/HTTP 化三选项,含改造量评估)→
  G4 用户源→故障演练→压测 D05→G2 真机→G6 试运行→发布交接;用户输入
  汇总表 + 决策 D03-D13 状态速查 + 风险表(跨境链路/双层签名/MySQL
  8.0.30 门槛/镜像仓库通道等)
- 总纲 P5 行注记:准备件完成 2026-09-21,实装待 G5 + G4
- P5-prep 计划全项勾选回填(评审项注明自审已修 + 独立 reviewer 由编排方追加)
- 自审修正:monitoring 统计副本表名(无 stat_snapshots 表,副本位在
  albums/photos 行)与 outbox_events.occurredAt/photo_jobs.updatedAt 列名、
  jq 管道括号;cdn 失效多 URL 换行分隔;k6 helpers 请求体用 ArrayBuffer
  原生形态、read-feed 身份串延迟生成(init 上下文 VU 编号恒 0)

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-21 01:56:56 +08:00
浅念 12059d9a0e docs(plan): p5 preparation plan
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-21 01:00:52 +08:00
浅念 22188ce3ee docs: p4b acceptance record
- P4b 验收记录(A11/A22 简化级/A23 组件/A12+T15 证据、偏差 16 项、
  P5 移交清单、测试统计 web 655 +66 / mobile 280 零漂移)
- 总纲 P4b 进度注记:P1-P4b 全部本地阶段完成,仅余 P5 真实环境接入
  (G5/G6 + D03/D05/D08/D09/D10/D13)
- P4b 计划勾选回填 + 完成头注

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-20 23:59:21 +08:00
浅念 e9a7dc8740 docs(plan): p4b review fixes (etag recipe, sandbox origin, narrow screen)
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-20 21:41:19 +08:00
浅念 ec7837ebb0 docs(plan): p4b implementation plan (pending review)
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-20 21:38:37 +08:00
浅念 17d09bbb01 docs: p4a acceptance record
P4a Task 10 收口:回归门全绿(web lint/typecheck/build 9/9 包任务,
单测 271 + e2e 318 = 589;mobile analyze 0 issue + 280/280 零漂移)。
验收记录含 A16/A17/A18/A20/A23/A29 证据、D06 工作默认登记、契约
增补汇总(36→51 operations + DOWNLOAD_DISABLED)、偏差 14 项、
G4 待真实接口清单(UserSourcePort 替换点 + D08 字段确认)。

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-20 21:21:08 +08:00
浅念 6723a0ce88 docs(plan): p4a implementation plan (approved)
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-20 16:39:03 +08:00
浅念 45d46518b1 docs(plan): p3 completion header note
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-20 15:23:45 +08:00
浅念 e484aa5427 docs: p3 acceptance record
P3 收口(Task 12):回归门全绿实测数字、MuMu 设备集成证据(阶段 1
十二腿 + 阶段 2 双场景,引用 it-logs 存档原文)、29+3 轮排障 13 根因
展开表、契约增补(password-change + sourceDeviceId)登记、G2 真机
清单(计划全量 + 集成期新增 5 项)、G3 引用 README-ios、偏差表(计划
内 13 + 计划外 5);总纲 P3 行进度注记(G2 待用户真机执行、D03 待确
认);P3 计划 Task 11/12 勾选。

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-20 15:21:49 +08:00
浅念 42e1c2e34b feat(mobile): ios background upload bridge (compile-gated at G3)
Swift 侧(协议与 Android UploadPlugin.kt 逐字一致,编译/真机留 G3):
- UploadBridge.swift:通道/方法/事件/失败码常量 + registerTask 参数解析
  (镜像 UploadProtocol.kt)
- UploadEventBus.swift:单调 seq + 终态 ack 缓存重放(镜像
  UploadEventBus.kt),iOS 增强——未 ack 终态落盘(系统后台拉起投递的
  回调在进程重启后同样重放,技术方案 §6.2 持久化原生回调)
- UploadTaskStore.swift:taskId→URLSession taskIdentifier 映射 plist 持久化
  (Application Support;对应 Android WorkManager 自持映射)
- UploadPlugin.swift:URLSession background
  (com.photolive.photo_live.uploads)+ delegate 失败分类(2xx→completed+etag
  / 403→needsRenew / 4xx→HTTP_4XX / 网络→重试上限后 NETWORK,镜像
  UploadPutExecutor/UploadWorker)、原生重试(5 次上限、10s 指数退避)、
  进度 500ms 节流、queryTask/cancelTask/ackEvents、静默取消
- AppDelegate.swift:implicit engine 通道注册 + 启动重建会话 +
  handleEventsForBackgroundURLSession completionHandler 暂存
- Info.plist:UIBackgroundModes 有意不声明(background URLSession 无需;
  计划措辞按技术方案 §6.2 修正,见 README-ios.md)
- project.pbxproj 登记新 Swift 文件;README-ios.md(Xcode 步骤 + G3 验证
  清单:实际文件上传/持久化回调窗口/服务端补偿/重启重联校准/强制退出/
  低电量延迟/100 张批量)

Dart:NativeTransport 选择矩阵并入 iOS(Platform.isAndroid || isIOS,
FORCE_DART_TRANSPORT 覆盖不变)——协议两侧一致,无新通道代码。

flutter analyze 0 issue;flutter test 219 全绿。

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-19 03:42:49 +08:00
浅念 d96e56f653 feat(mobile): drift upload task store with state machine
- upload_tasks 表(accountId 隔离 + 三个复合索引)、状态列枚举转换器、
  datetime 文本落库(UTC 归一,亚秒精度)
- 纯状态机(task_state.dart):合法迁移表 + canTransition/assertTransition,
  completed/cancelled 终态
- TaskStore 仓储:create(clientTaskId 同账号同相册应用侧唯一)、
  updateState(迁移守护+旁路字段)、账号隔离读路径(硬守护)、
  countsByState 徽章、cleanupCandidates/markCleanable(仅终态可清理——
  评审缺口 1 硬守护,未完成源文件永不清理)
- 测试 26 例(状态机表驱动全边 + 守护/隔离/筛选/保留策略);
  sqlite3 3.x build hooks 在 flutter test 宿主与 Android APK 构建均验证
  (libsqlite3.so 已打包全 ABI,运行时验证留 Task 11)

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-19 02:12:39 +08:00
浅念 5879552ecb docs(plan): p3 flutter app plan (approved; review fixes applied)
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-18 23:30:58 +08:00
浅念 79eb975096 docs: p2 acceptance record
P2 Task 12: 验收记录(A09/A10/A14/A21 部分/A26/A27 仿真级 + A25 部分
本地直读证据;D07/D11 初值确认——30min 浏览窗口、2s 推送/5min 对账/
60s 回传建议维持待 P5 实测冻结;13 项偏差登记;P4a/P5 移交清单;回归
门实测统计——全仓 448 测试绿)+ 总纲 P2 行进度注记。

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-18 20:17:54 +08:00
浅念 3d6e9ce175 feat(ov): ov schema, entry skeleton and compose profile
P2 Task 2 ov 数据层:
- compose ov profile:mysql-ov(mysql:8.4,127.0.0.1:3309,库级
  utf8mb4_0900_bin)+ redis-ov(6381),cn 侧默认 up 不受影响
  (3307/3308 已被其它本机项目占用,端口决策 3309)
- @photo/db-ov:9 表 schema(albums_ov/photos_ov 副本、sync_inbox/
  sync_state 同步账本(水位行同表标志位)、like_batches/album_stats/
  visit_sessions/visit_requests 互动域、outbox_stat_events 回传队列);
  迁移 20260918060102_init_ov 走固化校对手决流程,information_schema
  复核全部业务表/列 utf8mb4_0900_bin(_prisma_migrations 同 cn 先例
  保持 unicode_ci)
- generator 独立 output(包内 generated/):pnpm 将两包 @prisma/client
  提升为同一 store 实例,默认 .prisma/client 输出会被双 schema 互相
  覆盖,ov 客户端独立产出经 src/index.ts 转出口
- ov 入口骨架:main-ov.ts(PORT_OV 默认 8081)+ app-ov.module.ts
  (仅管线骨架 + /v1/health,feature modules 后续任务装配);logger
  装配选项抽取至 shared/logger-options.ts 供 cn/ov 双入口共用(行为
  不变,P1 套件守护)
- test/reset-ov.ts:ov 库 truncate-if-exists 隔离工具(无 MinIO 清理)
- 根脚本:db:generate 双库齐跑,新增 db-ov:migrate/db-ov:generate/dev:ov

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-18 14:11:41 +08:00
浅念 a4b95abd4c chore(plan): mysql-ov host port 3309 (yunke-mysql occupies 3307; user decision)
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-18 13:51:43 +08:00
浅念 24327c5147 feat(contracts): p2 realtime, likes, visits and internal sync contracts
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-18 13:34:35 +08:00
浅念 06111e1466 docs(plan): p2 implementation plan (approved, both review gaps fixed)
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-18 13:19:52 +08:00
浅念 b5145d6860 docs: p1b acceptance record
- P1b-验收记录.md: A08 (viewer.spec + journey), A12 partial (viewer
  i18n switch/fallback + admin template i18n; data-lang is P4b), R09
  (assets.e2e + admin upload + viewer render + journey banner), P1a
  final-review 4 items registered (47fb81a, absent from P1a record),
  9-row deviation table (ports 5175/5176 + cms conflict disclosure,
  staff-wide account lookup, art-design-pro v3.0.2 pin + lint ignore,
  no thumbnails in AdminPhoto, session-scoped banner preview,
  errorCode/pending_upload omissions, useCursorList, esbuild
  onlyBuiltDependencies), P2 handover, per-package test stats
- master roadmap: P1 fully complete (P1a + P1b), tag p1; G1 formally
  registered as skipped (no OSS credentials provided)
- P1b plan: all task checkboxes marked with completion notes

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-18 12:56:59 +08:00
浅念 62382eca3c docs(plan): p1b implementation plan (approved with advisory fixes)
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-18 08:05:06 +08:00
浅念 43de31ffda docs: p1a completion markers in plan and master roadmap
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-18 00:14:23 +08:00
浅念 8a09001525 docs: p1a acceptance record
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-18 00:06:44 +08:00
浅念 368b1d5b47 feat(api): argon2 password, idempotent admin seed, api-exception infra
Task 12 + Task 7 quality-review carryovers:

Part A - password hashing & controlled initial admin:
- src/auth/password.ts: hashPassword/verifyPassword over @node-rs/argon2
  (napi prebuilt, argon2id default); empty plain rejected at the door
- src/scripts/seed-admin.ts: idempotent admin seed (ADMIN_ACCOUNT/
  ADMIN_PASSWORD env, walk-up root .env load); existing account -> skip,
  never overwrites the password; no audit_logs (system op, no actor)
- pnpm seed script (build + node dist/scripts/seed-admin.js);
  .env.example dev defaults admin/admin-secret-change-me
- tests: test/password.spec.ts (5), test/seed.spec.ts real-DB idempotency (4)

Part B - Task 7 carryovers (all 8):
- ApiException(apiCode, message, httpStatus, details?) recognized first by
  the filter; unmapped-status rule: >=500 -> INTERNAL_ERROR + generic
  message, <500 -> VALIDATION_FAILED keeping original status (warn-logged)
- 5xx/INTERNAL_ERROR responses forced to generic message (leak fix)
- pino redact adds req.headers.cookie / res.headers.set-cookie
- x-request-id echo capped at 128 chars (fresh UUID beyond, no log)
- LOG_LEVEL validated against pino levels at module wiring -> fail fast
- shared/ constants (API_PREFIX), request-with-id, log-level (+spec)
- jest ts-jest reuses tsconfig.json; unit testMatch includes test/*.spec.ts
- build:watch script (no concurrently dep; dev = build:watch + node --watch)

api: 35 unit + 10 e2e tests green; root lint/typecheck/test green.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-17 20:54:30 +08:00
浅念 a99b8f200b feat(api): album domain schema
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-17 20:05:09 +08:00
浅念 7d250ec342 feat(api): cn-app skeleton, toolchain, env loading convention
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-17 19:14:41 +08:00
浅念 f77ab5ae4b feat(contracts): outbox event contract types
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-17 18:18:06 +08:00
浅念 f6448bd006 fix(contracts): quality review fixes for p1a contracts
- status enum active|archived -> active|offline (align requirement docs)
- UploadSessionState session-state semantics documented (no failed state)
- maxLength: clientTaskId 128 / filename 255 / cursor 512
- PublicPhoto width/height required (layout placeholders)
- reusable Unauthorized/InternalError responses (hybrid with inline op-specific codes)
- PublicAlbum.translations -> translation (single resolved object)
- contentType enum [jpeg/png/heic] (heic provisional pending G2)
- minLength 1 on title/name; publicToken pattern ^[0-9a-z]{20,32}$
- CursorPageMeta hasMore/nextCursor invariant documented
- public locale: silent fallback to defaultLocale (tech doc section 11)
- plan: upload_sessions state comment aligned; P1b adds management photo list + account lookup endpoints

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-17 18:06:54 +08:00
浅念 1dae00eaef feat(contracts): p1a endpoint contracts
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-17 17:31:11 +08:00
浅念 9dc530feaf docs(plan): record M0 completion (tasks 1-3, port conflict resolution, quay.io deviation)
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-17 16:50:43 +08:00