Skip to content

UI - #84

Merged
239573049 merged 2 commits into
mainfrom
ui
Sep 25, 2025
Merged

UI#84
239573049 merged 2 commits into
mainfrom
ui

Conversation

@239573049

Copy link
Copy Markdown
Member

This pull request introduces initial project setup and configuration files for both the backend (.NET 9) and frontend (React + Vite) of the Thor AI platform. It adds essential documentation, developer environment settings, build and launch tasks, and updates the frontend dependencies and meta tags to support new tooling and branding. These changes lay the foundation for local development, build automation, and consistent project structure.

Project Documentation and Guidance

  • Added comprehensive developer documentation in CLAUDE.md, detailing project architecture, build commands, environment variables, coding practices, and troubleshooting steps for both backend and frontend.

Frontend Configuration and Branding

  • Updated lobe/index.html meta tags and links to use new branding (favicon.png), set proper canonical and Open Graph URLs, and improved mobile web app support. [1] [2] [3]
  • Added lobe/components.json for UI library configuration, setting up Tailwind, Lucide icons, and component aliases.
  • Overhauled lobe/package.json dependencies: replaced Ant Design and related packages with Radix UI, Tailwind CSS, Lucide icons, and other modern libraries for improved frontend stack and performance. [1] [2]

Backend and Development Environment

  • Added .vscode/launch.json for .NET Core debugging and attach configurations, and .vscode/tasks.json for build, publish, and watch tasks to streamline backend development workflows. [1] [2]
  • Added .vscode/settings.json to configure VSCode extensions (e.g., disabling chatgpt on startup).
  • Added .claude/settings.local.json for Claude Code permissions, specifying allowed shell commands for local development and automation.

refactor: 重构Token服务分组验证逻辑

feat(abstractions): 新增Fal和Midjourney相关DTO

feat(service): 添加图片任务日志事件处理器

feat(core): 扩展数据访问实体配置

feat(migrations): 添加移除请求日志的迁移文件

feat(ui): 在模型映射页面添加自定义模型输入

fix(azure-databricks): 修复流式响应处理逻辑

feat(i18n): 新增未保存更改警告等翻译

style: 清理无用代码和文件

chore: 更新依赖和配置文件
Copilot AI review requested due to automatic review settings September 25, 2025 19:34
@239573049
239573049 merged commit 7667a10 into main Sep 25, 2025
2 of 4 checks passed
@239573049
239573049 deleted the ui branch September 25, 2025 19:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request establishes comprehensive project setup and configuration for a Thor AI platform, transitioning from Ant Design to a modern React + shadcn/ui stack with .NET 9 backend support.

Key Changes:

  • Migration from Ant Design to shadcn/ui component library with Tailwind CSS
  • Comprehensive developer tooling setup including VSCode configurations and Claude Code permissions
  • Complete UI component overhaul for channel management, announcements, authentication, and user interface
  • Updated internationalization with enhanced translations for new UI components

Reviewed Changes

Copilot reviewed 106 out of 305 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
lobe/src/pages/channel/features/UpdateChannel.tsx Complete rewrite using shadcn/ui components for channel editing
lobe/src/pages/channel/features/CreateChannel.tsx Migration to modern UI components with improved form validation
lobe/src/pages/auth/page.tsx Updated authentication page with shadcn/ui components
lobe/src/pages/announcement/page.tsx Comprehensive announcement management UI overhaul
lobe/src/pages/announcement/features/EditAnnouncement.tsx Modern dialog-based announcement editing interface
lobe/src/pages/announcement/features/CreateAnnouncement.tsx Enhanced announcement creation with markdown support
Various UI components New shadcn/ui component implementations
Configuration files VSCode, build tasks, and development environment setup
Comments suppressed due to low confidence (1)

lobe/src/i18n/locales/zh-CN.ts:1

  • The Azure OpenAI API version '2025-01-01-preview' appears to be a future version that may not exist yet. Verify this API version is available and consider using a confirmed existing version.
const zhCN = {

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

other: value.other || "",
key: value.key || "",
models: value.models || [],
group: value.group ? String(value.group) : value.groups?.[0] ?? "",

Copilot AI Sep 25, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The fallback logic using optional chaining with nullish coalescing is complex and potentially fragile. Consider extracting this into a helper function or simplifying the logic to handle the group/groups conversion more explicitly.

Copilot uses AI. Check for mistakes.
}
};

const selectedGroup = groups.find((group) => String(group.code ?? '') === formData.group);

Copilot AI Sep 25, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The type coercion with String() and fallback to empty string suggests uncertain data types. Consider defining proper TypeScript interfaces to ensure type safety and avoid runtime conversions.

Copilot uses AI. Check for mistakes.
Comment on lines +82 to +84
const expireTime = announcement.expireTime
? new Date(announcement.expireTime).toISOString().slice(0, 16)
: '';

Copilot AI Sep 25, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The date manipulation using slice(0, 16) to format for datetime-local input is brittle. Consider using a proper date formatting utility or extracting this logic into a reusable helper function.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +5
import { useTheme } from "next-themes"
import { Toaster as Sonner, ToasterProps } from "sonner"

const Toaster = ({ ...props }: ToasterProps) => {
const { theme = "system" } = useTheme()

Copilot AI Sep 25, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The import suggests this is a Next.js application, but the project appears to be using React Router based on other files. This could cause runtime errors if next-themes is not properly configured for non-Next.js environments.

Suggested change
import { useTheme } from "next-themes"
import { Toaster as Sonner, ToasterProps } from "sonner"
const Toaster = ({ ...props }: ToasterProps) => {
const { theme = "system" } = useTheme()
import React, { useContext } from "react"
import { Toaster as Sonner, ToasterProps } from "sonner"
// Simple ThemeContext for demonstration; in a real app, this should be provided at a higher level
const ThemeContext = React.createContext({ theme: "system" });
const Toaster = ({ ...props }: ToasterProps) => {
const { theme = "system" } = useContext(ThemeContext)

Copilot uses AI. Check for mistakes.
} from "../components/ui/toast"

const TOAST_LIMIT = 1
const TOAST_REMOVE_DELAY = 1000000

Copilot AI Sep 25, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The TOAST_REMOVE_DELAY of 1,000,000ms (16+ minutes) seems excessively long and likely unintentional. Consider using a more reasonable timeout like 5000ms (5 seconds) for better user experience.

Suggested change
const TOAST_REMOVE_DELAY = 1000000
const TOAST_REMOVE_DELAY = 5000

Copilot uses AI. Check for mistakes.
@239573049
239573049 restored the ui branch September 26, 2025 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants