补充创作者主页与关注粉丝工程文档 #638

Merged
lhk229 merged 9 commits from feat/creator-hub into master 2026-10-05 22:05:12 +08:00
Member

本 PR 补齐创作者主页与关注粉丝功能的产品合同和工程设计,供后续按里程碑实施;本次只修改文档。

桌面导航第四项进入自己的创作者主页,“我的”移到第五项。游戏详情可进入作者主页并关注/取消关注;自己或他人的关注、粉丝列表均公开可查看,点击用户头像或昵称可进入其主页。本人支持取消/重新关注、回关和移除粉丝,并明确两个关注方向独立。

工程设计包含关系表与 DTO、认证和事务边界、跨页状态同步、共享组件、深链及验收要求,拆分关系查询和页面交互两个里程碑。按用户要求,游戏列表沿用最多 48 项的现有限制,不增加游戏目录分页改造。

验证:

  • 已合入最新 origin/master(21c79f54a);共享决策记录冲突保留双方新增内容。
  • npm run check:encoding 通过。
  • npm run check:doc-index 通过。
  • git diff --check 与暂存差异检查通过。
  • 相对 master 仅六份文档发生变化;没有业务代码或 schema 修改,未执行业务测试或部署。
本 PR 补齐创作者主页与关注粉丝功能的产品合同和工程设计,供后续按里程碑实施;本次只修改文档。 桌面导航第四项进入自己的创作者主页,“我的”移到第五项。游戏详情可进入作者主页并关注/取消关注;自己或他人的关注、粉丝列表均公开可查看,点击用户头像或昵称可进入其主页。本人支持取消/重新关注、回关和移除粉丝,并明确两个关注方向独立。 工程设计包含关系表与 DTO、认证和事务边界、跨页状态同步、共享组件、深链及验收要求,拆分关系查询和页面交互两个里程碑。按用户要求,游戏列表沿用最多 48 项的现有限制,不增加游戏目录分页改造。 验证: - 已合入最新 origin/master(21c79f54a);共享决策记录冲突保留双方新增内容。 - npm run check:encoding 通过。 - npm run check:doc-index 通过。 - git diff --check 与暂存差异检查通过。 - 相对 master 仅六份文档发生变化;没有业务代码或 schema 修改,未执行业务测试或部署。
lhk229 added 2 commits 2026-10-05 17:01:33 +08:00
明确主页入口、公开关系列表及用户主页跳转行为
补充关注关系表、接口契约、权限和前端状态设计
拆分后端查询与页面交互里程碑及验收标准
记录游戏列表沿用现有上限、不增加分页改造的边界
同步文档索引与团队决策记录
合并最新主分支到创作者主页文档分支
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust crates (pull_request) Has been cancelled
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
Project CI / Repository checks (pull_request) Has been cancelled
Project CI / AI game creator shell web tests (pull_request) Has been cancelled
68f0bf0718
同步 origin/master 最新变更
合并共享决策记录并保留双方新增内容
保持创作者主页与关注粉丝文档范围不变
lhk229 added 1 commit 2026-10-05 17:12:34 +08:00
明确他人关注列表只读展示规则
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust crates (pull_request) Has been cancelled
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
Project CI / Repository checks (pull_request) Has been cancelled
Project CI / AI game creator shell web tests (pull_request) Has been cancelled
f542bd11ce
移除他人关注列表的关注、取消关注和重新关注操作
明确前后端跳过访问者与列表用户的关系检测
同步工程契约、里程碑验收与共享决策记录
lhk229 added 1 commit 2026-10-05 17:20:30 +08:00
确认创作者主页产品规则并统一他人列表只读
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust crates (pull_request) Has been cancelled
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
Project CI / Repository checks (pull_request) Has been cancelled
Project CI / AI game creator shell web tests (pull_request) Has been cancelled
f4e5aaf441
将他人的关注和粉丝列表统一为只读并跳过关系检测
确认移动端三入口、本人公开游戏范围与移除粉丝二次确认
同步主规范、工程设计、里程碑状态和验收标准
lhk229 added 1 commit 2026-10-05 17:29:29 +08:00
补充创作者关系与公开查询实施计划
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 6m58s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 3m52s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 5m32s
Project CI / Frontend tests (pull_request) Successful in 3m3s
Project CI / AI game creator shell web tests (pull_request) Successful in 3m8s
Project CI / Backend tests (pull_request) Successful in 7m35s
Project CI / Repository checks (pull_request) Successful in 6m15s
Project CI / Native shell tests (pull_request) Successful in 9m36s
25f858667e
明确后端契约、关系事务、接口接入和隔离验证的实施顺序
补充修改边界、验证命令、回滚点与验收证据矩阵
同步主规范、工程设计、里程碑和文档索引入口
lhk229 added 1 commit 2026-10-05 18:43:19 +08:00
实现创作者主页与关注粉丝功能
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 6m35s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 5m10s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 4m29s
Project CI / Frontend tests (pull_request) Failing after 55s
Project CI / Backend tests (pull_request) Successful in 8m13s
Project CI / AI game creator shell web tests (pull_request) Successful in 5m37s
Project CI / Repository checks (pull_request) Successful in 7m5s
Project CI / Native shell tests (pull_request) Successful in 9m2s
e32823d389
新增创作者公开主页、第四导航入口、详情作者跳转及关注按钮
实现关注与粉丝列表、取消后重新关注、回关及移除粉丝交互
新增私有关注关系表、类型契约、受信过程和站内查询写入接口
按作者过滤公开游戏并保持既有四十八项读取边界
复用共享用户行、关注按钮及游戏卡,接入移动布局和页面深链
补充定向测试、隔离数据库及浏览器验收脚本并归并工程验证文档
lhk229 added 1 commit 2026-10-05 19:51:19 +08:00
Merge branch 'master' into feat/creator-hub
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust crates (pull_request) Has been cancelled
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
Project CI / Repository checks (pull_request) Has been cancelled
Project CI / AI game creator shell web tests (pull_request) Has been cancelled
cadde8f8c5
lhk229 added 1 commit 2026-10-05 20:31:09 +08:00
修复创作者主页返回循环
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 7m7s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 5m47s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 4m16s
Project CI / Frontend tests (pull_request) Successful in 3m28s
Project CI / AI game creator shell web tests (pull_request) Successful in 3m7s
Project CI / Repository checks (pull_request) Successful in 6m49s
Project CI / Backend tests (pull_request) Successful in 8m37s
Project CI / Native shell tests (pull_request) Successful in 10m15s
bdcf67cb5f
返回兜底改为替换历史,关系列表回所属主页,主页回游戏广场
主页资料行改为静态展示,保留详情和关系列表的作者链接
补充导航与共享组件回归测试,并同步产品规则和排障记忆
lhk229 reviewed 2026-10-05 21:12:29 +08:00
lhk229 left a comment
Author
Member

