Remove the active TreeShellIframeHost path and legacy env flag so rust_family only mounts the Rust/WASM DOM shell host. Move legacy iframe host files to ignored recycle storage, clear tracked recycle cache entries, and update tree-domain design wording to the current no-iframe position. Align filetree default active rows with doc:<documentId> and update the renderer artifact bridge contract to dom_wasm.
2.9 KiB
2.9 KiB
4-13 [done] task-004 picker final renderer state family 执行清单 v1
口径修正(2026-04-28):本文件的
done状态只表示 picker state-family / runtime reducer / hydrated DOM patch 阶段完成;不表示 picker 已脱离TreeShellIframeHost的 inline JS DOM shell。final DOM shell 收口以4-18-tree-final-dom-shell-cutover-hard-gate-v1.md为准;该硬门禁现已在同目录done/收口。最终清理更新(2026-05-16):
TreeShellIframeHost与iframe_srcdoc已退出 active source 并移动到recycle/;本文保留为历史 state-family 阶段记录,当前口径以4-18/4-19为准。
目标
让 picker 在 rust_family 默认路径下继续退出 compat JS 高亮与 pick 执行路径,收口到轻量 final renderer state family:
- 首屏 DOM 继续由
data-rust-picker-renderer="initial_v1"输出。 - 空查询态、搜索结果态、根目录、排除项使用同一 picker state family 口径。
- 键盘高亮与 Enter pick 只走
rust_picker_state_reducer_v1合同入口,并在 hydrated Rust DOM 上 patchdata-focused / tabIndex。 - 鼠标点击 picker row/root 不再绕过 state family;应先归一化当前 active item,再按同一 pick 结果回传宿主。
- 3000 inline host 与
mnote-web /treedebug shell 保持同一可测试合同。
执行项
- 补齐 3000 inline picker state family 口径:
getPickablePickerEntries区分 root 与 doc,并应用excludeIds后只返回可选项。normalize、focus、next/previous/home/end、pick使用同一 pickable 列表。- 鼠标点击 row/root 通过 state action +
postPickerPickResultToHost,不直接调用handleNavigate/tree.pick.root。
- 对齐
mnote-web /treedebug runtime:- row/root 点击同样经 state action + pick result helper。
- hydrated Rust DOM 下高亮变化只 patch,不整树重绘;键盘 command 不把焦点抢入 iframe,搜索框焦点保持在宿主输入框。
- 测试覆盖:
cargo test -p mnote-web picker_renderer && cargo test -p mnote-web picker_statepnpm vitest run src/components/documents/move-embed-picker-dialog.test.tsx src/components/sidebar/tree-shell-iframe-host.test.tsxnode scripts/task113-picker-keyboard-regression-smoke.js
完成记录
- 2026-04-26:
task113的根因是键盘 command 后 hydrated picker row 主动focus(),导致父级搜索输入框失焦;已改为键盘/state patch 只更新data-focused / tabIndex,点击路径才允许focusDom: true。 - 2026-04-26:3000 inline host 与
mnote-web /treedebug shell 已同步postPickerPickResultToHost、pickable state family、row/root click state action 路径。
非目标
- 本清单不处理 file tree 的 final renderer;对应
task-005。 - 本清单不拆除 compat host;对应
task-006。