chore: 并入已删除会话的在途成果(防丢失;原会话已删,未做功能验收)
**背景**:这些改动原属本工作区另外几个会话(T01/T02 等),**那些会话已被用户删除** ⇒
工作树里的成果处于"无主"状态,一次错误 checkout / 覆盖即**永久丢失** ⇒ 代入库保全。
口径遵循本项目**先例**(`39a1f2e` / `b617cdb`:**别人的活,代入库并在提交信息里注明**)。
**内容**:档案 101「能力管理」改名 + 页内 tab 分页|档案 102 语言切换搬入「用户设置」|
`07-实例UI分区登记表.md`|`scripts/find-ui*.mjs`(UI 元素定位工具)|`poc/portal-entry/`(0.5.3)|
`src/web/locale-pref.ts` + `home-files.ts`(语言偏好持久化)|`test/locale-pref.test.mjs`|
`package.json`|`BRIEF.md` / `INDEX.md` / `docs-manifest.json` / `03-路线图与待办.md` / 档案 100 增量。
**已做最小健全性检查**(⚠️ **未跑完整构建 / 单测** —— 那是原会话的验收职责,本次只求"不丢"):
- JSON 合法:`package.json` / `poc/business-plugins/package.json` / `docs-manifest.json` ✓
- 4 个 TS 文件 `{}`/`()` 配平 ✓;新增文件均非空 ✓
- 规模:13 文件改动 +340/−210,新增 12 条
**未 push**(按 §4 提交边界:用户说"提交",未说"推送")。
This commit is contained in:
1 parent
03c8363960
commit
3efd68517f
27 files changed
+1712
-206
No files matched your search
@@ -183,9 +183,10 @@ function clsAll(tree) {
|
||||
}
|
||||
|
||||
// ── 注册与门禁 ────────────────────────────────────────────────────────────────
|
||||
// 档案 87 起 = 3 个:模型设置(全角色)+ 功能管理(全角色)+ 系统管理(仅 admin)
|
||||
// 档案 87 起 = 3 个:模型设置(全角色)+ 能力管理(全角色,原「功能管理」)+ 系统管理(仅 admin)
|
||||
// 档案 81 · R5(2026-09-15)新增「偏好设置」= 语言切换(全角色,order 99)⇒ 共 **4** 个
|
||||
ok("admin 视角下注册了四个 settings.section", regs.length === 4, "-> " + regs.map(r => r.meta.id).join(", "));
|
||||
// 2026-09-15:「偏好设置」撤除 ⇒ admin 侧 4 → 3(模型设置 + 能力管理 + 系统管理)
|
||||
ok("admin 视角下注册了三个 settings.section", regs.length === 3, "-> " + regs.map(r => r.meta.id).join(", "));
|
||||
const pa = regs.find(r => r.meta.id === "platform-admin");
|
||||
ok("存在 platform-admin 分区", !!pa);
|
||||
if (pa) ok("其 order = 102", pa.meta.order === 102);
|
||||
@@ -213,30 +214,24 @@ ok("非 admin:不出现任何功能项", !PORTAL_ITEMS.some(k => tUser.include
|
||||
mod.apply(ctx);
|
||||
await new Promise((r) => setTimeout(r, 80));
|
||||
const ids = regs.map(r => r.meta.id).sort();
|
||||
ok("非 admin:注册 3 个分区(偏好设置 + 功能管理 + 模型设置;不含系统管理)",
|
||||
ids.length === 3 && ids[0] === "business-plugins" && ids[1] === "model-settings" && ids[2] === "preferences",
|
||||
// 2026-09-15:「偏好设置」分区已撤除(语言切换搬到 portal-entry 的「用户设置」)⇒ 3 → 2
|
||||
ok("非 admin:注册 2 个分区(能力管理 + 模型设置;不含系统管理,也不再有偏好设置)",
|
||||
ids.length === 2 && ids[0] === "business-plugins" && ids[1] === "model-settings",
|
||||
"-> " + ids.join(", "));
|
||||
regs = []; ROLE = "admin";
|
||||
mod.apply(ctx);
|
||||
await new Promise((r) => setTimeout(r, 80));
|
||||
}
|
||||
|
||||
// ── 档案 81 · R5(2026-09-15):「偏好设置」= 语言切换(全角色,走官方 locale)──────
|
||||
// 口径:默认英语(官方 FALLBACK_LOCALE="en");切换走 ctx.locale.setLocale(id),
|
||||
// 语言 id 必须与官方 LOCALE_IDS 一致(en / zh)。本断言同时充当「该栏真能渲染」的冒烟。
|
||||
// ── 2026-09-15(用户要求):**「偏好设置」分区已撤除** ────────────────────────────
|
||||
// 语言切换搬到 `@dsh-local/portal-entry` 的「用户设置」分区(该 bundle 的断言见
|
||||
// `scripts/verify-portal-entry.mjs`)。这里只断言"它真的没了"—— 防止将来又把重复入口加回来。
|
||||
{
|
||||
regs = []; ROLE = "active";
|
||||
mod.apply(ctx);
|
||||
await new Promise((r) => setTimeout(r, 80));
|
||||
const pref = regs.find(r => r.meta.id === "preferences");
|
||||
ok("存在 preferences 分区(语言切换)", !!pref);
|
||||
if (pref) {
|
||||
ok("其 order = 99(排在模型设置之前)", pref.meta.order === 99, "-> " + pref.meta.order);
|
||||
const tPref = text(await render(pref.Comp)).join(" | ");
|
||||
ok("偏好设置:含「界面语言」标签 + 英文/中文两个语言项",
|
||||
tPref.includes("界面语言") && tPref.includes("English") && tPref.includes("中文"),
|
||||
"-> " + tPref.slice(0, 140));
|
||||
}
|
||||
ok("preferences 分区已撤除(不再注册)", regs.every(r => r.meta.id !== "preferences"),
|
||||
"-> " + regs.map(r => r.meta.id).join(", "));
|
||||
regs = []; ROLE = "admin";
|
||||
mod.apply(ctx);
|
||||
await new Promise((r) => setTimeout(r, 80));
|
||||
@@ -247,15 +242,18 @@ ok("非 admin:不出现任何功能项", !PORTAL_ITEMS.some(k => tUser.include
|
||||
const ms = regs.find(r => r.meta.id === "model-settings");
|
||||
ok("存在 model-settings 分区", !!ms);
|
||||
if (ms) {
|
||||
ok("其 order = 100(排在功能管理之前)", ms.meta.order === 100, "-> " + ms.meta.order);
|
||||
ok("其 order = 100(排在能力管理之前)", ms.meta.order === 100, "-> " + ms.meta.order);
|
||||
const tMs = text(await render(ms.Comp)).join(" | ");
|
||||
ok("模型设置:标题与副标题", tMs.includes("模型设置") && tMs.includes("模型选择器"));
|
||||
// 口径②:共享模型也列入且可开关
|
||||
ok("模型设置:平台共享模型区块 + 开关按钮", tMs.includes("平台共享模型") && tMs.includes("停用共享模型"));
|
||||
// 口径①:条目各自开关 ⇒ 要有「启用/停用」而不是「设为当前」
|
||||
ok("模型设置:条目按各自状态渲染徽章(已启用 / 已停用)", tMs.includes("已启用") && tMs.includes("已停用"));
|
||||
ok("模型设置:内置条目显示为「内置 DeepSeek」、自定义条目显示其 route",
|
||||
tMs.includes("内置 DeepSeek") && tMs.includes("my-gw"));
|
||||
// 2026-09-15 用户口径:「内置 DeepSeek」**去掉「内置」**,就叫「DeepSeek」。
|
||||
// 顺带断言那个误导性的「(平台共享)」后缀不再出现 —— 该选项走内置通道,但仍**要填
|
||||
// 用户自己的 API 密钥**,写成「平台共享」会让人以为不必填 key。
|
||||
ok("模型设置:条目名显示为「DeepSeek」(不再有「内置 DeepSeek」)",
|
||||
tMs.includes("DeepSeek") && !tMs.includes("内置 DeepSeek") && tMs.includes("my-gw"));
|
||||
ok("模型设置:自定义条目副行显示 endpoint · 协议",
|
||||
tMs.includes("https://api.example.com/v1") && tMs.includes("openai-completions"));
|
||||
// ── 档案 91(2026-09-14):「新增」改官方**两步式** ──────────────────────────
|
||||
|
||||
Reference in new issue
Block a user