# 剩余用户 PC 业务入口收口 Implementation Plan > **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. **Goal:** 让剩余未有正式接口支持的用户 PC 业务入口显示明确状态,避免跳转到看似可用的分享、会员或家谱管理流程。 **Architecture:** 复用 `public/js/pending-pages.js` 的状态契约和链接收束规则。仅标记 `profile-family-home.html`、`profile-share.html`、`profile-services.html`;账号主页、个人资料、安全设置和家族圈动态继续使用现有真实功能。 **Tech Stack:** 原生 JavaScript、静态 HTML/CSS、Node LTS `node:test`。 ## Global Constraints - 保留现有页面、布局、视觉类名和导航结构,不删除用户设计。 - `PC.openapi2.json` 中不存在家谱主页、邀请奖励和会员订单的正式接口,不得伪造请求或静态数据为真实业务。 - `profile-family-home.html` 的家族圈动态入口继续跳转到 `profile-feed.html`。 - 所有新增注释使用中文;不写入测试账号或密码。 - 当前工作区含用户未提交修改,不执行提交、重置或清理操作。 --- ### Task 1: 扩展入口状态测试 **Files:** - Modify: `tests/pending-pages.test.js` **Interfaces:** - Consumes: 目标页面的 `data-feature-status="pending"`、状态脚本引用与 `data-feature-link="available"`。 - Produces: 剩余业务入口的静态约束,及真实账户页面不被误标记的约束。 - [x] **Step 1: 写入失败测试** 新增以下数组并加入现有待开发页面检查: ```js const residualPendingPages = [ 'profile-family-home.html', 'profile-share.html', 'profile-services.html' ]; ``` 新增断言:`profile-family-home.html` 的 `profile-feed.html` 链接必须带有 `data-feature-link="available"`;`profile.html`、`profile-data.html`、`profile-security.html` 不得含待开发状态标记。 - [x] **Step 2: 运行失败测试** Run: `$env:Path = 'C:\\Program Files\\nodejs;' + $env:Path; node --test tests/pending-pages.test.js` Expected: 三个剩余入口尚未标记,测试失败。 ### Task 2: 标记剩余业务入口 **Files:** - Modify: `profile-family-home.html` - Modify: `profile-share.html` - Modify: `profile-services.html` - Test: `tests/pending-pages.test.js` **Interfaces:** - Consumes: `PageAvailability.init()` 读取的页面状态属性,和 `PageAvailability.shouldBlockLink(link)` 的可用入口约定。 - Produces: 状态提示、业务链接拦截,以及唯一保留的动态入口。 - [x] **Step 1: 标记页面状态** 分别在三个 `body` 中增加 `data-feature-status="pending"` 和对应中文提示:家谱主页使用“家谱概览与管理服务正在开发中,当前页面仅保留设计预览。”;应用分享使用“应用分享与邀请奖励服务正在开发中,当前页面仅保留设计预览。”;帮助与服务使用“会员与在线服务正在开发中,当前页面仅保留设计预览。” - [x] **Step 2: 加载统一状态脚本并放行动态入口** 每页都在 `utils/ApiClient.js` 后增加: ```html ``` 在 `profile-family-home.html` 中将动态链接改为: ```html 发布动态 ``` - [x] **Step 3: 运行测试确认通过** Run: `$env:Path = 'C:\\Program Files\\nodejs;' + $env:Path; node --test tests/pending-pages.test.js` Expected: 全部状态页面和真实账户页面断言通过。 ### Task 3: 更新进度与验证 **Files:** - Modify: `docs/规划.md` - Modify: `docs/superpowers/plans/2026-07-11-residual-pc-entry-closure.md` - Test: `tests/*.test.js` **Interfaces:** - Consumes: 全部 HTML 的本地脚本引用。 - Produces: 已完成第三轮进度和可重复验证记录。 - [x] **Step 1: 写入第三轮完成状态** 在 `docs/规划.md` 的“实施进度”中增加已完成第三轮,说明三类剩余 PC 业务入口已收口,家族圈动态未受影响。 - [x] **Step 2: 执行完整测试** Run: `$env:Path = 'C:\\Program Files\\nodejs;' + $env:Path; npm.cmd test` Expected: 所有 Node 测试通过。 - [x] **Step 3: 执行静态检查** Run: PowerShell 扫描全部 HTML 的 `src="*.js"`,随后运行 `git diff --check`。 Expected: 每个本地脚本文件存在,且没有空白格式错误。