[PR #102] [MERGED] feat(ai-providers): 优化 OpenAI 编辑页 UI,支持批量与按 Key 单独测试模型连通性 #105

Closed
opened 2026-02-27 16:42:34 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/router-for-me/Cli-Proxy-API-Management-Center/pull/102
Author: @moxi000
Created: 2/11/2026
Status: Merged
Merged: 2/12/2026
Merged by: @LTbinglingfeng

Base: devHead: feat/openai-ui-ux-optimization


📝 Commits (4)

  • c726fbc feat(ai-providers): 优化 OpenAI 编辑页 UI 交互与对齐
  • 0089d4a chore: 同步 package-lock 以匹配依赖变更
  • 2cf1e23 fix(ai-providers): 修复 OpenAI 密钥测试状态与共享样式回归
  • ab6a1a4 fix(ai-providers): 统一 OpenAI key 表头与内容居中对齐

📊 Changes

15 files changed (+896 additions, -249 deletions)

View changed files

📝 package-lock.json (+5 -33)
📝 src/components/ui/HeaderInputList.tsx (+7 -3)
📝 src/components/ui/ModelInputList.tsx (+38 -12)
📝 src/i18n/locales/en.json (+11 -2)
📝 src/i18n/locales/ru.json (+11 -2)
📝 src/i18n/locales/zh-CN.json (+11 -2)
📝 src/pages/AiProvidersAmpcodeEditPage.tsx (+2 -0)
📝 src/pages/AiProvidersClaudeEditPage.tsx (+5 -1)
📝 src/pages/AiProvidersCodexEditPage.tsx (+3 -1)
📝 src/pages/AiProvidersGeminiEditPage.tsx (+3 -1)
📝 src/pages/AiProvidersOpenAIEditLayout.tsx (+26 -0)
📝 src/pages/AiProvidersOpenAIEditPage.tsx (+416 -178)
📝 src/pages/AiProvidersPage.module.scss (+312 -13)
📝 src/pages/AiProvidersVertexEditPage.tsx (+5 -1)
📝 src/stores/useOpenAIEditDraftStore.ts (+41 -0)

📄 Description

变更内容

  • 支持批量测试模型连通性:可一键测试全部已配置 API Key
  • 支持按 key 单独测试模型连通性:可针对单条 API Key 独立触发测试
  • 重构 OpenAI 编辑页模型配置区:按钮布局、测试区交互与输入行对齐优化
  • 重构 API 密钥列表为更清晰的表格布局,补充状态图标与操作区对齐
  • 为 ModelInputList、HeaderInputList 增加可配置删除按钮文案/样式能力
  • 统一 i18n:移除相关硬编码文案,补齐多语言 key(含 invalid_provider_index)
  • 同步相关页面(Claude/Codex/Gemini/Vertex/Ampcode)的 i18n 删除文案接入

验证

  • npm run lint
  • npm run type-check
  • npm run build
  • 已验证一键批量测试全部 key 的连通性流程
  • 已验证按单个 key 测试模型连通性流程

备注

  • 已同步 package-lock.json,避免依赖锁不一致问题。

Follow-up(审查后修复)

  • 修复全量测试状态机:补齐 loading/success/error 与摘要消息更新,避免状态徽章失效
  • 修复并发触发:全量测试进行中禁用批量/单条测试按钮,避免重复触发并发请求
  • 修复 key 状态错位:编辑 key 后重置当前行状态,新增/删除 key 后同步重置状态数组长度
  • 修复统计口径:批量测试仅统计非空 key,空行不计入失败
  • 回滚全局 .item-row 共享样式到上游行为,消除跨页面对齐/换行回归风险

Follow-up 验证

  • npm run lint
  • npm run type-check
  • npm run build

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/router-for-me/Cli-Proxy-API-Management-Center/pull/102 **Author:** [@moxi000](https://github.com/moxi000) **Created:** 2/11/2026 **Status:** ✅ Merged **Merged:** 2/12/2026 **Merged by:** [@LTbinglingfeng](https://github.com/LTbinglingfeng) **Base:** `dev` ← **Head:** `feat/openai-ui-ux-optimization` --- ### 📝 Commits (4) - [`c726fbc`](https://github.com/router-for-me/Cli-Proxy-API-Management-Center/commit/c726fbc379301beef5727c376b8352642e4c68cf) feat(ai-providers): 优化 OpenAI 编辑页 UI 交互与对齐 - [`0089d4a`](https://github.com/router-for-me/Cli-Proxy-API-Management-Center/commit/0089d4a7054502a1a37c6416f1535fa53707c743) chore: 同步 package-lock 以匹配依赖变更 - [`2cf1e23`](https://github.com/router-for-me/Cli-Proxy-API-Management-Center/commit/2cf1e2335101d69aa4ef5ad425f6b9d2a6dc4c8a) fix(ai-providers): 修复 OpenAI 密钥测试状态与共享样式回归 - [`ab6a1a4`](https://github.com/router-for-me/Cli-Proxy-API-Management-Center/commit/ab6a1a412cca214844db621aed6ffbcc3f40074c) fix(ai-providers): 统一 OpenAI key 表头与内容居中对齐 ### 📊 Changes **15 files changed** (+896 additions, -249 deletions) <details> <summary>View changed files</summary> 📝 `package-lock.json` (+5 -33) 📝 `src/components/ui/HeaderInputList.tsx` (+7 -3) 📝 `src/components/ui/ModelInputList.tsx` (+38 -12) 📝 `src/i18n/locales/en.json` (+11 -2) 📝 `src/i18n/locales/ru.json` (+11 -2) 📝 `src/i18n/locales/zh-CN.json` (+11 -2) 📝 `src/pages/AiProvidersAmpcodeEditPage.tsx` (+2 -0) 📝 `src/pages/AiProvidersClaudeEditPage.tsx` (+5 -1) 📝 `src/pages/AiProvidersCodexEditPage.tsx` (+3 -1) 📝 `src/pages/AiProvidersGeminiEditPage.tsx` (+3 -1) 📝 `src/pages/AiProvidersOpenAIEditLayout.tsx` (+26 -0) 📝 `src/pages/AiProvidersOpenAIEditPage.tsx` (+416 -178) 📝 `src/pages/AiProvidersPage.module.scss` (+312 -13) 📝 `src/pages/AiProvidersVertexEditPage.tsx` (+5 -1) 📝 `src/stores/useOpenAIEditDraftStore.ts` (+41 -0) </details> ### 📄 Description ## 变更内容 - 支持批量测试模型连通性:可一键测试全部已配置 API Key - 支持按 key 单独测试模型连通性:可针对单条 API Key 独立触发测试 - 重构 OpenAI 编辑页模型配置区:按钮布局、测试区交互与输入行对齐优化 - 重构 API 密钥列表为更清晰的表格布局,补充状态图标与操作区对齐 - 为 ModelInputList、HeaderInputList 增加可配置删除按钮文案/样式能力 - 统一 i18n:移除相关硬编码文案,补齐多语言 key(含 invalid_provider_index) - 同步相关页面(Claude/Codex/Gemini/Vertex/Ampcode)的 i18n 删除文案接入 ## 验证 - [x] npm run lint - [x] npm run type-check - [x] npm run build - [x] 已验证一键批量测试全部 key 的连通性流程 - [x] 已验证按单个 key 测试模型连通性流程 ## 备注 - 已同步 package-lock.json,避免依赖锁不一致问题。 ## Follow-up(审查后修复) - 修复全量测试状态机:补齐 `loading/success/error` 与摘要消息更新,避免状态徽章失效 - 修复并发触发:全量测试进行中禁用批量/单条测试按钮,避免重复触发并发请求 - 修复 key 状态错位:编辑 key 后重置当前行状态,新增/删除 key 后同步重置状态数组长度 - 修复统计口径:批量测试仅统计非空 key,空行不计入失败 - 回滚全局 `.item-row` 共享样式到上游行为,消除跨页面对齐/换行回归风险 ### Follow-up 验证 - [x] npm run lint - [x] npm run type-check - [x] npm run build --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 16:42:34 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Cli-Proxy-API-Management-Center#105
No description provided.