feat(tree): checkpoint resource lifecycle work

提交当前顶层 mnote Git 工作区,范围集中在 04-tree-domain 的 resource/trash/filetree 生命周期、mnote-web resource_trash 路由、Convex/Next 兼容接口、sidebar/file-tree 客户端适配、smoke 脚本与对应设计/bug 记录。

不包含被 ignore 的 design/05-editor-mainline/reference-code/leptos-tiptap 嵌套仓库改动。新增 smoke 的测试密码改为运行时读取 MNOTE_E2E_PASSWORD,避免提交明文 credential assignment。
This commit is contained in:
lix-2026
2026-05-16 07:38:45 +08:00
parent 274779c0d8
commit 384da4e44c
85 changed files with 12570 additions and 394 deletions
@@ -106,7 +106,7 @@ async function main() {
const pageRow = document.querySelector(`#sidebar-tree-root .tree-row[data-shell-mode="page"][data-node-id="${CSS.escape(id)}"]`);
const fileRows = Array.from(document.querySelectorAll("#sidebar-file-tree-root .tree-row[data-shell-mode=\"filetree\"]"))
.filter((row) => row.getAttribute("data-doc-id") === id || row.getAttribute("data-document-id") === id);
return pageRow && fileRows.some((row) => row.getAttribute("data-row-id") === `doc:${id}`) && fileRows.some((row) => row.getAttribute("data-row-id") === `index:${id}`);
return pageRow && fileRows.some((row) => row.getAttribute("data-row-id") === `doc:${id}`);
},
createdDocumentId,
{ timeout: UI_TIMEOUT_MS },
@@ -114,7 +114,7 @@ async function main() {
const afterCreate = await readCreatedState(page, createdDocumentId);
assert.equal(afterCreate.localApplied, "create", "新建页面应由主文档壳本地 apply");
assert.equal(afterCreate.pageRows, 1, "Page Tree 应立即出现新页面");
assert.deepEqual(afterCreate.fileRows.sort(), [`doc:${createdDocumentId}`, `index:${createdDocumentId}`].sort(), "File Tree 应立即出现新页面 doc/index 行");
assert.deepEqual(afterCreate.fileRows.sort(), [`doc:${createdDocumentId}`], "File Tree 应立即出现新页面 .md 行");
const mindmapId = await insertMindmapThroughSlash(page);
await page.waitForFunction(