Summary

本次变更新增创作者主页、关注 / 取关 / 移除粉丝和公开资料查询,并把他人的关注、粉丝列表固定为只读。服务端对自关注、重复关注、缺失用户、关系方向和公开字段的约束,以及内部路由(未挂到 /api/external/v1)与契约形状是对齐的;浏览器里无应用内历史时用 replaceAppHistoryPath 兜底,避免深链返回循环。主要缺陷在游戏详情作者行:昵称补查未完成或失败时,会把公开投影的占位词「创作者」当成昵称渲染出来。关系列表对非法 tab 会静默打开关注列表,和现行设计里的无效链接状态不一致。

按严重程度

  • 缺陷:1
  • 建议:1
  • 注释:1

审查范围是 feat/creator-hub 相对 origin/master 的已提交改动(bdcf67cb)。这是评论,不是批准。

## Summary 本次变更新增创作者主页、关注 / 取关 / 移除粉丝和公开资料查询,并把他人的关注、粉丝列表固定为只读。服务端对自关注、重复关注、缺失用户、关系方向和公开字段的约束,以及内部路由(未挂到 `/api/external/v1`)与契约形状是对齐的;浏览器里无应用内历史时用 `replaceAppHistoryPath` 兜底,避免深链返回循环。主要缺陷在游戏详情作者行:昵称补查未完成或失败时,会把公开投影的占位词「创作者」当成昵称渲染出来。关系列表对非法 `tab` 会静默打开关注列表,和现行设计里的无效链接状态不一致。 ## 按严重程度 - 缺陷:1 - 建议:1 - 注释:1 审查范围是 `feat/creator-hub` 相对 `origin/master` 的已提交改动(`bdcf67cb`)。这是评论,不是批准。
@@ -328,0 +335,4 @@
<CreatorAuthor
user={{
id: game.author.id,
displayName: authorName || game.author.name || '创作者',
Author
Member

[缺陷] 游戏详情的作者行改为 CreatorAuthor 后,展示名取 authorName || game.author.name || '创作者'。useGameAuthorDisplayName(src/components/game-distribution/useGameAuthorName.ts:34)在按作者 ID 补查完成前返回 null,查不到或网络失败时返回空串;公开游戏投影没有真实昵称时,author.name 就是占位词「创作者」(server-rs/crates/api-server/src/modules/game_distribution.rs:3158)。null 和空串都会落到这个占位词上,加载过程中以及补查失败后,作者行都把角色词当成昵称显示,同一行的关注按钮同时可用。同函数仍把 displayGame.author.name 收成空串,供 GameDetailDisplay 在空名时不渲染「由 X 制作」;新传入的 authorContent 始终是元素,packages/shared/src/components/GameDetailDisplay/index.tsx:239 的 ?? 短路后,这条空名降级不再执行。

建议: 补查结果仍为 null 时不要使用 game.author.name,作者行只保留头像占位或骨架。结果为空串时传空展示名,或在名字仍是「创作者」「未知作者」时不渲染昵称。关注操作继续使用 game.author.id。

**[缺陷]** 游戏详情的作者行改为 `CreatorAuthor` 后,展示名取 `authorName || game.author.name || '创作者'`。`useGameAuthorDisplayName`(`src/components/game-distribution/useGameAuthorName.ts:34`)在按作者 ID 补查完成前返回 `null`,查不到或网络失败时返回空串;公开游戏投影没有真实昵称时,`author.name` 就是占位词「创作者」(`server-rs/crates/api-server/src/modules/game_distribution.rs:3158`)。`null` 和空串都会落到这个占位词上,加载过程中以及补查失败后,作者行都把角色词当成昵称显示,同一行的关注按钮同时可用。同函数仍把 `displayGame.author.name` 收成空串,供 `GameDetailDisplay` 在空名时不渲染「由 X 制作」;新传入的 `authorContent` 始终是元素,`packages/shared/src/components/GameDetailDisplay/index.tsx:239` 的 `??` 短路后,这条空名降级不再执行。 **建议:** 补查结果仍为 `null` 时不要使用 `game.author.name`,作者行只保留头像占位或骨架。结果为空串时传空展示名,或在名字仍是「创作者」「未知作者」时不渲染昵称。关注操作继续使用 `game.author.id`。
lhk229 marked this conversation as resolved
@@ -832,0 +910,4 @@
<CreatorConnectionsPage
id={gameId}
tab={
gameSearchParams.get('tab') === 'followers'
Author
Member

[建议] 现行设计约定关系列表在缺少主人或 tab 非法时展示明确的无效链接状态(docs/technical/【技术方案】创作者主页与关注粉丝工程设计-2026-10-05.md:105)。缺少 id 时 CreatorConnectionsPage 会提示「缺少创作者 ID」。壳层只把精确等于 followers 的查询打开为粉丝列表,缺省、空串和其他字符串都会打开关注列表。带错误 tab 的深链因此直接进入关注列表。

建议: tab 不是 following 或 followers 时,渲染与缺少创作者 ID 同类的无效链接状态。若缺省 tab 需要落到关注列表,把这个默认写进设计,并只对缺省生效。

**[建议]** 现行设计约定关系列表在缺少主人或 `tab` 非法时展示明确的无效链接状态(`docs/technical/【技术方案】创作者主页与关注粉丝工程设计-2026-10-05.md:105`)。缺少 `id` 时 `CreatorConnectionsPage` 会提示「缺少创作者 ID」。壳层只把精确等于 `followers` 的查询打开为粉丝列表,缺省、空串和其他字符串都会打开关注列表。带错误 `tab` 的深链因此直接进入关注列表。 **建议:** `tab` 不是 `following` 或 `followers` 时,渲染与缺少创作者 ID 同类的无效链接状态。若缺省 `tab` 需要落到关注列表,把这个默认写进设计,并只对缺省生效。
lhk229 marked this conversation as resolved
lhk229 reviewed 2026-10-05 21:14:29 +08:00
lhk229 left a comment
Author
Member

把注释意见改挂到新增的 authorContent 行上。上一条审查正文不变。

把注释意见改挂到新增的 `authorContent` 行上。上一条审查正文不变。
@@ -57,6 +57,7 @@ export interface GameDetailDisplayProps extends GameDetailShowcaseProps {
playCount?: number;
};
/** 「游玩方式」文案;缺省「未标注操作方式」。 */
authorContent?: ReactNode;
Author
Member

[注释] 新增的 authorContent 插在「游玩方式」注释和 controlsLabel 之间。该注释现在挂在作者插槽上,文案仍是游玩方式的缺省说明。

建议: 把这句注释移回 controlsLabel,并为 authorContent 注明它替换默认作者行。

**[注释]** 新增的 `authorContent` 插在「游玩方式」注释和 `controlsLabel` 之间。该注释现在挂在作者插槽上,文案仍是游玩方式的缺省说明。 **建议:** 把这句注释移回 `controlsLabel`,并为 `authorContent` 注明它替换默认作者行。
lhk229 marked this conversation as resolved
lhk229 added 1 commit 2026-10-05 21:29:35 +08:00
修复作者昵称降级和关系列表无效链接
Project CI / AI game creator shell Rust crates (pull_request) Successful in 5m56s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 6m45s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 7m42s
Project CI / Backend tests (pull_request) Successful in 8m33s
Project CI / Frontend tests (pull_request) Successful in 3m17s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m59s
Project CI / Repository checks (pull_request) Successful in 5m3s
Project CI / Native shell tests (pull_request) Successful in 6m49s
0c8554d113
作者昵称仅使用补查结果,空名保留可访问的主页链接与关注操作
严格校验关系列表 tab,无效链接不请求列表并保留返回入口
纠正作者插槽注释,补充定向测试并同步工程文档和排障记忆
lhk229 merged commit 51cb05f418 into master 2026-10-05 22:05:12 +08:00
lhk229 deleted branch feat/creator-hub 2026-10-05 22:05:12 +08:00
Sign in to join this conversation.