fix(settings): 避免模型下拉展开时抽屉下方字段被顶开 - #713
Merged
Merged
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
StackCairn
marked this pull request as draft
September 1, 2026 05:37
Contributor
|
PR governance checks failed — this PR has been converted to draft.
Fix the items above, then click Ready for review to re-run the checks. |
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.
Linked issue
Closes #712
Summary
供应商配置自定义设置抽屉里,「标题生成模型 / Commit 备注生成模型 / 澄清对话模型」展开后,下方字段会轻微下移。
ModelPicker的DropdownMenu是 fragment;菜单打开时 Base UI 会在 trigger 两侧插入 FocusGuard。Tailwind v4 的space-y-*会对非末子元素加margin-bottom,于是 trigger 多出约 6px 间距。用一层包装把 FocusGuard 关在内部,外层space-y的子节点开合前后不变。记忆设置、Cron 提示词表单等同样使用该选择器的地方一并修好。Change scope
crates/agent-ui/src/pages/settings/modelPicker.tsxScreenshots / preview
截图由作者补充(展开前 / 展开后,确认下方字段不再位移)。
Verification
Menu.Trigger打开时注入 FocusGuard 的实现,以及 Tailwind v4space-y-*的:not(:last-child) { margin-bottom }选择器,确认位移来自 spacing 上下文被打断。ModelPicker用例。Pre-submit checklist
Made with Cursor