Repository navigation
Conversation
There was a problem hiding this comment.
Devin Review found 3 potential issues.
3 flags not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)
| if remote.SSHConnectionID != "" { | ||
| saved := a.remote.entry(remote.SSHConnectionID) | ||
| if saved == nil { | ||
| a.remote.selectFirst() | ||
| a.operationRejected("remote_connect", "connection_removed") | ||
| if a.remote.readErr == "" { | ||
| a.remote.err = i18n.Shared(a.language(), "desktop.remote.hostSwitcher.connectionRemoved") | ||
| } | ||
| return | ||
| } | ||
| host.ssh = saved.Connection |
There was a problem hiding this comment.
🔴 SSH history opens the wrong host
After a saved SSH connection changes hosts, connectRecentRemote opens the old history entry’s folder on the new host. The connection keeps its ID, so a matching folder on the new host also inherits the old host’s pins and tags.
Learn more
saveRemote edits a saved SSH connection by its existing ID. The pinned Core’s connection save implementation keeps that ID but clears the connection’s own folder history when its target changes. recordRemoteRecent uses that same ID as the transport identity; the Core history key adds only the folder path. With no live tab, reopening therefore combines the old folder with the new host. openRecentRemote has the opposite problem when the old tab is still live: it activates that tab without checking the current target.
Example: Pin /srv/app on staging, then edit its saved connection to point at a replacement host that also has /srv/app. With the staging tab closed, clicking the staging recent opens the replacement host’s folder and retains the staging pin and tags.
Recommended fix: Bind history keys to a non-secret target identity as well as the saved connection ID and folder. Use Core’s target comparison rules to detect retargeting before opening or activating a tab, while still reading current settings and credentials for an unchanged target.
Was this helpful? React with 👍 or 👎 to provide feedback.
| edit.saving = true | ||
| a.changeRecent(core.SetRecentTags(edit.path, strings.FieldsFunc(edit.field.Text(), func(r rune) bool { return r == ',' || r == ',' })), func(_ core.RecentProjectsResult, err error) { |
There was a problem hiding this comment.
🔴 Saved tags overwritten across windows
When two windows edit the same project’s tags, saveWelcomeTags submits each draft without checking its starting tags. Saving the second draft silently removes tags added by the first save.
Learn more
editWelcomeTags copies the current tags into a text field. That draft does not change when finishRecent applies an updated history from another window. reduceStoredRecent rereads history under the file lock, but the tag action replaces the fresh tags rather than comparing them with the draft’s starting tags.
Example: Open Edit Tags for the same project in two windows while it has Work. In the first window, save Work, Research. After that save completes, save Work, Personal from the already-open second editor. The second save succeeds and Research disappears from disk.
Recommended fix: Capture the starting tags when opening the editor. Compare them with the latest entry inside the locked transaction before replacing them. On conflict, preserve the draft and tell the user that the saved tags changed.
Was this helpful? React with 👍 or 👎 to provide feedback.
| project := func(tag string) (core.RecentProjectsResult, error) { | ||
| return a.kernel.ReduceRecentProjects(ctx, a.recent, core.FilterRecent(query, tag), 0) | ||
| } |
There was a problem hiding this comment.
🟡 Search misses Greek project names
Searching for Σ through FilterRecent misses a project named ΟΣ. Core lowercases the query to σ but the matching letter in the project name to ς. The same mismatch can split case variants of a project tag.
Learn more
The pinned Core filter lowercases each whole string, then compares the resulting bytes. Rust lowercases capital sigma at the end of a Greek word differently from an isolated capital sigma. The previous desktop path search used Go’s context-independent strings.ToLower, so the same uppercase letter matched in both locations.
Example: Open a local folder named ΟΣ, return to the welcome page, and search for Σ. The folder appears before the Core migration but not after it.
Recommended fix: Use a context-independent Unicode case fold for search haystacks, queries, and tag keys in Core. Preserve the entered tag for display. Add a Core fixture for substring search and tag identity with Σ, σ, and ς.
Was this helpful? React with 👍 or 👎 to provide feedback.
关联 Issue / Linked issue
PR 类型 / Type
改动说明 / What changes
背景 / Why
多个窗口各自缓存最近项目,后保存的窗口可能覆盖另一窗口刚写入的置顶状态。新固定的项目也可能排在已有置顶项下面。起始页缺少项目标签与按标签筛选,远程项目只出现在已保存连接的文件夹历史中。
改动 / Changes
recent-projects-v2.json。新版与旧版各自写各自的文件,降级不会抹掉新版的标签和远程身份。导入旧客户端历史、移除条目及保存失败都经过同一事务入口。不在本 PR 范围内 / Out of scope
已保存连接中的旧远程文件夹在下次成功打开后加入公共历史。其余 #2231 远程功能由原议题跟踪。桌面 PR 合并前请先合入 Core #205,并将固定修订更新为 Core 主线上的对应提交。
类型专属:feat
多平台对齐
范围检查 / Scope checks
功能矩阵 / Feature matrix
onboarding-welcome、workspace-open-switch和remote-workspace,两端原生验证保持 pending。upstream/main的变更门禁通过。插件归属 / Plugin ownership
UI 验证 / UI evidence
统一日志系统 / Structured logging
界面文案 / i18n
逻辑归属 / Logic placement
workspace.recentProjects.reduce管理排序、数据规则、标签、筛选和远程历史身份,证据为 Core 的rust/fixtures/workspace/recent-projects-v1.json。性能与内存 / Performance and memory
设置 / Settings
N/A,改动是起始页项目历史与标签编辑。
插件契约 / Plugin contract
N/A,共享变更属于应用 C ABI。配套命令文档、fixture 和 Core 固定修订已更新。
发行包与资源 / Bundle and resources
docs/ci-builds.md说明历史文件、锁文件和截图的归属、生命周期及工作树复制限制。无用代码与重构 / Dead code and refactoring
验证 / Verification
test-stability-macos.sh --package ./internal/core --package ./internal/workbench,vivahead,lithevisual,定向起始页及最近项目go test -race固定版本的桌面代码为
78827905a。用例包括跨窗口覆盖、旧窗口重复置顶、标签编辑筛选、旧版历史读取隔离、SSH 受控替身重开和安装包不变验证。前一轮全量尝试出现 CLI 启动、zsh 与插件工具链相关失败。CLI 单独通过,未改动的主线终端包复现 zsh 失败。Windows 原生交互、真实 SSH、WSL 与容器尚未验收。
6 张最终截图
提交前确认 / Final checks
upstream/main,目标为main。