Commit Graph
1650 Commits
Author SHA1 Message Date
erio abe8162292 chore: bump version to 0.1.93.20 2026-03-08 04:01:34 +08:00
erio 0d179a794d chore: bump version to 0.1.93.19 2026-03-08 03:51:41 +08:00
erio 7f5e7372d3 chore: bump version to 0.1.93.18 2026-03-08 03:43:45 +08:00
erio 87631e753b chore: bump version to 0.1.93.17 2026-03-08 03:33:11 +08:00
erioandClaude Opus 4.6 dc46a49c6c fix: make table scrollbar clearly visible and prevent text selection during drag
Scrollbar:
- Override scrollbar-width to 'auto' (was 'thin' ~6px, nearly invisible)
- Increase scrollbar-color opacity to 0.7 (was 0.5)
- Add explicit ::-webkit-scrollbar width 10px for older Chrome

Text selection:
- Block selectstart in Phase 1 (onMouseDown) instead of Phase 2
- Clear existing text selection with removeAllRanges() on drag start

Stability:
- Add window blur handler to cleanup drag on tab switch / window leave
- Guard onWheel RAF callback against stale drag state
- Defensive removeMarquee() before createMarquee()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 03:17:58 +08:00
erioandClaude Opus 4.6 93cd0fd4b9 fix: make table scrollbar always visible instead of hover-only
The global CSS makes all scrollbars transparent by default (only visible
on hover). For table containers, scrollbars should always be visible so
users know the content is scrollable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 02:56:34 +08:00
erioandClaude Opus 4.6 259b9d2dbb fix: optimize swipe-select with binary search, short-circuit, and scrollbar detection
- Binary search in findRowIndexAtY (O(n) → O(log n))
- Short-circuit applyRange when row index unchanged
- Cache scrollParent in beginDrag instead of per-frame lookup
- Skip autoScroll recomputation when scrollTop unchanged
- Detect scrollbar clicks on inner containers, not just document

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 02:46:15 +08:00
erioandClaude Opus 4.6 b693e46bee chore: bump version to 0.1.93.13
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 02:28:56 +08:00
erioandClaude Opus 4.6 254ded1b8f chore: bump version to 0.1.93.12
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 02:18:14 +08:00
erioandClaude Opus 4.6 eb4dbeb2bd chore: bump version to 0.1.93.11
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 01:53:31 +08:00
erioandClaude Opus 4.6 1747bf820f chore: bump version to 0.1.93.10
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 01:37:56 +08:00
erioandClaude Opus 4.6 d79b1c56fa chore: bump version to 0.1.93.9
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 01:29:27 +08:00
erioandClaude Opus 4.6 597c19e80b fix: comprehensive Sora & GDrive code review fixes
P0 fixes:
- StorageType: UploadFromURL now returns actual storageType, fixing
  GDrive tasks being incorrectly recorded as "s3"
- Concurrency: selectAccount returns ReleaseFunc to caller, fixing
  premature slot release before task creation
- Race condition: applyRecoveredToken uses copy-on-write for
  account.Credentials map to prevent concurrent write panic
- GetCameoStatus: use direct HTTP call to populate missing fields
  (StatusMessage, InstructionSetHint, InstructionSet)
- Frontend: progress bar uses reactive now.value instead of
  non-reactive Date.now()

P1 fixes:
- EditImage: pass req.Image through to CreateImageRequest
- ListPending: add LIMIT 200 to prevent unbounded queries
- Worker encapsulation: add ListPendingTasks/UpdateTask proxy methods
  to SoraTaskService, worker no longer accesses repo directly
- Frontend polling: add retry counter (3 attempts) before giving up

P2-P3 fixes:
- QuotaBar: handle both quota_source and source field names
- i18n: replace hardcoded Chinese labels in SoraPromptBar and
  example prompts in SoraGeneratePage with i18n keys
- Fix regenrate → regenerate i18n typo
- SoraMediaPreview: skip Escape handler when not visible
- SoraGeneratePage: void handleGenerate promise in handleRetry

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 01:02:55 +08:00
erioandClaude Opus 4.6 f9695ca83f chore: bump version to 0.1.93.8
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 00:18:01 +08:00
erioandClaude Opus 4.6 07082650bb chore: bump version to 0.1.93.7
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 23:43:21 +08:00
erioandClaude Opus 4.6 9e50163b80 chore: bump version to 0.1.93.6
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 22:46:08 +08:00
erioandClaude Opus 4.6 0af1f5841d fix: Sora task API improvements
- selectAccountByID: use original task's account for remix instead of
  random selection, preventing permission issues in OAuth path
