fix(desktop): 修复自动任务模型菜单层级 - #4017
Conversation
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
|
| Filename | Overview |
|---|---|
| apps/desktop/src/renderer/components/new-chat/ModelSelector.tsx | 将调用方提供的浮层样式合并到次级模型面板的定位 wrapper;实现合理,但关键修复路径缺少直接回归测试。 |
Prompt To Fix All With AI
### Issue 1
apps/desktop/src/renderer/components/new-chat/ModelSelector.tsx:267
**缺少层级回归测试**
本次修复依赖把 `overlayContentClassName` 应用到实际的 `data-radix-popper-content-wrapper`,但现有测试只检查属性透传或内部面板,没有断言定位 wrapper 获得调用方传入的高层级类。因此,代码即使退回到仅给内部元素设置 z-index 的状态,测试仍可能通过。建议打开次级模型面板后,直接断言其最近的定位 wrapper 包含 `z-[10010]` 或 `z-[10020]`。
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "fix(desktop): preserve model menu overla..." | Re-trigger Greptile
| ref={refs.setFloating} | ||
| data-radix-popper-content-wrapper="" | ||
| className="z-50 w-[248px]" | ||
| className={cn('z-50 w-[248px]', className)} |
There was a problem hiding this comment.
本次修复依赖把 overlayContentClassName 应用到实际的 data-radix-popper-content-wrapper,但现有测试只检查属性透传或内部面板,没有断言定位 wrapper 获得调用方传入的高层级类。因此,代码即使退回到仅给内部元素设置 z-index 的状态,测试仍可能通过。建议打开次级模型面板后,直接断言其最近的定位 wrapper 包含 z-[10010] 或 z-[10020]。
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop/src/renderer/components/new-chat/ModelSelector.tsx
Line: 267
Comment:
**缺少层级回归测试**
本次修复依赖把 `overlayContentClassName` 应用到实际的 `data-radix-popper-content-wrapper`,但现有测试只检查属性透传或内部面板,没有断言定位 wrapper 获得调用方传入的高层级类。因此,代码即使退回到仅给内部元素设置 z-index 的状态,测试仍可能通过。建议打开次级模型面板后,直接断言其最近的定位 wrapper 包含 `z-[10010]` 或 `z-[10020]`。
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9af4199068
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ref={refs.setFloating} | ||
| data-radix-popper-content-wrapper="" | ||
| className="z-50 w-[248px]" | ||
| className={cn('z-50 w-[248px]', className)} |
There was a problem hiding this comment.
自动任务的 ModelEffortChip 在 ScheduleChips.tsx:1217-1241 直接渲染 ModelSelectorContent,并保留 unifiedPanel=true 的默认值,因此 ModelSelector.tsx:2763 会提前返回,永远不会执行这里的 ModelOptionsFloatingPanel。配置卡实际由 UnifiedFlyoutHost 渲染,而其 portal wrapper 在 UnifiedFlyoutHost.tsx:145-152 仍是 fixed z-50;传入的 z-[10020] 只落在内层卡片,无法越过父级 z-50 stacking context 和 z-[10000] 对话框。所以自动任务模型配置卡仍会被遮挡,应将覆盖层级传给 UnifiedFlyoutHost 的定位 wrapper。
Useful? React with 👍 / 👎.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
命中 UI 路径(apps/desktop/src/renderer/components/new-chat/ModelSelector.tsx)但 description 未附界面效果证据——建议补充改动后效果:截图/录屏,或改动后界面的 HTML 页面(```html 代码块、.html 附件或在线预览链接),便于确认界面符合 DESIGN.md 设计规范。不阻断合并。 |
|
@dashhuang 👋 这个 PR 还有 2 条 review conversation 没 resolve(apps/desktop/src/renderer/components/new-chat/ModelSelector.tsx),auto-review 因此暂时跳过、没法继续审查 / 合并。 如果你已经按评论改完或回应了,请到对应 thread 上点 Resolve conversation;全部 resolve 后,下一轮 auto-review 会自动重新审查这个 PR。 |
这次改了什么
摘要
修复自动任务设置中的模型选择器配置子面板被对话框遮挡的问题:调用方传入的高层级 class 现在会应用到实际定位 wrapper。
变更类型
fix缺陷修复范围
UI 变化
怎么验证的
自动验证
手工验证
未执行。
未执行的验证
项目测试未执行:当前环境未安装 pnpm。
风险
风险分类
影响与回滚
提交前检查