Repository navigation
Conversation
- 为使用日志公共列的样式添加undefined兜底值'neutral',避免样式渲染报错 - 优化用户编辑抽屉的群组查询逻辑,改为打开选择器时再拉取数据,修复选项不显示问题
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughTwo independent improvements: a defensive styling fallback for timing badges with missing variants, and a lazy-loading refactor that fetches user groups only when the dropdown is opened instead of on component mount. ChangesUI improvements and data fetching optimization
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
51fdfc5 to
2b6f1df
Compare
Important
📝 变更描述 / Description
(简述:做了什么?为什么这样改能生效?请基于你对代码逻辑的理解来写,避免粘贴未经整理的内容)
管理员用户模块中,编辑用户时的「分组」下拉选择器在抽屉打开时即自动请求 /api/group 接口获取分组列表。现在改为 仅在用户点击展开下拉列表时 才发起请求,通过 Select 组件的 onOpenChange 回调,在 isOpen === true 时触发 refetch() ,收起时不调用。同时修正了接口地址去掉尾部多余的 / 。
附带修复了一个与本需求无关的 TypeScript 编译错误:日志列表 timing 列中 frtVariant 可能为 null ,作为 timingBgMap 索引会导致类型报错,补充了 'neutral' fallback。
🚀 变更类型 / Type of change
🔗 关联任务 / Related Issue
✅ 提交前检查项 / Checklist
Bug fix,我已提交或关联对应 Issue,且不会将设计取舍、预期不一致或理解偏差直接归类为 bug。📸 运行证明 / Proof of Work
(请在此粘贴截图、关键日志或测试报告,以证明变更生效)

Summary by CodeRabbit
Bug Fixes
Improvements