Repository navigation
feat(frontend): add fetch-from-upstream button in model mapping - #7413
Bliod-Cook wants to merge 2 commits into
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. WalkthroughChannel configuration now supports selecting discovered upstream models for mapping rows. The picker uses single-selection controls and connects to channel discovery state. Manual target editing remains available. Tests cover discovery, picker interactions, permissions, and mapping updates. ChangesUpstream model mapping
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant ChannelMutateDrawer
participant UpstreamModelPicker
participant UpstreamModelSelection
participant ModelMappingEditor
ChannelMutateDrawer->>UpstreamModelPicker: provide discovery state and fetch callback
UpstreamModelPicker->>ChannelMutateDrawer: request model discovery
ChannelMutateDrawer->>UpstreamModelPicker: return models and status
UpstreamModelPicker->>UpstreamModelSelection: display discovered models
UpstreamModelSelection->>UpstreamModelPicker: return selected model
UpstreamModelPicker->>ModelMappingEditor: apply selected model
Suggested reviewers: Merge Risk: ⚪ Minimal · up to This adds an upstream-model picker to channel model mapping while keeping manual entry available. No concrete merge-blocking issue is evident from the supplied changes and tests. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The picker reuses existing discovery permissions and the normal channel-save flow. No new permission bypass or independent configuration write was identified. Backend authorization and persistence guarantees were not fully evaluated. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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. A rabbit taps the model door, Comment |
Resolve channel UI conflicts while retaining the upstream model picker, editable model comboboxes, batch redirects, redirect aliases, and stable selection tabs. Preserve draft rows when the form echoes mapping changes and cover the combined editor with a regression test. Validation: 140 relevant Vitest tests passed; bun run typecheck, targeted oxlint, formatting checks, seven-locale translation-key checks, and bun run build passed. AI-assisted conflict resolution.
English template:
.github/PULL_REQUEST_TEMPLATE/en.mdImportant
🔗 关联任务 / Related Issue
新功能请填写下方 Issue 编号;若还没有对应 Issue,请先自行创建。功能讨论请放在 Issue 中进行。
改动较大或方向性变更,请先在关联 Issue 中与维护者达成一致,再提交 PR。
Bug 修复请关联对应 Issue。设计取舍、理解偏差或预期不一致,更适合作为讨论或功能请求。
Closes 模型重定向时允许从上游拉取模型 #6101
🚀 变更类型 / Type of change
📝 变更描述 / Description
(简述做了什么、为什么生效。如果难以简述,建议先拆分范围,或在 Issue 中与维护者对齐。)
重新实现了旧版UI中在模型重定向设置中,从上游拉取模型填入的按钮
实现方式是为现有模型列表增加单选模式,因此自带结果缓存,可以保证操作的流畅性
附加更改:
📸 运行证明 / Proof of Work
(请写明如何验证:实际步骤与观察结果。UI 变更请附截图或录屏;Bug 修复请说明复现过程与修复后结果。)
旧版UI的图片:


新版UI的图片:
✅ 提交前检查项 / Checklist
New feature,我已关联对应 Issue;若尚无 Issue,我已先自行创建。Summary by CodeRabbit
New Features
Bug Fixes