Repository navigation
feat(desktop): 问题预览按严重程度着色并可直接编辑,选中色加深 - #2110
Merged
Merged
Conversation
- 预览所在行按诊断严重程度着色:错误红、警告黄、信息与提示蓝 - 主题 Accent 改为选中蓝,问题树等列表的选中行更醒目 - 问题预览成为文件文档的第二个编辑器:输入、撤销、保存都走文档, 与文件标签页双向同步;未打开的文件以无标签文档打开,离开且无未 保存修改时释放 - 预览显示诊断波浪线;补全、悬停、跳转定义、查找用法、重命名、 格式化和行操作按预览光标工作(document.lens / caretView) - 预览持有键盘焦点时诊断刷新只更新行颜色,不移动光标、不切换文件 - 更新功能矩阵与问题窗口截图,新增预览编辑同步测试
22 of 28 tasks
28 of 34 tasks
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
#2106 合入后有三个问题:
改动 / Changes
problemLineColor,明暗主题各一套。Accent改为编辑器选中蓝(含窗口失焦时的颜色),问题树等列表的选中行改为实心蓝底。theme_focus_test.go已同步。source_preview.go):问题预览是该文件文档的第二个编辑器,做法与 Diff 标签页右侧相同。editDocumentFrom)。文档自己的修改通过mirrorDocumentEdit→mirrorPreviewEdit同步到预览,不回传给来源视图。documentUndoChord,由diffUndoChord抽出共用)。保存调用saveDocument。readTablessFile/addTablessDocument,由openTablessDocument抽出)。预览离开该文件、关闭预览或关闭面板时,若无未保存修改就释放(closeSourcePreview、resetProblems)。closePreviewsOfDocument)。无标签文档释放时同时在语言服务器会话里关闭它(closeDocumentInSession)。installSourcePreview不变。document.lens记住用户最后在哪个视图里按键、点击或输入,caretView()返回该视图。补全、悬停、跳转定义、查找用法、重命名、格式化和行操作都按它的光标工作。lens清空。lens。pluginSemanticsPointer和hoverRowAnchor改为接收视图参数。pluginSemanticHit能识别预览(previewDocumentHit)。followKeyboardView对准有键盘焦点的视图,再经sourcePreviewShortcut交给预览。projectDocumentMarkers同时把波浪线投到预览视图,预览按自己的版本号投影。syncProblemsPreview接收当前焦点。预览持有键盘焦点时,诊断刷新只更新行颜色,所选问题移到别的文件时清除着色,不移动光标、不切换文件。runLineOperation先判断d == nil,再取caretView()。problems_test.go):TestProblemsPreviewFollowsTheSelectedDiagnostic改为断言预览打开的是无标签文档,切到读不到的文件后该文档被释放。TestClosingAProblemsNodeHandsItTheSelectionOfADiagnosticUnderIt改为断言单击不会打开文件标签页。TestProblemsPreviewEditsTheDocument,覆盖:预览输入同步到标签页;标签页修改同步到预览;预览里 ⌘Z 撤销文档修改;语言功能跟随预览光标;预览聚焦时诊断下移只改行颜色、光标不动;点回标签页后语言功能回到标签页。docs/assets/problems-tree/after/的截图。diagnostics-workspace的证据加source_preview.go、documents_tabless.go,验收说明和备注改为可编辑预览。不在本 PR 范围内 / Out of scope
类型专属:feat
多平台对齐
platform-specific),理由:范围检查 / Scope checks
功能矩阵 / Feature matrix
shared/platform-feature-matrix/features/diagnostics-workspace.json:加证据路径,改验收说明和备注,验证状态保持pending./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh(197 条通过)和verify-platform-feature-matrix-change.mjs origin/main HEAD(通过).artifacts/下生成的矩阵视图插件归属 / Plugin ownership
develop-lithe第三节“插件归属与宿主零依赖”的自查命令,结果为空UI 验证 / UI evidence
TestVisualProblemsToolWindow(-tags 'vivahead lithevisual',提交 152e7bd,1440×900,暗/亮 × 中文/英文)。场景是项目 shop:两个 Java 文件共 4 条诊断。项目标签,开启预览并选中一条警告:选中行为实心蓝;预览第 13 行标黄;预览中显示
List、Inventory、count下的诊断波浪线。文件标签
视图选项菜单
统一日志系统 / Structured logging
N/A:没有新增或改动生命周期、终态或失败路径。读文件失败沿用预览已有的失败提示。
界面文案 / i18n
verify-app-language-localization.mjs和generate-i18n.mjs --check(11434/11434),没有放宽脚本逻辑归属 / Logic placement
lsp.problems.query计算,没有新的可共享业务规则性能与内存 / Performance and memory
readTablessFile),主线程不读文件。预览与文档共享同一段文本(CopyContent)设置 / Settings
N/A:没有新增或修改设置项。
插件契约 / Plugin contract
N/A:没有改 Core、契约或宿主方法。
发行包与资源 / Bundle and resources
./scripts/desktop/verify/verify-runtime-bundle-immutability.sh(通过)无用代码与重构 / Dead code and refactoring
openTablessDocument和diffUndoChord里重复的读文件、撤销按键逻辑已抽成共用函数,没有留下旧副本验证 / Verification
desktop-go.sh vet ./internal/workbench/、gofmt -ldesktop-go.sh test ./internal/workbench/(整个包)TestVisualProblemsToolWindow(vivahead lithevisual)verify-app-language-localization.mjs、generate-i18n.mjs --checkverify-platform-feature-matrix.sh、verify-platform-feature-matrix-change.mjs origin/main HEADverify-runtime-bundle-immutability.sh未能执行的检查和原因:
internal/workbench整包,没有跑desktop-go.sh test ./...,完整套件交给本 PR 的 CI。提交前确认 / Final checks
main(6a65ed2,feat(desktop): 问题工具窗口对齐 IDEA,树行与选中移动改由 Core 计算 #2106)创建;目标分支main