IanShaw027
ee3f158f4e
fix(settings): restore wechat and payment config persistence
2026-04-21 17:35:12 +08:00
IanShaw027
d08757ce9e
refactor(admin): remove auth migration reports
2026-04-21 17:34:18 +08:00
IanShaw027
0fcddce69e
fix: reject http responses continuation ids
2026-04-21 13:53:12 +08:00
IanShaw027
65efef1eee
feat: support replacing bound primary email
2026-04-21 13:47:15 +08:00
IanShaw027
561405ab00
feat: add payment order provider snapshots
2026-04-21 12:41:27 +08:00
IanShaw027
9742796ee7
fix: retire public payment verify and backfill trade no
2026-04-21 11:41:02 +08:00
IanShaw027
f398650166
fix: harden oidc compat email and email bind tx
2026-04-21 11:00:08 +08:00
IanShaw027
7e89bca5e6
fix: tighten pending oauth email routing and binding state
2026-04-21 10:41:29 +08:00
IanShaw027
dcd5c43da4
feat: complete email binding and pending oauth verification flows
2026-04-21 10:00:06 +08:00
IanShaw027
09351e9459
fix auth completion and payment resume hardening
2026-04-21 08:23:26 +08:00
IanShaw027
ebe7524415
fix profile activity and migration remediation
2026-04-21 02:08:56 +08:00
IanShaw027
e12599c1b9
fix settings auth source default persistence
2026-04-21 02:08:04 +08:00
IanShaw027
7c6491c2d3
fix auth pending session hardening
2026-04-21 01:45:25 +08:00
IanShaw027
1d8432b8a4
fix: harden payment resume and wxpay webhook routing
2026-04-21 01:40:56 +08:00
IanShaw027
067eb23d8e
Tighten WeChat OAuth capability mode selection
2026-04-21 00:46:40 +08:00
IanShaw027
e4fe9fae2a
Fix profile refresh identity compatibility
2026-04-21 00:42:55 +08:00
IanShaw027
55e8dd550a
Tighten WeChat payment resume flow
2026-04-21 00:33:23 +08:00
IanShaw027
bf3ef2d19a
add admin user last used support
2026-04-21 00:22:17 +08:00
IanShaw027
9204145746
Close profile identity and avatar loop
2026-04-21 00:11:03 +08:00
IanShaw027
9e84e2fd2b
fix: persist admin payment visibility and scheduler settings
2026-04-21 00:05:17 +08:00
IanShaw027
7ef7fd19e7
fix: restore wechat payment oauth and jsapi flow
2026-04-20 23:34:57 +08:00
IanShaw027
724f8e89a1
feat: resolve auth identity migration reports
2026-04-20 22:29:21 +08:00
IanShaw027
452e55a53c
feat: add admin auth identity repair binding
2026-04-20 22:22:14 +08:00
IanShaw027
3bd3027251
feat: expose auth identity migration reports
2026-04-20 22:05:33 +08:00
IanShaw027
aaf4946b27
fix: normalize pending oauth email lookups
2026-04-20 21:59:03 +08:00
IanShaw027
422f60a145
fix: normalize legacy wechat auth identity keys
2026-04-20 21:42:35 +08:00
IanShaw027
f65429145e
fix: route legacy linuxdo users to account binding
2026-04-20 21:31:05 +08:00
IanShaw027
5adefb466b
fix: finalize oauth identity bindings
2026-04-20 21:24:33 +08:00
IanShaw027
9bebf1c1a6
feat: resolve payment results by resume token
2026-04-20 20:53:46 +08:00
IanShaw027
97c9b992cb
fix: require wechat unionid for oauth identity
2026-04-20 20:27:15 +08:00
IanShaw027
b51bc7ee24
feat: wire payment return url payloads
2026-04-20 20:19:23 +08:00
IanShaw027
fb6204ea8b
feat: apply oauth first-bind defaults and pending bind 2fa
2026-04-20 19:53:22 +08:00
IanShaw027
6a75bd77e3
feat: add pending oauth email onboarding flow
2026-04-20 19:30:09 +08:00
IanShaw027
c6d8592484
feat: add profile auth identity binding flow
2026-04-20 18:28:44 +08:00
IanShaw027
13d9780df4
feat: expose user activity timestamps in admin list
2026-04-20 17:48:30 +08:00
IanShaw027
e9de839d87
feat: rebuild auth identity foundation flow
2026-04-20 17:39:57 +08:00
IanShaw027
fbd0a2e3c4
feat: carry suggested third-party profile through pending oauth
2026-04-20 16:27:23 +08:00
IanShaw027
d3d4267731
fix: harden oidc callback security
2026-04-20 16:23:42 +08:00
erio
60614e6f74
fix: gofmt formatting and update API contract test for new fields
...
- Fix gofmt alignment in setting_handler.go, settings.go, payment_config_service.go
- Add payment_balance_recharge_multiplier and payment_recharge_fee_rate
to API contract test expected JSON
2026-04-15 01:39:00 +08:00
erio
98140f6cac
feat(payment): add recharge fee rate setting and fix provider card UI
...
- Add recharge_fee_rate system setting (percentage fee on top of recharge amount)
- Full backend chain: config constant, PaymentConfig struct, update validation,
read/write persistence, DTO, handler GET/PUT responses
- Frontend: settings input with preview, i18n (zh/en), API types
- Fix provider card toggle layout: labels above switches to save width
- Fix Chinese translation: "EasyPay" → "易支付" in provider description
2026-04-15 01:27:24 +08:00
erio
60a4b9316b
feat(payment): balance recharge multiplier and refund amount separation
...
- Add balance_recharge_multiplier system setting (e.g. 1.2 = charge 100 get 120)
- Separate order_amount (credited balance) from pay_amount (actual payment)
- Refund calculates gateway amount proportionally from pay_amount
- Frontend shows both amounts in order details, payment status, refund dialog
- Admin settings UI for configuring recharge multiplier
2026-04-15 01:27:24 +08:00
erio
8548a130c7
fix: Messages() routing refactor and subscription group test coverage
...
- Refactor OpenAI Messages() routing: pre-compute dispatch model using
resolveOpenAIMessagesDispatchMappedModel + NormalizeOpenAICompatRequestedModel
instead of try-fail-retry pattern with gin context passing
- Remove openai_messages_fallback_model context anti-pattern
- Use effectiveMappedModel directly for forward default mapped model
- Add 3 subscription group tests covering all branch paths:
_Blocked (no active subscription → SUBSCRIPTION_REQUIRED),
_RequiresRepo (nil repo → SUBSCRIPTION_REPOSITORY_UNAVAILABLE),
_AllowsActiveSubscription (valid subscription → success)
2026-04-14 20:34:53 +08:00
erio
63f539b382
fix: merge general improvements from release branch
...
Backend:
- gateway_handler: pass subject.UserID instead of int64(0) for user-level routing
- setting_handler: add missing BalanceLowNotifyRechargeURL to UpdateSettings response
- openai_gateway_service: use applyAccountStatsCost for account stats pricing integration
- embed_on: add local file override (data/public/) for embedded frontend assets
Frontend:
- useTableSelection: add batchUpdate method for batch operations
- AccountsView: virtual scrolling params, Set-based isSelected, swipe virtualization
- ProxiesView: add batchUpdate to selection and swipe-select
- BulkEditAccountModal: fix submit handler to prevent event object as argument
- SettingsView: move payload construction outside try block
- i18n: add general translation keys (saved, deleted, view, validation, allowUserRefund)
- api/client: reorder error fields for consistency
- stores/payment: clarify pollOrderStatus JSDoc
2026-04-14 19:29:37 +08:00
erio
58677dd53f
fix: merge 5 PR-related improvements
...
- gateway_handler: pass ParsedRequest to RecordUsage + set in gin.Context
- channel_handler: add FeaturesConfig to CRUD (WebSearch channel toggle)
- channel_repo: features_config JSONB persistence (Create/Get/Update/List)
- security_headers: add Stripe CSP domains (script-src + frame-src)
2026-04-14 18:34:57 +08:00
erio
6ac8ccde46
fix: merge 30 general improvements from release branch
...
Bug fixes:
- Detached context for GetAccountConcurrencyBatch (prevent all-zero on request cancel)
- Filter soft-deleted users in GetByGroupID
- Stripe CSP policy (allow Stripe.js in script-src and frame-src)
- WebSearch API key validation on save
- RECHARGING status in payment result success check
- Windows test fixes (logger Sync deadlock, config path escaping)
Feature enhancements:
- Webhook multi-instance dispatch (extractOutTradeNo + GetWebhookProvider)
- EasyPay mobile H5 payment (device param + PayURL2)
- SSE error propagation in WebSearch emulation
- AccountStatsCost DTO field for admin usage logs
- Plans sort by sort_order instead of created_at
- UsageMapHook for streaming response usage data
- apicompat Instructions field passthrough
- EffectiveLoadFactor for ops concurrency/metrics
- Usage billing RETURNING balance for notify system
- BulkUpdate mixed channel warning with details
- println to slog migration in auth cache
- Wire ProviderSet cleanup
- CI cache-dependency-path optimization
Frontend:
- Refund eligibility check per provider (canRequestRefund)
- Plan sort_order editing
- Dead code cleanup (simulate_claude_max, client_affinity)
- GroupsView platform switch guard
- channels features_config API type
- UsageView account_stats_cost export
2026-04-14 17:35:27 +08:00
erio
f1297a3694
feat: add per-provider allow_user_refund control and align wildcard matching
...
allow_user_refund:
- Add allow_user_refund field to PaymentProviderInstance ent schema
- Migration 103: ALTER TABLE payment_provider_instances ADD COLUMN
- Cascade logic: disabling refund_enabled auto-disables allow_user_refund
- User refund validation: check provider instance allows user refund
- Admin refund validation: check provider instance allows admin refund
- Subscription refund: deduct days on refund, rollback on failure
- New endpoint: GET /payment/orders/refund-eligible-providers
- Frontend: ToggleSwitch in ProviderCard/Dialog, cascade in SettingsView
Wildcard matching:
- Change findPricingForModel from "longest prefix wins" to "config order
priority (first match wins)", aligning with channel service behavior
2026-04-14 16:26:46 +08:00
erio
e8ee400a3f
fix: resolve remaining lint errors for upstream CI
...
- Fix errcheck: brave.go resp.Body.Close, manager_test.go Encode
- Fix gofmt: payment_config_service.go
- Fix unused: use shouldFallbackGeminiModel (with modelName param) in handler
2026-04-14 12:19:44 +08:00
erio
6a08efeef9
fix: resolve upstream CI failures (lint, test, gofmt)
...
- Fix errcheck: handle Write/Encode return values in brave_test.go
- Fix errcheck: defer resp.Body.Close() with _ assignment in tavily.go
- Fix gofmt: payment.go, channel.go, payment_config_providers.go
- Fix unused: remove dead decodeURLValue in easypay.go
- Restore shouldFallbackGeminiModel function (deleted during cherry-pick)
- Add missing balanceNotifyService param to NewGatewayService in test
- Fix platform default test expectation (empty stays empty)
- Fix wildcard pricing test (longest prefix wins, not config order)
- Fix subscription group test (SUBSCRIPTION_REPOSITORY_UNAVAILABLE)
2026-04-14 12:11:08 +08:00
erio
24e16b7f59
fix: restore resolveOpenAIMessagesDispatchMappedModel and reset VERSION
...
- Restore function deleted during cherry-pick conflict resolution
- Reset VERSION to upstream 0.1.112
2026-04-14 10:58:51 +08:00
erio
d6965b0676
fix: resolve cherry-pick conflicts and restore compilation
...
- Restore gateway_cache.go to upstream (no lua embeds)
- Restore payment_order.go to upstream (use out_trade_no lookup)
- Restore payment_fulfillment.go to upstream (same reason)
- Add FeaturesConfig field and IsWebSearchEmulationEnabled to Channel
- Add applyAccountStatsCost wrapper function
- Add SettingKeyWebSearchEmulationConfig constant
- Add WebSearchEmulationEnabled to SystemSettings
- Add notify code rate limiting methods to EmailCache interface
- Remove AllowUserRefund references (ent schema not present)
- Fix duplicate import in payment_handler.go
- Fix wire_gen.go argument mismatches
2026-04-14 10:18:39 +08:00