-
Notifications
You must be signed in to change notification settings - Fork 37
Feature/refactor web/1201 #345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
huangli28926
wants to merge
29
commits into
LianjiaTech:develop
Choose a base branch
from
huangli28926:feature/refactorWeb/1201
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feature/refactor web/1201 #345
huangli28926
wants to merge
29
commits into
LianjiaTech:develop
from
huangli28926:feature/refactorWeb/1201
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
重构应用的整体布局系统,引入统一的侧边栏导航和全局配置能力: - 新增全局侧边栏组件(AppSidebar)提供统一导航 - 引入主题提供器和语言提供器支持国际化和主题切换 - 添加设置对话框组件集成主题和语言配置 - 更新主布局(layout.tsx)集成新的组件架构 - 添加 radio-group UI 组件支持设置选项 - 调整 meta 页面布局适配新的导航系统 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- 新增 HomePage 作为应用默认首页,包含英雄区域、快速操作和新功能展示 - 新增 TopBar 通用顶部导航栏组件,支持主题切换和 GitHub 链接 - 优化侧边栏样式,使用灰色调配色方案提升视觉效果 - 修改登录按钮文案为"退出",更符合用户认知 - 清理 MetaPage 中未使用的导入项 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- 更新主题色为蓝色系 (217 91% 60%),统一 primary、accent 和 ring 颜色 - 调整首页 hero section 间距,移除外层 padding,优化按钮位置 - 同时支持亮色和暗色主题的新配色方案 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- 新增 models 页面展示和管理 AI 模型配置 - 添加端点选择工具函数用于模型能力判断 - 优化首页组件引入,移除未使用的 MetaPage 导入 - 更新 CLAUDE.md 添加中文响应指示 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
主要更新: - 将模型标签颜色从对象映射改为数组结构,提升性能 - 新增模拟数据结构,支持模型详情展示 - 更新Badge组件variant类型定义,支持更多样式 - 完善OpenAPI类型定义,增强类型安全性 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- 优化模型特性(features)数据处理,将数组转换为逗号分隔字符串 - 为上下文长度添加千分位格式化,提升大数字可读性 - 完善定价信息展示,支持输入/输出定价和缓存命中定价显示 - 优化 TypeScript 类型定义,增强 properties 字段的类型安全性 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- 移除未使用的 CapabilityType 类型定义 - 删除 allModels 模拟数据数组 - 删除 DATA_MOCK 大量测试数据 - 简化代码结构,提升可维护性 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
主要改动: - 新增 ModelCard 组件,提取模型卡片 UI 逻辑 - 优化模型管理页面代码结构,移除冗余导入 - 调整首页 Hero section 标题边距样式 - 改进模型特性标签颜色循环逻辑 - 优化代码可读性和可维护性 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
本次提交将整个web目录重命名为webV2,为前端项目的重构和升级奠定基础。 变更内容: - 重命名 web/ -> webV2/ - 保持所有源代码、配置文件和依赖完整性 - 包含所有页面、组件、API路由和工具函数 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- 调整主题色彩亮度值从60%到50%,使界面配色更加平衡 - 优化模型卡片中属性信息和特性标签的文字大小,从text-sm改为text-xs,提升信息密度 - 更新CLAUDE.md配置文档,添加开发流程指引 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- feat: 新增标签筛选功能,支持实时过滤模型列表 - refactor: 清理调试代码和冗余注释 - chore: 更新.gitignore忽略webV2构建产物和日志文件 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- 创建 useEndpointData Hook 管理端点数据获取逻辑 - 提取 category-tree 工具函数处理分类树扁平化 - 提取 model-data-processor 工具函数处理模型数据解析 - 优化主组件代码结构,移除重复逻辑 - 增加 TypeScript 类型定义和代码注释 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Collaborator
|
@claude 检查提交的代码,使用中文回复 |
Collaborator
|
Claude finished @szl97's task —— View job 前端重构代码审查报告我已完成对这个前端重构PR的全面代码审查。这是一个大规模的前端重构,将原有的 审查待办事项:
总体评价优点:
🚨 重要安全和配置问题1. 配置安全风险 - 高优先级// webV2/next.config.mjs:17
GITHUB_CLIENT_SECRET: process.env.GITHUB_CLIENT_SECRET
2. TypeScript构建忽略 - 中等优先级// webV2/next.config.mjs:5-6
typescript: {
ignoreBuildErrors: true,
},
3. 环境变量验证缺失// webV2/src/app/api/github/oauth/route.ts:18-20
if (!GITHUB_CLIENT_ID || !GITHUB_CLIENT_SECRET) {
return NextResponse.json({ error: 'GitHub OAuth not configured' }, { status: 500 });
}
🔧 代码质量改进建议1. 错误处理优化
2. 硬编码数据清理// webV2/src/app/api/logs/route.ts:40
index: "index-14812-15368",
3. 组件性能优化// webV2/src/app/playground/v1/chat/completions/page.tsx
4. API客户端标准化
🎨 用户界面和体验优点:
改进建议:
📁 文件结构评价结构评价: 遵循Next.js最佳实践,文件组织清晰合理。 🚀 部署和运维Docker配置审查:
📋 修复优先级建议高优先级 (必须修复):
中等优先级 (建议修复): 低优先级 (优化项): 结论这是一个高质量的前端重构项目,技术栈选择合理,代码结构清晰。主要需要关注安全配置问题和代码质量细节。修复上述问题后,这将是一个优秀的现代化前端应用。 |
- 优化useEndpointData Hook,增加modelName参数支持模型筛选 - 新增filteredModels计算逻辑,支持多维度搜索(模型名称、拥有者、端点、特性标签) - 更新模型列表展示,使用过滤后的结果并动态显示匹配数量 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- 重构 useEndpointData Hook,将 endpointData 拆分为独立的 endpoint、features、models 状态 - 区分 initialLoading 和 modelsLoading 两种加载状态,提升用户体验 - 使用 useRef 追踪 endpoint 变化,避免不必要的 features 更新 - 优化模型列表的加载状态 UI 显示 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- 新增清除按钮图标(X),提升用户体验 - 清除按钮仅在有搜索内容时显示 - 优化搜索框右侧padding以容纳清除按钮 - 添加悬停效果和平滑过渡动画 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- 重构playground页面结构,按功能分类(audio, chat, docparse, embedding, images, knowledge, ocr, rag, realtime, search, tts, workflow) - 删除旧的分散式playground页面(v1/audio/*, v1/chat/*, v1/images/*等) - 新增endpoint-mapping.ts统一管理endpoint映射关系 - 新增playground-sidebar-menu.tsx优化侧边栏菜单 - 重构playground组件:audio-playground, chat-playground, image-playground, ocr-playground - 更新UI组件库,新增accordion, breadcrumb, carousel, chart, drawer, form等组件 - 删除废弃的UI组件(confirm-dialog, data-table, date-range-picker等) - 更新依赖包版本
- 移除 apikey、logs、meta、monitor、ocr、user 相关废弃组件 - 优化 playground-sidebar-menu 组件逻辑
- 将 sidebar 相关组件移到 components/sidebar/ 目录 - 将 endpoint-mapping.ts 移到 lib/ 目录 - 新增 playground context 和 hooks 用于状态管理 - 新增 playground layout 布局组件 - 更新相关页面以适应新的组件结构
Author
- 新增 SSE (Server-Sent Events) 处理相关类库 - 重构 playground chat 页面逻辑 - 更新 nginx、docker-compose 和 next.config 配置 - 更新项目依赖
添加 max-w-full、break-all 和 whitespace-pre-wrap 样式,确保长代码能够正确换行显示
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



前端重构页面文件夹提交