feat(tree): close rust family shell cutover

This commit is contained in:
lix-2026
2026-04-28 16:30:51 +08:00
parent 4ab36a9386
commit 7965c6c107
75 changed files with 9721 additions and 1174 deletions
@@ -1233,7 +1233,7 @@ describe("/api/tree/commands route", () => {
);
});
it("embed action 走 tree.node.embed,并生成 pageReference 保存 payload", async () => {
it("embed action 走 tree.node.embed,并 pageReference 组装交给 Rust Page Aggregate preflight", async () => {
const client = {
mutation: vi.fn(),
query: vi.fn(async (name: string, args: { id: string }) => {
@@ -1342,18 +1342,19 @@ describe("/api/tree/commands route", () => {
targetDocumentId: "doc_target",
revision: 7,
conflictDetectionKey: "doc_target:7",
content: [
{ id: "anchor_1", type: "paragraph" },
{
id: expect.any(String),
type: "pageReference",
props: {
pageId: "doc_source",
title: "来源页面",
},
},
],
}),
preflightData: {
pageAggregateEmbed: {
sourceDocumentId: "doc_source",
sourceTitle: "来源页面",
targetDocumentId: "doc_target",
targetContent: [
{ id: "anchor_1", type: "paragraph" },
],
anchorBlockId: "anchor_1",
blockId: expect.any(String),
},
},
}),
);
expect(mockRecordRustBridgeCommandArtifacts).toHaveBeenCalledWith(