docs: record 0525 reasonix task drafts
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
# Reasonix Batch A / Worker A:5-29 dom_selection 第一刀
|
||||
|
||||
Project root:由 runner 传入的独立 worktree。
|
||||
|
||||
## 目标
|
||||
|
||||
实现 `design/05-editor-mainline/process/5-29-editor-runtime-followup-checklist-v1.md` 中 Worker A:新增 `editor_runtime/dom_selection.rs`,从 `rust/spikes/leptos-tiptap-spike/src/lib.rs` 迁出最小 selection helper,保持行为不变。
|
||||
|
||||
## 允许修改
|
||||
|
||||
- `rust/spikes/leptos-tiptap-spike/src/lib.rs`
|
||||
- `rust/spikes/leptos-tiptap-spike/src/editor_runtime/mod.rs`
|
||||
- 新增 `rust/spikes/leptos-tiptap-spike/src/editor_runtime/dom_selection.rs`
|
||||
|
||||
## 候选函数
|
||||
|
||||
优先迁移边界清楚、参数少、与 Leptos signal 无强耦合的函数:
|
||||
|
||||
- `active_editor_text_selection`
|
||||
- `selection_summary`
|
||||
- `has_active_text_selection`
|
||||
- `selection_has_rich_marks`
|
||||
- 如确实必要,可迁出 selection payload 构造 helper,但不要为了迁移扩大参数面。
|
||||
|
||||
## 禁止事项
|
||||
|
||||
- 不迁出 block menu DOM、overlay state、host bridge、resource open、local upload。
|
||||
- 不改 shell / `mnote-web` 代码。
|
||||
- 不修改设计文档、AGENTS、git 状态或提交。
|
||||
- 不做大范围格式化。
|
||||
- 不改用户可见文案,除非编译必须。
|
||||
|
||||
## 验收命令
|
||||
|
||||
至少运行:
|
||||
|
||||
```bash
|
||||
cargo fmt --manifest-path rust/Cargo.toml --all --check
|
||||
cargo check --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml
|
||||
```
|
||||
|
||||
如果时间允许,再运行:
|
||||
|
||||
```bash
|
||||
cargo build --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml --target wasm32-unknown-unknown --release
|
||||
```
|
||||
|
||||
## 输出要求
|
||||
|
||||
最终 handoff 必须列出:
|
||||
|
||||
- 修改文件和迁移函数清单。
|
||||
- 未迁函数及原因。
|
||||
- 验收命令和结果。
|
||||
- 风险,尤其是是否改变 selection / toolbar / shortcut 行为。
|
||||
@@ -0,0 +1,41 @@
|
||||
# Reasonix Batch A / Worker C:3-20 document pane host 只读审计
|
||||
|
||||
Project root:由 runner 传入的独立 worktree。
|
||||
|
||||
## 目标
|
||||
|
||||
只读审计 `mnote-web` document pane host adapter / document session / conflict panel 相关 inline runtime,为 `design/03-rust-web/process/3-20-browser-runtime-followup-checklist-v1.md` 提供下一刀模块拆分方案。
|
||||
|
||||
## 只读范围
|
||||
|
||||
可以读取:
|
||||
|
||||
- `rust/crates/mnote-web/src/routes/web_shell.rs`
|
||||
- `rust/crates/mnote-web/src/ssr/pages/layout.rs`
|
||||
- `rust/crates/mnote-web/browser/*`
|
||||
- 与 document session / conflict panel 相关的 smoke 脚本
|
||||
|
||||
## 禁止事项
|
||||
|
||||
- 严格只读,禁止修改任何源码、文档、脚本、生成产物或 git 状态。
|
||||
- 不迁入 Tiptap 内部命令、history 或 editor DOM overlay。
|
||||
- 不建议把 Page AI panel 混入本切片。
|
||||
|
||||
## 审计问题
|
||||
|
||||
请回答:
|
||||
|
||||
1. document pane host adapter 当前在哪些 Rust raw string / inline module 中?
|
||||
2. 哪些函数适合拆到 `document-pane-host-runtime.js` / `document-session-runtime.js` / `document-conflict-panel-runtime.js`?
|
||||
3. 第一刀最小可迁函数是什么,为什么?
|
||||
4. 哪些行为必须由 browser smoke 覆盖:primary/secondary pane、resource tab、conflict panel unmount、attachment tab、error placeholder?
|
||||
5. 哪些函数属于 `05-editor-mainline`,不能在 `03-rust-web` 里处理?
|
||||
|
||||
## 输出要求
|
||||
|
||||
最终 handoff 必须包含:
|
||||
|
||||
- 候选模块表。
|
||||
- 函数位置和迁移优先级。
|
||||
- 不可迁项和边界原因。
|
||||
- 推荐 Worker 实现任务书草案。
|
||||
@@ -0,0 +1,49 @@
|
||||
# Reasonix Batch A2 / Worker A:5-29 dom_selection 完成与验证
|
||||
|
||||
Project root:`/mnt/Data1T/mnote-worktrees/0525-5-29-dom-selection`
|
||||
|
||||
## 背景
|
||||
|
||||
该 worktree 可能已有候选 diff:
|
||||
|
||||
- 新增 `rust/spikes/leptos-tiptap-spike/src/editor_runtime/dom_selection.rs`
|
||||
- `mod.rs` 挂载 `dom_selection`
|
||||
- `lib.rs` 从该模块导入 selection helper
|
||||
|
||||
前一轮 runner 未写出 `process-handoff.md/json`,因此本任务要求完成、修正、验证并交接。
|
||||
|
||||
## 目标
|
||||
|
||||
确保 `dom_selection.rs` 第一刀是可采纳候选 patch:行为同构、编译通过、diff 范围干净。
|
||||
|
||||
## 允许修改
|
||||
|
||||
- `rust/spikes/leptos-tiptap-spike/src/lib.rs`
|
||||
- `rust/spikes/leptos-tiptap-spike/src/editor_runtime/mod.rs`
|
||||
- `rust/spikes/leptos-tiptap-spike/src/editor_runtime/dom_selection.rs`
|
||||
|
||||
可以修正空行、导入顺序、可见性、dead_code 标记。
|
||||
|
||||
## 禁止事项
|
||||
|
||||
- 不迁出 block menu DOM、overlay state、host bridge、resource open、local upload。
|
||||
- 不改 shell / `mnote-web`。
|
||||
- 不修改设计文档、AGENTS、git 状态或提交。
|
||||
- 不创建无关 symlink;如果已有无关 `reference-code` untracked,请不要删除,也不要依赖它。
|
||||
|
||||
## 验收命令
|
||||
|
||||
```bash
|
||||
cargo fmt --manifest-path rust/Cargo.toml --all --check
|
||||
cargo check --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml
|
||||
```
|
||||
|
||||
## 输出要求
|
||||
|
||||
handoff 必须列出:
|
||||
|
||||
- 最终修改文件。
|
||||
- 迁移函数清单。
|
||||
- 未迁函数及原因。
|
||||
- 验收命令和结果。
|
||||
- 是否有 untracked / unrelated 文件,尤其是 `reference-code`。
|
||||
@@ -0,0 +1,45 @@
|
||||
# Reasonix Batch A2 / Worker B:5-29 block menu legacy HTML helpers 实现
|
||||
|
||||
Project root:`/mnt/Data1T/mnote-worktrees/0525-a2-block-menu-current`
|
||||
|
||||
## 目标
|
||||
|
||||
在独立 worktree 中产出候选 patch:把 `rust/spikes/leptos-tiptap-spike/src/lib.rs` 中 block menu 仍使用 HTML 整文替换的 legacy helper 抽到独立 editor runtime 模块,降低 `lib.rs` 体积,为后续 history-safe command 替换做准备。本批只做同构迁移,不改变用户行为。
|
||||
|
||||
## 允许修改
|
||||
|
||||
- `rust/spikes/leptos-tiptap-spike/src/lib.rs`
|
||||
- `rust/spikes/leptos-tiptap-spike/src/editor_runtime/mod.rs`
|
||||
- 新增 `rust/spikes/leptos-tiptap-spike/src/editor_runtime/block_menu_legacy_html.rs`
|
||||
|
||||
如编译必须,可把 `DropPlacement` 或必要小 helper 调整为 `pub(crate)`;不要扩大到其它模块。
|
||||
|
||||
## 候选函数
|
||||
|
||||
- `duplicate_top_level_block_html`
|
||||
- `reorder_top_level_block_html`
|
||||
|
||||
可以一起迁移其仅服务这两个函数的小型 DOM helper;不要迁移 overlay state、Leptos signal、`apply_html_update` 或 Tiptap command。
|
||||
|
||||
## 禁止事项
|
||||
|
||||
- 不实现新交互,不修 unrelated bug。
|
||||
- 不改 shell / `mnote-web`。
|
||||
- 不修改设计文档、AGENTS、git 状态或提交。
|
||||
- 不把 legacy HTML helper 标成 history-safe;模块名和注释必须表达它只是过渡 legacy 路径。
|
||||
|
||||
## 验收命令
|
||||
|
||||
```bash
|
||||
cargo fmt --manifest-path rust/Cargo.toml --all --check
|
||||
cargo check --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml
|
||||
```
|
||||
|
||||
## 输出要求
|
||||
|
||||
handoff 必须列出:
|
||||
|
||||
- 修改文件和迁移函数。
|
||||
- 是否改变任何用户行为,预期应为否。
|
||||
- 仍未解决的 history 风险。
|
||||
- 验收命令和结果。
|
||||
@@ -0,0 +1,48 @@
|
||||
# Reasonix Batch A2 / Worker C:3-20 document conflict panel runtime 第一刀
|
||||
|
||||
Project root:`/mnt/Data1T/mnote-worktrees/0525-a2-conflict-runtime-current`
|
||||
|
||||
## 目标
|
||||
|
||||
在独立 worktree 中产出候选 patch:新增 document conflict panel browser runtime 的第一刀,把 `clearSessionConflictSurface` 这类纯 DOM 清理 helper 外置到 `rust/crates/mnote-web/browser/document-conflict-panel-runtime.js`,并让 `web_shell.rs` 优先委托该 runtime,保留 inline fallback。
|
||||
|
||||
## 允许修改
|
||||
|
||||
- `rust/crates/mnote-web/browser/document-conflict-panel-runtime.js`
|
||||
- `rust/crates/mnote-web/src/routes/web_shell.rs`
|
||||
- `rust/crates/mnote-web/src/routes/mod.rs`
|
||||
|
||||
必要时只新增/调整 `web_shell.rs` 或 `routes/mod.rs` 中的字符串断言测试。
|
||||
|
||||
## 实现要求
|
||||
|
||||
- 新增固定 asset route:`GET /api/mnote-browser-runtime/document-conflict-panel-runtime.js`,返回 `application/javascript; charset=utf-8`。
|
||||
- 在 document shell 页面加载该 module,且不影响现有 editor island adapter inline module。
|
||||
- `web_shell.rs` 中 `clearSessionConflictSurface(session)` 优先调用 `window.__mnoteDocumentConflictPanelRuntime.clearSessionConflictSurface(session, deps)`;runtime 不存在时执行原 inline fallback。
|
||||
- 外置 runtime 只做 DOM 清理,不处理 conflict merge / accept / keep current 业务。
|
||||
|
||||
## 禁止事项
|
||||
|
||||
- 不迁 Tiptap editor 内部命令。
|
||||
- 不迁 Page AI panel。
|
||||
- 不改变 conflict 状态机、保存接口、local-folder event channel。
|
||||
- 不修改设计文档、AGENTS、git 状态或提交。
|
||||
|
||||
## 验收命令
|
||||
|
||||
```bash
|
||||
node --check rust/crates/mnote-web/browser/document-conflict-panel-runtime.js
|
||||
cargo fmt --manifest-path rust/Cargo.toml --all --check
|
||||
cargo check --manifest-path rust/Cargo.toml -p mnote-web
|
||||
cargo test --manifest-path rust/Cargo.toml -p mnote-web mnote_browser_runtime_assets_are_explicitly_mounted -- --test-threads=1
|
||||
```
|
||||
|
||||
## 输出要求
|
||||
|
||||
handoff 必须列出:
|
||||
|
||||
- 修改文件。
|
||||
- 新 route 和注入位置。
|
||||
- 保留的 fallback。
|
||||
- 验收命令和结果。
|
||||
- 未覆盖风险。
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
# Reasonix Batch A2 / Worker D:3-20 local upload insert helper 外置实现
|
||||
|
||||
Project root:`/mnt/Data1T/mnote-worktrees/0525-a2-upload-insert-current`
|
||||
|
||||
## 目标
|
||||
|
||||
在独立 worktree 中产出候选 patch:把 `SIDEBAR_TREE_JS` 中 `insertUploadedAssetIntoEditor(asset, targetRoot)` 的实现同构迁入 `rust/crates/mnote-web/browser/local-upload-runtime.js`,`layout.rs` 只保留委托 wrapper 和 fallback。不得改变上传落盘、资源归属或 editor 插入行为。
|
||||
|
||||
## 允许修改
|
||||
|
||||
- `rust/crates/mnote-web/browser/local-upload-runtime.js`
|
||||
- `rust/crates/mnote-web/src/ssr/pages/layout.rs`
|
||||
|
||||
必要时只更新同文件内现有字符串断言测试。
|
||||
|
||||
## 实现要求
|
||||
|
||||
- `local-upload-runtime.js` 新增导出到 `window.__mnoteLocalUploadRuntime.insertUploadedAssetIntoEditor`。
|
||||
- `layout.rs` 中原 `insertUploadedAssetIntoEditor` 优先委托外置 runtime;runtime 不存在时保留原 fallback。
|
||||
- 外置 runtime 通过 deps 接收现有 helper,不复制 resource/open 业务语义:
|
||||
- `uploadedAssetTitle`
|
||||
- `localAssetOpenUrl`
|
||||
- `uploadedAssetUrl`
|
||||
- `uploadedAssetType`
|
||||
- `isLocalUploadedAsset`
|
||||
- `buildOnlyOfficeAssetOpenUrl`
|
||||
- `fetchCurrentOnlyOfficeUserId`
|
||||
- `buildOnlyOfficeOpenPath`
|
||||
- `inferOnlyOfficeFileType`
|
||||
- `currentDocumentId`
|
||||
- `uploadedAttachmentClass`
|
||||
- `uploadedFileSize`
|
||||
- `cssEscape`
|
||||
- `enhanceEditorAttachmentLinks`
|
||||
- 保持 `data-mnote-last-upload-inserted`、`data-mnote-last-upload-asset-id`、`data-mnote-last-upload-insert-error` 行为不变。
|
||||
|
||||
## 禁止事项
|
||||
|
||||
- 不迁 `uploadFileToMediaAsset` / `uploadFilesWithResolvedTarget` 主流程。
|
||||
- 不改 `/api/local-folder/assets/upload` 合同。
|
||||
- 不改 resource open / OnlyOffice URL 语义。
|
||||
- 不修改设计文档、AGENTS、git 状态或提交。
|
||||
|
||||
## 验收命令
|
||||
|
||||
```bash
|
||||
node --check rust/crates/mnote-web/browser/local-upload-runtime.js
|
||||
cargo fmt --manifest-path rust/Cargo.toml --all --check
|
||||
cargo check --manifest-path rust/Cargo.toml -p mnote-web
|
||||
cargo test --manifest-path rust/Cargo.toml -p mnote-web sidebar_upload_runtime_routes_local_markdown_assets_to_local_folder -- --test-threads=1
|
||||
```
|
||||
|
||||
## 输出要求
|
||||
|
||||
handoff 必须列出:
|
||||
|
||||
- 修改文件。
|
||||
- 委托 deps 清单。
|
||||
- 是否保持 fallback。
|
||||
- 验收命令和结果。
|
||||
- 未覆盖风险。
|
||||
@@ -0,0 +1,74 @@
|
||||
# Reasonix Worker Task
|
||||
|
||||
## 任务
|
||||
|
||||
对 `5-29` 的 block DnD runtime 拆分做只读审计,目标只限于:
|
||||
|
||||
- `rust/spikes/leptos-tiptap-spike/src/lib.rs` 里的
|
||||
- `drop_indicator_from_target`
|
||||
- `drop_indicator_from_point`
|
||||
- `rust/spikes/leptos-tiptap-spike/src/editor_runtime/block_dnd.rs`
|
||||
|
||||
你只做边界审计与最小切片建议,不修改源码,不运行格式化,不运行构建,不提交 git。
|
||||
|
||||
## Project Root
|
||||
|
||||
`/mnt/Data1T/mnote-worktrees/0525-ak-worker-a-5-29-drop-indicator-readonly`
|
||||
|
||||
## 输入文件
|
||||
|
||||
- Checklist:
|
||||
- `/mnt/Data1T/mnote/design/05-editor-mainline/process/5-29-editor-runtime-followup-checklist-v1.md`
|
||||
- 相关代码入口:
|
||||
- `/mnt/Data1T/mnote-worktrees/0525-ak-worker-a-5-29-drop-indicator-readonly/rust/spikes/leptos-tiptap-spike/src/lib.rs`
|
||||
- `/mnt/Data1T/mnote-worktrees/0525-ak-worker-a-5-29-drop-indicator-readonly/rust/spikes/leptos-tiptap-spike/src/editor_runtime/block_dnd.rs`
|
||||
|
||||
## Ownership
|
||||
|
||||
你负责:
|
||||
|
||||
- 只读分析 `drop_indicator_from_target` / `drop_indicator_from_point` 现在还剩哪些依赖。
|
||||
- 给出“下一刀最小可迁移 helper”建议。
|
||||
- 明确哪些壳层必须继续留在 `lib.rs`。
|
||||
- 若你认为可以继续外置,请给出建议的 helper 签名和责任边界。
|
||||
|
||||
你不能修改:
|
||||
|
||||
- 任何源码
|
||||
- 任何 design / bugs 文档
|
||||
- 任何生成产物
|
||||
|
||||
共享或冲突文件规则:
|
||||
|
||||
- 本任务是只读审计,工作区必须保持源码零 diff。
|
||||
- 允许写 runner 自己的输出文件,例如 `process-handoff.md/json`、`final.md`、`result.json`。
|
||||
|
||||
## 额外限制
|
||||
|
||||
- 禁止创建新的 `.codex/reasonix-tasks/*.md`
|
||||
- 禁止启动新的 reasonix / claudecode / codex / hermes / runner
|
||||
- 禁止操作其他 worktree
|
||||
- 不要把建议扩展到 `hovered_block_from_selection`、listener、signal、keyboard branch、block reorder
|
||||
- 不要建议复制布局常量到 `block_dnd.rs`
|
||||
|
||||
## 需要回答的问题
|
||||
|
||||
1. `drop_indicator_from_target` 是否已经具备迁入 `editor_runtime/block_dnd.rs` 的条件?
|
||||
2. 如果是,最小 helper 签名应该是什么?
|
||||
3. `drop_indicator_from_point` 是否也应在同一刀一起迁出,还是分下一刀更稳?
|
||||
4. 哪些依赖仍然应保留在 `lib.rs` 壳层?
|
||||
|
||||
## 验收命令
|
||||
|
||||
不需要运行测试;这是只读审计任务。
|
||||
|
||||
## 最终回复格式
|
||||
|
||||
请按以下结构回复:
|
||||
|
||||
- 修改文件:
|
||||
- 审计结论:
|
||||
- 建议的最小切片:
|
||||
- 必须留在 lib.rs 的边界:
|
||||
- 未完成项:
|
||||
- 风险和需要 Codex 复核的点:
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
# Reasonix Worker Task
|
||||
|
||||
## 任务
|
||||
|
||||
对 `3-20` 的 document pane host adapter / conflict panel runtime 做只读审计,范围只限于:
|
||||
|
||||
- `rust/crates/mnote-web/src/routes/web_shell.rs`
|
||||
- `rust/crates/mnote-web/browser/document-conflict-panel-runtime.js`
|
||||
- `design/03-rust-web/process/3-20-browser-runtime-followup-checklist-v1.md`
|
||||
|
||||
只做边界审计和最小切片建议,不修改源码、不运行测试、不提交 git。
|
||||
|
||||
## Project Root
|
||||
|
||||
`/mnt/Data1T/mnote-worktrees/0525-al-worker-a-3-20-document-pane-host-readonly`
|
||||
|
||||
## 输入文件
|
||||
|
||||
- Checklist:
|
||||
- `/mnt/Data1T/mnote/design/03-rust-web/process/3-20-browser-runtime-followup-checklist-v1.md`
|
||||
- 相关代码入口:
|
||||
- `/mnt/Data1T/mnote-worktrees/0525-al-worker-a-3-20-document-pane-host-readonly/rust/crates/mnote-web/src/routes/web_shell.rs`
|
||||
- `/mnt/Data1T/mnote-worktrees/0525-al-worker-a-3-20-document-pane-host-readonly/rust/crates/mnote-web/browser/document-conflict-panel-runtime.js`
|
||||
|
||||
## Ownership
|
||||
|
||||
你负责:
|
||||
|
||||
- 只读分析 document conflict / document pane host 当前还留在 `web_shell.rs` 的可迁纯 DOM/helper。
|
||||
- 明确哪些逻辑必须继续留在 `web_shell.rs` 壳层。
|
||||
- 给出下一刀最小 helper 建议,优先纯 DOM / callback wiring / host mount helper,不要碰 fetch/persist/session status 业务逻辑。
|
||||
|
||||
你不能修改:
|
||||
|
||||
- 任何源码
|
||||
- 任何 design / bugs 文档
|
||||
- 任何生成产物
|
||||
|
||||
共享或冲突文件规则:
|
||||
|
||||
- 本任务是只读审计,工作区必须保持源码零 diff。
|
||||
- 允许写 runner 自己的输出文件,例如 `process-handoff.md/json`、`final.md`、`result.json`。
|
||||
|
||||
## 额外限制
|
||||
|
||||
- 禁止创建新的 `.codex/reasonix-tasks/*.md`
|
||||
- 禁止启动新的 reasonix / claudecode / codex / hermes / runner
|
||||
- 禁止操作其他 worktree
|
||||
- 不要建议整体迁出 `acceptDiskVersion`、`keepCurrentEditorVersion`、`writeMergedConflictResult`
|
||||
- 不要建议整体迁出 fetch / persist / session status / aggregate/resource snapshot 逻辑
|
||||
- 重点只看 host 挂载、panel 定位、header 插入、diff panel 显隐、shared callback wiring 是否还能收一刀
|
||||
|
||||
## 需要回答的问题
|
||||
|
||||
1. `renderSessionConflictSurface` 中是否还有可迁出的纯 DOM / host helper?
|
||||
2. `openConflictDiffPanel` 中除已迁的 `populateSessionConflictDiffPanel` 外,是否还有可独立迁出的纯 DOM 层?
|
||||
3. 下一刀最小可迁 helper 的建议签名是什么?
|
||||
4. 哪些边界必须继续留在 `web_shell.rs`?
|
||||
|
||||
## 验收命令
|
||||
|
||||
不需要运行测试;这是只读审计任务。
|
||||
|
||||
## 最终回复格式
|
||||
|
||||
请按以下结构回复:
|
||||
|
||||
- 修改文件:
|
||||
- 审计结论:
|
||||
- 建议的最小切片:
|
||||
- 必须留在 web_shell.rs 的边界:
|
||||
- 未完成项:
|
||||
- 风险和需要 Codex 复核的点:
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
# Reasonix Worker Task
|
||||
|
||||
## 任务
|
||||
|
||||
对 `3-20` 的 filetree drop/upload preflight DOM helper 做只读审计,范围只限于:
|
||||
|
||||
- `rust/crates/mnote-web/src/ssr/pages/layout.rs`
|
||||
- `rust/crates/mnote-web/browser/filetree-runtime.js`
|
||||
- `design/03-rust-web/process/3-20-browser-runtime-followup-checklist-v1.md`
|
||||
|
||||
只做边界审计和最小切片建议,不修改源码、不运行测试、不提交 git。
|
||||
|
||||
## Project Root
|
||||
|
||||
`/mnt/Data1T/mnote-worktrees/0525-am-worker-a-3-20-filetree-preflight-readonly`
|
||||
|
||||
## 输入文件
|
||||
|
||||
- Checklist:
|
||||
- `/mnt/Data1T/mnote/design/03-rust-web/process/3-20-browser-runtime-followup-checklist-v1.md`
|
||||
- 相关代码入口:
|
||||
- `/mnt/Data1T/mnote-worktrees/0525-am-worker-a-3-20-filetree-preflight-readonly/rust/crates/mnote-web/src/ssr/pages/layout.rs`
|
||||
- `/mnt/Data1T/mnote-worktrees/0525-am-worker-a-3-20-filetree-preflight-readonly/rust/crates/mnote-web/browser/filetree-runtime.js`
|
||||
|
||||
## Ownership
|
||||
|
||||
你负责:
|
||||
|
||||
- 只读分析以下函数是否适合迁入 `filetree-runtime.js`:
|
||||
- `fileTreeRowsForUploadPreflight`
|
||||
- `fileTreeDocumentParentsForPreflight`
|
||||
- `fileTreeTargetChildrenForPreflight`
|
||||
- `fileTreeDropPreflightRows`
|
||||
- 给出下一刀最小 helper 建议。
|
||||
- 明确哪些依赖必须继续留在 `layout.rs` 壳层。
|
||||
|
||||
你不能修改:
|
||||
|
||||
- 任何源码
|
||||
- 任何 design / bugs 文档
|
||||
- 任何生成产物
|
||||
|
||||
共享或冲突文件规则:
|
||||
|
||||
- 本任务是只读审计,工作区必须保持源码零 diff。
|
||||
- 允许写 runner 自己的输出文件,例如 `process-handoff.md/json`、`final.md`、`result.json`。
|
||||
|
||||
## 额外限制
|
||||
|
||||
- 禁止创建新的 `.codex/reasonix-tasks/*.md`
|
||||
- 禁止启动新的 reasonix / claudecode / codex / hermes / runner
|
||||
- 禁止操作其他 worktree
|
||||
- 不要建议整体迁出 `ensureFileTreeWritableTarget`
|
||||
- 不要建议整体迁出 `/api/tree/filetree/drop-preflight` fetch
|
||||
- 不要建议整体迁出 `resolveFileTreeUploadTarget` 或 `refreshLocalFolderSidebarSnapshot`
|
||||
- 重点只看 DOM 行遍历、属性采集、目标 children/parents 组装这一层
|
||||
|
||||
## 需要回答的问题
|
||||
|
||||
1. 这 4 个 preflight helper 中,哪些已经具备迁入 `filetree-runtime.js` 的条件?
|
||||
2. 最小可迁 helper 签名应该是什么?
|
||||
3. 哪些依赖必须继续留在 `layout.rs`?
|
||||
4. 是否应该一刀一起迁,还是拆成两刀更稳?
|
||||
|
||||
## 验收命令
|
||||
|
||||
不需要运行测试;这是只读审计任务。
|
||||
|
||||
## 最终回复格式
|
||||
|
||||
请按以下结构回复:
|
||||
|
||||
- 修改文件:
|
||||
- 审计结论:
|
||||
- 建议的最小切片:
|
||||
- 必须留在 layout.rs 的边界:
|
||||
- 未完成项:
|
||||
- 风险和需要 Codex 复核的点:
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
# Reasonix Batch B / Worker D3:3-20 insertUploadedAssetIntoEditor 外置候选实现
|
||||
|
||||
Project root:`/mnt/Data1T/mnote-worktrees/0525-b3-upload-insert-runtime`
|
||||
|
||||
## 目标
|
||||
|
||||
在独立 worktree 中产出候选 patch:把 `SIDEBAR_TREE_JS` 中 `insertUploadedAssetIntoEditor(asset, targetRoot)` 的主体同构迁入 `rust/crates/mnote-web/browser/local-upload-runtime.js`,`layout.rs` 只保留委托 wrapper 和 inline fallback。不得改变上传落盘、资源归属、OnlyOffice URL 或 editor 插入行为。
|
||||
|
||||
## 允许修改
|
||||
|
||||
- `rust/crates/mnote-web/browser/local-upload-runtime.js`
|
||||
- `rust/crates/mnote-web/src/ssr/pages/layout.rs`
|
||||
|
||||
必要时只更新 `layout.rs` 中现有字符串断言测试。不要修改设计文档、AGENTS、其它源码、generated wasm、git 状态或提交。
|
||||
|
||||
## 实现要求
|
||||
|
||||
- `local-upload-runtime.js` 新增 `insertUploadedAssetIntoEditor(asset, targetRoot, deps)`,并导出到 `window.__mnoteLocalUploadRuntime.insertUploadedAssetIntoEditor`。
|
||||
- `layout.rs` 中原 `insertUploadedAssetIntoEditor(asset, targetRoot)` 优先委托:
|
||||
`localUploadRuntimeFunction('insertUploadedAssetIntoEditor')`。
|
||||
- 外置 runtime 不复制 resource/open 长期业务语义,必须通过 `deps` 接收以下既有 helper:
|
||||
- `uploadedAssetTitle`
|
||||
- `localAssetOpenUrl`
|
||||
- `uploadedAssetUrl`
|
||||
- `uploadedAssetType`
|
||||
- `isLocalUploadedAsset`
|
||||
- `buildOnlyOfficeAssetOpenUrl`
|
||||
- `fetchCurrentOnlyOfficeUserId`
|
||||
- `buildOnlyOfficeOpenPath`
|
||||
- `inferOnlyOfficeFileType`
|
||||
- `currentDocumentId`
|
||||
- `uploadedAttachmentClass`
|
||||
- `uploadedFileSize`
|
||||
- `cssEscape`
|
||||
- `enhanceEditorAttachmentLinks`
|
||||
- 保持以下 DOM attribute 行为完全不变:
|
||||
- `data-mnote-last-upload-inserted`
|
||||
- `data-mnote-last-upload-asset-id`
|
||||
- `data-mnote-last-upload-insert-error`
|
||||
- 保持 image 分支 `setImage({ src, alt, title })` 行为不变。
|
||||
- 保持附件 link content、`storedHref`、`class`、`target`、`rel`、后续 `setTimeout` enhance 行为不变。
|
||||
- runtime 不存在时,inline fallback 必须继续执行原实现。
|
||||
|
||||
## 禁止事项
|
||||
|
||||
- 不迁 `uploadFileToMediaAsset` / `uploadFilesWithResolvedTarget` 编排流程。
|
||||
- 不改 `/api/local-folder/assets/upload` 合同。
|
||||
- 不改 resource open / OnlyOffice URL 语义。
|
||||
- 不做格式化之外的邻近重构。
|
||||
- 不提交 git。
|
||||
|
||||
## 验收命令
|
||||
|
||||
```bash
|
||||
node --check rust/crates/mnote-web/browser/local-upload-runtime.js
|
||||
cargo fmt --manifest-path rust/Cargo.toml --all --check
|
||||
cargo check --manifest-path rust/Cargo.toml -p mnote-web
|
||||
cargo test --manifest-path rust/Cargo.toml -p mnote-web local_upload_runtime_contains_editor_upload_context_helpers -- --test-threads=1
|
||||
cargo test --manifest-path rust/Cargo.toml -p mnote-web sidebar_upload_runtime_routes_local_markdown_assets_to_local_folder -- --test-threads=1
|
||||
```
|
||||
|
||||
## 输出要求
|
||||
|
||||
handoff 必须列出:
|
||||
|
||||
- 修改文件。
|
||||
- 委托 deps 清单。
|
||||
- 是否保持 fallback。
|
||||
- 验收命令和结果。
|
||||
- 未覆盖风险。
|
||||
- `git diff --stat`。
|
||||
@@ -0,0 +1,60 @@
|
||||
# Reasonix Batch B / Worker E:5-29 block menu delete undo 回归修复
|
||||
|
||||
Project root:`/mnt/Data1T/mnote-worktrees/0525-b3-block-delete-undo`
|
||||
|
||||
## 目标
|
||||
|
||||
在独立 worktree 中产出候选 patch,修复 `task489-block-menu-delete-undo-smoke` 暴露的回归:块菜单删除 `Beta block` 后,`Control+Z` 必须恢复目标块,`Control+Y` 必须再次删除目标块。
|
||||
|
||||
## 允许修改
|
||||
|
||||
- `rust/spikes/leptos-tiptap-spike/src/editor_runtime/history_safe_commands.rs`
|
||||
- `rust/spikes/leptos-tiptap-spike/src/lib.rs`
|
||||
- 如确需重建运行时,可更新:
|
||||
- `rust/spikes/leptos-tiptap-spike/generated/island/mnote-leptos-tiptap-spike-island.js`
|
||||
- `rust/spikes/leptos-tiptap-spike/generated/island/mnote-leptos-tiptap-spike-island_bg.wasm`
|
||||
|
||||
如证据证明是 smoke 脚本焦点问题,允许只修改:
|
||||
|
||||
- `scripts/task489-block-menu-delete-undo-smoke.js`
|
||||
|
||||
但必须用浏览器证据说明为什么产品行为没有问题。
|
||||
|
||||
## 禁止事项
|
||||
|
||||
- 不回退到 `apply_html_update(...)` / `set_content(...)` 整文替换删除。
|
||||
- 不修改上传、mnote-web shell、AGENTS、设计文档、bugs 文档或 git 状态。
|
||||
- 不提交 git。
|
||||
- 不做与 block menu delete undo 无关的重构。
|
||||
|
||||
## 必做排查
|
||||
|
||||
1. 阅读 `bugs/05-editor-mainline/process/5-39-block-menu-delete-undo-regression-v1.md`。
|
||||
2. 对比 `delete_top_level_block_with_history`、block menu delete click handler、`sync_persisted_editor_command` 的调用顺序。
|
||||
3. 先判断根因:history 未入栈、后续同步清空 history、焦点导致快捷键未进入 editor,或脚本断言问题。
|
||||
|
||||
## 验收命令
|
||||
|
||||
```bash
|
||||
cargo fmt --manifest-path rust/Cargo.toml --all --check
|
||||
cargo check --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml
|
||||
```
|
||||
|
||||
若修改了 Rust island 源码且需要浏览器验证,请同时运行:
|
||||
|
||||
```bash
|
||||
cargo build --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml --target wasm32-unknown-unknown --release
|
||||
wasm-bindgen rust/spikes/leptos-tiptap-spike/target/wasm32-unknown-unknown/release/mnote_leptos_tiptap_spike.wasm --target web --out-dir rust/spikes/leptos-tiptap-spike/generated/island --out-name mnote-leptos-tiptap-spike-island
|
||||
node scripts/task489-block-menu-delete-undo-smoke.js
|
||||
```
|
||||
|
||||
## 输出要求
|
||||
|
||||
handoff 必须列出:
|
||||
|
||||
- 根因判断。
|
||||
- 修改文件。
|
||||
- 为什么不会破坏 history-safe 删除方向。
|
||||
- 验收命令和结果。
|
||||
- 未覆盖风险。
|
||||
- `git diff --stat`。
|
||||
@@ -0,0 +1,59 @@
|
||||
# Reasonix Batch C / Worker B:5-29 block menu delete undo 修复候选
|
||||
|
||||
Project root:`/mnt/Data1T/mnote-worktrees/0525-c-worker-b-block-delete-undo`
|
||||
|
||||
## 目标
|
||||
|
||||
在独立 worktree 中产出候选 patch,修复 `node scripts/task489-block-menu-delete-undo-smoke.js` 暴露的回归:块菜单删除 `Beta block` 后,`Control+Z` 必须恢复目标块,`Control+Y` 必须再次删除目标块。
|
||||
|
||||
## 允许修改
|
||||
|
||||
- `rust/spikes/leptos-tiptap-spike/src/editor_runtime/history_safe_commands.rs`
|
||||
- `rust/spikes/leptos-tiptap-spike/src/editor_runtime/command_sync.rs`
|
||||
- `rust/spikes/leptos-tiptap-spike/src/lib.rs`
|
||||
- 如确需重建运行时,可更新:
|
||||
- `rust/spikes/leptos-tiptap-spike/generated/island/mnote-leptos-tiptap-spike-island.js`
|
||||
- `rust/spikes/leptos-tiptap-spike/generated/island/mnote-leptos-tiptap-spike-island_bg.wasm`
|
||||
|
||||
如证据证明只是 smoke 焦点问题,允许只修改:
|
||||
|
||||
- `scripts/task489-block-menu-delete-undo-smoke.js`
|
||||
|
||||
但必须用浏览器证据说明为什么产品行为没有问题。
|
||||
|
||||
## 禁止事项
|
||||
|
||||
- 不回退到 `apply_html_update(...)` / `set_content(...)` 整文替换删除。
|
||||
- 不修改 3-20 runtime、上传、mnote-web shell、AGENTS、设计文档、bugs 文档或 git 状态。
|
||||
- 不提交 git。
|
||||
- 不做与 block menu delete undo 无关的重构。
|
||||
|
||||
## 必做排查
|
||||
|
||||
1. 阅读 `bugs/05-editor-mainline/process/5-39-block-menu-delete-undo-regression-v1.md`。
|
||||
2. 对比 `delete_top_level_block_with_history`、block menu delete click handler、`sync_persisted_editor_command` 的调用顺序。
|
||||
3. 先判断根因:history 未入栈、后续同步清空 history、焦点导致快捷键未进入 editor,或脚本断言问题。
|
||||
4. 若修改 Rust island 源码,必须重建 generated island 文件并跑浏览器 smoke。
|
||||
|
||||
## 验收命令
|
||||
|
||||
```bash
|
||||
cargo fmt --manifest-path rust/Cargo.toml --all --check
|
||||
cargo check --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml
|
||||
cargo build --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml --target wasm32-unknown-unknown --release
|
||||
wasm-bindgen rust/spikes/leptos-tiptap-spike/target/wasm32-unknown-unknown/release/mnote_leptos_tiptap_spike.wasm --target web --out-dir rust/spikes/leptos-tiptap-spike/generated/island --out-name mnote-leptos-tiptap-spike-island
|
||||
node scripts/task489-block-menu-delete-undo-smoke.js
|
||||
node scripts/task488-local-attachment-link-delete-undo-smoke.js
|
||||
```
|
||||
|
||||
## 输出要求
|
||||
|
||||
handoff 必须列出:
|
||||
|
||||
- 根因判断。
|
||||
- 修改文件。
|
||||
- 为什么不会破坏 history-safe 删除方向。
|
||||
- 验收命令和结果。
|
||||
- 浏览器 smoke 证据路径。
|
||||
- 未覆盖风险。
|
||||
- `git diff --stat`。
|
||||
@@ -0,0 +1,57 @@
|
||||
# Reasonix Batch C / Worker C:3-20 uploadFileToMediaAsset runtime 外置候选
|
||||
|
||||
Project root:`/mnt/Data1T/mnote-worktrees/0525-c-worker-c-upload-media-asset`
|
||||
|
||||
## 目标
|
||||
|
||||
在独立 worktree 中产出候选 patch:把 `SIDEBAR_TREE_JS` 中 `uploadFileToMediaAsset(file, plan, options)` 的实现同构迁入 `rust/crates/mnote-web/browser/local-upload-runtime.js`,`layout.rs` 只保留委托 wrapper 和完整 inline fallback。不得改变上传落盘、资源归属、editor 插入、sidebar snapshot refresh 或事件语义。
|
||||
|
||||
## 允许修改
|
||||
|
||||
- `rust/crates/mnote-web/browser/local-upload-runtime.js`
|
||||
- `rust/crates/mnote-web/src/ssr/pages/layout.rs`
|
||||
|
||||
必要时只更新 `layout.rs` 中现有字符串断言测试。
|
||||
|
||||
## 实现要求
|
||||
|
||||
- `local-upload-runtime.js` 新增并导出 `uploadFileToMediaAsset(file, plan, options, deps)`。
|
||||
- `layout.rs` 中原 `uploadFileToMediaAsset(file, plan, options)` 优先委托 `localUploadRuntimeFunction('uploadFileToMediaAsset')`。
|
||||
- runtime 不复制 editor / resource open 长期业务语义,必须通过 `deps` 接收既有 helper 或 callback。
|
||||
- 保持以下行为完全不变:
|
||||
- `resolveEditorUploadContext` 的调用和 options 透传。
|
||||
- `uploadLocalFolderAsset` 的调用和 FormData 合同。
|
||||
- `insertUploadedAssetIntoEditor` 的调用时机。
|
||||
- `reloadSidebarTreeSnapshot()`、`wolai:local-assets-changed`、`data-mnote-last-upload-*` 相关行为。
|
||||
- runtime 不存在时,inline fallback 继续执行原实现。
|
||||
|
||||
## 禁止事项
|
||||
|
||||
- 不迁 `uploadFilesWithResolvedTarget`。
|
||||
- 不改 `/api/local-folder/assets/upload` 合同。
|
||||
- 不改 resource open / OnlyOffice URL 语义。
|
||||
- 不修改 document conflict runtime、editor island、AGENTS、设计文档或 git 状态。
|
||||
- 不提交 git。
|
||||
|
||||
## 验收命令
|
||||
|
||||
```bash
|
||||
node --check rust/crates/mnote-web/browser/local-upload-runtime.js
|
||||
cargo fmt --manifest-path rust/Cargo.toml --all --check
|
||||
cargo check --manifest-path rust/Cargo.toml -p mnote-web
|
||||
cargo test --manifest-path rust/Cargo.toml -p mnote-web local_upload_runtime_contains_editor_upload_context_helpers -- --test-threads=1
|
||||
cargo test --manifest-path rust/Cargo.toml -p mnote-web sidebar_upload_runtime_routes_local_markdown_assets_to_local_folder -- --test-threads=1
|
||||
node scripts/task479-local-folder-markdown-resource-lifecycle-smoke.js
|
||||
```
|
||||
|
||||
## 输出要求
|
||||
|
||||
handoff 必须列出:
|
||||
|
||||
- 修改文件。
|
||||
- 委托 deps 清单。
|
||||
- 是否保留 fallback。
|
||||
- 验收命令和结果。
|
||||
- 浏览器 smoke 证据路径。
|
||||
- 未覆盖风险。
|
||||
- `git diff --stat`。
|
||||
@@ -0,0 +1,50 @@
|
||||
# Reasonix Batch C / Worker D:3-20 document conflict action 边界候选
|
||||
|
||||
Project root:`/mnt/Data1T/mnote-worktrees/0525-c-worker-d-conflict-action`
|
||||
|
||||
## 目标
|
||||
|
||||
在独立 worktree 中产出候选 patch:围绕 `document-conflict-panel-runtime.js` 与 `web_shell.rs` 的边界继续收口,但只允许迁出一个低风险 action helper 或 wiring helper。优先选择 `openConflictDiffPanel(session, panel)` 的纯 UI 面板创建/切换部分;如果发现它仍强依赖 session 状态或 editor 内容读取,则只输出最小诊断 patch 或测试,不强迁。
|
||||
|
||||
## 允许修改
|
||||
|
||||
- `rust/crates/mnote-web/browser/document-conflict-panel-runtime.js`
|
||||
- `rust/crates/mnote-web/src/routes/web_shell.rs`
|
||||
|
||||
必要时只更新同文件现有字符串断言测试。
|
||||
|
||||
## 实现要求
|
||||
|
||||
- 保持 `acceptDiskVersion(session)`、`keepCurrentEditorVersion(session)` 的保存 / 状态机语义在 `web_shell.rs` 中,不迁业务状态机。
|
||||
- 如果迁 `openConflictDiffPanel`,runtime 必须通过 `deps` 接收读取编辑器内容、渲染 diff、toast、escape 等依赖,不得在 runtime 中复制 document session 真相。
|
||||
- runtime 不存在时,inline fallback 必须继续执行原实现。
|
||||
- 若实际不可安全迁出,必须用代码证据说明阻塞点,并可只补字符串断言或注释禁止误迁。
|
||||
|
||||
## 禁止事项
|
||||
|
||||
- 不迁 document session lifecycle。
|
||||
- 不迁 local upload / filetree / editor island。
|
||||
- 不修改 AGENTS、设计文档、bugs 文档或 git 状态。
|
||||
- 不提交 git。
|
||||
|
||||
## 验收命令
|
||||
|
||||
```bash
|
||||
node --check rust/crates/mnote-web/browser/document-conflict-panel-runtime.js
|
||||
cargo fmt --manifest-path rust/Cargo.toml --all --check
|
||||
cargo check --manifest-path rust/Cargo.toml -p mnote-web
|
||||
cargo test --manifest-path rust/Cargo.toml -p mnote-web document_conflict_panel_runtime_contains_dom_helpers -- --test-threads=1
|
||||
cargo test --manifest-path rust/Cargo.toml -p mnote-web mnote_browser_runtime_assets_are_explicitly_mounted -- --test-threads=1
|
||||
```
|
||||
|
||||
## 输出要求
|
||||
|
||||
handoff 必须列出:
|
||||
|
||||
- 根因/边界判断:迁出或不迁出的理由。
|
||||
- 修改文件。
|
||||
- 委托 deps 清单或阻塞证据。
|
||||
- 是否保留 fallback。
|
||||
- 验收命令和结果。
|
||||
- 未覆盖风险。
|
||||
- `git diff --stat`。
|
||||
@@ -0,0 +1,59 @@
|
||||
# Reasonix Batch D / Worker A:5-29 editor focus helper 模块化候选
|
||||
|
||||
Project root:`/mnt/Data1T/mnote-worktrees/0525-d-worker-a-5-29-focus-runtime`
|
||||
|
||||
## 目标
|
||||
|
||||
在独立 worktree 中产出候选 patch,把 `rust/spikes/leptos-tiptap-spike/src/lib.rs` 中焦点相关 helper 的最小可迁部分迁入 `editor_runtime` 子模块,继续推进 `5-28` 后续收口。
|
||||
|
||||
优先迁出:
|
||||
|
||||
- `schedule_editor_focus(editor)`
|
||||
- `active_editor_stage()`
|
||||
- 如有必要,可新增 `body_has_focus()` 或同等私有 helper
|
||||
|
||||
## 允许修改
|
||||
|
||||
- `rust/spikes/leptos-tiptap-spike/src/lib.rs`
|
||||
- `rust/spikes/leptos-tiptap-spike/src/editor_runtime/mod.rs`
|
||||
- 新增 `rust/spikes/leptos-tiptap-spike/src/editor_runtime/editor_focus.rs`
|
||||
- 如 Rust island 源码变更并需要浏览器验证,可更新:
|
||||
- `rust/spikes/leptos-tiptap-spike/generated/island/mnote-leptos-tiptap-spike-island.js`
|
||||
- `rust/spikes/leptos-tiptap-spike/generated/island/mnote-leptos-tiptap-spike-island_bg.wasm`
|
||||
|
||||
## 禁止事项
|
||||
|
||||
- 不修改 3-20 / mnote-web 上传 runtime。
|
||||
- 不迁 `sync_editor_overlay_state` / `try_sync_editor_overlay_state` 整个大函数。
|
||||
- 不改 block menu 行为语义,不回退 history-safe delete。
|
||||
- 不修改 AGENTS、design、bugs 或 git 状态。
|
||||
- 不提交 git。
|
||||
|
||||
## 实现要求
|
||||
|
||||
- 新模块必须只承接焦点/active editor DOM 判断,不承接 overlay signal、block menu signal、selection payload 或 host bridge 事件。
|
||||
- `active_editor_stage` 迁出后仍应使用当前 `EDITOR_STAGE_SELECTOR` / editor root 判断语义;可通过参数传入 selectors 或通过小型 provider/helper 避免硬编码重复。
|
||||
- 保持 `task489` 的删除后立即 `Ctrl+Z` 行为不回归。
|
||||
|
||||
## 验收命令
|
||||
|
||||
```bash
|
||||
cargo fmt --manifest-path rust/Cargo.toml --all --check
|
||||
cargo check --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml
|
||||
cargo build --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml --target wasm32-unknown-unknown --release
|
||||
wasm-bindgen rust/spikes/leptos-tiptap-spike/target/wasm32-unknown-unknown/release/mnote_leptos_tiptap_spike.wasm --target web --out-dir rust/spikes/leptos-tiptap-spike/generated/island --out-name mnote-leptos-tiptap-spike-island
|
||||
NODE_PATH=/mnt/Data1T/mnote/node_modules node scripts/task489-block-menu-delete-undo-smoke.js
|
||||
NODE_PATH=/mnt/Data1T/mnote/node_modules node scripts/task488-local-attachment-link-delete-undo-smoke.js
|
||||
```
|
||||
|
||||
## 输出要求
|
||||
|
||||
handoff 必须列出:
|
||||
|
||||
- 修改文件。
|
||||
- 迁出的函数和未迁出的边界。
|
||||
- 为什么不会破坏 block menu delete undo。
|
||||
- 验收命令和结果。
|
||||
- 浏览器 smoke 证据路径。
|
||||
- 未覆盖风险。
|
||||
- `git diff --stat`。
|
||||
@@ -0,0 +1,63 @@
|
||||
# Reasonix Batch D / Worker B:3-20 uploadFileToMediaAsset 编排壳外置候选
|
||||
|
||||
Project root:`/mnt/Data1T/mnote-worktrees/0525-d-worker-b-3-20-upload-file-orchestrator`
|
||||
|
||||
## 目标
|
||||
|
||||
在独立 worktree 中产出候选 patch:把 `SIDEBAR_TREE_JS` 中 `uploadFileToMediaAsset(file, plan, options)` 的编排壳同构迁入 `rust/crates/mnote-web/browser/local-upload-runtime.js`,`layout.rs` 只保留委托 wrapper 和完整 inline fallback。不得改变本地 Markdown 资源归属、非本地 media upload、editor 插入、sidebar refresh 或事件分发行为。
|
||||
|
||||
## 允许修改
|
||||
|
||||
- `rust/crates/mnote-web/browser/local-upload-runtime.js`
|
||||
- `rust/crates/mnote-web/src/ssr/pages/layout.rs`
|
||||
|
||||
必要时只更新同文件内字符串断言测试。
|
||||
|
||||
## 实现要求
|
||||
|
||||
- `local-upload-runtime.js` 新增并导出 `uploadFileToMediaAsset(file, plan, options, deps)`。
|
||||
- `layout.rs` 中原 `uploadFileToMediaAsset(file, plan, options)` 优先委托 `localUploadRuntimeFunction('uploadFileToMediaAsset')`,runtime 不存在时执行原 inline fallback。
|
||||
- runtime 可复用现有外置 helper:`uploadLocalFolderAsset`、`uploadMediaAsset`、`insertUploadedAssetIntoEditor`。
|
||||
- 通过 `deps` 注入仍属于 shell 的依赖:
|
||||
- `currentSourceKind`
|
||||
- `currentRootUri`
|
||||
- `currentDocumentId`
|
||||
- `editorRootFromUploadOptions`
|
||||
- `appendUploadedAssetRow`
|
||||
- `refreshLocalFolderSidebarSnapshot`
|
||||
- 需要时注入 `dispatchEvent` / `CustomEvent`
|
||||
- 保持事件不变:
|
||||
- local folder:`wolai:local-assets-changed`
|
||||
- non-local media:`wolai:assets-changed`
|
||||
- 保持 `data-mnote-last-upload-*` 由 editor 插入 helper 维护,不新增第二套状态。
|
||||
|
||||
## 禁止事项
|
||||
|
||||
- 不迁 `resolveFileTreeUploadTarget`。
|
||||
- 不改 `/api/local-folder/assets/upload` 或 `/api/media/upload` 合同。
|
||||
- 不改 OnlyOffice URL / resource open 语义。
|
||||
- 不修改 editor island、document conflict runtime、AGENTS、design、bugs 或 git 状态。
|
||||
- 不提交 git。
|
||||
|
||||
## 验收命令
|
||||
|
||||
```bash
|
||||
node --check rust/crates/mnote-web/browser/local-upload-runtime.js
|
||||
cargo fmt --manifest-path rust/Cargo.toml --all --check
|
||||
cargo check --manifest-path rust/Cargo.toml -p mnote-web
|
||||
cargo test --manifest-path rust/Cargo.toml -p mnote-web local_upload_runtime_contains_editor_upload_context_helpers -- --test-threads=1
|
||||
cargo test --manifest-path rust/Cargo.toml -p mnote-web sidebar_upload_runtime_routes_local_markdown_assets_to_local_folder -- --test-threads=1
|
||||
NODE_PATH=/mnt/Data1T/mnote/node_modules node scripts/task479-local-folder-markdown-resource-lifecycle-smoke.js
|
||||
```
|
||||
|
||||
## 输出要求
|
||||
|
||||
handoff 必须列出:
|
||||
|
||||
- 修改文件。
|
||||
- 委托 deps 清单。
|
||||
- 是否保留 fallback。
|
||||
- 验收命令和结果。
|
||||
- 浏览器 smoke 证据路径。
|
||||
- 未覆盖风险。
|
||||
- `git diff --stat`。
|
||||
@@ -0,0 +1,66 @@
|
||||
# Reasonix Batch E / Worker A:5-29 block hover state 类型边界候选
|
||||
|
||||
Project root:`/mnt/Data1T/mnote-worktrees/0525-e-worker-a-5-29-block-hover-state`
|
||||
|
||||
## 目标
|
||||
|
||||
在独立 worktree 中产出候选 patch,把 `rust/spikes/leptos-tiptap-spike/src/lib.rs` 中 block hover / block menu / drop indicator 的共享状态类型迁入 `editor_runtime` 子模块,为后续拆 `sync_editor_overlay_state`、block menu signal 和拖拽重排逻辑做类型边界准备。
|
||||
|
||||
优先迁出类型:
|
||||
|
||||
- `HoveredBlockState`
|
||||
- `BlockMenuLayout`
|
||||
- `DropPlacement`
|
||||
- `DropIndicatorState`
|
||||
|
||||
必要时可同时迁出只依赖这些类型的极小纯 helper,但不要迁 DOM 查询/事件 listener。
|
||||
|
||||
## 允许修改
|
||||
|
||||
- `rust/spikes/leptos-tiptap-spike/src/lib.rs`
|
||||
- `rust/spikes/leptos-tiptap-spike/src/editor_runtime/mod.rs`
|
||||
- 新增 `rust/spikes/leptos-tiptap-spike/src/editor_runtime/block_hover_state.rs`
|
||||
|
||||
如 Rust island 源码变更并需要浏览器验证,可更新:
|
||||
|
||||
- `rust/spikes/leptos-tiptap-spike/generated/island/mnote-leptos-tiptap-spike-island.js`
|
||||
- `rust/spikes/leptos-tiptap-spike/generated/island/mnote-leptos-tiptap-spike-island_bg.wasm`
|
||||
|
||||
## 禁止事项
|
||||
|
||||
- 不修改 `rust/crates/mnote-web/`。
|
||||
- 不迁 `sync_editor_overlay_state` / `try_sync_editor_overlay_state` 整个大函数。
|
||||
- 不迁 `hovered_block_from_target`、`block_state_from_index`、`block_menu_layout` 等 DOM 查询或布局函数,除非只是为编译所需的类型 import 调整。
|
||||
- 不改 block menu 行为语义,不回退 history-safe delete。
|
||||
- 不修改 AGENTS、design、bugs 或 git 状态。
|
||||
- 不提交 git。
|
||||
|
||||
## 实现要求
|
||||
|
||||
- 新模块只承接共享状态类型,不承接 Leptos signal、DOM listener、host bridge 或 editor command。
|
||||
- 如果类型字段需要跨模块访问,使用 `pub(crate)` 字段,保持结构和语义同构。
|
||||
- `block_menu_document.rs` / `block_menu_legacy_html.rs` 不应继续从 `crate::DropPlacement` 读取;改为从新模块路径 import。
|
||||
- `lib.rs` 仍保留实际 DOM 计算和 signal 编排。
|
||||
|
||||
## 验收命令
|
||||
|
||||
```bash
|
||||
cargo fmt --manifest-path rust/Cargo.toml --all --check
|
||||
cargo check --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml
|
||||
cargo build --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml --target wasm32-unknown-unknown --release
|
||||
wasm-bindgen rust/spikes/leptos-tiptap-spike/target/wasm32-unknown-unknown/release/mnote_leptos_tiptap_spike.wasm --target web --out-dir rust/spikes/leptos-tiptap-spike/generated/island --out-name mnote-leptos-tiptap-spike-island
|
||||
NODE_PATH=/mnt/Data1T/mnote/node_modules node scripts/task489-block-menu-delete-undo-smoke.js
|
||||
NODE_PATH=/mnt/Data1T/mnote/node_modules node scripts/task488-local-attachment-link-delete-undo-smoke.js
|
||||
```
|
||||
|
||||
## 输出要求
|
||||
|
||||
handoff 必须列出:
|
||||
|
||||
- 修改文件。
|
||||
- 迁出的类型和未迁出的函数边界。
|
||||
- 为什么不会破坏 block menu delete undo / drag reorder。
|
||||
- 验收命令和结果。
|
||||
- 浏览器 smoke 证据路径。
|
||||
- 未覆盖风险。
|
||||
- `git diff --stat`。
|
||||
@@ -0,0 +1,73 @@
|
||||
# Reasonix Batch E / Worker B:3-20 document conflict diff DOM helper 候选
|
||||
|
||||
Project root:`/mnt/Data1T/mnote-worktrees/0525-e-worker-b-3-20-conflict-diff-dom`
|
||||
|
||||
## 目标
|
||||
|
||||
在独立 worktree 中产出候选 patch,把 document conflict panel 中 diff / merge 区域的纯 DOM 构建和按钮 wiring 从 `web_shell.rs` inline script 外置到 `document-conflict-panel-runtime.js`。`web_shell.rs` 仍负责读取磁盘版本、计算 plain text、状态切换和持久化业务逻辑。
|
||||
|
||||
优先新增 runtime helper:
|
||||
|
||||
- `populateSessionConflictDiffPanel(panel, context, deps)` 或等价命名
|
||||
|
||||
其中 `context` 至少包含:
|
||||
|
||||
- `currentText`
|
||||
- `diskText`
|
||||
- 可选 empty 文案
|
||||
|
||||
`deps` 注入:
|
||||
|
||||
- `onUseCurrent`
|
||||
- `onUseDisk`
|
||||
- `onSaveMerge`
|
||||
|
||||
## 允许修改
|
||||
|
||||
- `rust/crates/mnote-web/browser/document-conflict-panel-runtime.js`
|
||||
- `rust/crates/mnote-web/src/routes/web_shell.rs`
|
||||
|
||||
必要时只更新同文件内字符串断言测试。
|
||||
|
||||
## 禁止事项
|
||||
|
||||
- 不修改 `rust/crates/mnote-web/browser/local-upload-runtime.js` 或 `layout.rs`,避免和当前 3-20 local upload 候选冲突。
|
||||
- 不修改 editor island / leptos-tiptap 代码。
|
||||
- 不迁 `acceptDiskVersion`、`keepCurrentEditorVersion`、`writeMergedConflictResult`、`fetchLatestSessionAggregate`、`fetchLatestResourceSnapshot` 等业务逻辑。
|
||||
- 不改变按钮 data-testid、面板结构语义、错误处理和 fallback 行为。
|
||||
- 不修改 AGENTS、design、bugs 或 git 状态。
|
||||
- 不提交 git。
|
||||
|
||||
## 实现要求
|
||||
|
||||
- `openConflictDiffPanel(session, panel)` 仍负责:
|
||||
- 显示 loading。
|
||||
- fetch 最新 session/resource snapshot。
|
||||
- 计算 `latestText` 与 `sessionPlainText(session)`。
|
||||
- 捕获错误并显示错误。
|
||||
- runtime helper 只负责在已有 `diffPanel` 中创建 current/disk/merge DOM,并绑定 use current / use disk / save merge 回调。
|
||||
- runtime 不可直接访问 session fetch / persist / status 业务函数。
|
||||
- inline fallback 必须完整保留;runtime 不存在时当前行为不变。
|
||||
|
||||
## 验收命令
|
||||
|
||||
```bash
|
||||
node --check rust/crates/mnote-web/browser/document-conflict-panel-runtime.js
|
||||
cargo fmt --manifest-path rust/Cargo.toml --all --check
|
||||
cargo check --manifest-path rust/Cargo.toml -p mnote-web
|
||||
cargo test --manifest-path rust/Cargo.toml -p mnote-web document_conflict_panel_runtime_contains_dom_helpers -- --test-threads=1
|
||||
cargo test --manifest-path rust/Cargo.toml -p mnote-web mnote_browser_runtime_assets_are_explicitly_mounted -- --test-threads=1
|
||||
```
|
||||
|
||||
如果能定位现有 secondary pane conflict smoke,可额外运行;不要新增大范围浏览器用例。
|
||||
|
||||
## 输出要求
|
||||
|
||||
handoff 必须列出:
|
||||
|
||||
- 修改文件。
|
||||
- 外置 DOM helper 的职责和 deps 清单。
|
||||
- fallback 是否保留。
|
||||
- 验收命令和结果。
|
||||
- 未覆盖风险。
|
||||
- `git diff --stat`。
|
||||
@@ -0,0 +1,65 @@
|
||||
# Reasonix Batch F / Worker A:5-29 block menu layout helper 候选
|
||||
|
||||
Project root:`/mnt/Data1T/mnote-worktrees/0525-f-worker-a-5-29-block-menu-layout`
|
||||
|
||||
## 目标
|
||||
|
||||
在独立 worktree 中产出候选 patch,把 `rust/spikes/leptos-tiptap-spike/src/lib.rs` 中 block menu hover / layout 的最小可迁 helper 迁入 `editor_runtime` 子模块,继续减少 `lib.rs` 中 block menu overlay 逻辑。
|
||||
|
||||
优先迁出:
|
||||
|
||||
- `hover_anchor_top(block)`
|
||||
- `hover_anchor_transform(block)`
|
||||
- `block_menu_layout(block)`
|
||||
|
||||
如实现边界自然,可新增 `editor_runtime/block_menu_overlay.rs` 或等价命名。不要迁 `pointer_in_handle_corridor`、`drop_indicator_from_target`、`drop_indicator_from_point`,因为它们更接近拖拽 hit-test 逻辑。
|
||||
|
||||
## 允许修改
|
||||
|
||||
- `rust/spikes/leptos-tiptap-spike/src/lib.rs`
|
||||
- `rust/spikes/leptos-tiptap-spike/src/editor_runtime/mod.rs`
|
||||
- 新增 `rust/spikes/leptos-tiptap-spike/src/editor_runtime/block_menu_overlay.rs`
|
||||
|
||||
如 Rust island 源码变更并需要浏览器验证,可更新:
|
||||
|
||||
- `rust/spikes/leptos-tiptap-spike/generated/island/mnote-leptos-tiptap-spike-island.js`
|
||||
- `rust/spikes/leptos-tiptap-spike/generated/island/mnote-leptos-tiptap-spike-island_bg.wasm`
|
||||
|
||||
## 禁止事项
|
||||
|
||||
- 不修改 `rust/crates/mnote-web/`。
|
||||
- 不迁 `sync_editor_overlay_state` / `try_sync_editor_overlay_state` 整个大函数。
|
||||
- 不迁拖拽 hit-test:`pointer_in_handle_corridor`、`drop_indicator_from_target`、`drop_indicator_from_point`。
|
||||
- 不改 block menu 行为语义,不回退 history-safe delete。
|
||||
- 不修改 AGENTS、design、bugs 或 git 状态。
|
||||
- 不提交 git。
|
||||
|
||||
## 实现要求
|
||||
|
||||
- 新模块只承接 block menu hover anchor / layout helper,可通过参数注入 `stage_width` / `stage_top` / `stage_left` 等值,也可在模块内调用现有 DOM helper,但必须保持行为同构。
|
||||
- 如果引入参数化 helper,`lib.rs` 保留 DOM 查询,模块只做几何计算优先。
|
||||
- 保持 `BlockMenuLayout`、`HoveredBlockState` 从 `block_hover_state.rs` 读取。
|
||||
- 不新增对 Leptos signal 的依赖。
|
||||
|
||||
## 验收命令
|
||||
|
||||
```bash
|
||||
cargo fmt --manifest-path rust/Cargo.toml --all --check
|
||||
cargo check --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml
|
||||
cargo build --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml --target wasm32-unknown-unknown --release
|
||||
wasm-bindgen rust/spikes/leptos-tiptap-spike/target/wasm32-unknown-unknown/release/mnote_leptos_tiptap_spike.wasm --target web --out-dir rust/spikes/leptos-tiptap-spike/generated/island --out-name mnote-leptos-tiptap-spike-island
|
||||
NODE_PATH=/mnt/Data1T/mnote/node_modules node scripts/task489-block-menu-delete-undo-smoke.js
|
||||
NODE_PATH=/mnt/Data1T/mnote/node_modules node scripts/task488-local-attachment-link-delete-undo-smoke.js
|
||||
```
|
||||
|
||||
## 输出要求
|
||||
|
||||
handoff 必须列出:
|
||||
|
||||
- 修改文件。
|
||||
- 迁出的 helper 和未迁出的边界。
|
||||
- 为什么不会破坏 block menu delete undo / drag reorder。
|
||||
- 验收命令和结果。
|
||||
- 浏览器 smoke 证据路径。
|
||||
- 未覆盖风险。
|
||||
- `git diff --stat`。
|
||||
@@ -0,0 +1,63 @@
|
||||
# Reasonix Batch F / Worker B:3-20 filetree upload target helper 候选
|
||||
|
||||
Project root:`/mnt/Data1T/mnote-worktrees/0525-f-worker-b-3-20-filetree-upload-target`
|
||||
|
||||
## 目标
|
||||
|
||||
在独立 worktree 中产出候选 patch,把 `SIDEBAR_TREE_JS` 中 file tree 上传目标解析的纯 fallback / plan 归一化 helper 外置到 `filetree-runtime.js`,为后续 `resolveFileTreeUploadTarget` 收口做准备。不得改变 local folder 文件拖入目标、editor markdown attach、preflight fallback 或资源归属语义。
|
||||
|
||||
优先迁出:
|
||||
|
||||
- `fallbackFileTreeUploadTarget(detail, deps)` 或等价 helper
|
||||
- 如需要,可迁 `normalizeFileTreeUploadPlan(plan, detail)` 这类纯 plan 归一化 helper
|
||||
|
||||
不要整体迁 `resolveFileTreeUploadTarget` 的 async preflight 流程,除非只是在 `layout.rs` 中优先委托新 runtime helper 后保留完整 inline fallback。
|
||||
|
||||
## 允许修改
|
||||
|
||||
- `rust/crates/mnote-web/browser/filetree-runtime.js`
|
||||
- `rust/crates/mnote-web/src/ssr/pages/layout.rs`
|
||||
|
||||
必要时只更新同文件内字符串断言测试。
|
||||
|
||||
## 禁止事项
|
||||
|
||||
- 不修改 `rust/crates/mnote-web/browser/document-conflict-panel-runtime.js` 或 `rust/crates/mnote-web/src/routes/web_shell.rs`,避免和当前 conflict panel 候选冲突。
|
||||
- 不修改 `local-upload-runtime.js`。
|
||||
- 不改 `/api/filetree/upload-target`、`/api/local-folder/assets/upload` 或 `/api/media/upload` 合同。
|
||||
- 不改 OnlyOffice URL / resource open 语义。
|
||||
- 不修改 editor island、AGENTS、design、bugs 或 git 状态。
|
||||
- 不提交 git。
|
||||
|
||||
## 实现要求
|
||||
|
||||
- `filetree-runtime.js` 新增并导出 fallback helper,依赖通过 `deps` 注入:
|
||||
- `resolveWorkspaceId`
|
||||
- `currentDocumentId`
|
||||
- `layout.rs` 中原 `fallbackFileTreeUploadTarget(detail)` 优先委托 `fileTreeRuntimeFunction('fallbackFileTreeUploadTarget')`,runtime 不存在时保留完整原 inline fallback。
|
||||
- 保持错误文案 `请选择一个目标页面后再拖入文件` 不变。
|
||||
- 保持 upload intent 规则:
|
||||
- 有 `targetRelativePath` 时默认为 `filetree.folder.drop`
|
||||
- 否则默认为 `editor.markdown.attach`
|
||||
|
||||
## 验收命令
|
||||
|
||||
```bash
|
||||
node --check rust/crates/mnote-web/browser/filetree-runtime.js
|
||||
cargo fmt --manifest-path rust/Cargo.toml --all --check
|
||||
cargo check --manifest-path rust/Cargo.toml -p mnote-web
|
||||
cargo test --manifest-path rust/Cargo.toml -p mnote-web sidebar_filetree_runtime_helpers_are_externalized_with_inline_fallback -- --test-threads=1
|
||||
cargo test --manifest-path rust/Cargo.toml -p mnote-web sidebar_upload_runtime_routes_local_markdown_assets_to_local_folder -- --test-threads=1
|
||||
NODE_PATH=/mnt/Data1T/mnote/node_modules node scripts/task479-local-folder-markdown-resource-lifecycle-smoke.js
|
||||
```
|
||||
|
||||
## 输出要求
|
||||
|
||||
handoff 必须列出:
|
||||
|
||||
- 修改文件。
|
||||
- 外置 helper 的职责和 deps 清单。
|
||||
- fallback 是否保留。
|
||||
- 验收命令和结果。
|
||||
- 未覆盖风险。
|
||||
- `git diff --stat`。
|
||||
@@ -0,0 +1,46 @@
|
||||
# Batch G Worker B: 3-20 filetree upload target helper
|
||||
|
||||
Project root: `/mnt/Data1T/mnote-worktrees/0525-g-worker-b-3-20-filetree-upload-target`
|
||||
|
||||
## Goal
|
||||
|
||||
Move only the low-risk, synchronous fallback/normalization part of `resolveFileTreeUploadTarget(detail)` out of inline `SIDEBAR_TREE_JS` and into `rust/crates/mnote-web/browser/filetree-runtime.js`.
|
||||
|
||||
This is a candidate patch only. Codex will review and selectively merge.
|
||||
|
||||
## Allowed files
|
||||
|
||||
- `rust/crates/mnote-web/browser/filetree-runtime.js`
|
||||
- `rust/crates/mnote-web/src/ssr/pages/layout.rs`
|
||||
|
||||
Do not edit any other file.
|
||||
|
||||
## Expected shape
|
||||
|
||||
- Add a small exported runtime helper, for example `resolveFileTreeUploadTargetFallback(detail, deps)` or a better local name.
|
||||
- Keep async preflight / fetch / backend ownership in `layout.rs`.
|
||||
- Keep complete inline fallback behavior in `layout.rs`.
|
||||
- Preserve local-folder resource ownership semantics exactly.
|
||||
- Do not move `uploadFileToMediaAsset`, `uploadFilesWithResolvedTarget`, `refreshLocalFolderSidebarSnapshot`, or `appendUploadedAssetRow`.
|
||||
|
||||
## Verification
|
||||
|
||||
Run these from the project root:
|
||||
|
||||
```bash
|
||||
node --check rust/crates/mnote-web/browser/filetree-runtime.js
|
||||
cargo fmt --manifest-path rust/Cargo.toml --all --check
|
||||
cargo check --manifest-path rust/Cargo.toml -p mnote-web
|
||||
cargo test --manifest-path rust/Cargo.toml -p mnote-web filetree -- --test-threads=1
|
||||
cargo test --manifest-path rust/Cargo.toml -p mnote-web local_upload_runtime_contains_editor_upload_context_helpers -- --test-threads=1
|
||||
NODE_PATH=/mnt/Data1T/mnote/node_modules node scripts/task479-local-folder-markdown-resource-lifecycle-smoke.js
|
||||
```
|
||||
|
||||
If a command fails because of a pre-existing baseline issue, record the exact command and failure.
|
||||
|
||||
## Required output
|
||||
|
||||
- Produce `process-handoff.md`, `process-handoff.json`, `result.json`, and `final.md`.
|
||||
- Include modified files, exact verification commands, pass/fail evidence, risks, and remaining work.
|
||||
- Do not commit.
|
||||
- Do not modify `/mnt/Data1T/mnote`.
|
||||
@@ -0,0 +1,46 @@
|
||||
# Batch G Worker C: 3-20 conflict action boundary
|
||||
|
||||
Project root: `/mnt/Data1T/mnote-worktrees/0525-g-worker-c-3-20-conflict-actions`
|
||||
|
||||
## Goal
|
||||
|
||||
Extract only pure DOM/action wiring helpers for document conflict actions from inline `web_shell.rs` into `rust/crates/mnote-web/browser/document-conflict-panel-runtime.js`.
|
||||
|
||||
This is a candidate patch only. Codex will review and selectively merge.
|
||||
|
||||
## Allowed files
|
||||
|
||||
- `rust/crates/mnote-web/browser/document-conflict-panel-runtime.js`
|
||||
- `rust/crates/mnote-web/src/routes/web_shell.rs`
|
||||
|
||||
Do not edit any other file.
|
||||
|
||||
## Expected shape
|
||||
|
||||
- Keep business logic in `web_shell.rs`: session lookup, snapshot fetch, editor writes, persistence, status messages, and error handling.
|
||||
- You may add small runtime helpers for wiring or invoking callbacks for actions currently near `acceptDiskVersion`, `keepCurrentEditorVersion`, or `writeMergedConflictResult`, but the runtime must receive dependencies/callbacks from `web_shell.rs`.
|
||||
- Preserve the existing inline fallback path.
|
||||
- Do not change conflict resolution semantics, button labels, event names, or secondary-pane behavior.
|
||||
- Do not touch local upload or filetree runtime files.
|
||||
|
||||
## Verification
|
||||
|
||||
Run these from the project root:
|
||||
|
||||
```bash
|
||||
node --check rust/crates/mnote-web/browser/document-conflict-panel-runtime.js
|
||||
cargo fmt --manifest-path rust/Cargo.toml --all --check
|
||||
cargo check --manifest-path rust/Cargo.toml -p mnote-web
|
||||
cargo test --manifest-path rust/Cargo.toml -p mnote-web document_conflict_panel_runtime_contains_dom_helpers -- --test-threads=1
|
||||
cargo test --manifest-path rust/Cargo.toml -p mnote-web mnote_browser_runtime_assets_are_explicitly_mounted -- --test-threads=1
|
||||
NODE_PATH=/mnt/Data1T/mnote/node_modules node scripts/task451-local-markdown-conflict-resolution-ui-smoke.js
|
||||
```
|
||||
|
||||
If a command fails because of a pre-existing baseline issue, record the exact command and failure.
|
||||
|
||||
## Required output
|
||||
|
||||
- Produce `process-handoff.md`, `process-handoff.json`, `result.json`, and `final.md`.
|
||||
- Include modified files, exact verification commands, pass/fail evidence, risks, and remaining work.
|
||||
- Do not commit.
|
||||
- Do not modify `/mnt/Data1T/mnote`.
|
||||
@@ -0,0 +1,48 @@
|
||||
# Batch G Worker D: 5-29 block menu DnD helper boundary
|
||||
|
||||
Project root: `/mnt/Data1T/mnote-worktrees/0525-g-worker-d-5-29-block-dnd-helpers`
|
||||
|
||||
## Goal
|
||||
|
||||
Move a narrow, testable helper boundary for block handle drag/drop hit testing out of `rust/spikes/leptos-tiptap-spike/src/lib.rs`.
|
||||
|
||||
This is a candidate patch only. Codex will review and selectively merge.
|
||||
|
||||
## Allowed files
|
||||
|
||||
- `rust/spikes/leptos-tiptap-spike/src/lib.rs`
|
||||
- `rust/spikes/leptos-tiptap-spike/src/editor_runtime/mod.rs`
|
||||
- `rust/spikes/leptos-tiptap-spike/src/editor_runtime/block_hover_state.rs`
|
||||
- You may add one new file under `rust/spikes/leptos-tiptap-spike/src/editor_runtime/`, preferably `block_dnd.rs` or a more precise local name.
|
||||
|
||||
Do not edit generated island files. Do not edit mnote-web files.
|
||||
|
||||
## Expected shape
|
||||
|
||||
- Prefer extracting pure geometry/classification helpers used by `pointer_in_handle_corridor`, `drop_indicator_from_target`, or `drop_indicator_from_point`.
|
||||
- Do not move Leptos signals, DOM listener closures, editor command dispatch, or HTML reorder behavior.
|
||||
- Preserve current block menu delete/undo and drag/reorder behavior.
|
||||
- Keep `DropPlacement`, `DropIndicatorState`, and `HoveredBlockState` ownership consistent with `block_hover_state.rs`.
|
||||
- If a helper needs DOM rect values, pass primitives/structs in from `lib.rs`; do not invent a second editor-stage lookup layer.
|
||||
|
||||
## Verification
|
||||
|
||||
Run these from the project root:
|
||||
|
||||
```bash
|
||||
cargo fmt --manifest-path rust/Cargo.toml --all --check
|
||||
cargo check --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml
|
||||
cargo build --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml --target wasm32-unknown-unknown --release
|
||||
wasm-bindgen rust/spikes/leptos-tiptap-spike/target/wasm32-unknown-unknown/release/mnote_leptos_tiptap_spike.wasm --target web --out-dir rust/spikes/leptos-tiptap-spike/generated/island --out-name mnote-leptos-tiptap-spike-island
|
||||
NODE_PATH=/mnt/Data1T/mnote/node_modules node scripts/task489-block-menu-delete-undo-smoke.js
|
||||
NODE_PATH=/mnt/Data1T/mnote/node_modules node scripts/task488-local-attachment-link-delete-undo-smoke.js
|
||||
```
|
||||
|
||||
If `wasm-bindgen` changes generated files, report that fact but keep generated files out of the candidate diff unless required by the task.
|
||||
|
||||
## Required output
|
||||
|
||||
- Produce `process-handoff.md`, `process-handoff.json`, `result.json`, and `final.md`.
|
||||
- Include modified files, exact verification commands, pass/fail evidence, risks, and remaining work.
|
||||
- Do not commit.
|
||||
- Do not modify `/mnt/Data1T/mnote`.
|
||||
@@ -0,0 +1,51 @@
|
||||
# Batch I Worker A: 5-29 overlay reconciler read-only audit
|
||||
|
||||
Project root: `/mnt/Data1T/mnote-worktrees/0525-i-worker-a-5-29-overlay-reconciler-readonly`
|
||||
|
||||
You are a read-only audit worker. Do not modify files, do not run formatters that write files, do not commit, and do not clean unrelated files.
|
||||
|
||||
## Goal
|
||||
|
||||
Audit the next smallest safe extraction boundary around editor overlay reconciliation after the existing splits:
|
||||
|
||||
- `editor_runtime/dom_selection.rs`
|
||||
- `editor_runtime/overlays.rs`
|
||||
- `editor_runtime/editor_focus.rs`
|
||||
- `editor_runtime/block_hover_state.rs`
|
||||
- `editor_runtime/block_menu_overlay.rs`
|
||||
- `editor_runtime/block_dnd.rs`
|
||||
|
||||
Focus only on:
|
||||
|
||||
- `sync_editor_overlay_state`
|
||||
- `try_sync_editor_overlay_state`
|
||||
- their immediate callers
|
||||
- the signal groups they close/reset
|
||||
|
||||
## Questions to answer
|
||||
|
||||
1. Is there a pure helper smaller than moving the whole `sync_editor_overlay_state` / `try_sync_editor_overlay_state` pair?
|
||||
2. Which state transitions must stay in `lib.rs` because they are Leptos signal orchestration?
|
||||
3. Would a small struct such as `OverlayCloseSet` / `EditorOverlaySyncResult` reduce risk, or would it add unnecessary abstraction?
|
||||
4. What exact module/function signature should Codex implement next, if any?
|
||||
5. What tests/smoke should Codex run after the implementation?
|
||||
|
||||
## Required checks
|
||||
|
||||
Run only read-only commands:
|
||||
|
||||
```bash
|
||||
git status --short
|
||||
cargo check --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml
|
||||
```
|
||||
|
||||
If `cargo check` is blocked by missing `reference-code/`, report that instead of retrying repeatedly.
|
||||
|
||||
## Required output
|
||||
|
||||
- `modified_files`: must be `[]`
|
||||
- recommended extraction slice or explicit "do not extract yet"
|
||||
- files/functions inspected
|
||||
- verification commands and results
|
||||
- risks / do-not-move list
|
||||
- `process-handoff.md`, `process-handoff.json`, `result.json`, and `final.md` through the runner
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
# Batch I Worker B: 3-20 filetree DOM runtime read-only audit
|
||||
|
||||
Project root: `/mnt/Data1T/mnote-worktrees/0525-i-worker-b-3-20-filetree-dom-runtime-readonly`
|
||||
|
||||
You are a read-only audit worker. Do not modify files, do not run formatters that write files, do not commit, and do not clean unrelated files.
|
||||
|
||||
## Goal
|
||||
|
||||
Audit the next smallest safe extraction boundary for filetree DOM runtime helpers after the existing upload/runtime splits.
|
||||
|
||||
Focus only on:
|
||||
|
||||
- `refreshLocalFolderSidebarSnapshot`
|
||||
- `appendUploadedAssetRow`
|
||||
- `revealFileTreeRow`
|
||||
- `revealFileTreeAssetRow`
|
||||
- any existing helper already in `rust/crates/mnote-web/browser/filetree-runtime.js`
|
||||
|
||||
## Questions to answer
|
||||
|
||||
1. Which part, if any, can move to `filetree-runtime.js` without moving API fetch, source ownership, or full shell orchestration?
|
||||
2. Is `appendUploadedAssetRow` safe to split into a pure row builder plus inline shell insertion, or should it stay in `layout.rs` for now?
|
||||
3. Is `refreshLocalFolderSidebarSnapshot` safe to delegate rendering/apply steps to runtime, or should fetch/render coupling remain inline?
|
||||
4. What exact function signature and allowed files should Codex use for the next implementation slice?
|
||||
5. What tests/smoke should Codex run after the implementation?
|
||||
|
||||
## Required checks
|
||||
|
||||
Run only read-only commands:
|
||||
|
||||
```bash
|
||||
git status --short
|
||||
node --check rust/crates/mnote-web/browser/filetree-runtime.js
|
||||
cargo check --manifest-path rust/Cargo.toml -p mnote-web
|
||||
```
|
||||
|
||||
If a command is blocked by environment or lock contention, record the exact reason.
|
||||
|
||||
## Required output
|
||||
|
||||
- `modified_files`: must be `[]`
|
||||
- recommended extraction slice or explicit "do not extract yet"
|
||||
- files/functions inspected
|
||||
- verification commands and results
|
||||
- risks / do-not-move list
|
||||
- `process-handoff.md`, `process-handoff.json`, `result.json`, and `final.md` through the runner
|
||||
@@ -0,0 +1,49 @@
|
||||
# Reasonix Batch J / Worker B:5-29 close block menu overlays helper
|
||||
|
||||
Project root:`/mnt/Data1T/mnote-worktrees/0525-j-worker-b-5-29-close-overlays`
|
||||
|
||||
## 目标
|
||||
|
||||
在独立 worktree 中产出候选 patch:根据 Batch I Worker A 只读审计结论,只提取 `close_block_menu_overlays` 这一窄 helper,并删除确认无调用方的 `sync_editor_overlay_state` 死代码。不要迁 `try_sync_editor_overlay_state`,不要统一 `on_selection_change` 的内联 overlay 逻辑。
|
||||
|
||||
## 允许修改
|
||||
|
||||
- `rust/spikes/leptos-tiptap-spike/src/lib.rs`
|
||||
- 如确需新增小模块,只允许:
|
||||
- `rust/spikes/leptos-tiptap-spike/src/editor_runtime/overlays.rs`
|
||||
- `rust/spikes/leptos-tiptap-spike/src/editor_runtime/mod.rs`
|
||||
|
||||
如修改 Rust island 源码后需要重建运行时,可更新:
|
||||
|
||||
- `rust/spikes/leptos-tiptap-spike/generated/island/mnote-leptos-tiptap-spike-island.js`
|
||||
- `rust/spikes/leptos-tiptap-spike/generated/island/mnote-leptos-tiptap-spike-island_bg.wasm`
|
||||
- `rust/spikes/leptos-tiptap-spike/generated/island/mnote-leptos-tiptap-spike-island.d.ts`
|
||||
|
||||
## 禁止事项
|
||||
|
||||
- 不迁 `try_sync_editor_overlay_state`。
|
||||
- 不改 `on_selection_change` 的 overlay 同步行为。
|
||||
- 不改 block DnD、filetree、mnote-web、AGENTS、设计文档或 bugs 文档。
|
||||
- 不提交 git,不回滚或清理无关文件。
|
||||
|
||||
## 验收命令
|
||||
|
||||
```bash
|
||||
cargo fmt --manifest-path rust/Cargo.toml --all --check
|
||||
cargo check --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml
|
||||
cargo build --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml --target wasm32-unknown-unknown --release
|
||||
wasm-bindgen rust/spikes/leptos-tiptap-spike/target/wasm32-unknown-unknown/release/mnote_leptos_tiptap_spike.wasm --target web --out-dir rust/spikes/leptos-tiptap-spike/generated/island --out-name mnote-leptos-tiptap-spike-island
|
||||
NODE_PATH=/mnt/Data1T/mnote/node_modules node scripts/task489-block-menu-delete-undo-smoke.js
|
||||
NODE_PATH=/mnt/Data1T/mnote/node_modules node scripts/task488-local-attachment-link-delete-undo-smoke.js
|
||||
```
|
||||
|
||||
## 输出要求
|
||||
|
||||
handoff 必须列出:
|
||||
|
||||
- 是否确认 `sync_editor_overlay_state` 无调用方。
|
||||
- 修改文件。
|
||||
- helper 的调用点和未迁边界。
|
||||
- 验收命令、结果和 smoke 证据路径。
|
||||
- 未覆盖风险。
|
||||
- `git diff --stat`。
|
||||
@@ -0,0 +1,52 @@
|
||||
# Reasonix Batch J / Worker C:3-20 filetree DOM runtime 外置候选
|
||||
|
||||
Project root:`/mnt/Data1T/mnote-worktrees/0525-j-worker-c-3-20-filetree-dom`
|
||||
|
||||
## 目标
|
||||
|
||||
在独立 worktree 中产出候选 patch:把 `SIDEBAR_TREE_JS` 中 `revealFileTreeRow(row)`、`revealFileTreeAssetRow(assetId)`、`appendUploadedAssetRow(asset, documentId)` 迁入 `rust/crates/mnote-web/browser/filetree-runtime.js`,`layout.rs` 只保留 runtime 委托 wrapper 和完整 inline fallback。
|
||||
|
||||
## 允许修改
|
||||
|
||||
- `rust/crates/mnote-web/browser/filetree-runtime.js`
|
||||
- `rust/crates/mnote-web/src/ssr/pages/layout.rs`
|
||||
|
||||
必要时只更新 `layout.rs` 中现有字符串断言测试。
|
||||
|
||||
## 实现要求
|
||||
|
||||
- `filetree-runtime.js` 新增并导出:
|
||||
- `revealFileTreeRow(row)`
|
||||
- `revealFileTreeAssetRow(assetId, deps)`
|
||||
- `appendUploadedAssetRow(asset, documentId, deps)`
|
||||
- `layout.rs` 中同名 inline 函数优先委托 `fileTreeRuntimeFunction(...)`,runtime 不存在时继续执行原 fallback。
|
||||
- 不迁 `refreshLocalFolderSidebarSnapshot`。
|
||||
- 不改资源归属、filetree row data contract、上传 API、editor 插入或 sidebar refresh 语义。
|
||||
|
||||
## 禁止事项
|
||||
|
||||
- 不迁 `refreshLocalFolderSidebarSnapshot`。
|
||||
- 不改 `local-upload-runtime.js`。
|
||||
- 不改 conflict panel、editor island、AGENTS、设计文档或 bugs 文档。
|
||||
- 不提交 git,不回滚或清理无关文件。
|
||||
|
||||
## 验收命令
|
||||
|
||||
```bash
|
||||
node --check rust/crates/mnote-web/browser/filetree-runtime.js
|
||||
cargo fmt --manifest-path rust/Cargo.toml --all --check
|
||||
cargo check --manifest-path rust/Cargo.toml -p mnote-web
|
||||
cargo test --manifest-path rust/Cargo.toml -p mnote-web filetree_runtime_contains_row_accessor_helpers -- --test-threads=1
|
||||
NODE_PATH=/mnt/Data1T/mnote/node_modules node scripts/task479-local-folder-markdown-resource-lifecycle-smoke.js
|
||||
```
|
||||
|
||||
## 输出要求
|
||||
|
||||
handoff 必须列出:
|
||||
|
||||
- 修改文件。
|
||||
- 委托 deps 清单。
|
||||
- 是否保留 fallback。
|
||||
- 验收命令、结果和 smoke 证据路径。
|
||||
- 未覆盖风险。
|
||||
- `git diff --stat`。
|
||||
@@ -0,0 +1,50 @@
|
||||
# Reasonix Batch J / Worker D:3-20 document conflict action helper 候选
|
||||
|
||||
Project root:`/mnt/Data1T/mnote-worktrees/0525-j-worker-d-3-20-conflict-action`
|
||||
|
||||
## 目标
|
||||
|
||||
在独立 worktree 中产出候选 patch:围绕 `document-conflict-panel-runtime.js` 与 `web_shell.rs` 的边界继续收口,只允许迁出一个低风险 action/wiring helper。优先选择把冲突按钮 action 的 try/catch、toast、rerender 包装委托给 runtime;业务保存状态机仍留在 `web_shell.rs`。
|
||||
|
||||
## 允许修改
|
||||
|
||||
- `rust/crates/mnote-web/browser/document-conflict-panel-runtime.js`
|
||||
- `rust/crates/mnote-web/src/routes/web_shell.rs`
|
||||
|
||||
必要时只更新同文件现有字符串断言测试。
|
||||
|
||||
## 实现要求
|
||||
|
||||
- 保持 `acceptDiskVersion(session)`、`keepCurrentEditorVersion(session)`、`writeMergedConflictResult(session, value)` 的业务语义在 `web_shell.rs`。
|
||||
- runtime 只做 action wrapper / DOM wiring / 错误 toast 协调,通过 `deps` 注入具体业务函数。
|
||||
- runtime 不存在时,inline fallback 必须继续执行原实现。
|
||||
- 若发现当前 HEAD 已有相同 helper 或不宜继续迁出,则输出诊断 patch 或 handoff 说明,不强迁。
|
||||
|
||||
## 禁止事项
|
||||
|
||||
- 不迁 document session lifecycle。
|
||||
- 不迁 local upload / filetree / editor island。
|
||||
- 不修改 AGENTS、设计文档或 bugs 文档。
|
||||
- 不提交 git,不回滚或清理无关文件。
|
||||
|
||||
## 验收命令
|
||||
|
||||
```bash
|
||||
node --check rust/crates/mnote-web/browser/document-conflict-panel-runtime.js
|
||||
cargo fmt --manifest-path rust/Cargo.toml --all --check
|
||||
cargo check --manifest-path rust/Cargo.toml -p mnote-web
|
||||
cargo test --manifest-path rust/Cargo.toml -p mnote-web document_conflict_panel_runtime_contains_dom_helpers -- --test-threads=1
|
||||
cargo test --manifest-path rust/Cargo.toml -p mnote-web mnote_browser_runtime_assets_are_explicitly_mounted -- --test-threads=1
|
||||
```
|
||||
|
||||
## 输出要求
|
||||
|
||||
handoff 必须列出:
|
||||
|
||||
- 迁出或不迁出的边界判断。
|
||||
- 修改文件。
|
||||
- 委托 deps 清单或阻塞证据。
|
||||
- 是否保留 fallback。
|
||||
- 验收命令和结果。
|
||||
- 未覆盖风险。
|
||||
- `git diff --stat`。
|
||||
@@ -0,0 +1,60 @@
|
||||
# Batch S Worker A: 5-29 overlay sync boundary audit
|
||||
|
||||
## Project root
|
||||
|
||||
`/mnt/Data1T/mnote-worktrees/0525-s-worker-a-5-29-overlay-sync-readonly`
|
||||
|
||||
## Goal
|
||||
|
||||
Do a read-only audit for the next safe 5-29 editor runtime extraction slice around:
|
||||
|
||||
- `rust/spikes/leptos-tiptap-spike/src/lib.rs::try_sync_editor_overlay_state`
|
||||
- `on_selection_change` / selection bridge paths near it if needed
|
||||
- `rust/spikes/leptos-tiptap-spike/src/editor_runtime/overlays.rs`
|
||||
|
||||
Answer what can still be extracted safely without changing runtime behavior.
|
||||
|
||||
## Required questions
|
||||
|
||||
1. Is `try_sync_editor_overlay_state` now small enough to move wholesale into `editor_runtime/overlays.rs`, or should it stay in `lib.rs`?
|
||||
2. If not wholesale, what is the next smallest pure/helper extraction?
|
||||
3. Which exact files/functions would a future implementation worker be allowed to edit?
|
||||
4. What smoke/tests must Codex run after that future patch?
|
||||
|
||||
## Allowed files
|
||||
|
||||
Read-only task. Do not modify any repository file.
|
||||
|
||||
## Hard forbidden leaf-worker rules
|
||||
|
||||
You are a leaf worker, not a coordinator.
|
||||
|
||||
- Do not create `.codex/reasonix-tasks/*.md`.
|
||||
- Do not start `reasonix-coding-runner`, `reasonix acp`, Claude Code, Codex, Hermes, or any sub-agent.
|
||||
- Do not create, delete, or operate any worktree other than your project root.
|
||||
- Do not commit, reset, checkout, delete, clean, or revert files.
|
||||
- If you think the task needs splitting, report that in handoff only.
|
||||
|
||||
## Suggested checks
|
||||
|
||||
```bash
|
||||
git status --short
|
||||
git diff --stat
|
||||
```
|
||||
|
||||
## Required final artifacts
|
||||
|
||||
Create these files under your output directory if the runner supports it, or include equivalent content in final output:
|
||||
|
||||
- `process-handoff.md`
|
||||
- `process-handoff.json`
|
||||
- `result.json`
|
||||
|
||||
Include:
|
||||
|
||||
- Findings with file/function references.
|
||||
- Recommended next implementation slice.
|
||||
- Explicit "do not move" boundary.
|
||||
- `git status --short`.
|
||||
- `git diff --stat`.
|
||||
|
||||
Reference in New Issue
Block a user