Commit Graph
185 Commits
Author SHA1 Message Date
yeuimu 0d2a954153 deploy(single-stack): 单栈收敛——v2 并入 deploy compose,v1 退役
- docker-compose.yml 重写为单栈 4 容器(admin 边缘 + v2-api/v2-admin/v2-postgres),
  v2 数据卷 deploy-v2_pgdata/uploads 以 external 引用,数据零迁移
- nginx:/uploads/ /assets/ 上游改 v2-api(product-center 覆盖块随之冗余移除),
  / 跳转 /v2/admin/;docker-compose.v2.yml 删除(血统已并入 develop)
- v1 api+postgres 已停用未删,终档/快照/回滚手册见 deploy/backups/consolidation-*/
- 切换验证:v2 库切换前后行数完全一致;/v2-api /public /v2/admin /v2/h5
  /assets 全路由冒烟 + 公网端到端通过
2026-09-03 02:09:24 +08:00
yeuimu a554b77379 fix(product-families): 热转印词表以 v2 为准——归因不再映射回烫画
合并冲突的行为级裁决:develop 侧 memberMatrixCombos 曾把 热转印→烫画
归一(旧别名方案),与 v2 线上一等公民词表(8903afd)矛盾,导致 v2 侧
三个矩阵用例失败。取 v2 版 family-recompute.service.{ts,spec}(即当前
线上行为)。另修复 v2 分支 structs.md 残留的冲突标记。

Tests: api 23 suites/217 passed (runInBand), admin 27 passed, tsc clean
2026-09-03 02:00:33 +08:00
yeuimu 5e69397adc merge: refactor/v2 完全并入 develop(v2 为准,v2 血统 20+ 提交收敛为主干) 2026-09-03 01:54:32 +08:00
yeuimu 37353470e7 fix(categories): 分类名去括号——同步入库整段删除括号段
左侧分类树/官网分类名的括号段(型号限定词(JSA002)与内容性括号
(黑+卡其)/(短裤 & 长裤))整段删除。分类名每小时被 SDS 同步覆盖,
清洗落在 syncCategories 入库路径(cleanCategoryDisplayName,款号 token
保留,剥空守卫),另附幂等存量脚本 fix:category-names。

已执行:V1/V2 各 33 条分类名去括号,复跑幂等 0。注意 api 容器重建
部署前旧镜像的下一轮同步会把名称写回原文,部署后自动恢复干净。

Tests: api 23 suites/206 passed(含新增 category-name.spec 7 例),tsc clean
2026-09-03 01:27:38 +08:00
yeuimu 9eafac7204 fix(goods): 商品展示名统一「品名 SKU」——剥 ASCII 型号限定词、纯款号补描述
左栏商品名显示成光款号(如 PLTK016)的根因是双层解析不一致:api 写路径按
首括号对解析产出「童装…(DTG180) PLTK016」,admin 展示解析按末括号取品名
误显示成 PLTK016。

- admin parseLinkName 对齐 api 首括号对解析 + 无 SKU 段中文品名守卫,
  cleanLinkName 剥离 ASCII 型号限定词(中文括号内容保留)
- api 新增 cleanGoodDisplayName/describePureSkuGoodName,接入 create/update/
  batchCreate(batchCreate 补上缺失的 normalize);纯款号按 SDS 分类名补描述
- 新增幂等存量修复脚本 fix:good-names(默认 dry-run,--apply 写库)
- 已执行:V2 栈 34 条限定词名、V1 栈 213 条原始链接名规范化,复跑幂等 0

Tests: api 22 suites/199 passed, admin 27 passed, tsc clean
2026-09-03 01:27:26 +08:00
yeuimu 0ffab120e9 merge: bugfix/category-name-parens-yeuimu into develop (分类名去括号) 2026-09-03 01:20:17 +08:00
yeuimu 814f45c5a3 fix(categories): 分类名去括号——同步入库整段删除括号段
左侧分类树/官网分类名的括号段(型号限定词(JSA002)与内容性括号
(黑+卡其)/(短裤 & 长裤))整段删除。分类名每小时被 SDS 同步覆盖,
清洗落在 syncCategories 入库路径(cleanCategoryDisplayName,款号 token
保留,剥空守卫),另附幂等存量脚本 fix:category-names。

已执行:V1/V2 各 33 条分类名去括号,复跑幂等 0。注意 api 容器重建
部署前旧镜像的下一轮同步会把名称写回原文,部署后自动恢复干净。