- Upstream error passthrough: forward HTTP status code and body from
  upstream instead of always returning 500
- Add accountRepo to SoraTaskService for direct account lookup

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 22:43:19 +08:00
erioandClaude Opus 4.6 4e14409d04 chore: bump version to 0.1.93.5
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 21:06:15 +08:00
erioandClaude Opus 4.6 70f5827a8f fix: add missing ClearAccountAffinity mocks and update API contract test
- Add ClearAccountAffinity to mockGatewayCacheForPlatform,
  openAIWSStateStoreTimeoutProbeCache, mockGatewayCacheForGemini
- Add allow_messages_dispatch field to groups/available contract test

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 20:37:00 +08:00
erioandClaude Opus 4.6 ceb9dec8e4 fix: reject non-UTF-8 request body in Sora handler
Windows terminals may send request bodies in GBK encoding, causing
garbled prompts and upstream failures. Validate UTF-8 encoding in
readBody and return 400 for invalid encodings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 20:15:09 +08:00
erioandClaude Opus 4.6 e951651ee8 chore: bump version to 0.1.93.4
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 20:14:14 +08:00
erioandClaude Opus 4.6 812135b57e fix: add ClearAccountAffinity to remaining GatewayCache mock implementations
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 20:13:59 +08:00
erioandClaude Opus 4.6 0306119e12 fix: validate UTF-8 before storing request_body as JSONB
PostgreSQL JSONB columns require valid UTF-8 encoding. Skip storing
request_body if it contains invalid UTF-8 byte sequences (e.g. from
non-UTF-8 terminal encodings).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 19:59:51 +08:00
erioandClaude Opus 4.6 7f3bf571da chore: bump version to 0.1.93.3
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 19:59:51 +08:00
erioandClaude Opus 4.6 e617dfa009 fix: convert []byte to *string for JSONB columns in sora_task_repo
pq driver treats []byte as bytea, not jsonb. Convert charJSON and
reqBody to *string before passing to ExecContext for character_info
and request_body JSONB columns.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 19:52:13 +08:00
erioandClaude Opus 4.6 a64dca7c41 fix: use SoraObjectStorage interface for storage router compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 19:23:59 +08:00
erioandClaude Opus 4.6 2b510b6aed chore: bump version to 0.1.93.2
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 19:19:23 +08:00
erioandClaude Opus 4.6 8c412b32d1 feat: add Sora async task API (videos/images)
Add async task management for Sora video/image generation with two
forwarding modes: OAuth (SDK) and API Key (HTTP upstream). Includes
background worker for status polling and 3-layer storage degradation
(S3 > local disk > upstream URL passthrough).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 19:19:11 +08:00
erioandClaude Opus 4.6 4fb58c66c4 chore: bump version to 0.1.93.1
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 18:36:25 +08:00
erio 56d9d5cd60 Merge branch 'release/custom-0.1.92' into release/custom-0.1.93
# Conflicts:
#	backend/ent/group.go
#	backend/ent/group/group.go
#	backend/ent/group/where.go
#	backend/ent/group_create.go
#	backend/ent/group_update.go
#	backend/ent/migrate/schema.go
#	backend/ent/mutation.go
#	backend/ent/runtime/runtime.go
#	backend/ent/schema/group.go
#	backend/go.sum
#	backend/internal/handler/dto/mappers.go
#	backend/internal/repository/group_repo.go
#	frontend/src/views/admin/GroupsView.vue
2026-03-07 18:35:52 +08:00
erioandClaude Opus 4.6 146f0baebc chore: bump version to 0.1.92.19
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 17:31:01 +08:00
erioandClaude Opus 4.6 91c7a4dccb fix: affinity zone filter must run after priority filter in scheduling
classifyByAffinityZone was running before filterByMinPriority, causing
high-priority accounts in the red zone to be removed before priority
filtering, allowing low-priority accounts in the green zone to be
selected instead. Move zone classification into the priority loop so
it operates within same-priority groups, with fallback to next priority
group when current group is entirely in the red zone.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 17:30:48 +08:00
erioandClaude Opus 4.6 3998e58b53 chore: bump version to 0.1.92.18
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 17:20:55 +08:00
Wesley Liddick c2b14693b4 Merge pull request #835 from biubiutata/codex/fix-openai-originator-detection
fix(openai): 统一官方 Codex 客户端识别逻辑
2026-03-07 17:03:52 +08:00
shaw 92d35409de feat: 为openai分组增加messages调度开关和默认映射模型 2026-03-07 17:02:19 +08:00
erioandClaude Opus 4.6 56c2799293 chore: bump version to 0.1.92.17
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 16:56:40 +08:00
erioandClaude Opus 4.6 59869b2b07 feat: client affinity three-zone scheduling model (green/yellow/red)
Backend: Add AffinityZone type with GetAffinityBase/GetAffinityBuffer/GetAffinityZone
methods. Integrate classifyByAffinityZone into Layer 2 scheduling and red zone
check into Layer 1.6 affinity hit path. 17 unit tests covering all zone boundaries.

