dsh-linked-workspace 0.15.0 → 0.16.1
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 +50 -0
- package/README.en.md +7 -2
- package/README.md +6 -2
- package/docs/API.md +3 -1
- package/docs/VERIFY.md +28 -3
- package/lib/client.js +474 -37
- package/lib/index.js +119 -33
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
English · [简体中文](CHANGELOG.zh.md)
|
|
4
4
|
|
|
5
|
+
## 0.16.1 — 2026-11-19
|
|
6
|
+
|
|
7
|
+
- The hover card's connection state now follows reality in both directions: the
|
|
8
|
+
page polls the new `hosts.status` (memory only, no dialling) every 6 seconds
|
|
9
|
+
and repaints just that one line, even while the card is open, so a host that
|
|
10
|
+
drops shows "connection lost" within seconds and one that recovers goes back
|
|
11
|
+
to "connected" without a reload.
|
|
12
|
+
- A missing remote folder is no longer reported as a dead connection: `remote_workspaces.test`
|
|
13
|
+
returns `exists: false` and leaves the host alone, so checking a workspace
|
|
14
|
+
whose directory was renamed elsewhere no longer turns every other workspace on
|
|
15
|
+
that host red.
|
|
16
|
+
- A recorded failure decays after 60 seconds (`STATUS_TTL_MS`) instead of
|
|
17
|
+
sticking forever: an error nobody has re-checked reads as "not connected",
|
|
18
|
+
and the next successful call sets the state again.
|
|
19
|
+
- HTML preview is no longer blocked by the editor's 2 MB ceiling: it reads with `preview`, which raises the cap to the 8 MB read cap, so a 7 MB plotly page opens; only files above 8 MB show "download it to the default folder and open it in a browser", and the doubled "无法预览网页:无法预览网页" wording is gone.
|
|
20
|
+
- HTML preview now uses `sandbox="allow-scripts"`: the page's own scripts run in a separate opaque origin (charts are no longer blank) and still cannot reach the DSH UI, host storage or tabs; the status chip reads "Sandboxed preview (scripts run, no access to the DSH UI)".
|
|
21
|
+
|
|
22
|
+
## 0.16.0 — 2026-11-16
|
|
23
|
+
|
|
24
|
+
- The workspace root no longer offers “Change permissions”, and the Host rejects it too: a stray 644 on the root makes the whole workspace look empty.
|
|
25
|
+
- The workspace root no longer offers “Rename” or “Delete”: the Host rejects both, so the old menu only produced a confirm dialog followed by an error.
|
|
26
|
+
- “Change permissions” starts from the right default per kind — 755 for folders (with a note that the execute bit matters) and 644 for files; the dialog also explains why 644 on a folder makes it look empty.
|
|
27
|
+
- Permission failures now name the usual cause (a folder missing its execute bit — set 755 again) in the editor panel, inside dialogs and in the banner.
|
|
28
|
+
- The hidden-file toggle is remembered in localStorage, so it survives reopening the tab; its tooltip no longer reads like a stutter.
|
|
29
|
+
- Starting a new action (open a file, refresh the tree, run a search) clears the previous error banner instead of leaving it pinned.
|
|
30
|
+
- The transfer queue reports throughput (for example `12.4 MB/s`) next to the byte count.
|
|
31
|
+
- Tree header shows the free space of the remote volume the workspace lives on
|
|
32
|
+
(`hosts.df`) and refreshes with the tree.
|
|
33
|
+
- "Download to the default folder" reports what actually landed — file count and
|
|
34
|
+
size — and warns when the 150-file / 15 MB cap cut the run short or a single
|
|
35
|
+
file over 20 MB was skipped. Multi-select can download every selected remote
|
|
36
|
+
entry at once ("Download N selected").
|
|
37
|
+
- Every confirmation dialog answers Escape, keeps Tab inside the dialog and
|
|
38
|
+
returns focus to the row that opened it.
|
|
39
|
+
- Notices can be closed by hand and are announced to screen readers; error
|
|
40
|
+
notices no longer vanish after 4.2 seconds, so a long SSH message can be read
|
|
41
|
+
and copied.
|
|
42
|
+
- Content search remembers the last eight queries and offers them as chips when
|
|
43
|
+
the box is empty; inside the editor Ctrl+Up / Ctrl+Down walk the hits of the
|
|
44
|
+
query that opened the file.
|
|
45
|
+
- The transfer dialog keeps the last 20 finished transfers, so closing it no
|
|
46
|
+
longer loses the record.
|
|
47
|
+
- The context menu gains "Copy ssh command" for remote folders — a ready to
|
|
48
|
+
paste `ssh host -t 'cd <dir> && exec $SHELL -l'`.
|
|
49
|
+
- "Open a copy in Notepad" is labelled as such (the copy is never written back)
|
|
50
|
+
and copies older than a day are swept on start, so the temp folder stops
|
|
51
|
+
growing forever.
|
|
52
|
+
- The host API suite removes its remote scratch tree in `finally` and clears
|
|
53
|
+
leftovers before it starts, so a failed run cannot leave debris behind.
|
|
54
|
+
|
|
5
55
|
## 0.15.0 — 2026-11-15
|
|
6
56
|
|
|
7
57
|
- **Remote workspace files are editable**: a remote workspace’s remote tree now behaves like the remote side of a linked workspace — files open in the built-in editor, `Ctrl/Cmd+S` (and autosave) write straight back to the host, save conflicts are detected the usual way, and Markdown / Word / Excel / PowerPoint / PDF documents open in their document panes. Only the features that need a local directory stay linked-only: transfer to the local mirror, the transfer queue, two-way comparison, and the local terminal / local pane (the transfer button is disabled there and its tooltip says so).
|
package/README.en.md
CHANGED
|
@@ -57,9 +57,14 @@ The plugin takes over the DSH sidebar/hero directory-selection hole; the dialog
|
|
|
57
57
|
3. **Remote workspace**: SSH host + remote directory + workspace name; the placeholder directory becomes a DSH workspace and sessions run on the server.
|
|
58
58
|
|
|
59
59
|
> Linked workspace rows no longer carry a `⇄` title prefix: a scoped stylesheet keyed on `data-row-key` swaps the host folder glyph for the workspace's own icon — two interlocking links for a linked workspace, a display with an outbound arrow for a remote workspace (normal local workspaces are untouched). When the SSH connection drops the row icon turns red, and the host's hover card gains one line under the name combining the SSH host with its live state (`RTX-PRO-6000-1 · Connected`, turning red with “Connection lost” once the link drops); a remote workspace shows the remote directory, a linked one shows both the remote and local directories. This is the only DOM-level adaptation of the host row; if DSH changes the row structure the selector stops matching and the original folder icon returns, with no other breakage.
|
|
60
|
+
>
|
|
61
|
+
> That state follows the real connection in both directions: the page asks the host for every host's state once every 6 seconds (memory only, it never dials), and only repaints that one line when the value actually changed — so a host that drops shows “Connection lost” within seconds while the card stays open, and one that recovers goes back to “Connected” without a reload. A single failure only describes that moment: an error nobody has re-checked decays to “Not connected” after 60 seconds, and “Test connection” finding a missing remote directory is no longer treated as a dead link, so it cannot paint the other workspaces on the same host red.
|
|
60
62
|
|
|
61
63
|
### Sidebar: “Linked Workspace Directory”
|
|
62
64
|
|
|
65
|
+
The heading shows the free space of the remote volume that holds the workspace;
|
|
66
|
+
hover it for the total size and the used percentage.
|
|
67
|
+
|
|
63
68
|
- Fixed on the far right of the sidebar: **remote tree on top, local tree below**, both rooted at “All files”; the plugin's `.local`/`.remote` internal folders are hidden from the local tree.
|
|
64
69
|
- **Single-click opens, double-click pins**: single-click a folder to expand/collapse; single-click a file to open it in the content panel, replacing the current unpinned preview. Double-click a file to pin it so later single clicks do not replace it; double-clicking a folder only keeps it expanded.
|
|
65
70
|
- Toolbar (top right of the sidebar):
|
|
@@ -74,7 +79,7 @@ The plugin takes over the DSH sidebar/hero directory-selection hole; the dialog
|
|
|
74
79
|
- Coloured file-type icons (JS/TS/Python/JSON/Markdown/Shell/YAML/images/archives/config files…).
|
|
75
80
|
- **Tabs and editor**: up to 12 tabs, local and remote files share the same editor; line numbers, syntax highlighting (overlay), theme colours, `Ctrl/Cmd+S`, conflict prompt (reload / force save), read-only protection for binary and >2 MB files; the status bar shows encoding, line endings, line count and file size.
|
|
76
81
|
- **Find and replace**: `Ctrl/Cmd + F` opens an in-editor bar with a case-sensitive toggle, previous/next, a match counter, replace and replace all. Above 5000 matches the counter shows `5000+` while replace-all still edits the whole document; `Esc` closes it from the replace field too. The Markdown document panel has its own read-only find (`Ctrl+F`, counter, next/previous).
|
|
77
|
-
- **Image, CSV and HTML previews**: PNG/JPG/GIF/WebP/BMP/ICO/AVIF/SVG render in the content panel (up to 24 MB) with zoom buttons, `Ctrl/Cmd + wheel`, fit-to-window and 1:1; CSV/TSV open as a table with a Table/Source toggle (the source view stays editable), capped at 1000 rows × 80 columns. HTML/HTM render in a sandboxed iframe
|
|
82
|
+
- **Image, CSV and HTML previews**: PNG/JPG/GIF/WebP/BMP/ICO/AVIF/SVG render in the content panel (up to 24 MB) with zoom buttons, `Ctrl/Cmd + wheel`, fit-to-window and 1:1; CSV/TSV open as a table with a Table/Source toggle (the source view stays editable), capped at 1000 rows × 80 columns. HTML/HTM render in a sandboxed iframe whose scripts run in an opaque origin (charts draw, but the frame cannot reach the DSH UI or its storage); the cap is 8 MB, and beyond that the panel tells you to download the file and open it in a browser. Markdown previews strip scripts, event attributes and dangerous links.
|
|
78
83
|
- **Shortcuts**: `Ctrl/Cmd+S` save, `Ctrl/Cmd+W` close tab (prompting when dirty), `Ctrl+Tab` / `Shift+Ctrl+Tab` cycle tabs, `Ctrl/Cmd+B` toggle the directory panel, `Ctrl/Cmd+Shift+F` file search.
|
|
79
84
|
- **Auto save**: Settings → Linked workspaces → “Editor behaviour”; saves about one second after typing stops. With it off, use `Ctrl/Cmd+S`; unsaved changes trigger a confirmation before the page unloads.
|
|
80
85
|
|
|
@@ -185,7 +190,7 @@ The npm package is `dsh-linked-workspace`; released versions can also be install
|
|
|
185
190
|
- Remote workspaces and direct file APIs are confined to the configured remote root; linked-workspace tools are confined to the remote root, and local writes to the local root.
|
|
186
191
|
- Single-file saves are capped at 8 MB; mirror sync runs in the background (500 files / 50 MB by default, skipping oversized files), excludes `.git`/`node_modules`/caches, uses a 30 s per-file timeout and never blocks an HTTP request. “Transfer” and “Download to default folder” handle at most 150 files / 15 MB per run and report partial transfers.
|
|
187
192
|
- The page HTTP API accepts loopback same-origin requests only (remote deployments fall back to the DSH `connection` service's Host/Origin authentication).
|
|
188
|
-
-
|
|
193
|
+
- HTML previews run inside a `sandbox="allow-scripts"` iframe: the page's own scripts execute (so plotly-style charts actually draw) but in a separate opaque origin that cannot reach the DSH UI, host storage or tabs. Markdown/document previews still strip scripts, inline styles, event attributes and `javascript:`/`vbscript:` links, keeping safe links and image `data:` URLs.
|
|
189
194
|
|
|
190
195
|
## FAQ
|
|
191
196
|
|
package/README.md
CHANGED
|
@@ -57,9 +57,13 @@
|
|
|
57
57
|
3. **远程工作区**:SSH 主机 + 远端目录 + 工作区名称,创建后占位目录成为 DSH 工作区,会话直接跑在远端。
|
|
58
58
|
|
|
59
59
|
> 左侧工作区行不再带 `⇄` 标题前缀:插件用一份按 `data-row-key` 定位的样式表,把宿主文件夹图标换成工作区自己的图标——联动工作区是**双链环**,远程工作区是**显示器 + 出链箭头**,普通本地工作区不受影响。SSH 连接断开时该行的图标会变红;把鼠标停在行上,宿主那张悬停信息卡里名字下面会多出一行「SSH 主机 · 连接状态」(形如 `RTX-PRO-6000-1 · 已连接`,掉线后变红并显示「连接已断开」);远程工作区显示远端目录、联动工作区同时显示远端与本地目录。这是对宿主行结构的唯一 DOM 级适配;如果 DSH 以后更改行结构,选择器会自然失配并回退到原来的文件夹图标,不破坏其他功能。
|
|
60
|
+
>
|
|
61
|
+
> 这一行状态是**跟着实际连通性走的**:页面每 6 秒向宿主取一次各主机的连接状态(只读内存、不发起新连接),只有状态真的变了才重绘那一行,卡片开着时也会即时更新——主机掉线几秒内变「连接已断开」,恢复后自动回到「已连接」,不用刷新页面。一次失败只代表当时:没人再验证的旧错误 60 秒后降级为「未连接」;「测试连接」发现远端目录不存在也不会被当成断连,不会把同一台主机上的其它工作区一起标红。
|
|
60
62
|
|
|
61
63
|
### 右侧栏「联动工作区目录」
|
|
62
64
|
|
|
65
|
+
目录栏标题右侧显示该工作区所在远端卷的可用空间,悬停可看到总量与已用百分比。
|
|
66
|
+
|
|
63
67
|
- 面板固定在右侧栏最右边:**上方远端树,下方本地树**,两棵树根部都显示「所有文件」;本地树自动隐藏插件的 `.local`/`.remote` 内部目录。
|
|
64
68
|
- **单击打开,双击固定**:单击文件夹立即展开/折叠;单击文件直接在文件内容面板打开,再次单击其他文件会替换当前未固定的预览标签。双击文件可固定该标签,之后单击其他文件不会覆盖它;双击文件夹只保持展开。
|
|
65
69
|
- 工具栏(右侧栏右上角):
|
|
@@ -74,7 +78,7 @@
|
|
|
74
78
|
- 不同文件类型使用不同彩色图标(JS/TS/Python/JSON/Markdown/Shell/YAML/图片/压缩包/配置文件等)。
|
|
75
79
|
- **标签与编辑器**:最多同时打开 12 个标签,本地与远端文件共用内部编辑器;行号、语法高亮(叠层渲染)、主题配色、`Ctrl/Cmd+S` 保存、冲突提示(重新加载/强制保存)、二进制与 >2 MB 文件只读保护;状态栏显示编码、换行符、行数与文件大小。
|
|
76
80
|
- **查找/替换**:编辑器内 `Ctrl/Cmd + F` 打开查找条,支持区分大小写、上一个/下一个、命中计数、替换与全部替换;命中超过 5000 处时计数显示 `5000+`,全部替换仍作用于全文。替换框内按 `Esc` 也能关闭查找条。Markdown 文档面板另有只读查找(同样 `Ctrl+F`,支持计数与上下跳转)。
|
|
77
|
-
- **图片、CSV 与网页预览**:PNG/JPG/GIF/WebP/BMP/ICO/AVIF/SVG 直接在内容面板按图片显示(最大 24 MB),支持按钮缩放、`Ctrl/Cmd + 滚轮` 缩放、适应窗口和 1:1 原始大小;CSV/TSV 默认按表格显示,可在「表格 / 源码」间切换,源码视图仍可编辑保存,超过 1000 行或 80 列时只展示截断后的表格。HTML/HTM 以沙箱 iframe
|
|
81
|
+
- **图片、CSV 与网页预览**:PNG/JPG/GIF/WebP/BMP/ICO/AVIF/SVG 直接在内容面板按图片显示(最大 24 MB),支持按钮缩放、`Ctrl/Cmd + 滚轮` 缩放、适应窗口和 1:1 原始大小;CSV/TSV 默认按表格显示,可在「表格 / 源码」间切换,源码视图仍可编辑保存,超过 1000 行或 80 列时只展示截断后的表格。HTML/HTM 以沙箱 iframe 渲染(脚本在独立源里运行,图表能画出来,但拿不到 DSH 界面与存储;上限 8 MB,超过时提示改下载后用浏览器打开),Markdown 预览会移除脚本、事件属性与危险链接。
|
|
78
82
|
- **快捷键**:`Ctrl/Cmd+S` 保存当前文件;`Ctrl/Cmd+W` 关闭当前标签(未保存时提示保存/放弃/取消);`Ctrl+Tab` / `Shift+Ctrl+Tab` 切换标签;`Ctrl/Cmd+B` 显示/隐藏目录面板;`Ctrl/Cmd+Shift+F` 打开文件搜索。
|
|
79
83
|
- **自动保存**:设置 → 联动工作区 →「编辑器行为」中开启;停止输入约 1 秒后自动保存。关闭时使用 `Ctrl+S` 手动保存;有未保存文件时刷新/关闭页面会弹确认。
|
|
80
84
|
|
|
@@ -185,7 +189,7 @@ npm 包名为 `dsh-linked-workspace`,也可以从 npm 安装已发布版本(
|
|
|
185
189
|
- 直接远程工作区的读写限制在该目录内;联动工作区的工具限制在远端根目录内,本地写入限制在本地根目录内。
|
|
186
190
|
- 单文件保存上限 8 MB;镜像同步在后台执行,默认最多 500 文件 / 50 MB(跳过超大文件),默认排除 `.git`/`node_modules`/各类缓存目录,单文件读取 30 s 超时,不再阻塞 HTTP 请求。右键「传输」与「下载到默认文件夹」单次最多 150 文件 / 15 MB(超限会提示未全部传输)。
|
|
187
191
|
- 页面 HTTP API 只接受本机回环同源请求(远程部署时回落到 DSH `connection` 服务的 Host/Origin 鉴权)。
|
|
188
|
-
-
|
|
192
|
+
- HTML 预览跑在 `sandbox="allow-scripts"` 的 iframe 里:脚本能执行(plotly 这类图表才有内容),但处于独立的不透明源,访问不到 DSH 界面、宿主存储与标签页;Markdown/文档预览仍会移除脚本、内联样式、事件属性与 `javascript:`/`vbscript:` 等危险链接,只保留安全链接与图片 `data:` URL。
|
|
189
193
|
|
|
190
194
|
## 常见问题
|
|
191
195
|
|
package/docs/API.md
CHANGED
|
@@ -54,13 +54,15 @@ scope root, or absolute inside it.
|
|
|
54
54
|
| `hosts.list` | `{ refresh? }` | `{ hosts: HostInfo[] }` (`HostInfo` carries `authType`, `hasCredential`, `hasStoredPassword`) |
|
|
55
55
|
| `hosts.credentials` | `{ hostId, password?, passphrase?, privateKey?, clear? }` | `{ hostId, authType, hasCredential, hasStoredPassword }` (stores the secret in the plugin's own `ssh-credentials.json`; `clear: true` deletes it) |
|
|
56
56
|
| `hosts.browse` | `{ hostId, path? }` | `{ path, parent, home, entries }` (dirs + files) |
|
|
57
|
+
| `hosts.df` | `{ hostId, path? }` | `{ disk: { path, size, used, avail, percent } \| null }` (free space of the volume holding `path`; defaults to the login home) |
|
|
58
|
+
| `hosts.status` | `{ hostIds? }` | `{ statuses: { [hostId]: { state, reason?, message?, latencyMs?, checkedAt? } } }` (in-memory snapshot of the pool, never dials; an `error` older than 60 s is reported as `idle`; defaults to every known host of the host list plus every workspace's host id) |
|
|
57
59
|
| `hosts.mkdir` | `{ hostId, path?, name }` | `{ path }` (creates `name` inside `path`; defaults to the login home; `409`/`FS_EXISTS` when it already exists) |
|
|
58
60
|
| `remote_workspaces.list` | `{}` | `{ workspaces: RemoteWorkspaceInfo[] }` |
|
|
59
61
|
| `remote_workspaces.create` | `{ hostId, remotePath, name? }` | `{ workspace }` |
|
|
60
62
|
| `remote_workspaces.get` | `{ id }` | `{ workspace }` |
|
|
61
63
|
| `remote_workspaces.update` | `{ id, name? }` | `{ workspace }` |
|
|
62
64
|
| `remote_workspaces.remove` | `{ id }` | `{ removedWorkspace, removedPlaceholder }` |
|
|
63
|
-
| `remote_workspaces.test` | `{ id }` | `{ ok, latencyMs?, exists?, type?, error? }` |
|
|
65
|
+
| `remote_workspaces.test` | `{ id }` | `{ ok, latencyMs?, exists?, type?, error? }` (a missing directory comes back as `exists: false` and leaves the host's connection state untouched) |
|
|
64
66
|
| `fs.list` | `{ linkedId?/remoteId?, path, limit?, offset? }` | `{ path, entries: RemoteEntry[], total, offset, limit, hasMore }` (default 500, max 5000). Listings are cached for 5 s for `offset > 0`; writes, mkdir, rename, move, delete, copy and transfers invalidate the cache. |
|
|
65
67
|
| `fs.read` | `{ linkedId?/remoteId?, path, maxBytes? }` | `FileRead` |
|
|
66
68
|
| `media.read` | `{ linkedId?/remoteId?, path }` | `{ path, size, mtime, mime, base64 }` (PNG/JPG/GIF/WebP/BMP/ICO/AVIF/SVG, max 24 MB) |
|
package/docs/VERIFY.md
CHANGED
|
@@ -75,6 +75,9 @@ Host code (lib/) reloads live with `plugin_manager set_plugin include:linked-wor
|
|
|
75
75
|
3. **卡片里的目录**:远程工作区的卡片只显示**远端目录**绝对路径(例如 `/shared_data_ssd1/huangjh/code`,不显示本地占位目录);联动工作区的卡片显示两行——「远端 …」与「本地 …」两个绝对路径。
|
|
76
76
|
4. **断线变红**:让主机断开 SSH(例如在服务器上执行 `pkill -u <user> sshd`,或在网络中断开)→ 左侧栏该工作区行的图标变红(`#f85149`),悬停卡片里的状态行同样变成红色的「连接已断开」。
|
|
77
77
|
5. **自动恢复**:再次访问该工作区(打开目录树 / 刷新设置页)→ 连接重建后图标恢复常规颜色,悬停卡片里的状态回到「已连接」。
|
|
78
|
+
5b. **状态跟着实际连通性走(0.16.1)**:把鼠标停在某行上让卡片保持打开,然后让该主机掉线(`hosts.credentials { hostId, clear: true }` 丢掉长连接,再把该主机从 `known_hosts.json` 的指纹改坏;或在服务器上 `pkill -u <user> sshd`)→ 最多 6 秒后卡片那一行变成红色的「连接已断开」,**全程不刷新页面**;恢复指纹/主机后随便访问一次该目录,再等 ≤6 秒,同一张还开着的卡片自动回到绿色的「已连接」。
|
|
79
|
+
5c. **目录不存在不算断连**:在插件外用 `rm -rf` 删掉某个远程工作区指向的目录,再在设置页点它的「测试连接」→ 卡片给出「远端目录不存在」一类的提示,但 `hosts.status` 里该主机仍是 `connected`,同一台主机上的其它工作区**不会**被标红;对不存在的路径 `fs.stat` / `fs.list` 也只会返回 `FS_NOT_FOUND`,主机状态不变。
|
|
80
|
+
5d. **旧错误会过期**:制造一次真实失败(`hosts.status` 里该主机为 `error`)后什么都不做,等 60 秒以上 → `hosts.status` 里它变成 `{ state: 'idle' }`,卡片显示「未连接」而不是一直红着;随后任意一次成功的目录访问会重新写回 `connected`。
|
|
78
81
|
6. **命名**:设置左侧导航显示「联动工作区」,页面标题显示「联动&远程工作区」;「添加工作区」弹窗第三个页签显示「远程工作区」。
|
|
79
82
|
|
|
80
83
|
## 深色主题(0.11.0)
|
|
@@ -196,9 +199,10 @@ Host code (lib/) reloads live with `plugin_manager set_plugin include:linked-wor
|
|
|
196
199
|
1. 打开 PNG/SVG:图片默认适应窗口;点「适应窗口」重新适配,「1:1」恢复原始像素。
|
|
197
200
|
2. 点 `−` / `+` 时缩放比例按 20% 步进,状态栏百分比同步;`Ctrl/Cmd + 滚轮` 可连续缩放,最小 5%、最大 800%。
|
|
198
201
|
3. 放大后图片区域出现滚动条,可查看四周;缩小后图片保持居中,不出现拉伸变形。
|
|
199
|
-
4. 本地与远端各打开一个 `.html`/`.htm`:内容面板以 iframe 渲染页面,状态栏显示 HTML
|
|
200
|
-
5.
|
|
201
|
-
|
|
202
|
+
4. 本地与远端各打开一个 `.html`/`.htm`:内容面板以 iframe 渲染页面,状态栏显示 HTML、大小和「沙箱预览(脚本可运行,无法访问 DSH 界面)」。
|
|
203
|
+
5. 页面自带的脚本在沙箱里执行:打开一个 plotly 之类靠 JS 画图的页面,图表应正常绘制(沙箱是不透明源,拿不到 DSH 界面、宿主存储与标签页)。
|
|
204
|
+
5b. 打开一个 2–8 MB 的 HTML(例如 7.1 MB 的趋势图):应正常预览整页;超过 8 MB 的页面显示「文件 X 超过预览上限 8.0 MB,请右键『下载到默认文件夹』后用浏览器打开」,不再出现重复的「无法预览网页:无法预览网页」。
|
|
205
|
+
6. 读取失败的 HTML(权限/二进制)显示错误提示和重试按钮。
|
|
202
206
|
|
|
203
207
|
## 安全、分页与可访问性(0.8.2)
|
|
204
208
|
|
|
@@ -250,6 +254,27 @@ Host code (lib/) reloads live with `plugin_manager set_plugin include:linked-wor
|
|
|
250
254
|
10. **悬停展开**:拖拽停在折叠目录行 700 ms:该目录应自动展开。
|
|
251
255
|
11. **host-api**:`node test/host-api.mjs` 应为 33 步全部通过(0.15.0 起含 `meta.info`)。
|
|
252
256
|
|
|
257
|
+
## 提示、对话框与下载(0.16.1)
|
|
258
|
+
|
|
259
|
+
1. 目录栏标题右侧出现可用空间(如「7983.64 GB」),悬停显示「可用 …(已用 17%)· 已用 / 总量」;换工作区后数字随之变化。
|
|
260
|
+
2. 对含 150 个以上文件的远端目录右键「下载到默认文件夹」:提示里带文件数与体积,并以「达到上限,未全部下载」结尾;下载目录里确实是 150 个文件。
|
|
261
|
+
3. 对含超过 20 MB 单文件的目录执行同样操作:提示以「跳过 1 个(超过 20 MB)」结尾。
|
|
262
|
+
4. 多选两个远端文件后右键:出现「下载所选的 2 项」,执行后一条汇总提示,本地两个文件都在。
|
|
263
|
+
5. 右键「移动到…」打开对话框后按 Esc:对话框关闭,焦点回到刚才那一行;对话框内按 Tab 不会跑到后面的页面上。
|
|
264
|
+
6. 触发一条错误提示(例如对只读目录重命名):提示不再自动消失,右侧有 × 可关闭;读屏软件能读到(role=status)。
|
|
265
|
+
7. 内容搜索输入关键词回车,清空输入框后出现「最近搜索」chip;点 chip 重新搜索。
|
|
266
|
+
8. 打开一条命中后按 Ctrl+↓:光标跳到下一处命中并被选中,Ctrl+↑ 回到上一处。
|
|
267
|
+
9. 传输一个文件后打开「队列」:除队列外还有「最近的传输」,关闭对话框再打开仍在。
|
|
268
|
+
10. 远端目录右键出现「复制 ssh 命令」,粘贴得到 `ssh <主机> -t 'cd <目录> && exec $SHELL -l'`。
|
|
269
|
+
11. 右键菜单显示「用记事本打开副本(不回写)」;`%TEMP%\dsh-linked-workspace-open` 里超过一天的文件在下次启动后消失。
|
|
270
|
+
|
|
271
|
+
12. 右键工作区根节点(最上面的「所有文件」/远端根目录):菜单里**没有**「重命名」「删除」,其余项(复制、粘贴、复制路径、复制 ssh 命令、更改权限、在此打开终端、新建…、与本地对比、属性)照常出现。
|
|
272
|
+
13. 对**目录**点「更改权限」:标题下方写「目录权限(需要含 7 才有进入权限,如 755)」,默认值 `755`;对**文件**点同名项:文案是「八进制权限(如 644 / 0755)」,默认值 `644`。
|
|
273
|
+
14. 故意把某个目录改成 644,再打开目录里的文件:编辑器显示「没有权限访问该路径…Permission denied(目录可能缺少执行位:用「更改权限」改回 755 即可恢复)」;改回 755 后文件恢复可读。
|
|
274
|
+
15. 关闭隐藏文件显示后刷新页面:按钮仍显示「显示以 . 开头的文件」,树里依旧不出现 `.conda` 等点开头条目(选择被记住)。
|
|
275
|
+
16. 触发一次错误提示后,再打开一个文件或点「刷新目录」:之前那条红色提示自动消失。
|
|
276
|
+
17. 传一个较大的目录到远端,观察队列对话框的进行中行:进度后面会跟上吞吐,形如 `已传 3 个 · 12.0 MB · 4.1 MB/s`。
|
|
277
|
+
18. 右键工作区根节点:菜单里**没有**「更改权限」(也没有「重命名」「删除」「移动到…」)。绕过界面直接请求 `fs.chmod` 并把 `path` 指向工作区远端根:返回 400「不能修改工作区根目录的权限」,随后 `fs.stat` 的权限保持不变。
|
|
253
278
|
## 旧 Host 自检(0.15.0)
|
|
254
279
|
|
|
255
280
|
1. **正常时不打扰**:插件已重启过后打开任意目录树,顶部**不应**出现任何黄色提示条。
|