Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## 先说结论

远程文件夹以“本地占位根目录”的身份打开成工作区:根目录是本机的一个空目录,工作台照常拿到一个文件 URL,这个目录下面的文件在远端。文件树与编辑器通过文件端口访问主机,Git、搜索和构建保留现有 Core 引擎,终端把远端伪终端的字节交给本机渲染。桌面端尚未接入远程工作区;本文记录的是 Core 远程服务与工作区路由的已定决策。
远程文件夹用本机用户缓存中的空目录作为工作区标识,目录内容由 Core 从 SSH 主机读取。Viva 已接入文件夹选择、目录树及会话状态,远程文件编辑、终端、搜索与 Git 仍在接入中。Windows 等客户端按本机规则处理占位目录,Linux 主机路径按 POSIX 规则校验和拼接。

## 问题

Expand All @@ -13,6 +13,7 @@
## 决策

- **守护进程启动必须有确定结果**:并发连接可能各自启动候选进程。代理必须等自己启动的候选已经写入会话锁的 PID,或已退出,才连接 socket;不能因为别的候选已发布 socket 就提前握手,否则显式关闭后,迟到的候选还会接管锁并留下新进程。复用已有锁文件和子进程退出状态,不增加协议、目录或长期监听;等待沿用启动期限,失败时终止并回收本次启动的候选,成功的守护进程继续跨断线保留。
- **路径规则随文件所在主机**:Core 用 POSIX 规则检查 Linux 主机的根目录并拼接路径,本机占位路径使用客户端系统的规则。若主机条目名会被客户端解释为不同的路径(例如 Windows 将反斜杠解释为分隔符),拒绝该投影,以免操作落到另一个条目。Windows 桌面回归测试覆盖主机路径校验和关闭会话的结果(#2264)。
- **远程文件树复用 Core 列表**:根目录和展开目录都使用带远程主机身份的 `workspace.listDirectories`,共享可见性、自然排序与嵌套 worktree 规则;根目录只请求一层,后续展开仍按需加载。`readDir` 已提供不跟随链接的文件类型,Core 复用它,不能对每个普通文件再发一个 `stat`;目录的嵌套 worktree 与空目录探测仍需要主机请求。主机不可用时保留失败,不从本机空占位目录补列表。真实协议主机 fixture 覆盖目录顺序、请求数量与占位目录隔离,真实 SSH 产品流程仍需验收。
- **文档版本**:和本地一样,文档标识是读到的原始字节的 SHA-256。远端用大小和修改时间做冲突检测,所以路由层为每个读到的标识记住远端版本(最多 512 个),保存时把它作为 `expected` 传给 `remote.writeFile`;不认识的标识会先读当前内容比对哈希。文件变了就返回冲突,不覆盖。
- **外部修改监听**:`RemoteDirectoryObservation` 在工作线程订阅主机原生 watcher,转换路径后交给已有文件树、Git、搜索索引和文档刷新流程。Git common directory 位于工作区外时使用同一绑定的外部路径命名空间并额外监听,订阅时还原主机路径,事件回来后投影回同一个本地身份。订阅先于创建,启动和溢出要求重新扫描,根目录移除结束订阅;取消先屏蔽旧 generation,再通过 Core 的资源所有者停止主机 watcher。打开的文档共用其工作区根的订阅,列表缓存随文档变更清空。
Expand Down
4 changes: 2 additions & 2 deletions desktop/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ toolchain go1.27.3
require (
github.com/creack/pty v1.1.24
github.com/tailscale/hujson v0.0.0-20260727124030-b80ff77dac4f
github.com/vivaui/viva v0.6.7-0.20261121054605-59a696ec91c1
github.com/vivaui/viva v0.6.7-0.20261121062827-3abb3dbb4259
github.com/zalando/go-keyring v0.2.8
golang.org/x/sys v0.50.0
)
Expand All @@ -20,4 +20,4 @@ require (
github.com/godbus/dbus/v5 v5.2.2 // indirect
)

replace github.com/vivaui/viva => github.com/Lithe-IDEA/viva v0.6.7-0.20261121060852-8014d5cc701e
replace github.com/vivaui/viva => github.com/Lithe-IDEA/viva v0.6.7-0.20261121064427-ecc66fc55042
4 changes: 2 additions & 2 deletions desktop/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/Lithe-IDEA/viva v0.6.7-0.20261121060852-8014d5cc701e h1:lCDDQgnTCLXTxIeCuZ5LZLFzr0XB02410htNSdJukwU=
github.com/Lithe-IDEA/viva v0.6.7-0.20261121060852-8014d5cc701e/go.mod h1:e9In6+J77G7B9ow4enZ2FSOFh7U3q4cQ5iJr3Qn/Olk=
github.com/Lithe-IDEA/viva v0.6.7-0.20261121064427-ecc66fc55042 h1:OCMipbo7UxizI9qLawOemmDPxO4e/LTO/Q+GyqzetUQ=
github.com/Lithe-IDEA/viva v0.6.7-0.20261121064427-ecc66fc55042/go.mod h1:e9In6+J77G7B9ow4enZ2FSOFh7U3q4cQ5iJr3Qn/Olk=
github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s=
github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE=
github.com/danieljoos/wincred v1.2.3 h1:v7dZC2x32Ut3nEfRH+vhoZGvN72+dQ/snVXo/vMFLdQ=
Expand Down
2 changes: 1 addition & 1 deletion desktop/viva.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name = "Lithe Desktop"
# A separate identity from the SwiftUI client (app.lithe.desktop), so both can be installed
# while this client grows.
id = "app.lithe.viva"
version = "0.8.12"
version = "0.8.13"
executable = "lithe"
package = "./cmd/lithe"
# The full-bleed square of the SwiftUI client's icon; viva package shapes it into the macOS tile.
Expand Down
143 changes: 143 additions & 0 deletions docs/releases/v0.8.13.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
## 中文

Lithe Desktop 0.8.13 改善了 Java 项目从首次打开到运行和调试的流程,并加入安全模式、可信位置及 SSH 远程目录浏览。

### 下载

- [项目主页](https://github.com/1lck/Lithe-IDEA)
- [macOS Apple Silicon DMG](https://github.com/1lck/Lithe-IDEA/releases/download/desktop-v0.8.13/lithe-0.8.13-darwin-arm64.dmg)
- [macOS Intel DMG](https://github.com/1lck/Lithe-IDEA/releases/download/desktop-v0.8.13/lithe-0.8.13-darwin-amd64.dmg)
- [Windows x64 安装程序](https://github.com/1lck/Lithe-IDEA/releases/download/desktop-v0.8.13/lithe-0.8.13-windows-amd64-setup.exe)
- [全部下载文件与 SHA-256 校验文件](https://github.com/1lck/Lithe-IDEA/releases/tag/desktop-v0.8.13)

### 重点更新

打开 Java 工程后,可以从插件推荐直接安装所需工具,并在已打开的编辑器里继续工作。

#### ✨ 新功能

- 用安全模式查看不熟悉的项目时,Lithe 会限制语言服务器、Git 和版本控制的运行。
- 在“设置 → 工具 → 可信位置”中管理可直接打开的位置。
- 在远程开发窗口保存、分组和测试 SSH 连接,可用颜色区分主机并直接回答 SSH 询问。
- 连接 SSH 主机后可选择文件夹并在新标签页浏览目录,状态栏显示连接状态,断线后会尝试重连。
- Git 需要用户名、密码或口令时,可以直接在窗口中输入,也可以取消。

#### ⚡ 改进

- 欢迎页直接显示新建项目、打开项目、克隆仓库和远程开发四种入口。
- 设置窗口记住上次调整后的尺寸,控制台和可信位置归入“工具”,Git 有独立设置页。
- 同步 Viva 后,Windows 拖动缩放减少重复绘制,列表滚动范围和 Linux 长文本绘制也得到修正。

#### 🛠 修复

- 修复首次打开项目时插件推荐不完整,以及从推荐入口打开空白列表的问题。
- 安装语言插件后,已打开的文件可以直接获得语言服务。
- 恢复工具栏的当前文件运行与调试、附加调试,并修复从构建工具发现的入口启动调试。
- 修复多项目工作区中从当前文件运行时选错项目的问题。
- 修复 Windows 无法打开 Linux SSH 主机目录的问题。
- 修复“语言与框架”目录页缺失、语言设置页重复显示目录项的问题。

#### 🔌 插件需要的新宿主能力

以下版本需要本版新增的宿主能力,Lithe 0.8.12 及更早的版本会拒绝安装。

- Gradle 2.0.1需要 `buildSystems` 版本 2 和 `buildProviders` 版本 1,用于按当前 Java 文件所属的源集准备运行和调试。[插件版本](https://github.com/Lithe-IDEA/lithe-plugin-gradle/releases/tag/v2.0.1)
- Maven 1.0.3需要 `buildSystems` 版本 2 和 `buildProviders` 版本 1,用于准备 Maven 应用的调试类路径,并依赖本版对当前文件调试和构建入口调试的修复。[插件版本](https://github.com/Lithe-IDEA/lithe-plugin-maven/releases/tag/v1.0.3)

### 升级说明

- 可从标题栏的更新入口或“设置 → 关于”检查更新,也可以下载完整安装包。
- macOS 用户打开对应架构的 DMG,将 `Lithe Desktop.app` 拖入“应用程序”。
- Homebrew 配方更新后,运行 `brew update && brew upgrade --cask lithe`。
- Windows 用户运行 x64 安装程序,从 Windows 0.8.0 升级时请手动下载安装。
- 全部下载文件中提供 Linux x64、ARM64 的 DEB、RPM 和 tar.gz。

### 兼容性与已知问题

- macOS 最低要求 13.0。Windows 提供 x64 安装包,Linux 需要兼容的运行库和图形环境。
- macOS 安装包使用临时签名,Windows 安装包无发行者签名。系统可能显示安全提示。
- SSH 工作区目前支持浏览目录,打开和编辑文件、远程终端、项目搜索与 Git 仍在开发。[#2231](https://github.com/1lck/Lithe-IDEA/issues/2231)
- Windows 首次导入 Gradle 项目时,如果 Wrapper 尚未下载且探测超时,可在项目目录运行 `gradlew.bat --version` 等待下载完成,再回到 Lithe 重试。
- 在 Windows 11 ARM64 上运行 x64 版时,Spring Petclinic 的 Gradle 调试因 Java 语言服务器请求超时而未能启动。
- 以 `build.xml` 为根的 Apache Ant 工程仍有项目导入、调试和源码跳转缺口。[#1761](https://github.com/1lck/Lithe-IDEA/issues/1761)

如果 macOS 提示无法打开 `Lithe Desktop.app`,请在“应用程序”中按住 Control 点按应用并选择“打开”。如果仍被阻止,可执行 `xattr -dr com.apple.quarantine "/Applications/Lithe Desktop.app"`。旧版 `Lithe.app` 使用 `xattr -dr com.apple.quarantine /Applications/Lithe.app`。仅对可信来源的应用使用。

[查看完整变更](https://github.com/1lck/Lithe-IDEA/compare/desktop-v0.8.12...desktop-v0.8.13)

---

## English

Lithe Desktop 0.8.13 improves the path from opening a Java project to running and debugging it. It also adds Safe Mode, trusted locations, and SSH remote folder browsing.

### Downloads

- [Project homepage](https://github.com/1lck/Lithe-IDEA)
- [macOS Apple Silicon DMG](https://github.com/1lck/Lithe-IDEA/releases/download/desktop-v0.8.13/lithe-0.8.13-darwin-arm64.dmg)
- [macOS Intel DMG](https://github.com/1lck/Lithe-IDEA/releases/download/desktop-v0.8.13/lithe-0.8.13-darwin-amd64.dmg)
- [Windows x64 installer](https://github.com/1lck/Lithe-IDEA/releases/download/desktop-v0.8.13/lithe-0.8.13-windows-amd64-setup.exe)
- [All downloads and SHA-256 checksums](https://github.com/1lck/Lithe-IDEA/releases/tag/desktop-v0.8.13)

### Highlights

When you open a Java project, you can install the recommended tools and continue working in the files you already have open.

#### ✨ New features

- Safe Mode restricts language servers, Git, and version control when you inspect an unfamiliar project.
- Manage locations you trust to open directly in Settings → Tools → Trusted Locations.
- Save, group, color-code, and test SSH connections and answer prompts in the Remote Development window.
- Choose a folder after connecting to an SSH host, browse its tree in a new tab, and see connection and reconnection status.
- Enter Git usernames, passwords, and passphrases in the window, or cancel the prompt.

#### ⚡ Improvements

- Create, open, clone, and remote development now have their own buttons on the welcome screen.
- Settings remembers its window size, groups Console and Trusted Locations under Tools, and gives Git its own page.
- The Viva update reduces extra redraws during Windows resizing and fixes list scrolling bounds and long text drawing on Linux.

#### 🛠 Fixes

- Fixes missing plugin suggestions when opening projects and an empty list when following a suggestion.
- Files already open can receive language services as soon as you install the language plugin.
- Restores toolbar run and debug for the current file and debugger attach, and fixes debugging from discovered build entry points.
- Fixes run commands for the current file selecting the wrong project in a multi-project workspace.
- Fixes opening Linux SSH host folders from Windows.
- Restores the Languages & Frameworks directory page and removes duplicated directory entries from language settings.

#### 🔌 New host capabilities that plugins need

These plugin versions need capabilities added in this release. Lithe 0.8.12 and earlier refuse to install them.

- Gradle 2.0.1 needs `buildSystems` version 2 and `buildProviders` version 1 to run and debug a Java file with its Gradle source set. [Plugin release](https://github.com/Lithe-IDEA/lithe-plugin-gradle/releases/tag/v2.0.1)
- Maven 1.0.3 needs `buildSystems` version 2 and `buildProviders` version 1 to prepare the Maven debug classpath. It also relies on this release’s current-file and build-entry debugging fixes. [Plugin release](https://github.com/Lithe-IDEA/lithe-plugin-maven/releases/tag/v1.0.3)

### Upgrade instructions

- Check for updates from the title bar or Settings → About, or download a full installer.
- On macOS, open the DMG for your processor and drag `Lithe Desktop.app` to Applications.
- With Homebrew, run `brew update && brew upgrade --cask lithe` once the cask update is available.
- On Windows, run the x64 installer. Windows 0.8.0 users should download and install it manually.
- Linux downloads include DEB, RPM, and tar.gz packages for x64 and ARM64.

### Compatibility and known issues

- macOS requires 13.0 or newer. Windows packages target x64. Linux requires compatible libraries and a graphical environment.
- macOS packages use ad hoc signing. Windows installers have no publisher signature. Your system may show security prompts.
- SSH workspaces support browsing folders. Opening and editing files, remote terminals, project search, and Git are in development. [#2231](https://github.com/1lck/Lithe-IDEA/issues/2231)
- On Windows, a Gradle project can time out during its first import if its Wrapper distribution still needs to download. Run `gradlew.bat --version` in the project directory, wait for it to finish, and retry in Lithe.
- Gradle debugging for Spring Petclinic could not start in the x64 app on Windows 11 ARM64 because the Java language server request timed out.
- Apache Ant projects rooted at `build.xml` still have gaps in project import, debugging, and source navigation. [#1761](https://github.com/1lck/Lithe-IDEA/issues/1761)

If macOS cannot open `Lithe Desktop.app`, Control-click it in Applications and choose Open. If it is still blocked, run `xattr -dr com.apple.quarantine "/Applications/Lithe Desktop.app"` in Terminal. For the older `Lithe.app`, use `xattr -dr com.apple.quarantine /Applications/Lithe.app`. Use these commands only for an app from a source you trust.

[Full changelog](https://github.com/1lck/Lithe-IDEA/compare/desktop-v0.8.12...desktop-v0.8.13)

### 🙌 感谢贡献者

感谢 [@1lck](https://github.com/1lck) 和 [@xiaoyumuxi](https://github.com/xiaoyumuxi)。

### 🙌 Contributors

Thanks to [@1lck](https://github.com/1lck) and [@xiaoyumuxi](https://github.com/xiaoyumuxi).
2 changes: 1 addition & 1 deletion scripts/desktop/build-desktop-core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ PINNED_CORE_REPOSITORY="https://github.com/Lithe-IDEA/Lithe-core-rust.git"
# Lithe-core-rust main at 66a1476: #147 starts, stops and lists port forwards
# (remote.startForward, remote.stopForward, remote.forwards) and names the process of each
# listening port (S28/S29, #2231).
PINNED_CORE_REVISION="53c7cfa473f7cd5c41ace7d7a872f02fb5a89865"
PINNED_CORE_REVISION="68a69a6d9e300576f98c630a85fbf890ad0686b9"
PROFILE="debug"
CHECKOUT_ONLY="no"
while [[ $# -gt 0 ]]; do
Expand Down
Loading
Loading