Tests: api 23 suites/206 passed(含新增 category-name.spec 7 例),tsc clean
2026-09-03 01:20:17 +08:00
yeuimu 39eb06b6a2 merge: bugfix/pure-sku-good-name-yeuimu into develop (商品名剥型号限定词 + 纯款号补描述) 2026-09-03 01:04:26 +08:00
yeuimu c3be8ab979 fix(goods): 商品展示名统一「品名 SKU」——剥 ASCII 型号限定词、纯款号补描述
左栏商品名显示成光款号(如 PLTK016)的根因是双层解析不一致:api 写路径按
首括号对解析产出「童装…(DTG180) PLTK016」,admin 展示解析按末括号取品名
误显示成 PLTK016。

- admin parseLinkName 对齐 api 首括号对解析 + 无 SKU 段中文品名守卫,
  cleanLinkName 剥离 ASCII 型号限定词(中文括号内容保留)
- api 新增 cleanGoodDisplayName/describePureSkuGoodName,接入 create/update/
  batchCreate(batchCreate 补上缺失的 normalize);纯款号按 SDS 分类名补描述
- 新增幂等存量修复脚本 fix:good-names(默认 dry-run,--apply 写库)
- 已执行:V2 栈 34 条限定词名、V1 栈 213 条原始链接名规范化,复跑幂等 0

Tests: api 22 suites/199 passed, admin 27 passed, tsc clean
2026-09-03 01:04:22 +08:00
yeuimu ae9901e6cc merge: bugfix/family-auto-merge-auth-cookie-yeuimu into develop (SKU 自动合并 + 掉线修复) 2026-09-02 18:40:22 +08:00
yeuimu f1e81872e7 fix(product-family): auto-merge SKUs after manual tag edits; fix session cookie path
问题2(SKU 无法自动合并,GBIU017 案例)四处叠加根因修复:
- 人工标签旧词「热转印」被封闭词表静默踢出合并矩阵 → CRAFT_TAG_ALIASES
  别名归一为「烫画」(矩阵归因与 CUSTOM 标签同路径生效)
- updateTags 缺任一定价维度组即整链掉出矩阵且人工接管后永不恢复 →
  缺啥补啥(按链接名派生补齐,人工勾选值不动,响应带 filledDimensionTags)
- autoGroup 只建新族从不并入已有族(产生 USIU005-2 类碎片)→ 并入已有
  autoManaged 同款族优先,无匹配才新建;同款仅人工锁定族则跳过并报告
- 名称回退分组键含物流备注,包邮/不包邮永不同组 → 新增族语义键
  familyNameKey(国家+品名+SKU),api/admin 两侧同构,合并默认勾选随之修复

附加:
- updateTags 后未归族链接自动并入匹配族(attachToMatchingFamily,响应带
  attachedFamilyId)
- 整理新增碎片族合并 consolidateFragments:纯碎片族并入带商品族并删除
  (保公开 goodId=族ID 稳定),带商品/覆盖价/人工锁定进人工复审报告
- admin:保存标签提示补齐明细,整理完成消息含并入/碎片合并/待人工数

问题1(后台频繁 Unauthorized 掉线):
- refresh cookie path '/auth' 与代理前缀(/api、/v2-api)不匹配导致浏览器
  永远带不上 refresh cookie → 两 cookie path 统一为 '/'
- v2 构建基址带尾斜杠 + 手工拼接产生 /v2-api//auth/refresh 双斜杠 404 →
  request.ts 规范拼接

