Skip to content

上游同步 - #3430

Closed
Nacho-Neko wants to merge 15 commits into
QuantumNous:mainfrom
Gan-cell888:main
Closed

上游同步#3430
Nacho-Neko wants to merge 15 commits into
QuantumNous:mainfrom
Gan-cell888:main

Conversation

@Nacho-Neko

@Nacho-Neko Nacho-Neko commented Mar 24, 2026

Copy link
Copy Markdown

Summary by CodeRabbit

  • New Features

    • Added comprehensive documentation page with guides, model tiers, and setup tutorials.
    • Implemented improved CI/CD pipeline with automated builds and deployments.
  • Style & Design

    • Rebranded from "New API" to "YOUME API" with modern tech-themed visual design system.
    • Updated page layouts and styling for improved user experience.
  • Chores

    • Removed Waffo payment gateway integration.
    • Removed chat functionality and related sidebar features.
    • Removed outdated CI workflows and repository governance documents.

@coderabbitai

coderabbitai Bot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

Pull request was closed or merged during review

Walkthrough

The 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

Cohort / File(s) Summary
CI Workflow Removals
.github/workflows/docker-image-alpha.yml, docker-image-arm64.yml, electron-build.yml, release.yml, sync-to-gitee.yml
Removed all Docker image publishing, Electron build, release publishing, and Gitee sync workflows (151–159 lines each).
CI Workflow Additions
.github/workflows/ci.yml, web/.github/workflows/ci.yml
Added unified web CI pipeline on push/PR to main: builds frontend with Node.js v24, sets VITE_API_BASE_URL env var, uploads dist artifact, and deploys to /opt/www/meeyo via SSH on main branch push.
Governance Files Removed
.github/CODE_OF_CONDUCT.md, SECURITY.md
Deleted Contributor Covenant code of conduct and security policy documentation (83–86 lines each).
Frontend Configuration
web/.env.example, web/index.html, web/vercel.json
Added example env file with VITE_API_BASE_URL; updated page title to "YOUME API"; added Vercel rewrites for /mj and /pg proxying to backend API endpoints.
API Client Refactoring
web/src/helpers/api.js
Implemented dynamic base URL resolution prioritizing VITE_API_BASE_URL, then VITE_REACT_APP_SERVER_URL, falling back to window.location.origin; added resolveServerUrl() and resolveRequestUrl() exports; enabled credential propagation via withCredentials: true.
Route Lazy Loading & Navigation
web/src/App.jsx, web/src/hooks/common/useNavigation.js, web/src/hooks/common/useHeaderBar.js
Converted 20+ page imports to React.lazy() code splitting; introduced withSuspense() helper for consistent Suspense boundaries; removed /about route, added /docs route; removed docsLink from hooks and navigation; renamed About component to Docs.
New Docs Page
web/src/pages/Docs/index.jsx
Added comprehensive documentation page with model tiers table, quick-start guides, API connection tutorials (SillyTavern/OpenAI-compatible clients), and QQ group support card.
Layout & Header Components
web/src/components/layout/PageLayout.jsx, web/src/components/layout/headerbar/index.jsx, web/src/components/layout/headerbar/HeaderLogo.jsx
Updated layout CSS classes to global-tech-app/global-tech-content; removed system name from header; changed logo tag color from conditional (purple/blue) to fixed blue; added console-route CSS class toggling; updated title to constant 'YOUMI API'.
Sidebar & Footer Updates
web/src/components/layout/SiderBar.jsx, web/src/components/layout/Footer.jsx
Removed dynamic chat route generation from sidebar; removed localStorage chat parsing and route map updates; relocated footer credits to fixed bottom-right positioning with z-index layering.
Home Page Redesign
web/src/pages/Home/index.jsx
Removed endpoint rotation, docs link retrieval, and BASE URL copy UI; simplified notice logic to localStorage-only check; added new CSS hook classes (home-page-shell, home-tech-hero, etc.); updated docs navigation to use /docs route instead of external link.
Internationalization Overhaul
web/src/i18n/i18n.js, web/src/i18n/locales/zh-TW.json, web/src/index.jsx
Implemented lazy locale loading with i18nReady async promise; deferred app render until i18n initialization completes; removed static locale imports and dynamic loading via ensureLanguageLoaded(); deleted zh-TW translation entries for removed features.
Payment Gateway Removal
web/src/components/topup/index.jsx, web/src/components/topup/RechargeCard.jsx, web/src/components/topup/modals/TopupHistoryModal.jsx, web/src/pages/Setting/Payment/SettingsPaymentGatewayWaffo.jsx
Removed all Waffo payment support: deleted Waffo state/props, removed gateway settings component (608 lines), filtered payment methods to Alipay only, added error logging for JSON parse failures, simplified admin action rendering.
Payment Settings Updates
web/src/pages/Setting/Payment/SettingsPaymentGateway.jsx, web/src/components/settings/PaymentSetting.jsx
Removed Waffo settings import; added ALIPAY_ENTERPRISE_PAYMETHODS default template; updated placeholder text to reflect Alipay-only configuration; added error logging in payment option parsing.
Token & Channel Components
web/src/components/table/tokens/TokensDescription.jsx, web/src/components/table/channels/modals/OllamaModelModal.jsx
Expanded TokensDescription with mobile responsiveness, 3-second endpoint rotation, copy-to-clipboard for https://api.meeyo.org fixed URL; updated Ollama pull-model endpoint to use resolveRequestUrl() with credentials.
Codex Usage Modal
web/src/components/table/channels/modals/CodexUsageModal.jsx
Removed plan-type classification logic; now directly maps rate_limit.primary_window and secondary_window to UI cards; removed conditional progress rendering fallbacks.
Notice & Modal Updates
web/src/components/layout/NoticeModal.jsx, web/src/components/table/models/index.jsx
Replaced API-based notice fetch with new renderWelcomeNotice() implementation; updated modal styling and icon imports; wrapped model page root in div.model-marketplace-page.
Markdown & Chart Rendering
web/src/components/common/markdown/MarkdownRenderer.jsx, web/src/hooks/dashboard/useDashboardCharts.jsx
Implemented lazy, cached mermaid initialization via getMermaid() helper with unmount cancellation logic; removed eager theme initialization from chart hook; deferred mermaid rendering until async load completes.
Icon & UI Helper Refactoring
web/src/helpers/render.jsx
Replaced LobeHub icon direct imports with local registry mapping; added parseLobeIcon() to parse icon identifiers with attributes and type coercion; updated all model/channel icons to use string-based getLobeHubIcon() calls; switched LinkedIn icon from SiLinkedin to FaLinkedin.
API Request Streaming
web/src/hooks/playground/useApiRequest.jsx
Added resolveRequestUrl() for chat completions endpoint; enabled credential propagation for both fetch and SSE streaming with credentials: 'include' and withCredentials: true.
Model Settings
web/src/pages/Setting/Model/SettingGeminiModel.jsx
Added HARM_CATEGORY_CIVIC_INTEGRITY: 'BLOCK_NONE' to Gemini safety settings example JSON.
Build Configuration
web/vite.config.js, web/package.json
Changed Vite config to dynamic factory accepting mode param; computed backendTarget from env vars; made codeInspectorPlugin conditional on non-production; updated manual chunks to replace i18n with charting for VChart library; upgraded @douyinfe/semi-ui to ^2.93.0 and added antd ^6.3.3.
Login Form Styling
web/src/components/auth/LoginForm.jsx
Added login-continue-btn CSS class to "Continue" button alongside existing full-width/rounded classes.
Comprehensive CSS Theming
web/src/index.css
Added 1112 lines of new "blue-white tech" styling: notice component styles, home-page shell/hero/grid layouts with animations, global tech app/content/header theme, responsive design adjustments, dark-mode overrides, and Semi UI component customization (cards, buttons, inputs, tables, modals).

Sequence Diagrams

sequenceDiagram
    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
Loading
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
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested reviewers

  • Calcium-Ion
  • seefs001
  • creamlike1024

Poem

🐰 Hoppy refactoring hops along,
Workflows and payments, righting what's wrong—
Lazy routes leap, locales load on cue,
YOUMI shines bright in tech-styled blue!

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The PR title "上游同步" (Upstream Sync) is extremely vague and does not meaningfully convey the scope or nature of the changes, which are substantial and multi-faceted including GitHub Actions workflow modifications, UI/styling overhauls, payment system refactoring, i18n lazy loading, and comprehensive component updates. Replace with a specific, descriptive title that identifies the primary changes, such as "Refactor CI/CD workflows and modernize frontend styling with tech theme" or break into multiple focused PRs with clear titles.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch main

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Nacho-Neko Nacho-Neko closed this Mar 24, 2026
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.

1 participant