fix(tree): stabilize filetree mindmap switching
Open filetree mindmap assets inside the primary document pane so the sidebar root is not rebuilt during rapid mindmap/page switching. Keep filetree active rows on doc:<documentId> and asset:<mindmapId>, shorten generated mindmap filenames, and preserve legacy index rows only as compatibility input. Add task438-task445 browser smokes and close the 4-27/4-38/4-39/4-40 tree-domain bug records.
This commit is contained in:
@@ -182,19 +182,19 @@ mod tests {
|
||||
selected: true,
|
||||
},
|
||||
FileTreeRenderRow {
|
||||
row_id: "index:page_root".into(),
|
||||
row_kind: "index".into(),
|
||||
node_id: "index:page_root".into(),
|
||||
row_id: "asset:mind_1".into(),
|
||||
row_kind: "asset".into(),
|
||||
node_id: "asset:mind_1".into(),
|
||||
parent_node_id: Some("page_root".into()),
|
||||
title: "index.md".into(),
|
||||
title: "思维导图.json".into(),
|
||||
depth: 1,
|
||||
expandable: false,
|
||||
expanded: false,
|
||||
icon_kind: "index".into(),
|
||||
icon_kind: "mindmap".into(),
|
||||
document_id: Some("page_root".into()),
|
||||
asset_id: None,
|
||||
asset_id: Some("mind_1".into()),
|
||||
object_identity: Some(
|
||||
r#"{"objectKind":"index","documentId":"page_root","blockId":null,"assetId":null}"#.into(),
|
||||
r#"{"objectKind":"mindmap","documentId":"page_root","blockId":null,"assetId":"mind_1"}"#.into(),
|
||||
),
|
||||
selected: false,
|
||||
},
|
||||
@@ -204,9 +204,12 @@ mod tests {
|
||||
assert!(html.contains("data-rust-filetree-renderer=\"initial_v1\""));
|
||||
assert!(html.contains("data-rust-rendered-row=\"filetree\""));
|
||||
assert!(html.contains("data-testid=\"filetree-doc-row\""));
|
||||
assert!(html.contains("data-testid=\"filetree-index-row\""));
|
||||
assert!(html.contains("data-testid=\"filetree-asset-row\""));
|
||||
assert!(!html.contains("data-testid=\"filetree-index-row\""));
|
||||
assert!(!html.contains("index.md"));
|
||||
assert!(html.contains("data-doc-id=\"page_root\""));
|
||||
assert!(html.contains("data-object-identity=\"{"objectKind":"index""));
|
||||
assert!(html.contains("data-asset-id=\"mind_1\""));
|
||||
assert!(html.contains("data-object-identity=\"{"objectKind":"mindmap""));
|
||||
assert!(html.contains("tree-children"));
|
||||
assert!(html.contains("首页 <安全>"));
|
||||
assert!(html.contains("data-selected=\"true\""));
|
||||
|
||||
Reference in New Issue
Block a user