上游同步 - #3430
Conversation
fix(ci): 硬编码API基础URL为生产环境地址 将VITE_API_BASE_URL环境变量从GitHub secrets改为硬编码的生产环境URL https://api.meeyo.org,以便CI构建时使用正确的API端点。 ```
|
Caution Review failedPull request was closed or merged during review WalkthroughThe PR encompasses a major platform refactoring: removing legacy Docker/release CI workflows and consolidating to a unified web CI pipeline; removing community governance documents; rebranding to "YOUMI API" with comprehensive tech-styled theming; refactoring frontend routing with lazy-loaded components; implementing dynamic API base URL resolution; introducing on-demand locale loading; removing Waffo payment gateway; simplifying sidebar chat functionality; and updating numerous UI components and styling. Changes
Sequence DiagramssequenceDiagram
participant Browser as Browser/App
participant i18n as i18n Module
participant Loader as Locale Loader
participant JSON as Locale JSON
rect rgb(100, 150, 200, 0.5)
Note over Browser,JSON: App Initialization
Browser->>i18n: Import i18nReady
activate i18n
i18n->>i18n: Initialize with default locale (zh-CN)
i18n->>JSON: Load zh-CN.json (static import)
JSON-->>i18n: Return zh-CN resources
i18n->>i18n: Register default resources
i18n-->>Browser: i18nReady promise
deactivate i18n
Browser->>Browser: Await i18nReady.finally()
end
rect rgb(150, 200, 100, 0.5)
Note over i18n,JSON: Language Change
i18n->>i18n: Emit languageChanged event
i18n->>Loader: ensureLanguageLoaded(new language)
activate Loader
Loader->>Loader: Validate against supportedLanguages
Loader->>JSON: Dynamic import locale JSON
JSON-->>Loader: Return resources
Loader->>i18n: addResourceBundle(language, resources)
deactivate Loader
end
rect rgb(200, 150, 100, 0.5)
Note over Browser,JSON: App Render
Browser->>Browser: root.render(<App/>)
Browser->>Browser: Components use i18n (t-function)
end
sequenceDiagram
participant Client as Frontend
participant Env as Environment
participant Vite as Vite Config
participant API as API Helper
participant Server as Backend Server
rect rgb(100, 150, 200, 0.5)
Note over Vite: Build Phase
Env->>Vite: Load VITE_API_BASE_URL or VITE_REACT_APP_SERVER_URL
Vite->>Vite: Compute backendTarget (from env or default)
Vite->>Vite: Configure dev server proxy targets (/api, /mj, /pg)
end
rect rgb(150, 200, 100, 0.5)
Note over Client,Server: Runtime URL Resolution
Client->>API: Import API module
activate API
API->>API: resolveServerUrl() → prioritize env vars, fallback to window.location.origin
API->>API: Create axios instance with resolved baseURL + withCredentials: true
API-->>Client: Export API client & resolveRequestUrl()
deactivate API
end
rect rgb(200, 150, 100, 0.5)
Note over Client,Server: API Requests
Client->>API: Call resolveRequestUrl('/path')
API->>API: Prepend resolved server URL + ensure leading /
API-->>Client: Return full URL
Client->>Server: fetch(url, { credentials: 'include' })
Server-->>Client: Response with cookie/session
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
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 |
Summary by CodeRabbit
New Features
Style & Design
Chores