openpencil/crates/op-git/src
Fini b1c3136deb feat(editor): EditorCommand::InsertSubtree — nested PenNode subtree insert
Existing EditorCommand variants are leaf-only (BatchInsertItem carries
only kind/name/x/y/w/h/fill_hex). The design orchestrator (S3a) must
apply rich nested designs — frames with children, layout, text — so
add InsertSubtree { nodes: Vec<PenNode>, parent_id }.

cmd_insert_subtree validates the parent is a container (or NONE = page
root), remaps every incoming node id to a fresh editor id via
remap_subtree_ids (so an externally-authored subtree can't collide
with live ids), and appends under the parent. The apply arm wraps it
in a history snapshot so the insert is one undo step.

NOT verified locally: op-editor-core does not currently build —
vendor/jian is pinned to unpushed commit 80121906 whose DesignMd*
types op-editor-core depends on are absent from every available jian.
The 8 InsertSubtree tests in command_subtree_tests.rs run once the
jian build is restored.

S3a Plan A.
2026-05-22 22:56:10 +08:00
..
auth.rs feat(editor): EditorCommand::InsertSubtree — nested PenNode subtree insert 2026-05-22 22:56:10 +08:00
branch.rs feat(desktop): add op-git crate for in-app version control 2026-05-18 21:45:00 +08:00
history.rs feat(editor): EditorCommand::InsertSubtree — nested PenNode subtree insert 2026-05-22 22:56:10 +08:00
lib.rs feat(editor): EditorCommand::InsertSubtree — nested PenNode subtree insert 2026-05-22 22:56:10 +08:00
merge.rs feat(editor): EditorCommand::InsertSubtree — nested PenNode subtree insert 2026-05-22 22:56:10 +08:00
remote.rs feat(editor): EditorCommand::InsertSubtree — nested PenNode subtree insert 2026-05-22 22:56:10 +08:00
ssh.rs feat(editor): EditorCommand::InsertSubtree — nested PenNode subtree insert 2026-05-22 22:56:10 +08:00
status.rs feat(editor): EditorCommand::InsertSubtree — nested PenNode subtree insert 2026-05-22 22:56:10 +08:00
tests.rs feat(editor): EditorCommand::InsertSubtree — nested PenNode subtree insert 2026-05-22 22:56:10 +08:00
tests_auth.rs feat(editor): add Design-MD panel and complete i18n coverage 2026-05-19 22:29:22 +08:00
tests_merge.rs feat(editor): EditorCommand::InsertSubtree — nested PenNode subtree insert 2026-05-22 22:56:10 +08:00
tests_repo.rs feat(editor): EditorCommand::InsertSubtree — nested PenNode subtree insert 2026-05-22 22:56:10 +08:00
worktree.rs feat(editor): EditorCommand::InsertSubtree — nested PenNode subtree insert 2026-05-22 22:56:10 +08:00