Persist PageTree expand state via control-plane view-state and align chevron/DOM with restored expansion; keep Sidex-style shallow page-tree scan and drop the unused recursive scanner that only added cargo noise. Add password vault workbench routes/runtime/skill/CLI, split page_ai_pi into a module package, and retire Hermes/ACP/OpenHub recycle + root harness evidence from the index while gitignoring recycle and local diag dumps. Archive superseded design/bugs docs under old/, point architecture at ARCHITECTURE.md, and refresh smokes for Pi S1–S7, vault, and editor regressions so the working tree can stay clean.
40 lines
2.9 KiB
Markdown
40 lines
2.9 KiB
Markdown
# [recycle] 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 上 patch `data-focused / tabIndex`。
|
||
- 鼠标点击 picker row/root 不再绕过 state family;应先归一化当前 active item,再按同一 pick 结果回传宿主。
|
||
- 3000 inline host 与 `mnote-web /tree` debug shell 保持同一可测试合同。
|
||
|
||
## 执行项
|
||
|
||
- [x] 补齐 3000 inline picker state family 口径:
|
||
- [x] `getPickablePickerEntries` 区分 root 与 doc,并应用 `excludeIds` 后只返回可选项。
|
||
- [x] `normalize`、`focus`、`next/previous/home/end`、`pick` 使用同一 pickable 列表。
|
||
- [x] 鼠标点击 row/root 通过 state action + `postPickerPickResultToHost`,不直接调用 `handleNavigate` / `tree.pick.root`。
|
||
- [x] 对齐 `mnote-web /tree` debug runtime:
|
||
- [x] row/root 点击同样经 state action + pick result helper。
|
||
- [x] hydrated Rust DOM 下高亮变化只 patch,不整树重绘;键盘 command 不把焦点抢入 iframe,搜索框焦点保持在宿主输入框。
|
||
- [x] 测试覆盖:
|
||
- [x] `cargo test -p mnote-web picker_renderer && cargo test -p mnote-web picker_state`
|
||
- [x] `pnpm vitest run src/components/documents/move-embed-picker-dialog.test.tsx src/components/sidebar/tree-shell-iframe-host.test.tsx`
|
||
- [x] `node 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 /tree` debug shell 已同步 `postPickerPickResultToHost`、pickable state family、row/root click state action 路径。
|
||
|
||
## 非目标
|
||
|
||
- 本清单不处理 file tree 的 final renderer;对应 `task-005`。
|
||
- 本清单不拆除 compat host;对应 `task-006`。
|