测试:api jest 187/187、admin vitest 22/22、双侧 tsc 0 错误;
public.service 夹具改为自包含(不依赖共享库既有数据)。
2026-09-02 18:39:35 +08:00
yeuimu b81d944c38 docs(agent): add dimension-value onboarding lesson 2026-09-02 16:37:56 +08:00
yeuimu f09a629311 merge: add heat-transfer craft to matrix vocabularies 2026-09-02 16:34:27 +08:00
yeuimu 8903afdc82 feat(product-families): add heat-transfer (热转印) craft to matrix vocabularies
Append 热转印 to DIM_VALUES.craft so links manually tagged with the new
tag enter the price matrix (previously the closed vocabulary filtered it
out and the link's prices would silently disappear), and to
OPTION_DISPLAY_ORDER.craft so the button group renders it after 不打印.
No derivation rules changed: existing links are unaffected until an
operator explicitly tags them.
2026-09-02 16:33:41 +08:00
yeuimu fb85a56444 docs(plan): add heat-transfer craft tag feature plan 2026-09-02 16:31:26 +08:00
yeuimu 5f81b18388 docs(agent): add materialized-array order determinism lesson 2026-09-02 16:08:35 +08:00
yeuimu f828cc0bd9 merge: fix price-matrix option sort (canonical display order) 2026-09-02 16:05:05 +08:00
yeuimu a84b3b5daa fix(product-families): sort price-matrix option arrays by canonical display order
printCounts/crafts/logistics were materialized in first-encounter order
(originGoods had no orderBy), so the H5 print/craft/logistics button
groups rendered in an unstable, per-family arbitrary order. Add
OPTION_DISPLAY_ORDER (单面→双面, 烫画→直喷→不打印, 不包邮→包邮) and
stable-sort the aggregated arrays before materializing; out-of-vocabulary
free-text labels (e.g. 海运) sink to the end preserving encounter order.
Fix traversal order with orderBy id asc so recomputes are fully
deterministic. Add recompute:families script for one-off re-materialize.
2026-09-02 16:00:12 +08:00
yeuimu 1ffd73a1af docs(plan): add price-matrix option sort fix plan 2026-09-02 15:52:41 +08:00
yeuimu ae880ff346 docs(agent): add representative-row convergence lesson 2026-09-02 14:59:29 +08:00
yeuimu 26a5b08b56 merge: bugfix/public-goodname-representative (列表/首页族代表行对齐详情) 2026-09-02 14:58:59 +08:00
yeuimu 63820a3e6f fix(public): unify family representative selection with detail endpoint
List/home endpoints picked the family representative row via goods[0],
which drifted with the list sort parameter (cheapest under PRICE_ASC,
lowest id under DEFAULT ties), causing goodName and other
representative-derived fields to differ from the detail endpoint.
Extract pickFamilyRepresentative (goodPriority desc -> createdAt desc
-> id asc, same as getGoodByFamilyId) and use it in getGoods and
getHomeGoods grouping. Group ordering and API contracts unchanged.
2026-09-02 14:58:42 +08:00
yeuimu e34398a002 deploy(nginx): route /assets/product-center/ to v2 api for shared icons; ignore backups/ 2026-09-02 11:40:51 +08:00
yeuimu b32a5575df deploy(nginx): route /assets/product-center/ to v2 api for shared icons
沙特国旗等新增图标只需放入 v2 仓库 public 目录;nginx 按最长前缀把
product-center 静态资源转发给 v2 api,其余 /assets/、/uploads/ 仍走 v1。
同步沉淀 AGENTS.md:入口 nginx 真实挂载源在 v1 仓库、文件型 bind mount 的
inode 陷阱。
2026-09-02 11:19:49 +08:00
yeuimu a0ad6da9c7 chore(api): add Saudi Arabia flag icon 2026-09-02 11:01:11 +08:00
yeuimu 2bec7822f0 merge: feature/category-tree-sort (public goods style-order sorting) 2026-09-02 10:34:12 +08:00
yeuimu 76eb849b49 docs: record style-order semantics, container-run pitfalls and lessons 2026-09-02 10:33:54 +08:00
yeuimu bea0bf14d8 feat(api): order public goods by country > mid-category > style > priority 2026-09-02 10:27:23 +08:00
yeuimu 3ccddc5982 feat(api): backfill category/country sort order from reference table 2026-09-02 10:22:49 +08:00
yeuimu dc90712c4f feat(api): add sort_order column to categories 2026-09-02 10:16:29 +08:00
yeuimu d01c1e1b97 docs(plan): keep legacy tree as nav, treat sds leaves as style-order metadata, drop tree-switch tasks 2026-09-02 10:00:29 +08:00
yeuimu 3d431f8375 docs(plan): add backup/rollback section, fix backfill run channel and sink semantics 2026-09-02 09:36:17 +08:00
yeuimu 6973f863b5 chore: ignore local db snapshots (backups/) 2026-09-02 09:27:08 +08:00
yeuimu 88f60ba2e2 docs: add category-sort implementation plan (single categoryId, dual-path filter) 2026-09-01 19:26:50 +08:00
yeuimu 01fe444f93 docs: add category sort reference table (country > level2 > level3 order) 2026-09-01 19:00:24 +08:00
yeuimu 318f5c2a64 deploy(v2): update h5 build artifacts (new entry & products chunks) 2026-09-01 17:15:19 +08:00
yeuimu 5c5fb88f58 merge: refactor/v2 (v2 stack deploy, new h5 build, miniprogram assets) into develop 2026-09-01 16:30:43 +08:00
yeuimu 007ad2c831 deploy(v2): h5 build with base /v2/h5, admin dockerfile & nginx route, shared compose 2026-09-01 16:26:22 +08:00
yeuimu 60992cb3d9 deploy: new h5 build, /v2/h5 route, restore /v2-api & /public proxy
- replace deploy/h5 with latest h5 build (base /h5/)
- nginx: add /v2/h5/ passthrough to v2-admin
- nginx: restore lost /v2-api/ and /public/ proxy locations
- compose: join inkreach-shared network so v1 admin can resolve v2-admin
2026-09-01 16:21:45 +08:00
yeuimu 62f968c1c1 chore(api): add miniprogram static assets to /app/public (served at /assets/miniprogram) 2026-08-31 19:02:23 +08:00
yeuimu a5884c638c merge: fix/test-fixture-junk-badge into develop 2026-08-30 03:15:23 +08:00
yeuimu f55e7ba4bb merge: develop (fixture junk cleanup + badge text) into refactor/v2 2026-08-30 03:15:23 +08:00
yeuimu 674d38a9a7 fix(api,admin): stop test fixture junk leaking to shared dev DB; badge text x个配置
清理标签筛选里的「Upd {ts}-v2」空分组与原产品库树里的
「Tree Cat {ts}」垃圾分类——两者均为集成测试夹具残留:
- tag-groups spec「改名」用例把分组改成 -v2 后缀,afterAll 按原名
  删除永远漏掉它(累积 31 个空分组);修复:改名前把 v2 名一并登记
- origin-goods spec getTree 用例的 finally 先删 good,被
  goodOriginGood 外键限制挡住且错误被 .catch 吞掉,分类/商品/国家/
  链接全部残留;修复:先删引用行再删 good
- 已清库:31 个 Upd 空分组、Tree Cat 分类 + Tree Good 商品 +
  Tree Country 国家 + 2 条 tree-a/b 链接;复跑两 spec 复核零残留

左树一族一行徽标文案按用户反馈去掉「N 条链接」,仅显示「M 个配置」
(memberCount 字段保留在 DTO,悬浮弹层行为不变)

验证:tag-groups + origin-goods spec 13/13 绿且零残留;admin
vue-tsc 干净 + vitest 22/22
2026-08-30 03:15:18 +08:00
yeuimu 102d61c181 merge: develop (family composition badge) into refactor/v2 2026-08-30 03:07:21 +08:00
yeuimu 12882e7d5a merge: fix/family-composition-badge into develop 2026-08-30 03:07:20 +08:00
yeuimu a756c8c3c8 fix(admin,api): always show family composition badge N条链接·M个配置
按用户反馈(PLTM006 明明能查到配置数却不显示):左树徽标此前只在
同分类内 ≥2 个配置时才出现,单配置族一行上什么都不显示,而右树同族
链接都挂着绿色已配置徽标,两边数字对不上,反复造成「配置数没显示」
的误解。

- goods API:GOOD_INCLUDE 的 family 带 _count.originGoods,
  GoodDto.originGood.family 增加 memberCount(族成员链接数)
- admin:distinctByFamily 记录 linkCount;一族一行的徽标常显
  「N 条链接 · M 个配置」(链接数=族成员数,配置数=该族官网商品数),
  悬浮仍列出全部配置可打开
- 文档同步徽标语义

效果:PLTM006 行显示「4 条链接 · 1 个配置」(真值:4 条链接仅配了
1 个官网商品);PLTF026 的「4 条链接 · 4 个配置」同屏可对比,其中
4 个配置为历史同国家重复配置,建议另行清理。

验证:admin vue-tsc 干净 + vitest 22/22;api goods spec 18/18;
Prisma _count 查询实测返回 originGoods=4
2026-08-30 03:07:16 +08:00
yeuimu ab42cb49a3 merge: develop (block family re-config) into refactor/v2 2026-08-30 02:55:33 +08:00
yeuimu 5d089bdb43 merge: fix/block-family-reconfig into develop 2026-08-30 02:55:32 +08:00
yeuimu 49d28c8d4f fix(admin): block re-config for family-configured links
按用户反馈:族已配置后不允许再配置(撤回上一轮的「再配置」入口):
- 「配置」按钮仅在本链接及其同款族均未配置时显示(configuredCount
  与 familyConfiguredCount 均为 0),族已配置的链接只显示「同款已配置」徽标
- openConfigModal 增加统一拦截(按钮与右树拖拽两条路径都覆盖):
  已配置/族已配置的链接弹出警告并阻止打开配置弹窗,避免产生官网
  不可见的冗余商品
- 文档同步:撤回「再配置」语义,恢复拦截说明

已核实 PLTF004(族 786)实际仅 1 个官网商品,「四个配置」是右树
族聚合徽标造成的观感误解;149 个族无一跨分类,左树一族一行计数无误。

验证:admin vue-tsc 干净 + vitest 22/22 绿
2026-08-30 02:55:28 +08:00
yeuimu ab51052d26 merge: develop (family-configured badge fix) into refactor/v2 2026-08-30 02:40:44 +08:00