收口 Rust Web 入口与 AI 写入链
- 将 3000 主入口继续收口到 mnote-web,补齐 /favicon.ico、/api/auth、session alias、AI run 等 Rust Web 路由边界。 - 更新登录页与 Convex Auth 代理,支持测试账号快速登录写入真实 Convex Auth cookie。 - 推进页面设置、Wolai 对齐、Phase 7 AI kernel/CLI-first 设计文档与相关 smoke 脚本。 - 更新 leptos-tiptap 生成资产、mnote-cli/bridge-runtime、前端依赖和 dev/prod 启动脚本。
This commit is contained in:
@@ -110,18 +110,28 @@ async function validateGateway(baseUrl) {
|
||||
assert.equal(auth.status, 200, `/auth 失败: ${auth.status}`);
|
||||
assert.equal(auth.headers.get("x-mnote-web-owner"), "mnote-web");
|
||||
assert.match(auth.headers.get("content-type") || "", /text\/html/);
|
||||
const legacyUpstream = auth.headers.get("x-mnote-legacy-upstream");
|
||||
if (legacyUpstream === "next-app-router") {
|
||||
assert.match(authText, /Wolai Clone|测试账号快速登录|加载中/);
|
||||
} else {
|
||||
assert.match(authText, /data-mnote-web-owner="mnote-web"/);
|
||||
}
|
||||
assert.equal(auth.headers.get("x-mnote-legacy-upstream"), null, "/auth 不应再代理 3100");
|
||||
assert.match(authText, /data-mnote-shell="auth"/);
|
||||
assert.match(authText, /邮箱登录/);
|
||||
assert.match(authText, /测试账号快速登录/);
|
||||
assert.doesNotMatch(authText, /隐私政策|使用\s*Google|使用\s*GitHub|第三方快捷/iu);
|
||||
|
||||
const root = await fetchWithTimeout(`${baseUrl}/`);
|
||||
const rootText = await root.text();
|
||||
assert.equal(root.status, 200, `/ 失败: ${root.status}`);
|
||||
assert.equal(root.status, 303, `/ 未登录应跳转 /auth: ${root.status} ${rootText.slice(0, 120)}`);
|
||||
assert.equal(root.headers.get("x-mnote-web-owner"), "mnote-web");
|
||||
assert.match(rootText, /data-mnote-shell="workspace"/);
|
||||
assert.equal(root.headers.get("location"), "/auth");
|
||||
|
||||
const authedRoot = await fetchWithTimeout(`${baseUrl}/`, {
|
||||
headers: {
|
||||
"x-mnote-actor-id": "user_real",
|
||||
"x-mnote-actor-type": "user",
|
||||
},
|
||||
});
|
||||
const authedRootText = await authedRoot.text();
|
||||
assert.equal(authedRoot.status, 200, `/ 已登录入口失败: ${authedRoot.status}`);
|
||||
assert.equal(authedRoot.headers.get("x-mnote-web-owner"), "mnote-web");
|
||||
assert.match(authedRootText, /data-mnote-shell="workspace"/);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
|
||||
Reference in New Issue
Block a user