Repository navigation
fix(settings): 在后台串行保存 Viva 工作台设置 - #2463
Merged
Merged
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
devin-ai-integration
Bot
requested review from
1lck,
Mucheen and
xiaoyumuxi
as code owners
November 27, 2026 05:16
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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.
关联 Issue / Linked issue
PR 类型 / Type
改动说明 / What changes
背景 / Why
文件锁空闲时,Viva 设置回调在窗口线程重读并写入
settings.json。写入暂停会阻塞窗口事件。改动 / Changes
.settings.lock,在锁内重读并调用SaveWithBackup,保留磁盘未知字段、不可读文件备份、编辑器偏好冲突处理、失败日志和通知。不在本 PR 范围内 / Out of scope
应用偏好在多个窗口之间的统一所有权与投递由 #1851 跟踪。
类型专属:fix
复现与根因
8e2e6ef1b。用 Viva 无头工作台改终端滚动回溯行数,保持文件锁空闲并暂停写入器。原回调两秒内未返回,期望在磁盘写入暂停时仍能返回。见 复现记录。2eec684e6(feat(editor): 内置彩虹配色、缩进参考线与上下文高亮 #2420)中的TryAcquire分支在拿到锁后直接重读并保存,文件锁被占用时才使用后台任务。b88fa7e40暂停第二个标签页写盘,再从持有旧快照的标签页提交最终尺寸,四个受控场景都把终端滚动回溯行数覆盖成了 0。检查项
desktop/internal/workbench/settings_save_test.go的TestSettingsSaveReturnsWhileDiskWriteIsBlocked在修复前报timed out waiting for setting callback returned with disk write blocked。TestSettingsCloseKeepsLatestPreferencesAcrossTabs在关闭场景覆盖 4 条路径,验证当前正在写入和待写的新值与最终尺寸一起落盘。范围检查 / Scope checks
功能矩阵 / Feature matrix
application-settings的实现与证据路径,原生验证状态保持pending。origin/main HEAD的变更校验通过。插件归属 / Plugin ownership
UI 验证 / UI evidence
N/A:变更涉及写入调度与关闭等待。无头测试以受控写入器观察设置回调和关闭回调。
统一日志系统 / Structured logging
settings_save及workbench_shutdown_wait失败路径。界面文案 / i18n
逻辑归属 / Logic placement
性能与内存 / Performance and memory
设置 / Settings
N/A:本次只改设置文件保存与回读时序,设置项定义和真实来源沿用现有实现。
插件契约 / Plugin contract
N/A:插件协议与宿主方法不涉及本次设置落盘路径。
发行包与资源 / Bundle and resources
无用代码与重构 / Dead code and refactoring
验证 / Verification
scripts/desktop/check.shTestShellSeesItsDirectoryAsTheHostSpelledIt,单独重跑可复现 PTY 输出在换行前被读取verify-test-stability.sh与--base origin/main39422f26b的三平台 vet、测试与 Desktop CI gate 通过,PR 共 12 项检查通过本地环境为 Linux,macOS 和 Windows 验证来自 CI。旧日志门禁脚本已移除,等价检查待仓库恢复。
提交前确认 / Final checks
origin/main创建,目标为main。Link to Devin session: https://app.devin.ai/sessions/84cff5dd7e19454e93ce5bb9744e46f6
Open in Devin Desktop: https://app.devin.ai/desktop/session/84cff5dd7e19454e93ce5bb9744e46f6?variant=devin
Requested by: @1lck