Repository navigation
fix(settings): 只读来源的列表逐行显示,不再显示重置和浏览 - #2081
Merged
Merged
Conversation
插件以只读方式投影的来源(writable:false)中,stringList/fileList 字段 原先渲染成单行省略的只读框,只能看到第一项;同时仍显示禁用的“重置” 和“浏览…”。现在只读列表每项一行显示,只读来源不显示这两个操作。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
24 of 27 tasks
1lck
marked this pull request as ready for review
November 17, 2026 05:33
1 task done
24 of 32 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
插件的原生来源设置(
litheSettingsSources)可以把一个来源声明为只读(writable:false)。只读来源里的stringList/fileList字段原先走readOnlyField:单行、超出部分省略,多项列表只能看到第一项的开头。Java 插件 3.1.0 用只读来源展示“自动识别的库”“容器与变量”“未能解析”等列表,结果在设置页里几乎看不到内容。此外,只读来源还会显示禁用的“重置”和“浏览…”,用户无法操作,看了只会困惑。改动 / Changes
desktop/internal/settingswindow/plugin_settings_view.go:新增readOnlyList。只读列表每项占一行,单行过长时省略;无障碍信息仍是只读文本框,值为完整列表。desktop/internal/settingswindow/source_settings_view.go:readOnlyList显示,不再用单行的readOnlyField;desktop/internal/settingswindow/source_settings_view_test.go:nativeFormSource可以接收一个回调来调整快照;TestNativeSettingsFormShowsReadOnlyListsInFull:把契约 fixture 的工作区来源设为只读,列表放三项,断言三项都显示、字段是只读,并且没有“重置”和“浏览…”。不在本 PR 范围内 / Out of scope
无。
类型专属:fix
复现与根因
writable:false的来源,其中有stringList字段,值包含多项;打开对应设置页。实际结果:只显示一个单行框,内容被截断成第一项的开头,并且有禁用的“重置”(fileList时还有“浏览…”)。期望结果:每项一行,没有不可用的操作。sourceSettingsControl的default分支在disabled时对所有文本类字段都调用readOnlyField,它是固定 30 px 高、带省略的单行框。“重置”和“浏览…”只做了禁用,没有按来源是否可写来隐藏。检查项
TestNativeSettingsFormShowsReadOnlyListsInFull,修复前输出为read-only list item "web/lib/*.jar" is not shownreadOnlyField的其他调用(插件设置、工具链)不变;只有来源设置的列表分支改用readOnlyList范围检查 / Scope checks
功能矩阵 / Feature matrix
N/A:没有新增能力,只修正已有来源设置页的显示。
插件归属 / Plugin ownership
UI 验证 / UI evidence
scripts/compiler/visual.mjs以 overlay 方式运行TestPluginNativeSourceVisual(标签vivahead lithevisual),覆盖中英文、明暗主题,窗口 1120×1600;投影来自真实 JDT LS 1.61.0 的联调测试Server Runtime [Apache Tomcat v9.0] — 2 个 JAR...,并且每个只读字段下都有禁用的“重置”。修复后四个条目逐行显示,不再有“重置”。统一日志系统 / Structured logging
N/A:只改了视图,没有新增日志事件或失败路径。
界面文案 / i18n
N/A:没有新增文案,复用了
desktop.pluginSettings.reset和desktop.pluginSettings.browse。逻辑归属 / Logic placement
N/A:纯呈现改动。
性能与内存 / Performance and memory
设置 / Settings
插件契约 / Plugin contract
N/A:契约不变。
发行包与资源 / Bundle and resources
N/A
无用代码与重构 / Dead code and refactoring
验证 / Verification
scripts/desktop/desktop-go.sh test ./internal/settingswindow -count=1-run TestNativeSettingsFormShowsReadOnlyListsInFullread-only list item "web/lib/*.jar" is not shownscripts/desktop/desktop-go.sh vet ./internal/settingswindow、gofmt -l.agents/skills/write-stable-tests/scripts/verify-test-stability.sh --base origin/mainnode scripts/compiler/visual.mjs <本分支检出>(20 张截图)未能执行的检查和原因: Windows 实机没有验证;视图代码各平台共用,Windows 由 CI 覆盖。
提交前确认 / Final checks
main(5bbd47c88)创建,目标分支是main🤖 Generated with Claude Code