Files
john 4e21ca937a
Deploy Documentation / deploy (push) Has been cancelled
Canary / Prepare Version (push) Has been cancelled
Canary / build-cli (push) Has been cancelled
Canary / Upload Install Script (push) Has been cancelled
Canary / bundle-desktop (push) Has been cancelled
Canary / bundle-desktop-intel (push) Has been cancelled
Canary / bundle-desktop-linux (push) Has been cancelled
Canary / bundle-desktop-windows (push) Has been cancelled
Canary / bundle-desktop-windows-cuda (push) Has been cancelled
Canary / Release (push) Has been cancelled
Unused Dependencies / machete (push) Has been cancelled
CI / changes (push) Has been cancelled
CI / Check Rust Code Format (push) Has been cancelled
CI / Build and Test Rust Project (push) Has been cancelled
CI / Build Rust Project on Windows (push) Has been cancelled
CI / Check MSRV (push) Has been cancelled
CI / Lint Rust Code (push) Has been cancelled
CI / Check Generated Schemas are Up-to-Date (push) Has been cancelled
CI / Test and Lint Electron Desktop App (push) Has been cancelled
CI / H5 Plaza Tests and Build (push) Has been cancelled
Live Provider Tests / check-fork (push) Has been cancelled
Live Provider Tests / changes (push) Has been cancelled
Live Provider Tests / Build Binary (push) Has been cancelled
Live Provider Tests / Smoke Tests (push) Has been cancelled
Live Provider Tests / Smoke Tests (Code Execution) (push) Has been cancelled
Live Provider Tests / Compaction Tests (push) Has been cancelled
Live Provider Tests / goose server HTTP integration tests (push) Has been cancelled
Publish Ask AI Bot Docker Image / docker (push) Has been cancelled
Publish Docker Image / docker (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
Add TKMind platform extensions, H5/MindSpace stack, and deployment tooling.
Fork goose with custom MCP widgets, platform extensions (aider, git, web, search),
MindSpace H5 backend/frontend, Plaza/Ops UIs, and deploy scripts for tkmind.cn.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-14 21:30:20 +08:00

14 KiB
Raw Permalink Blame History

sidebar_position, title, sidebar_label, description
sidebar_position title sidebar_label description
11 实现进度 实现进度 Plaza 各 Sprint 任务状态、依赖关系与验收记录

实现进度

最后更新:2026-06-13(差距补齐修订)

当前阶段

Sprint 5 — 运营后台MVP 可用,规格补全中)

目标:内容审核、举报、精选、创作者管理与数据看板可用。

状态图例

标记 含义
代码已实现且本地验证通过
⚠️ 部分实现或仅单元测试覆盖
未实现或需生产/联调验收
🔧 本次修订中补齐

总体状态

