dsh-linked-workspace 0.8.3 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.10.0 — 2026-11-12
4
+
5
+ Fourth review round: transfer safety, content search, document find and comparison actions.
6
+
7
+ - **No silent overwrite (fix)**: dropping a file onto a folder that already has that name now asks first — cancel, keep both, or overwrite. `fs.pullToLocal` and `fs.upload` accept `conflict=error|overwrite|unique`; `unique` goes through `uniqueLocalPath` / `remoteUniqueTarget`. Verified by overwriting `REMOTE-OVER` with `LOCAL-OVER` and by creating `same copy.txt` and `overwrite (2).txt`.
8
+ - **Transfer and drag fixes**: single-file transfers create missing parent directories (previously `writeFileAtomic … No such file`); same-tree drops point at “Move to…”; dropping a folder shows a direction-specific notice; hovering a folder for 700 ms while dragging expands it.
9
+ - **Content search (feature)**: `fs.grep` searches file contents — the local scan is bounded to 1 MB per file, 2000 files, 8 MB and 5 s; the remote side runs `grep -rIl … | head`. The search bar switches between “File name” and “Content” modes; `fs.search` stays a filename search (now documented, and the placeholder was corrected).
10
+ - **Document find (feature)**: the Markdown document pane supports Ctrl/Cmd+F with a counter, next/previous and Escape; it is read-only (replace remains in the text editor).
11
+ - **Compare actions (feature)**: comparison rows can be pushed to the remote side or pulled to the local side; the dialog notes a missing local folder and per-side truncation, closes when a row is opened, and derives the local path separator instead of hardcoding `\`.
12
+ - **Queue retry (feature)**: failed transfer-queue items gain “Retry”.
13
+ - **Workspace registration (feature)**: when a link has no `workspaceId`, settings offers “Register workspace” (`linked.update` with `ensureWorkspace: true`).
14
+ - **Smaller fixes**: the find counter is announced (`aria-live`), Escape closes the find bar from the replace field, and the editor status bar no longer shows a pointless `Ctrl+S` keycap.
15
+ - Tests: 63 unit tests pass; `test/host-api.mjs` passes 28 steps.
16
+ ## 0.9.0 — 2026-11-12
17
+
18
+ Third review round: in-editor editing, local/remote comparison and drag-and-drop, plus refresh behaviour.
19
+
20
+ - **Find and replace (feature)**: `Ctrl/Cmd + F` opens an in-editor bar with a case-sensitive toggle, previous/next, a match counter, replace and replace all. Matching stops at 5000 hits and the counter shows `5000+` when more exist; replace-all still edits the whole document (6000 replacements verified).
21
+ - **Terminal in a directory (feature)**: the tree context menu gains “Open terminal here” for folders. `terminal.open` accepts an optional `path`, validated to stay inside the linked workspace, and starts the shell in that directory (verified with a real `ssh -t … "cd <dir> && exec bash -l"` process).
22
+ - **Filter in the path pickers (feature)**: the local and remote directory pickers filter already-loaded entries while typing, with an empty-state hint.
23
+ - **Local/remote comparison (feature)**: `fs.compare` compares a remote directory with its local counterpart and returns only-local / only-remote / changed entries (size differs, or mtime differs by more than 2 s), capped at 4000 files, depth 12 and 200 rows per group with a `truncated` flag. The dialog lists the three groups; clicking a row opens it.
24
+ - **Multi-select and batch actions (feature)**: Ctrl/Cmd-click toggles a row, Shift-click extends the selection; the context menu offers “Transfer selected (N)” and “Delete selected (N)” with a confirmation dialog, and per-item errors are aggregated (a file deleted outside the app reports “path does not exist” while the others are removed).
25
+ - **Drag and drop (feature)**: drag rows between the local and remote trees (a remote file is copied through `fs.pullToLocal`, a local file through `fs.upload`), and drop OS files onto either tree (`fs.upload` / `local.import`; up to 50 files, 64 MB each). If the browser hides file paths, or a remote folder is dropped onto the local tree, a notice explains the limitation instead of failing silently.
26
+ - **Refresh throttling**: the 4-second tick now refreshes each directory at most every 15 seconds and pauses while the page is hidden (measured intervals 18–19 s), so a large tree no longer re-lists on every tick.
27
+ - **Unsaved-changes guard**: a dirty editor registers `beforeunload`, so reloading or closing the window asks for confirmation.
28
+ - **Refresh keeps loaded rows**: a silent refresh merges the first page with already-loaded rows instead of truncating back to 500 (or 5000); a 5500-entry directory stayed at 5522 rendered rows across refresh cycles.
29
+ - **Search truncation**: results over the 200-row cap now show “showing the first 200 matches” instead of dropping the flag.
30
+ - **Load-more and counter fixes**: “Load more (0 left)” disappears once everything is loaded; the find counter reports `5000+` instead of pretending the document has exactly 5000 matches.
31
+ - Review note: two previously reported issues (no context menu in the right-sidebar tree, hidden-file toggle not refreshing expanded folders) were re-tested and could not be reproduced; neither was changed.
32
+
3
33
  ## 0.8.3 — 2026-11-11
4
34
 
5
35
  Second review round: follow-ups to the 0.8.2 paging and preview work.
package/README.en.md CHANGED
@@ -119,6 +119,36 @@ Old “Remote directories” tabs are restored after refresh through hidden lega
119
119
 
120
120
  See [CHANGELOG.md](CHANGELOG.md) for the full version history.
121
121
 
122
+ ### 0.10.0
123
+
124
+ Transfer safety, content search, document find and comparison actions (fourth review round):
125
+
126
+ - **No silent overwrite**: dropping a file onto a folder that already has that name now asks first — cancel, keep both or overwrite. `fs.pullToLocal` and `fs.upload` accept `conflict=error|overwrite|unique`; unique names go through `uniqueLocalPath` / `remoteUniqueTarget` (verified by overwriting `REMOTE-OVER` with `LOCAL-OVER`, and by producing `same copy.txt` and `overwrite (2).txt`).
127
+ - **Transfer and drag fixes**: single-file transfers create missing parent directories (previously `writeFileAtomic … No such file`); same-tree drops point at “Move to…”; dropping a folder shows a direction-specific notice; hovering a folder for 700 ms while dragging expands it.
128
+ - **Content search**: `fs.grep` searches file contents — local scans are bounded to 1 MB per file, 2000 files, 8 MB and 5 s; the remote side runs `grep -rIl … | head`. The search bar switches between “File name” and “Content”; `fs.search` remains a filename search (now documented, placeholder corrected).
129
+ - **Document find**: the Markdown document pane supports `Ctrl/Cmd + F` with a counter, next/previous and Escape; it is read-only (replace stays in the text editor).
130
+ - **Compare actions**: rows can be pushed to the remote side or pulled to the local side; a missing local folder and per-side truncation are explained; opening a row closes the dialog; the local path separator is inferred instead of hardcoded.
131
+ - **Queue retry**: failed transfer-queue items gain “Retry”.
132
+ - **Workspace registration**: when a link has no `workspaceId`, settings offers “Register workspace” (`linked.update` with `ensureWorkspace`).
133
+ - **Smaller fixes**: the find counter is announced (`aria-live`); Escape closes the find bar from the replace field; the editor status bar no longer shows a pointless `Ctrl+S` keycap.
134
+ - Tests: 63 unit tests pass; `test/host-api.mjs` passes 28 steps.
135
+ ### 0.9.0
136
+
137
+ In-editor find/replace, local↔remote comparison, multi-select and drag-and-drop, plus refresh fixes (third review round):
138
+
139
+ - **Find and replace**: `Ctrl/Cmd + F` opens a find bar with a case-sensitive toggle, previous/next, a match counter, replace and replace all. Matching stops at 5000 hits and the counter shows `5000+`; replace-all still edits the whole document (6000 replacements verified).
140
+ - **Open a terminal in a directory**: the folder context menu offers “Open terminal here”; `terminal.open` accepts a validated `path` and starts the shell there (verified as a real `ssh -t … "cd <dir> && exec bash -l"` process).
141
+ - **Picker filtering**: the local and remote directory pickers filter already-loaded entries as you type, with an empty-state hint.
142
+ - **Local/remote comparison**: `fs.compare` reports only-local / only-remote / changed entries (size differs or mtime differs by more than 2 s), capped at 4000 files, depth 12 and 200 rows per group with a truncation flag; clicking a row opens it.
143
+ - **Multi-select and batch actions**: Ctrl/Cmd-click toggles, Shift-click extends; the context menu offers “Transfer selected (N)” and “Delete selected (N)” with confirmation, and per-item errors are aggregated.
144
+ - **Drag and drop**: drag rows between the two trees (remote files via `fs.pullToLocal`, local files via `fs.upload`) and drop OS files onto either tree (`fs.upload` / `local.import`; up to 50 files, 64 MB each). Clear notices cover browsers that hide file paths and remote folders dropped onto the local tree.
145
+ - **Refresh throttling**: each directory refreshes at most every 15 seconds and not at all while the page is hidden (measured 18–19 s), instead of re-listing on every 4-second tick.
146
+ - **Unsaved-changes guard**: a dirty editor registers `beforeunload`, so reloading or closing the window asks for confirmation.
147
+ - **Refresh keeps loaded rows**: a silent refresh merges the first page with the rows already loaded instead of truncating back to 500 (or 5000); a 5500-entry directory stayed at 5522 rendered rows.
148
+ - **Search truncation**: more than 200 matches now shows “showing the first 200 matches” instead of dropping the flag.
149
+ - **Load-more and counter fixes**: “Load more (0 left)” disappears when everything is loaded; the find counter reports `5000+` when the limit is hit.
150
+ - Review note: two earlier findings (no context menu in the sidebar tree, hidden-file toggle not refreshing) could not be reproduced and were not changed.
151
+
122
152
  ### 0.8.3
123
153
 
124
154
  Follow-up fixes to the 0.8.2 paging and preview work (second review round):
package/README.md CHANGED
@@ -114,6 +114,36 @@ dsh plugin --profile "$DSH_PROFILE" add "file:$PWD/dsh-linked-workspace"
114
114
 
115
115
  已打开的旧右侧栏「远程目录」标签页会在刷新后自动恢复(插件保留了两个隐藏的旧 tab 类型别名),标签标题也会自动改成「联动工作区目录」,新开的标签使用新的 `dsh-linked-workspace` 类型。
116
116
 
117
+ ### 0.10.0 变化
118
+
119
+ 传输安全、内容搜索、文档查找与对比操作(第四轮评审):
120
+
121
+ - **不再静默覆盖**:把文件拖到已有同名文件的目标目录时,先弹「取消 / 保留两者 / 覆盖」;`fs.pullToLocal`、`fs.upload` 新增 `conflict=error|overwrite|unique`,唯一名走 `uniqueLocalPath` / `remoteUniqueTarget`(实测覆盖 `REMOTE-OVER` → `LOCAL-OVER`,保留两者生成 `same copy.txt`、`overwrite (2).txt`)。
122
+ - **传输与拖拽修正**:单文件传输会自动创建缺失的父目录(此前报 `writeFileAtomic … No such file`);同侧拖拽会提示改用「移动到…」;拖目录时按方向给出明确提示;拖拽悬停目录 700 ms 自动展开。
123
+ - **内容搜索**:新增 `fs.grep` 搜索文件内容——本地限制单文件 1 MB、2000 个文件、8 MB、5 秒;远端用 `grep -rIl … | head`。搜索条可在「文件名 / 内容」之间切换;`fs.search` 仍是文件名匹配(已写入文档,占位文案同步修正)。
124
+ - **文档内查找**:Markdown 文档面板支持 `Ctrl/Cmd + F`,带计数、上一个/下一个与 Esc 关闭;只读,替换仍在文本编辑器中。
125
+ - **对比操作**:对比行可「推送到远端 / 拉取到本地」;本地缺少对应目录、单侧截断都有说明;点行打开后对话框自动关闭;本地路径分隔符按路径推断,不再写死 `\`。
126
+ - **队列重试**:传输队列的失败项增加「重试」。
127
+ - **注册工作区**:联动记录没有 `workspaceId` 时,设置页显示「注册为工作区」(`linked.update` 的 `ensureWorkspace`)。
128
+ - **其他修正**:查找计数加 `aria-live`;焦点在替换框时 Esc 也能关闭查找条;编辑器状态栏移除无用的 `Ctrl+S` 键帽。
129
+ - 测试:63 项单元测试通过;`test/host-api.mjs` 通过 28 步。
130
+ ### 0.9.0 变化
131
+
132
+ 编辑器内查找替换、本地⇄远端对比、多选与拖拽,以及刷新行为修复(第三轮评审):
133
+
134
+ - **编辑器查找/替换**:`Ctrl/Cmd + F` 打开查找条,支持区分大小写、上一个/下一个、命中计数、替换与全部替换;命中超过 5000 处时计数显示 `5000+`,全部替换仍作用于全文(实测 6000 处全部替换)。
135
+ - **在目录处打开终端**:目录右键菜单新增「在此打开终端」;`terminal.open` 支持 `path` 参数(校验必须在该联动工作区内),直接在该目录启动 shell(实测为 `ssh -t … "cd <目录> && exec bash -l"`)。
136
+ - **路径选择器过滤**:本地/远端目录选择器支持输入过滤已加载条目,无匹配时给出提示。
137
+ - **本地与远端对比**:新增 `fs.compare`,返回「仅本地 / 仅远端 / 大小或时间不同(mtime 差 >2 秒)」三组,单次最多 4000 个文件、深度 12、每组最多 200 行并带 `truncated` 标记;对话框按组列出,点行可直接打开。
138
+ - **树多选与批量操作**:Ctrl/Cmd 点击切换选中、Shift 点击追加;右键菜单出现「传输所选的 N 项」「删除所选的 N 项」并弹确认框,逐项失败会聚合提示(外部已删除的文件会报「路径不存在」,其余照常删除)。
139
+ - **拖拽**:可在本地/远端两棵树之间拖动文件(远端文件走 `fs.pullToLocal`,本地文件走 `fs.upload`),也可把系统文件拖进任一树(`fs.upload` / `local.import`,最多 50 个、单个 64 MB)。浏览器不暴露文件路径、或把远端目录拖到本地树时会给出明确提示,不再静默失败。
140
+ - **刷新节流**:4 秒定时器改为每个目录最多 15 秒刷新一次,页面隐藏时暂停(实测间隔 18–19 秒),大目录不再每个 tick 都重列。
141
+ - **未保存拦截**:有未保存改动时注册 `beforeunload`,刷新/关闭窗口会弹确认。
142
+ - **刷新保留已加载行**:静默刷新把第一页与已加载行合并,不再截回 500(或 5000);5500 项目录在多个刷新周期后仍保持 5522 行。
143
+ - **搜索截断提示**:超过 200 条时显示「结果过多,仅显示前 200 条」。
144
+ - **加载更多与计数修正**:全部加载后「加载更多(剩余 0 项)」不再残留;查找计数满 5000 时显示 `5000+`,不再假装全文只有 5000 处。
145
+ - 复核说明:上一轮报告的两项(右侧栏树无右键菜单、切换隐藏文件后不刷新)复测未能复现,本轮未改动。
146
+
117
147
  ### 0.8.3 变化
118
148
 
119
149
  针对 0.8.2 分页与预览的后续修复(第二轮评审):
package/docs/API.md CHANGED
@@ -74,21 +74,25 @@ relative to the scope root, or absolute inside it.
74
74
  | `local.mkdir` | `{ path, name }` | `{ path }` (existing target → 409) |
75
75
  | `linked.list` | `{}` | `{ links: LinkInfo[] }` (each link carries `running`) |
76
76
  | `linked.create` | `{ hostId, remotePath, localPath, name?, mirror? }` | `{ link, workspaceId: string|null }` |
77
- | `linked.update` | `{ id, name?, mirror? }` | `{ link }` |
77
+ | `linked.update` | `{ id, name?, mirror?, ensureWorkspace? }` | `{ link }` (`ensureWorkspace: true` registers the local directory as a DSH workspace when it is not registered yet) |
78
78
  | `linked.remove` | `{ id, removeWorkspace?, deleteLocalState? }` | `{ removedWorkspace, deletedLocalState }` |
79
79
  | `linked.sync` | `{ id, maxFiles?, maxBytes? }` | `{ job: SyncJob }` (starts a background job) |
80
80
  | `linked.syncStatus` | `{ id }` | `{ job: SyncJob | null }` |
81
81
  | `linked.syncCancel` | `{ id }` | `{ cancelled: boolean }` |
82
82
  | `local.list` | `{ path, limit?, offset? }` | `{ path, entries: [{ name, path, type, size, mtime }], total, offset, limit, hasMore }` |
83
83
  | `local.openExternal` | `{ path }` | `{ opened, path }` |
84
- | `terminal.open` | `{ workspaceId?/linkedId?, side: 'remote'\|'local' }` | `{ opened, side, path, host? }` |
84
+ | `terminal.open` | `{ workspaceId?/linkedId?, side: 'remote'\|'local', path? }` | `{ opened, side, path, host? }` (`path` must stay inside the linked workspace) |
85
85
  | `fs.openExternal` | `{ workspaceId?/linkedId?, path }` | `{ opened, localPath, size }` |
86
86
  | `localWorkspace.create` | `{ path, name? }` | `{ workspaceId, title, path }` |
87
87
  | `session.info` | `{ sessionId }` | `{ sessionId, cwd, running }` |
88
88
  | `skills.list` | `{ linkedId }` | `{ localPath, skills: [{ name, description, whenToUse, path, source }] }` |
89
89
  | `skills.read` | `{ linkedId, name }` | `{ name, description, content, path }` |
90
90
  | `git.status` | `{ workspaceId?/linkedId?, side: 'remote'|'local' }` | `{ ok, repo, root, branch, changes, error? }` |
91
- | `fs.search` | `{ workspaceId?/linkedId?, side, query, maxResults? }` | `{ ok, query, entries, truncated }` |
91
+ | `fs.search` | `{ workspaceId?/linkedId?, side, query, maxResults? }` | `{ ok, query, entries, truncated }` (matches **file names**, not contents; use `fs.grep` for contents) |
92
+ | `fs.grep` | `{ workspaceId?/linkedId?, side, query, maxResults? }` | `{ ok, query, entries, truncated }` (searches file **contents**; local scans stop at 1 MB per file, 2000 files, 8 MB and 5 s; remote uses `grep -rIl`; max 1000 rows) |
93
+ | `fs.compare` | `{ workspaceId?/linkedId?, path? }` | `{ path, relative, localPath, localMissing, counts: { onlyLocal, onlyRemote, changed, same }, onlyLocal, onlyRemote, changed, truncated, remoteTruncated, localTruncated, skippedLinks }` (linked workspaces only; excludes `.git`, `node_modules`, `.local`, `.remote`; 4000 files and depth 12 **per side**, 200 rows per group; `skippedLinks` counts symlinks and non-regular files) |
94
+ | `fs.pullToLocal` | `{ workspaceId?/linkedId?, path, targetDir?, conflict? }` | `{ path, relative, size, mtime }` (single file, ≤64 MB; `targetDir` must stay inside the local root; `conflict` is `error` (default), `overwrite` or `unique`) |
95
+ | `fs.upload` | `{ workspaceId?/linkedId?, path, paths, conflict? }` | `{ side: 'remote', target, files, bytes, skipped }` (≤50 local files, 64 MB each; `conflict` is `error` (default), `overwrite` or `unique`; a missing target directory is created) |
92
96
  | `fs.transfer` | `{ workspaceId?/linkedId?, path }` | `{ files, bytes, skipped, truncated, dest }` |
93
97
  | `fs.download` | `{ workspaceId?/linkedId?, path }` | `{ path, files, bytes, skipped, truncated }` |
94
98
  | `fs.edit` | `{ workspaceId?/linkedId?, path, app? }` | `{ localPath, size }` (opens Notepad/default app) |
@@ -98,6 +102,7 @@ relative to the scope root, or absolute inside it.
98
102
  | `local.media` | `{ path }` | `{ path, size, mtime, mime, base64 }` (max 24 MB) |
99
103
  | `local.write` | `{ path, content, expectedMtime? }` | `{ path, size, mtime }` |
100
104
  | `local.stat` | `{ path }` | `{ path, type, size, mtime, mode }` |
105
+ | `local.import` | `{ dir, paths }` | `{ dir, copied, skipped }` (copies OS files into `dir`, ≤50 files, 64 MB each) |
101
106
  | `local.rename` | `{ from, to }` | `{ path }` |
102
107
  | `local.move` | `{ path, targetDir?, root? }` | `{ path, type }` (same local tree; collision → 409) |
103
108
  | `local.delete` | `{ path, root? }` | `{}` (recursive) |
package/docs/VERIFY.md CHANGED
@@ -156,3 +156,31 @@ Host code (lib/) reloads live with `plugin_manager set_plugin include:linked-wor
156
156
  6. **复制失败清理(开发核验)**:复制一个内含 >64 MB 文件的目录:应报错且目标目录不留半成品(可用 `git status` 之外的目录列表确认)。
