sync: bring over remaining release/custom-0.1.115 changes

- Extract PublicSettingsInjectionPayload named struct with drift test
- Add channel_monitor_default_interval_seconds to SSR injection
- Add image_output_price to SupportedModelChip
- Simplify AppSidebar buildSelfNavItems (admins see available channels)
- Add gateway WARN logs for 503 no-available-accounts branches
- Wire ChannelMonitorRunner into provideCleanup for graceful shutdown
- Add migrations 130/131 (CC template userid fix + mimicry field cleanup)
- Clean up fork-only features (sora, claude max simulation, client affinity)
- Remove ~320 obsolete i18n keys
- Add codexUsage utility, WechatServiceButton, BulkEditAccountModal
- Tidy go.sum
This commit is contained in:
erio
2026-04-23 20:55:18 +08:00
parent d5dac84e12
commit 748a84d871
76 changed files with 1380 additions and 1699 deletions

View File

@@ -0,0 +1,40 @@
-- Migration: 115_cleanup_claude_code_mimicry_fields
-- 清理 "Claude Code CLI 模拟套件 (A)" + "Signature Pool (B)" 回滚后遗留的 DB 状态。
--
-- 涉及回滚的功能:
-- - 6d0e0562 feat(fingerprint): Claude Code CLI fingerprint mimicry suite
-- - cfd95669 feat(tls-fingerprint): show binding count + fix randomized fingerprint visibility
-- - 2df77c16/78de54b6/89d14a2 等 Signature Pool 相关 commits
--
-- 需要清理的字段:
-- 1. accounts.extra->>'tls_fingerprint_randomized' — cfd95669 引入的随机指纹标记
-- 2. accounts.extra->>'metadata' (内含 user_id) — sticky session UUID per Claude OAuth account
-- 3. accounts.extra->>'sticky_session_user_id' — sticky session 备用键名(保险)
--
-- 需要清理的索引:
-- - idx_accounts_tls_fp_profile_id — 来自 migration 108加速绑定数聚合查询。
-- 回滚后绑定数 UI 已移除,索引不再被任何查询使用,删除以释放空间。
--
-- 注意:上游已存在的 tls_fingerprint_profile_id / enable_tls_fingerprint 字段保留,
-- 这些是上游 TLS fingerprint profile 功能本身的一部分,不在回滚范围内。
-- 1) 删除 cfd95669 引入的索引
DROP INDEX IF EXISTS idx_accounts_tls_fp_profile_id;
-- 2) 清理 sticky session UUID仅 Claude/Anthropic OAuth/SetupToken 账号会写入此字段)
UPDATE accounts
SET extra = extra - 'metadata'
WHERE deleted_at IS NULL
AND extra ? 'metadata';
-- 3) 清理随机指纹标记
UPDATE accounts
SET extra = extra - 'tls_fingerprint_randomized'
WHERE deleted_at IS NULL
AND extra ? 'tls_fingerprint_randomized';
-- 4) 清理可能残留的 sticky session 备用字段
UPDATE accounts
SET extra = extra - 'sticky_session_user_id'
WHERE deleted_at IS NULL
AND extra ? 'sticky_session_user_id';