feat(miniprogram): V0.8 PR-1 周经营计划 + 节日机会#1
Merged
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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}src/stores/ai-store.ts(a1c9962)src/app.config.tssrc/pages/index/index.tsx(2 张新卡片)src/data/{mock-week-plan, mock-festivals}.json(a1c9962)src/services/ai/{plan, festival}.ts(a1c9962)src/types/index.ts(+ WeekPlan/FestivalOpportunity/computeDaysAway, a1c9962)__tests__/services/{plan, festival}.test.ts+__tests__/stores/ai-store-v08.test.tsscripts/smoke-weapp.mjs(10 → 11 页) +scripts/screenshot-h5.mjs(10 → 11 截图)dist-screenshots/week-plan.png+home.png更新版Verification
公网视觉:
dist-screenshots/week-plan.png(82KB) +home.png(97KB) 显示 V0.8 PR-1 渲染。Constitution Verification
--brand-green/--brand-coral等)commissionTargetFen是整数 (smoke '_fen all integers' OK)ProviderCallResult<T>(与 v0.6 mock 保持一致).env/project.config.json不入仓)Out of Scope
PR-2 风格学习 / PR-3 发布时间优化 + 多平台 / PR-4 商品替换提醒 / 真实 LLM / 真实云开发 — 后续 PR。
cc @pm for §III plan 拍板 ✅ (4 yes)