Skip to content

feat(miniprogram): V0.8 PR-1 周经营计划 + 节日机会#1

Merged
rockcent merged 3 commits into
mainfrom
feature/v0-8-pr1-week-plan-festival
Jul 6, 2026
Merged

feat(miniprogram): V0.8 PR-1 周经营计划 + 节日机会#1
rockcent merged 3 commits into
mainfrom
feature/v0-8-pr1-week-plan-festival

Conversation

@rockcent

@rockcent rockcent commented Jul 6, 2026

Copy link
Copy Markdown
Owner

V0.8 AI 经营版 / PR-1:周经营计划 + 节日机会

基于根目录 PRD V0.8 §13 V0.8 范围的第一刀。SDD 三件套:spec.md / plan.md / tasks.md 已 commit on main (3d90045),本 PR 是其实施。

Scope

Files Changed (15 个)

路径
新页面 src/pages/week-plan/{week-plan.tsx, .scss, index.tsx}
新组件 src/components/festival-card/{festival-card.tsx, .scss}
改 store src/stores/ai-store.ts (a1c9962)
改 routes src/app.config.ts
改首页 src/pages/index/index.tsx (2 张新卡片)
新 mock src/data/{mock-week-plan, mock-festivals}.json (a1c9962)
新 service src/services/ai/{plan, festival}.ts (a1c9962)
扩 types src/types/index.ts (+ WeekPlan/FestivalOpportunity/computeDaysAway, a1c9962)
新测试 __tests__/services/{plan, festival}.test.ts + __tests__/stores/ai-store-v08.test.ts
改 smoke scripts/smoke-weapp.mjs (10 → 11 页) + scripts/screenshot-h5.mjs (10 → 11 截图)
改 README V0.8 路线图段
改 CHANGELOG v0.8.0-pr1 段
新截图 dist-screenshots/week-plan.png + home.png 更新版

Verification

npm run smoke:weapp  # 6 checks PASS(含 'all 11 page entries present')
npm test             # 28 tests in 8 suites PASS(14 旧 + 14 新)
npm run build:h5     # webpack PASS(1 warning: entrypoint size)

公网视觉:dist-screenshots/week-plan.png (82KB) + home.png (97KB) 显示 V0.8 PR-1 渲染。

Constitution Verification

  • §6.1 平台 pin 形式不变 (smoke 'platform pin' OK)
  • §6.2 vis token 复用 (CSS var --brand-green / --brand-coral 等)
  • §4 commissionTargetFen 是整数 (smoke '_fen all integers' OK)
  • §6.5 接口形态 = ProviderCallResult<T> (与 v0.6 mock 保持一致)
  • §7.1 SDD 三件套 + §7.3 commit 前缀 (feat:)
  • §7.4 0 敏感文件 (.env / project.config.json 不入仓)
  • §8.2 mock 阶段豁免(接口 = 真实 ProviderCallResult,阶段二零成本切真实 LLM)

Out of Scope

PR-2 风格学习 / PR-3 发布时间优化 + 多平台 / PR-4 商品替换提醒 / 真实 LLM / 真实云开发 — 后续 PR。

cc @pm for §III plan 拍板 ✅ (4 yes)

Codex CTO added 3 commits July 6, 2026 21:19
按 .specify/features/v0-8-ai-operation/plan.md T-B + T-C 落地:

- src/types/index.ts: 新增 WeekPlan / WeekPlanDay / DayTask / SceneKind /
  DayTaskStatus / WeeklyKpi / FestivalOpportunity / FestivalRelation +
  computeDaysAway()
- src/data/mock-week-plan.json: 7 天 21 任务(weekId 2026-W28, today 2026-07-06)
- src/data/mock-festivals.json: 6 个节日分布 0-128 天
- src/services/ai/plan.ts: planMock.fetchWeekPlan() (sleep 800ms,
  ProviderCallResult<WeekPlan> 形态)
- src/services/ai/festival.ts: festivalMock.fetchFestivalOpportunities()
  (filter daysAway ∈ [0, 30] + sort by daysAway asc)
- src/stores/ai-store.ts: 增 weekPlan + festivalOpportunities 字段 +
  loadWeekPlan + loadFestivalOpportunities 2 个 action + reset 同步清空

不动 v0.6 任何代码;接口形态 = 真实 ProviderCallResult(§6 + §8.2);
后续 T-D UI 层直接对接。
实施 .specify/features/v0-8-ai-operation/plan.md 的 T-D / T-E / T-F 全部:

UI(T-D):
- src/components/festival-card/{festival-card.tsx, .scss} 新组件(emoji + name +
  daysAway + aiPitch + 关系 chip)
- src/pages/week-plan/{week-plan.tsx, week-plan.scss, index.tsx} 新页(KPI Bar +
  7 天格子 + 今日高亮 + 节日卡 + CTA)
- src/app.config.ts 新增 'pages/week-plan/index' 路由
- src/pages/index/index.tsx 加'今日计划卡' + '今日节日卡'(不动原 9 个 section)

Testing(T-E):
- __tests__/services/plan.test.ts(7 tests:mock + computeDaysAway)
- __tests__/services/festival.test.ts(3 tests:filter + sort + shape)
- __tests__/stores/ai-store-v08.test.ts(4 tests:load + reset)
- 总:14 (旧) + 14 (新) = 28 tests in 8 suites(npm test PASS)

Guard + 文档(T-F):
- scripts/smoke-weapp.mjs 加第 11 页(10 旧 + 1 新)
- README.md 新增 V0.8 路线图段(PR-1~PR-4)
- CHANGELOG.md 增 v0.8.0-pr1 段
- dist-screenshots/{home, week-plan}.png 渲染新版(11 张全 OK)

不入仓:
- node_modules/puppeteer-core(dev only via --no-save)+ src/pages/week-plan/
  week-plan.scss.bak (sed -i 自动备份,已清理)
- 各新 mock JSON(已含在 a1c9962 commit)

宪法验证:
- §6.1 平台 pin 形式不变(smoke 'platform pin' OK)
- §6.2 vis token 复用(CSS var --brand-*)
- §4 金额 commissionTargetFen 整数(smoke '_fen all integers' OK)
- 接口形态 = ProviderCallResult(plan.ts / festival.ts 与 v0.6 一致)
- 提信息用 feat: 前缀(符合 §7.3)
… 11th page

PR-1 added pages/week-plan/index as the 11th page. Update the CI step label
so reviewers see the actual scope. Behavior unchanged (smoke-weapp.mjs
already covers 11 pages since commit 7ece3ca).
@rockcent rockcent merged commit 849c6a6 into main Jul 6, 2026
1 check passed
@rockcent rockcent deleted the feature/v0-8-pr1-week-plan-festival branch July 6, 2026 13:38
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