Repository navigation
feat(tui): 去掉失效的「设为工作区」入口,新增 o 打开镜像根目录 - #103
Merged
Merged
Conversation
…oot with o The machine action menu's "设为工作区" entry only re-used a recorded workspace path and did not open the picker, so it looked dead; creating a workspace already works through "browse remote directories" + w. Remove that entry (and the identical hidden list shortcut) so there is one path left. Add "o" on the machine list: open the local mirror root (`$DSH_HOME/remote-workspaces`, with one <host>-<user>-<port> directory per machine) in the system file manager. Opening is a detached spawn of open/explorer/xdg-open on the host side; a missing root is reported as VALIDATION instead of creating anything.
Owner
|
已合并。砍掉只会"点了没反应"的失效入口、用 本地全套件 1060 通过 / 0 失败, |
flymysql
added a commit
that referenced
this pull request
Nov 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
两处 TUI 菜单体验问题:
b浏览远程目录 →w」。改动
1. 移除失效的「设为工作区」入口
workspace项、隐藏的列表快捷键w、菜单里的w残留,以及ensureMachineWorkspace函数和对应 i18n(menu.workspace/notify.noWorkspace)。b浏览远程目录 →w(pickBrowseWorkspace不变)。2. 主列表新增
o:打开本机镜像根目录o用系统默认文件管理器打开$DSH_HOME/remote-workspaces(每台机器一个<host>-<user>-<port>子目录)。open/ Windowsexplorer/ 其他xdg-open;detached +stdio: 'ignore',不阻塞 TUI。revealMirrorFolder():{ path };VALIDATION,不创建任何东西;xdg-open)→ 错误进页脚,不会先提示“已打开”。o静默降级,其它功能不受影响。改动文件
lib/open-folder.js(新):平台命令选择 + Promise 化 spawnlib/index.js、lib/host-api.js:revealMirrorFolder()接线与错误映射lib/tui/scene.js:菜单清理、主列表olib/tui/i18n.js:文案与提示行test/open-folder.test.js(新)、test/host-api.test.js、test/tui-install.test.jsdocs/tui.md、README.md、README.en.md验证
npm test:1067 例 / 1058 通过 / 9 skip / 0 failnode check.mjs:OKo后 Finder 实际打开~/.dsh/remote-workspaces兼容性 / 限制
inactiveShimmer);插件detail是纯字符串,无法分段着色,结构已与 TUI 其它悬停对齐。o打开的目录同时含machines.json/audit.log等插件数据;credentialFallback: plain时可能含明文密码,仅在本机文件管理器可见(文档已注明)。