Frontend: Add AffinityConfigCard for base/buffer configuration in EditAccountModal.
Move affinity badge from status column to capacity column with zone-based coloring
(count/limit format). Extract CapacityBadge and QuotaBadge components to reduce
AccountCapacityCell from 444 to 215 lines.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 16:56:23 +08:00
shaw 351a08f813 fix: announcement强制弹窗通知补全迁移sql 2026-03-07 15:36:18 +08:00
shaw a58dc787a9 fix(ci): 精简golangci-lint配置解决v2.11超时问题
- 移除staticcheck 470+冗余检查项,all已包含全部
- unused: generated-is-used改为true,跳过ent 13万行生成代码分析
- unused: exported-fields-are-used改为true,避免全项目导出字段引用追踪
- unused: field-writes-are-uses改为true
2026-03-07 15:17:16 +08:00
shaw 7079edc2d0 feat: announcement支持强制弹窗通知 2026-03-07 15:06:13 +08:00
erio 1d4e1feb93 chore: bump version to 0.1.92.16 2026-03-07 14:34:08 +08:00
erioandClaude Opus 4.6 e890f177b9 refactor: usage queue groups by proxy exit identity instead of proxy_id
Anthropic OAuth/setup-token accounts are throttled by actual proxy
connection (host:port:username). Other platforms bypass the queue
entirely. Also adds unit tests for affinity and usage queue features.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 14:33:52 +08:00
admin da89583ccc fix(openai): detect official codex client by headers 2026-03-07 14:12:38 +08:00
erioandClaude Opus 4.6 9b382a2dc7 feat: add affinity clients hover popover with last active times
- New API: GET /accounts/:id/affinity-clients returns client list with
  last_active timestamps from Redis ZSET scores
- New Lua script: get_affinity_clients_with_scores.lua uses ZREVRANGEBYSCORE
  WITHSCORES to return both client IDs and their timestamps
- New frontend component: AffinityBadge.vue replaces inline badge with
  hover popover that lazy-loads client details on first hover
- Shows client ID (monospace) + relative time (e.g. "3h ago")

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 13:50:39 +08:00
shaw a42a1f08e9 fix: 编辑error状态账号时保存报Status验证失败
后端UpdateAccountRequest.Status的oneof验证缺少error状态,
前端编辑表单也未处理error状态,导致编辑异常账号时无法保存
2026-03-07 13:47:08 +08:00
shaw ebd5253e22 fix: /response端点移除强制注入大量instructions内容 2026-03-07 13:39:47 +08:00
erio 5f5c41cef6 chore: bump version to 0.1.92.15 2026-03-07 12:53:29 +08:00
erioandClaude Opus 4.6 1864f41f33 merge: sync upstream/main into release/custom-0.1.92
Merge upstream main branch changes including:
- OpenAI Codex support and websearch adaptation
- API key rate limit auto-reset fix
- golangci-lint v2.11 upgrade for Go 1.26 compatibility
- Go 1.26.1 stdlib security fixes
- Empty stream failover fix
- CCSwitch import improvements
- API key credentials preserve existing fields
- Usage query rate limit optimization
- Setup Token real utilization fix

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 12:53:12 +08:00
erio fcdd34ddb0 chore: bump version to 0.1.92.14 2026-03-07 12:34:48 +08:00
erioandClaude Opus 4.6 7d276bc91d fix: ensure Lua scripts are loaded before pipeline EVALSHA calls
Pipeline mode only sends EVALSHA (no automatic fallback to EVAL).
If Redis restarts and script cache is lost, all pipeline Lua calls
silently fail with NOSCRIPT. Add ensureScriptLoaded() to pre-load
scripts before pipeline execution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 12:34:36 +08:00