157
157
  7. **导出 PDF 上限(开发核验)**:同目录放 999 个同名 `<name>.pdf` 后再次导出同名的 Markdown:应提示「同名 PDF 过多,请先清理目录中的旧导出」,不进入无限循环。
158
158
  8. **host-api 套件**:在有 SSH 主机与 DSH 运行时 Node 的机器上跑 `node test/host-api.mjs`(本机系统 Node 24.13 删除中日韩字符目录会崩溃,用 DSH 自带 Electron Node 执行):应为 28 步全部通过。
159
+
160
+ ## 编辑、对比与拖拽(0.9.0)
161
+
162
+ 1. **查找/替换**:打开一个含 6000 处 `beta` 的文本文件,`Ctrl/Cmd + F` 输入 `beta`:计数应显示 `第 1 / 5000+ 个`;把替换框填成 `gamma` 点「全部替换」,正文应替换全部 6000 处(不只是 5000 处),保存后文件内容一致。
163
+ 2. **在此打开终端**:右键远端子目录 →「在此打开终端」:应弹提示「已打开终端」,并出现一个 `ssh -t … "cd <该目录> && exec bash -l"` 的终端窗口(开发核验:`Get-Process ssh | Select-Object CommandLine`)。
164
+ 3. **本地与远端对比**:让远端目录只多一个文件、本地只多一个文件、同名的两个文件大小不同;右键远端目录 →「与本地对比…」:三组计数应为 1/1/1,点某一行可直接打开对应文件。
165
+ 4. **多选与批量删除**:Ctrl+点击选中 3 个文件后,先在外部删掉其中 1 个,再「删除所选的 3 项」并确认:其余 2 个应删除成功,提示汇总出现「路径不存在」。
166
+ 5. **拖拽(浏览器分支)**:从系统文件管理器把文件拖到树行:Web 端应提示「当前浏览器无法读取被拖入文件的路径,请在 DSH 桌面窗口中拖拽」,不产生半成品文件。
167
+ 6. **拖拽(桌面分支)**:在 DSH 桌面窗口把文件拖到本地/远端目录行:应提示「已导入 1 个文件」,文件出现在目标目录且大小一致。
168
+ 7. **刷新节流**:展开一个 >500 项的目录,用开发者工具记录 `local.list` 请求:相邻刷新间隔应 ≥15 秒(实测 18–19 秒),切到后台标签页后不再刷新。
169
+ 8. **未保存拦截**:修改文件但不保存,刷新页面:浏览器应弹出离开确认;取消后编辑内容仍在。
170
+ 9. **分页按钮**:把 >500 项的目录加载到底:`.rw-load-more` 按钮应消失,不再显示「剩余 0 项」。
171
+ 10. **搜索截断**:在目录中放 250 个文件名含 `needle` 的文件后搜索:结果顶部应提示「结果过多,仅显示前 200 条;请输入更精确的关键词」。
172
+ 11. **注意**:搜索按**文件名**匹配(不是内容),界面占位符「在文件中搜索…」为既有文案问题,已列入下一轮缺陷候选。
173
+
174
+ ## 传输安全、内容搜索与对比操作(0.10.0)
175
+
176
+ 1. **拖拽冲突**:目标目录已有同名文件时,把文件拖进去:应弹「取消 / 保留两者 / 覆盖」;选「保留两者」生成 `name copy.txt`(或 `name (2).txt`),选「覆盖」后内容为拖入版本,选「取消」目标不变。
177
+ 2. **单文件传输建父目录**:向远端不存在的子目录传输单个文件:应成功,且不再出现 `writeFileAtomic … No such file`。
178
+ 3. **内容搜索**:搜索条切到「内容」后搜一个只出现在正文里的词(如 `beta`):本地应列出 `notes.md` 等文件;远端命中很多时显示「结果过多,仅显示前 200 条」;切回「文件名」仍按名称匹配。
179
+ 4. **文档内查找**:打开 Markdown 文档,`Ctrl/Cmd + F` 输入 `beta`:计数应显示「第 1 / 3 个」,Enter/Shift+Enter 上下跳转并选中,Esc 关闭且焦点回到编辑区。
180
+ 5. **对比操作**:右键远端目录「与本地对比…」,点「仅本地」行的「推送到远端」:远端出现该文件;点「仅远端」行的「拉取到本地」:本地出现该文件;打开某行后对话框自动关闭。
181
+ 6. **本地缺少对应目录**:对比一个本地没有的远程子目录:对话框应提示「本地没有对应目录,远端独有的文件无法对比」。
182
+ 7. **队列重试**:制造一次传输失败(例如目标路径是文件而非目录),在队列中点「重试」:修好原因后应成功并刷新树。
183
+ 8. **注册工作区**:联动记录的 `workspaceId` 为空时,设置页应显示「注册为工作区」,点击后变为正常的工作区信息。
184
+ 9. **拖拽提示**:同侧拖动、拖本地目录到远端、拖远端目录到本地:应分别给出「请使用移动到…」「暂不支持把本地目录拖拽到远端…」「暂不支持把远程目录拖拽到本地…」。
185
+ 10. **悬停展开**:拖拽停在折叠目录行 700 ms:该目录应自动展开。
186
+ 11. **host-api**:`node test/host-api.mjs` 应为 28 步全部通过。