1. 19 Jun, 2025 4 commits
    • 🛠️ chore(ratio-sync): improve upstream ratio comparison & output cleanliness · 53e8aa05
      Summary
      1. Consider “both unset” as identical
         • When both localValue and upstreamValue are nil, mark upstreamValue as "same" to avoid showing “Not set”.
      
      2. Exclude fully-synced upstream channels from result
         • Scan `differences` to detect channels that contain at least one divergent value.
         • Remove channels whose every ratio is either `"same"` or `nil`, so the frontend only receives actionable discrepancies.
      
      Why
      These changes reduce visual noise in the Upstream Ratio Sync table, making it easier for admins to focus on models requiring attention. No functional regressions or breaking API changes are introduced.
      Apple\Apple committed
    • chore(ui): enhance channel selector with status avatars and UI improvements · 73cfa589
      Add visual status indicators and improve user experience for the upstream ratio sync channel selector modal.
      
      Features:
      - Add status-based avatar indicators for channels (enabled/disabled/auto-disabled)
      - Implement search functionality with text highlighting
      - Add endpoint configuration input for each channel
      - Optimize component structure with reusable ChannelInfo component
      
      UI Improvements:
      - Custom styling for transfer component items
      - Hide scrollbars for cleaner appearance in transfer lists
      - Responsive layout adjustments for channel information display
      - Color-coded avatars: green (enabled), red (disabled), amber (auto-disabled), grey (unknown)
      
      Code Quality:
      - Extract channel status configuration to constants
      - Create reusable ChannelInfo component to reduce code duplication
      - Implement proper search filtering for both channel names and URLs
      - Add consistent styling classes for transfer demo components
      
      Files modified:
      - web/src/components/settings/ChannelSelectorModal.js
      - web/src/pages/Setting/Ratio/UpstreamRatioSync.js
      - web/src/index.css
      
      This enhancement provides better visual feedback for channel status and improves the overall user experience when selecting channels for ratio synchronization.
      Apple\Apple committed
    • 🗑️ chore(custom channel): Remove custom channel support from upstream ratio sync · 9db2886c
      Remove all custom channel functionality from the upstream ratio sync feature to simplify the codebase and focus on database-stored channels only.
      
      Changes:
      - Remove custom channel UI components and related state management
      - Remove custom channel testing and validation logic
      - Simplify ChannelSelectorModal by removing custom channel input fields
      - Update API payload to only include channel_ids, removing custom_channels
      - Remove custom channel processing logic from backend controller
      - Update import path for DEFAULT_ENDPOINT constant
      
      Files modified:
      - web/src/pages/Setting/Ratio/UpstreamRatioSync.js
      - web/src/components/settings/ChannelSelectorModal.js
      - controller/ratio_sync.go
      
      This change streamlines the ratio synchronization workflow by focusing solely on pre-configured database channels, reducing complexity and potential maintenance overhead.
      Apple\Apple committed
  2. 18 Jun, 2025 1 commit
    • 🚚 Refactor(ratio_setting): refactor ratio management into standalone `ratio_setting` package · 175ea56f
      Summary
      • Migrated all ratio-related sources into `setting/ratio_setting/`
        – `model_ratio.go` (renamed from model-ratio.go)
        – `cache_ratio.go`
        – `group_ratio.go`
      • Changed package name to `ratio_setting` and relocated initialization (`ratio_setting.InitRatioSettings()` in main).
      • Updated every import & call site:
        – Model / cache / completion / image ratio helpers
        – Group ratio helpers (`GetGroupRatio*`, `ContainsGroupRatio`, `CheckGroupRatio`, etc.)
        – JSON-serialization & update helpers (`*Ratio2JSONString`, `Update*RatioByJSONString`)
      • Adjusted controllers, middleware, relay helpers, services and models to reference the new package.
      • Removed obsolete `setting` / `operation_setting` imports; added missing `ratio_setting` imports.
      • Adopted idiomatic map iteration (`for key := range m`) where value is unused.
      • Ran static checks to ensure clean build.
      
      This commit centralises all ratio configuration (model, cache and group) in one cohesive module, simplifying future maintenance and improving code clarity.
      Apple\Apple committed
  3. 17 Jun, 2025 25 commits
  4. 16 Jun, 2025 10 commits