Skip to content

fix(settings): 避免模型下拉展开时抽屉下方字段被顶开 - #713

Merged
su-fen merged 1 commit into
mainfrom
fix/settings-model-picker-open-shift
Sep 1, 2026
Merged

fix(settings): 避免模型下拉展开时抽屉下方字段被顶开#713
su-fen merged 1 commit into
mainfrom
fix/settings-model-picker-open-shift

Conversation

@su-fen

@su-fen su-fen commented Sep 1, 2026

Copy link
Copy Markdown
Member

Linked issue

Closes #712

Summary

供应商配置自定义设置抽屉里,「标题生成模型 / Commit 备注生成模型 / 澄清对话模型」展开后,下方字段会轻微下移。

ModelPickerDropdownMenu 是 fragment;菜单打开时 Base UI 会在 trigger 两侧插入 FocusGuard。Tailwind v4 的 space-y-* 会对非末子元素加 margin-bottom,于是 trigger 多出约 6px 间距。用一层包装把 FocusGuard 关在内部,外层 space-y 的子节点开合前后不变。记忆设置、Cron 提示词表单等同样使用该选择器的地方一并修好。

Change scope

  • Modules: agent-ui
  • Key paths:
    • crates/agent-ui/src/pages/settings/modelPicker.tsx

Screenshots / preview

截图由作者补充(展开前 / 展开后,确认下方字段不再位移)。

Verification

  • 对照 Base UI Menu.Trigger 打开时注入 FocusGuard 的实现,以及 Tailwind v4 space-y-*:not(:last-child) { margin-bottom } 选择器,确认位移来自 spacing 上下文被打断。
  • 未新增自动化测试:该问题依赖真实菜单打开时的 sibling 结构,现有套件没有 ModelPicker 用例。

Pre-submit checklist

  • A requirement issue is linked (or this is a trivial fix that needs no issue, as explained in the summary).
  • Synced with the target branch; no merge conflicts.
  • The change is focused, with no unrelated modifications.
  • No secrets, tokens, or personal data included.
  • Docs are updated for changes affecting user behavior, deployment, or configuration.

Made with Cursor

Co-authored-by: Cursor <cursoragent@cursor.com>
@StackCairn
StackCairn marked this pull request as draft September 1, 2026 05:37
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

PR governance checks failed — this PR has been converted to draft.

  • UI change without screenshots: this PR modifies frontend code. Please add before/after screenshots or a recording under "Screenshots / preview" in the PR body.

Fix the items above, then click Ready for review to re-run the checks.

@su-fen su-fen added the governance-exempt Skip PR governance checks label Sep 1, 2026
@su-fen
su-fen marked this pull request as ready for review September 1, 2026 05:38
@su-fen
su-fen merged commit 5156b98 into main Sep 1, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

governance-exempt Skip PR governance checks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] 供应商配置抽屉中模型下拉展开后下方字段会轻微下移

1 participant