chore: align local-first control plane and editor fixes
- wire SQLite control-plane access/session paths into Rust web local-folder routes - preserve local Markdown attachment semantics across upload, reload, and secondary-pane resource tabs - refresh design governance docs, Reasonix task templates, and bug records - retire root .mcp.json local MCP config
This commit is contained in:
@@ -1268,7 +1268,9 @@ mod tests {
|
||||
std::env::temp_dir().join(format!("mnote-local-mindmap-trash-{}", std::process::id()));
|
||||
let _ = std::fs::remove_dir_all(&root);
|
||||
std::fs::create_dir_all(root.join("Page")).expect("create page");
|
||||
std::fs::write(root.join("Page").join("Page.md"), "# Page\n").expect("write md");
|
||||
let markdown_path = root.join("Page").join("Page.md");
|
||||
let original_markdown = "# Page\n\n[map](map.mindmap.json)\n";
|
||||
std::fs::write(&markdown_path, original_markdown).expect("write md");
|
||||
std::fs::write(
|
||||
root.join("Page").join("map.mindmap.json"),
|
||||
r#"{"data":{"uid":"root","text":"KMIND"},"children":[]}"#,
|
||||
@@ -1313,6 +1315,11 @@ mod tests {
|
||||
.join("trash")
|
||||
.join("map.mindmap.json")
|
||||
.exists());
|
||||
assert_eq!(
|
||||
std::fs::read_to_string(&markdown_path).expect("read markdown after trash"),
|
||||
original_markdown,
|
||||
"mindmap archive 只移动资源文件,不应改写正文引用"
|
||||
);
|
||||
let trash_index = std::fs::read_to_string(root.join(".mnote").join("trash-index.json"))
|
||||
.expect("trash index");
|
||||
assert!(trash_index.contains("local-file:Page/map.mindmap.json"));
|
||||
@@ -1354,6 +1361,11 @@ mod tests {
|
||||
"tree.resource.restore"
|
||||
);
|
||||
assert!(root.join("Page").join("map.mindmap.json").exists());
|
||||
assert_eq!(
|
||||
std::fs::read_to_string(&markdown_path).expect("read markdown after restore"),
|
||||
original_markdown,
|
||||
"mindmap restore 只恢复资源文件,不应改写正文引用"
|
||||
);
|
||||
|
||||
let delete_again = app()
|
||||
.oneshot(
|
||||
|
||||
Reference in New Issue
Block a user