模块 状态 说明
Sprint 14 主链路 发布、互动、热度、SEO MVP
DBreports / featured / audit schema.sql Sprint 5
后端 /api/ops/v1/* plaza-ops.mjs
公开举报 API 帖子 + 评论举报
Feed 精选合并 trending + category_top 分类置顶
前端 ui/ops/ ⚠️ 五页可用;看板图表待增强
运营审核 ops 路径 + admin 路径均写 audit log
OpenAPI 同步 ui/h5/openapi.json + just check-h5-openapi-schema
E2E / 集成测试 ⚠️ MySQL 集成 3 项;Playwright E2E 未做
CI plaza 任务 h5-plaza jobMySQL service + build

差距追踪(P0P3

P0 — 文档与契约对齐(2026-06-13 已补齐)

状态
08-development-guide 勾选与 10 一致
04-backend-api ops_admin 命名
07-seo 渲染策略与实现对齐

P1 — 产品完整性(2026-06-13 已补齐)

状态
二级评论展示(parent_id 回复树)
MindSpace 发布:封面 + 允许评论
Plaza 帖子/评论举报 UI
分享写入 share_count
分类 Feed 合并 category_top
首页/分类 JSON-LD
PostGridSkeleton 接入 loading
Ops 审核 Tab + 批量通过
admin 审核写 ops_audit_log

P2 — 质量与可持续

状态
MySQL 集成测试(发布→审核→Feed) plaza-integration.test.mjs
CIplaza-*.test.mjs + ui/plaza/ui/ops build .github/workflows/ci.yml h5-plaza job
OpenAPI 片段生成 ui/h5/openapi.json 含 Plaza/Ops
权限/越权路径测试 ⚠️ 集成测试覆盖 hide/duplicate;完整矩阵待补

P3 — 增强(后续)

状态
Redis 点赞 INCR + 同步
微信 JS-SDK 分享
看板图表 / 小时预聚合表
审核拒绝站内通知
ops_audit_log 180 天清理
同域 Cookie 联调(:3001/:8080
生产 Redis / 百度推送 / Nginx /ops

Sprint 1 任务拆分

按依赖顺序执行;完成后在「验收」列打勾。

Phase A — 数据库(阻塞后续)

ID 任务 文件 状态
S1-A1 plaza_categories 表 + 8 条初始分类 ui/h5/schema.sql
S1-A2 plaza_posts 表 + 索引 ui/h5/schema.sql
S1-A3 h5_publish_records.plaza_view/like_count ui/h5/db.mjs
S1-A4 迁移幂等验证 plaza-integration.test.mjs + CI MySQL

Phase B — 后端 API

ID 任务 文件 状态
S1-B1 createPlazaPostService repository + service ui/h5/plaza-posts.mjs
S1-B2 GET /api/plaza/v1/categories server.mjs
S1-B3 GET /api/plaza/v1/feedhot/new,仅 published server.mjs
S1-B4 GET /api/plaza/v1/posts/:id server.mjs
S1-B5 POST /api/plaza/v1/posts server.mjs
S1-B6 PATCH /api/plaza/v1/posts/:id server.mjs
S1-B7 DELETE /api/plaza/v1/posts/:idhidden server.mjs
S1-B8 publication offline → plaza_posts.hidden mindspace-publications.mjs
S1-B9 单元/集成测试 plaza-posts.test.mjs 单元
S1-B10 OpenAPI 片段更新 ui/h5/openapi.json / generate script

Phase C — Plaza 前端(Next.js

ID 任务 文件 状态
S1-C1 初始化 ui/plaza 项目 ui/plaza/
S1-C2 /plaza 首页 SSR + PostGrid app/plaza/page.tsx
S1-C3 /plaza/cat/[slug] app/plaza/cat/
S1-C4 /plaza/p/[id] + iframe embed app/plaza/p/
S1-C5 lib/metadata.ts + 07-seo 规范 lib/
S1-C6 PostCard 全状态 components/

Phase D — MindSpace 集成

ID 任务 文件 状态
S1-D1 页面详情「发布到广场」对话框 H5 页面详情组件
S1-D2 调用 POST /api/plaza/v1/posts H5 API 封装
S1-D3 最小审核:auto-approve 或 admin 通过 env / admin

Sprint 1 出口验收

  • POST 发布 → pending_review → 审核 → publishedGET /feed 可见(本地 PLAZA_AUTO_APPROVE
  • 帖子详情 SSR 含标题与 embed
  • offline publication → plaza_posts.status = hidden → feed 不可见
  • node --test plaza-posts.test.mjs 通过

Sprint 2 任务拆分

Phase A — 数据库

ID 任务 文件 状态
S2-A1 plaza_reactions schema.sql
S2-A2 plaza_comments + plaza_comment_reactions schema.sql
S2-A3 plaza_follows schema.sql

Phase B — 后端 API

ID 任务 文件 状态
S2-B1 plaza-interactions.mjs service ui/h5/
S2-B2 POST/DELETE /posts/:id/reactions server.mjs
S2-B3 GET/POST /posts/:id/comments server.mjs
S2-B4 POST /comments/:id/reactions server.mjs
S2-B5 GET /users/:slug + /posts + follow server.mjs
S2-B6 viewer_reacted 注入 feed/detail plaza-posts.mjs
S2-B7 单元测试 plaza-interactions.test.mjs

Phase C — Plaza 前端

ID 任务 文件 状态
S2-C1 PostActions(点赞/收藏/分享) components/post/
S2-C2 CommentSection + 登录引导 components/comment/
S2-C3 FollowButton + UserCard components/user/
S2-C4 /u/[slug] 用户主页 app/u/
S2-C5 帖子详情接入互动 app/plaza/p/[id]/
S2-C6 pnpm build 通过 ui/plaza/

Sprint 2 出口验收

  • 点赞/收藏 API + 前端 optimistic 切换
  • 评论列表/发布/点赞
  • 关注/取关 + 用户主页作品网格
  • 未登录触发 LoginPrompt 浮层
  • 同域 Cookie 联调(本地 :3001 / :8080 需反向代理)

Sprint 3 任务拆分

Phase A — 数据库与算法

ID 任务 文件 状态
S3-A1 plaza_algorithm_config 表 + 默认权重 schema.sql
S3-A2 computeHotScore + 48h 重算任务 plaza-algorithm.mjs
S3-A3 发布/审核通过时写入初始 hot_score plaza-posts.mjs

Phase B — Redis 与定时任务

ID 任务 文件 状态
S3-B1 Redis 浏览 INCR + IP 24h 去重 plaza-redis.mjs
S3-B2 5 分钟计数同步 MySQL plaza-tasks.mjs
S3-B3 Feed 缓存(hot 5min / new 60s plaza-redis.mjs + plaza-posts.mjs
S3-B4 publication 统计每小时回写 plaza-tasks.mjs
S3-B5 评论频率限制(10 条/小时/帖) plaza-interactions.mjs
S3-B6 GET 帖子详情记录浏览 server.mjs
S3-B7 单元测试 plaza-algorithm.test.mjs

Phase C — 前端

ID 任务 文件 状态
S3-C1 Feed 无限滚动(IntersectionObserver FeedLoadMore.tsx
S3-C2 FeedTabs / CategoryNav / MobileNav Sprint 1 已有

Sprint 3 出口验收

  • 热门 Feed 按 hot_score DESC 排序
  • 热度公式与文档示例一致(单元测试 ±0.05)
  • 同一 IP 24h 内对同一帖子只计 1 次浏览(Redis 或进程内降级)
  • PLAZA_REDIS_URL 未配置时 MySQL 降级可用
  • 生产 Redis + 多实例 IP 去重联调

Sprint 4 任务拆分

Phase A — 后端 SEO / 归因

ID 任务 文件 状态
S4-A1 plaza_attribution_events schema.sql
S4-A2 GET /api/plaza/v1/seo/sitemap plaza-seo.mjs
S4-A3 POST /api/plaza/v1/attribution/events plaza-seo.mjs
S4-A4 发布时百度 URL 推送 plaza-seo.mjs + plaza-posts.mjs
S4-A5 注册时 signup 归因(utm_source server.mjs
S4-A6 单元测试 plaza-seo.test.mjs

Phase B — 前端 SEO

ID 任务 文件 状态
S4-B1 app/sitemap.ts ui/plaza/
S4-B2 动态 OG 图(无封面兜底) opengraph-image.tsx
S4-B3 用户主页 JSON-LD lib/metadata.ts
S4-B4 UTM 落地追踪 AttributionTracker.tsx
S4-B5 分享:链接 + OG 图预览 PostActions.tsx
S4-B6 Footer/登录 UTM 统一 helper lib/utm.ts
S4-B7 首屏图片 priority + 骨架屏组件 PostCard / PostGridSkeleton

Sprint 4 出口验收

  • /sitemap.xml 生成(含分类/帖子/用户 URL
  • robots.txt 声明 sitemap
  • 无封面帖子有动态 OG 图
  • UTM landing 事件写入 DB
  • 生产配置 PLAZA_BAIDU_PUSH_TOKEN 并验证推送
  • Google Search Console 提交 sitemap(运维操作)

环境变量

变量 默认 说明
PLAZA_AUTO_APPROVE false 开发环境 true 时扫描通过后自动 published
PLAZA_REDIS_URL - Redis 浏览计数、Feed 缓存、评论限流
PLAZA_PUBLIC_BASE https://go.tkmind.cn 百度推送与 sitemap 公开 URL 前缀
PLAZA_BAIDU_SITE go.tkmind.cn 百度搜索资源平台站点
PLAZA_BAIDU_PUSH_TOKEN - 配置后新帖发布自动推送百度

Sprint 5 任务拆分

Phase A — 数据库与后端

ID 任务 文件 状态
S5-A1 plaza_reports / plaza_featured / ops_audit_log schema.sql
S5-A2 plaza-ops.mjs service ui/h5/
S5-A3 /api/ops/v1/review/* server.mjs
S5-A4 /api/ops/v1/reports/* + 公开举报 server.mjs
S5-A5 /api/ops/v1/featured server.mjs
S5-A6 /api/ops/v1/analytics/overview server.mjs
S5-A7 /api/ops/v1/creators server.mjs
S5-A8 Feed 精选合并 plaza-posts.mjs
S5-A9 单元测试 plaza-ops.test.mjs

Phase B — 运营前端 ui/ops/

ID 任务 文件 状态
S5-B1 Vite 项目初始化 ui/ops/
S5-B2 审核队列页 ReviewPage.tsx
S5-B3 举报处理页 ReportsPage.tsx
S5-B4 精选管理页 FeaturedPage.tsx
S5-B5 数据看板 AnalyticsPage.tsx
S5-B6 创作者管理 CreatorsPage.tsx
S5-B7 Plaza 首页精选轮播 FeaturedBanner.tsx

Sprint 5 出口验收

  • 审核通过/拒绝写入 ops_audit_log
  • ops_role 权限校验(reviewer / editor / ops_admin
  • 精选帖在首页 banner 与 hot feed 中展示
  • pnpm buildui/ops)通过
  • 生产 Nginx /ops 内网限制
  • 为运营账号分配 ops_role

本地启动

# 后端
cd ui/h5 && PLAZA_AUTO_APPROVE=false node server.mjs

# 运营后台
cd ui/ops && pnpm dev   # http://localhost:3002/ops

运营账号需在 DB 中设置:UPDATE h5_users SET ops_role='reviewer' WHERE username='...'


变更日志

2026-06-13P2 质量)

  • 新增 plaza-integration.test.mjs(MySQL:发布→审核→Feed、越权 hide、重复发布)。
  • ui/h5/openapi.json 纳入 Plaza + Ops 路由(scripts/plaza-openapi.mjs)。
  • CI 新增 h5-plaza job:MySQL 8 服务、单元/集成测试、ui/plaza/ui/ops build、OpenAPI 校验。

2026-06-13(差距补齐)

  • 文档:08/04/07/10 与实现对齐,新增差距追踪 P0–P3。
  • 后端:评论举报 API、批量审核、category_top 分类 Feed 合并、admin 审核写 audit log。
  • Plaza 前端:二级评论展示、帖子/评论举报、分享 share_count、首页/分类 JSON-LD、loading.tsx 骨架屏。
  • H5:发布到广场对话框补封面 URL 与允许评论。
  • Ops:审核 Tab(待审/已通过/已拒绝)+ 批量通过。

2026-06-13Sprint 5

  • 新增 plaza-ops.mjs、ops API、plaza_reports / plaza_featured / ops_audit_log 表。
  • 上线 ui/ops/ 运营 SPA(审核/举报/精选/看板/创作者)。
  • Feed 合并精选 trendingPlaza 首页展示 FeaturedBanner

2026-06-13Sprint 4

  • 新增 plaza-seo.mjssitemap 数据 API、UTM 归因、百度推送。
  • Next.jssitemap.ts、帖子 opengraph-image.tsx、用户 JSON-LD、UTM 追踪与分享增强。

2026-06-13Sprint 3

  • 新增 plaza_algorithm_configplaza-algorithm.mjs(热度公式 + 10 分钟重算)。
  • 新增 plaza-redis.mjs / plaza-tasks.mjs(浏览计数、Feed 缓存、publication 回写)。
  • 帖子详情 GET 自动记浏览;评论 10 条/小时/帖限流。
  • 前端 FeedLoadMore 接入 IntersectionObserver 无限滚动。

2026-06-13Sprint 2

  • 新增 plaza_reactions / plaza_comments / plaza_follows 表与 plaza-interactions.mjs
  • 实现互动 API(点赞、收藏、评论、关注)及 viewer_reacted
  • Plaza 前端:PostActionsCommentSectionFollowButton、用户主页 /u/[slug]pnpm build 通过。

2026-06-13Sprint 1

  • 文档矛盾修复:POST/PATCH 分离、物理表映射、total_likes 定义、Cookie 策略、Feed 精选合并、Redis 同步策略。
  • 新增本文档;启动 Sprint 1 Phase A/B。
  • 实现 plaza_categories / plaza_posts schema、plaza-posts.mjs、6 个 Plaza API、offline 联动、单元测试 4 项通过。
  • 完成 ui/plaza Next.js(首页/分类/详情 SSR、pnpm build 通过)。
  • H5 页面详情增加「发布到广场」流程(listPlazaCategories + publishPageToPlaza)。