From ae2eb08fca5cd96d030da7dc577d1058321eefae Mon Sep 17 00:00:00 2001 From: que01 Date: Sun, 27 Sep 2026 19:21:31 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=87=8D=E6=95=B4=E5=90=8E=E5=8F=B0?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E9=A1=B5=E4=BF=A1=E6=81=AF=E6=9E=B6=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PROGRESS.md | 7 +++++++ .../SPEC.md | 12 +++++++++++ .../TODO.csv | 4 ++++ .../src/features/workspace/WorkspacePage.tsx | 21 ++++++++++++++++--- apps/admin/src/main.tsx | 2 +- 5 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 .codex-tasks/admin-workspace-information-architecture/PROGRESS.md create mode 100644 .codex-tasks/admin-workspace-information-architecture/SPEC.md create mode 100644 .codex-tasks/admin-workspace-information-architecture/TODO.csv diff --git a/.codex-tasks/admin-workspace-information-architecture/PROGRESS.md b/.codex-tasks/admin-workspace-information-architecture/PROGRESS.md new file mode 100644 index 0000000..dd09187 --- /dev/null +++ b/.codex-tasks/admin-workspace-information-architecture/PROGRESS.md @@ -0,0 +1,7 @@ +# 执行记录 + +- 任务:重整模板与表单设置页的信息架构。 +- 形态:single-full +- 进度:3/3 +- 结果:日常配置入口前置,模板和负责人设置明确标注,页面名称和导航同步更新。 +- 验证:Admin production build、全量 typecheck、lint、format、`git diff --check` 通过。 diff --git a/.codex-tasks/admin-workspace-information-architecture/SPEC.md b/.codex-tasks/admin-workspace-information-architecture/SPEC.md new file mode 100644 index 0000000..fb78edb --- /dev/null +++ b/.codex-tasks/admin-workspace-information-architecture/SPEC.md @@ -0,0 +1,12 @@ +# 后台设置页信息架构 + +## 目标 + +让普通品牌管理员进入设置页后先看到日常配置入口,再看到模板和负责人级高级设置,降低页面职责混杂带来的困惑。 + +## 范围 + +- 将页面命名为“模板与表单设置”,说明日常配置与负责人设置的边界。 +- 增加品牌表达、业务提供项、信任内容和发布的直接入口。 +- 将运行时状态改成“小程序当前状态”等业务表达。 +- 将模板组合预览标记为高级预览,自定义字段标记为负责人设置。 diff --git a/.codex-tasks/admin-workspace-information-architecture/TODO.csv b/.codex-tasks/admin-workspace-information-architecture/TODO.csv new file mode 100644 index 0000000..08a6376 --- /dev/null +++ b/.codex-tasks/admin-workspace-information-architecture/TODO.csv @@ -0,0 +1,4 @@ +id,task,status,acceptance_criteria,validation_command,completed_at,retry_count,notes +1,增加日常配置入口与页面说明,DONE,设置页顶部直接进入品牌表达、业务提供项、信任内容和发布,pnpm --filter @personal-brand/admin build,2026-09-27,0, +2,区分状态与高级设置,DONE,运行时状态、模板预览、自定义字段使用业务化标题并标注负责人范围,pnpm typecheck,2026-09-27,0, +3,完成质量门禁,DONE,Admin build、typecheck、lint、format 和 diff 检查通过,pnpm format:check,2026-09-27,0, diff --git a/apps/admin/src/features/workspace/WorkspacePage.tsx b/apps/admin/src/features/workspace/WorkspacePage.tsx index 58bb492..219d7d5 100644 --- a/apps/admin/src/features/workspace/WorkspacePage.tsx +++ b/apps/admin/src/features/workspace/WorkspacePage.tsx @@ -12,6 +12,7 @@ import { message, } from "antd"; import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; +import { useNavigate } from "react-router-dom"; import { createApiClient } from "../../lib/api.js"; import { ApiClientError } from "@personal-brand/api-client"; import type { @@ -67,6 +68,7 @@ function supportsIndustry( } export function WorkspacePage() { + const navigate = useNavigate(); const client = createApiClient(); const queryClient = useQueryClient(); const [fieldOpen, setFieldOpen] = useState(false); @@ -240,10 +242,23 @@ export function WorkspacePage() { return ( - + + + 下面这些入口面向日常经营,不需要理解模板或技术设置。完成后回到“配置与发布”统一检查并上线。 + + + + + + + + + {runtimeQuery.isError ? ( 公开运行时工作空间暂时无法加载。 ) : ( diff --git a/apps/admin/src/main.tsx b/apps/admin/src/main.tsx index e990340..c6095ee 100644 --- a/apps/admin/src/main.tsx +++ b/apps/admin/src/main.tsx @@ -198,7 +198,7 @@ function Dashboard({ onLogout, role }: { onLogout: () => void; role: string }) { type: "group" as const, label: "系统管理", children: [ - { key: "workspace", label: "模板与设置" }, + { key: "workspace", label: "模板与表单设置" }, { key: "capabilities", label: "能力插件" }, { key: "members", label: "团队成员" }, ],