Repository navigation
refactor(plugins): 删除设置导航已无人使用的 limit 与溢出行 - #103
Merged
Merged
Conversation
桌面端 1lck/Lithe-IDEA#2178 把「构建、执行、部署」下的插件页改成每个 种类一行、点开是分栏页,不再折叠成“展开列 6 个 + 全部 N 个”的文件夹, plugins.settings.navigation 的 limit 和 overflow 行已没有调用方。 - 删除 NavigationItem.limit、溢出行和 limit 的校验;未知字段(包括旧的 limit)按 deny_unknown_fields 返回 invalid_request。 - 测试改为验证第三级全部列出、搜索命中带路径,以及 limit 现在是未知字段。 - rust-core-api.md 同步说明。 - 顺手修正 main 上的既有问题: - 协议更新记录里 #102 已合入却还在「待合入」,移进 2026-11-18 时间线; - toolchain/settings_view.rs 未按 rustfmt 格式化; - toolchain_definitions.rs 的 .err().expect() 触发 clippy err_expect。
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
limit,本 PR 合入前后它都能工作,两边不互相依赖。类型
refactor:删除已没有调用方的 Core 命令参数,没有用户可观察的变化。不改插件契约、能力版本或插件函数协议,所以协议更新记录不新增本 PR 的条目。
改动
设置导航(
rust/crates/plugin-manifest/src/settings_surfaces.rs)plugins.settings.navigation每项的可选limit,以及超出limit时追加的溢出行{id,title,level,path,overflow}。宿主原来用它把一个种类折叠成“展开列 6 个 + 全部 N 个…”,现在每个种类在侧栏只占一行,页面列表在分栏页里,这个参数已没有调用方(Core feat(toolchain): 工具定义声明设置分组(toolDefinitions 1),新增 toolchains.settingsView 和三级设置导航 #99 加入)。limit的校验(0 或超过 512 时拒绝)。导航请求本来就是deny_unknown_fields,所以还带limit的旧请求现在返回invalid_request,不会被静默忽略。测试(
rust/crates/core/src/tests/plugin_settings_documents.rs)settings_navigation_folds_a_third_level_behind_an_overflow_row改为settings_navigation_lists_a_third_level_and_search_hits_with_their_path:展开的种类在第三级列出全部 12 页,每页带路径;搜索命中只列命中页并带路径;种类本身命中时列出它下面的全部页面。settings_navigation_rejects_a_fourth_level_cycles_and_empty_limits改为..._and_unknown_fields:第四级和循环仍返回rejected;带limit的请求返回invalid_request。文档(
rust/contracts/rust-core-api.md)plugins.settings.navigation一段删除limit与溢出行,补写“折叠的分组隐藏子项”和“未知字段是invalid_request”。顺手修正 main 上的既有问题
shared/plugins/reference/protocol-changelog.md:feat(toolchain): 设置投影的问题项带上所在分组,并把已合入的 #99 移进更新记录时间线 #102 已于 2026-11-18 合入,却还留在「待合入」。已把它移进 2026-11-18 的时间线(排在 feat(toolchain): 工具定义声明设置分组(toolDefinitions 1),新增 toolchains.settingsView 和三级设置导航 #99 上面,合入更晚),「待合入」改回“目前没有。”。rust/crates/toolchain/src/settings_view.rs:没有按 rustfmt 格式化,cargo fmt --all -- --check在 main 上不通过,已格式化。rust/crates/core/src/tests/toolchain_definitions.rs:.err().expect(...)触发 clippyerr_expect,cargo clippy -p lithe-core --all-targets -- -D warnings在 main 上不通过,已改为.expect_err(...)。原计划编号
plugins.settings.navigation(Core 命令,不是宿主方法)limit与溢出行验证
cargo fmt --all -- --check:通过。cargo clippy -p lithe-plugin-manifest -p lithe-core -p lithe-toolchain --all-targets --all-features -- -D warnings:通过。cargo test -p lithe-core -p lithe-plugin-manifest -p lithe-toolchain:全部通过(其中plugin_settings相关 17 个)。scripts/rust-core/verify-rust-core-comments.sh core plugin-manifest toolchain:通过。node shared/plugins/scripts/verify-docs.mjs:Plugin docs and contract links are consistent.sdk-e2e.mjs。8d3c16b,桌面端测试全过;它不发送limit,所以换到本 PR 的 commit 也不受影响。