Skip to content

[codex] Modularize Shop frontend and billing logic#33

Merged
cnYui merged 3 commits into
mainfrom
codex/shop-modular-refactor-pr-20260613
Jun 13, 2026
Merged

[codex] Modularize Shop frontend and billing logic#33
cnYui merged 3 commits into
mainfrom
codex/shop-modular-refactor-pr-20260613

Conversation

@cnYui

@cnYui cnYui commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • 拆分 Shop 后端纯逻辑:金额工具、历史价格回放、收银统计、周消费和模型总览。
  • 拆分 Shop 前端:shop/shop.js 变为入口兼容层,页面逻辑移入 shop/js/*
  • 拆分测试与上下文文档,新增前端模块加载和静态结构覆盖。

Validation

  • npm test:155 个测试通过
  • npm run build:css:通过,仅 Browserslist 过期提示
  • git diff --check:通过
  • 浏览器验收:/shop/shop.js 动态注入 6 个模块脚本,控制台无错误

Risk Notes

  • 外部 API 路径、请求体、响应体和主要 DOM id 保持兼容。
  • server.js 仍保留路由、SQL statement 和事务边界,本次不做 C 级路由 / 仓储层深拆。
  • docs/ai/context 原本被 ignore,本 PR 强制纳入三份设计 / 计划 / 实施文档,避免 AGENTS 引用悬空。

@cnYui cnYui merged commit 56163ea into main Jun 13, 2026
2 checks passed
@cnYui cnYui deleted the codex/shop-modular-refactor-pr-20260613 branch June 13, 2026 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant