5788 Commits

Author SHA1 Message Date
zizi
fa77659fe8 fix(concurrency): wait when channel slots are saturated
Add a channel concurrency wait plan so saturated account/channel selection can distinguish no-wait, queue-full, and wait-for-slot outcomes while preserving fallback to other available channels first.
2026-05-25 00:37:43 +08:00
zizi
7a2fc8683c fix(i18n): localize new admin UI copy 2026-05-20 23:02:40 +08:00
zizi
0ff2fff94d feat: add promo code management and payment settings
Add default-web promo code CRUD, user/channel concurrency controls, and domestic Alipay/Wxpay billing settings. Harden promo code validation and preserve explicit zero concurrency limits with backend regression coverage.
2026-05-20 21:45:28 +08:00
zizi
36b742ad3d fix: harden payment and background edge cases
Acknowledge unrecoverable direct payment callback mismatches, tolerate missing affiliate users during rebate processing, and make channel monitor runner shutdown wait for checks safely.
2026-05-20 16:37:21 +08:00
zizi
b636142e27 fix: schedule affiliate rebate releases
Run an hourly rebate release task at startup so frozen affiliate rebates become transferable after expiry.
2026-05-20 15:56:46 +08:00
zizi
b4ee983d1d fix: validate direct payment callback amounts
Check direct payment callback currency, provider, and paid amount before settling Alipay or WxPay top-ups.
2026-05-20 15:49:08 +08:00
zizi
03e440b005 fix: apply affiliate rebates on topups
Move rebate processing into model transactions, keep frozen rebates out of transferable quota until release, and trigger top-up rebates idempotently.
2026-05-20 15:47:00 +08:00
zizi
9264873e2c fix: load direct payment options
Register Alipay and WxPay option keys and sync option updates into runtime payment settings.
2026-05-20 15:41:36 +08:00
zizi
0625c6304b fix: protect channel monitor dial targets
Validate resolved dial IPs in the channel monitor HTTP transport so DNS rebinding cannot bypass SSRF checks.
2026-05-20 15:41:06 +08:00
zizi
24235f2872 fix: start channel monitor background tasks
Start the channel monitor runner and maintenance loop during service boot so scheduled checks, rollups, and cleanup run automatically.
2026-05-20 15:40:34 +08:00
zizi
df5114cc4a feat: register direct payment routes
Wire Alipay and WxPay direct payment endpoints and add provider payload storage to top-up records.
2026-05-20 15:22:38 +08:00
zizi
56a9b1e956 feat: add wxpay direct payment flow
Add WxPay settings, APIv3 provider implementation, create/notify handlers, and provider-specific top-up settlement.
2026-05-20 15:18:17 +08:00
zizi
6405a21e60 feat: add alipay direct payment flow
Add Alipay settings, RSA2 provider implementation, create/return/notify handlers, and provider-specific top-up settlement.
2026-05-20 15:05:38 +08:00
zizi
597fe545b7 feat: add payment encryption helpers
Add AES-GCM encryption utilities for payment credentials with key length and ciphertext validation.
2026-05-20 14:53:18 +08:00
zizi
27a452f8d3 feat: add payment provider contract
Introduce shared payment request, response, order status, and provider interface types.
2026-05-20 14:48:48 +08:00
zizi
cf5160c9f2 feat: add concurrency ops snapshot API
Expose admin Redis snapshot for user and channel concurrency plus current user RPM usage.
2026-05-20 14:46:06 +08:00
zizi
3a25007df2 feat: enforce relay concurrency limits
Add user RPM and concurrency middleware, enforce channel concurrency for relay selection and retry paths, and wire checks into relay routes.
2026-05-20 14:40:36 +08:00
zizi
f069f98b35 feat: add concurrency guard service
Add Redis-backed user and channel concurrency slots plus user RPM checks with fail-open behavior.
2026-05-20 14:27:18 +08:00
zizi
befce8a55c feat: add concurrency limit fields
Add user and channel model fields for concurrency and RPM controls.
2026-05-20 14:21:59 +08:00
zizi
886d32f255 feat: add affiliate admin API
Add admin endpoints for affiliate overview, invites, rebates, transfers, user overrides, batch rate updates, and global rebate config.
2026-05-20 14:18:06 +08:00
zizi
6f134b1a83 feat: add affiliate rebate service
Implement rebate calculation, idempotent record creation, frozen release handling, and tests for rebate configuration behavior.
2026-05-20 14:03:16 +08:00
zizi
16b2853d62 feat: add rebate data models
Add affiliate rebate configuration fields, option defaults, and rebate record persistence for the rebate workflow.
2026-05-20 13:55:41 +08:00
zizi
959ee42bcb feat: add channel monitor rollups
Aggregate monitor history into daily rollups and add maintenance helpers for rollup refresh and history cleanup.
2026-05-20 13:51:22 +08:00
zizi
564a9619ed feat: add channel monitor admin API
Add admin endpoints to manage monitors, run probes, and inspect history and rollups.
2026-05-20 13:44:06 +08:00
zizi
8f91ab1eb6 feat: add channel monitor runner
Implement monitor probe execution, history recording, redirect-safe target checks, and a background runner for due monitors.
2026-05-20 13:38:42 +08:00
zizi
a63300fc1f feat: add channel monitor safety helpers
Add default probe prompts and SSRF validation for channel monitor targets, with focused tests for blocked internal addresses.
2026-05-20 13:28:58 +08:00
zizi
5154ca2e4d feat: add channel monitor data models
Add monitor configuration, history, and daily rollup models for the operations channel monitoring module.
2026-05-20 13:21:11 +08:00
zizi
eec9f4dcae feat: add user announcement endpoints
Expose active announcements to authenticated users, track read state, and feed active database announcements into /api/status with legacy fallback.
2026-05-20 13:15:35 +08:00
zizi
d9d79638c0 feat: add announcement admin API
Add authenticated admin endpoints to create, edit, list, and archive announcements with safe HTML rendering.
2026-05-20 13:06:58 +08:00
zizi
6a409b7724 feat: add announcement data models
Add announcement and read-tracking models with active/unread query helpers for the operations announcement system.
2026-05-20 13:01:47 +08:00
zizi
1de1cdb14f feat: add promo code bonus flow
Add promo code models and APIs, persist selected promo codes on top-up orders, and apply bonus quota idempotently when payments complete.
2026-05-20 12:57:54 +08:00
zizi
059512f6ef docs: add operations capability implementation plan
Document the six-module operations roadmap and executable task breakdown for promo codes, announcements, channel monitoring, rebates, concurrency controls, and domestic payments.
2026-05-20 12:57:40 +08:00
zizi
f245e9bdf5 feat: add channel quota reset controls
Add per-channel quota limits with reset scheduling and runtime checks so channel capacity can be capped and restored on configured periods.
2026-05-20 12:57:19 +08:00
zizi
0a0616a370 feat: add subscription redemption support to redemption codes
Redemption codes can now redeem either quota (existing) or a subscription
plan (new). The Redemption model gains Type (1=quota, 2=subscription) and
PlanId fields. When Type=2, Redeem() calls CreateUserSubscriptionFromPlanTx
to activate the plan, reusing all existing subscription logic (purchase
limits, group upgrade, quota reset, expiry). Old codes default to Type=0
which behaves identically to Type=1 (quota).
2026-05-19 01:10:14 +08:00
zizi
e6bced5dc2 chore: rebuild dev/1.0.0 from main with docs and deploy config
- Rebase dev/1.0.0 on latest upstream main (drop Muse relay code)
- Preserve: troubleshooting records, remote layout, Docker deploy workflow
- Simplify docker-compose.yml to app-only (external PG/Redis)
- Add ops/remote/ host documentation
- Update .env.example with host/docker connection profiles
2026-05-18 23:39:31 +08:00
NitroFire
5dd0d3bcbd
fix: add analytics placeholder (#4928) 2026-05-17 18:54:39 +08:00
QuentinHsu
f69ceb6967
fix: 修复新 UI 语言与文案显示问题 (#4876)
* chore(dev): add local setup state reset target

- add a reset-setup make target to clear setup records, root users, and related options.
- support both docker dev PostgreSQL and local SQLite development databases.
- restart the docker dev backend so setup status is recalculated after reset.

* fix(chat): prevent preset menu text overflow

- add truncation layout for chat preset names to keep long labels inside the sidebar menu.
- prevent loading and external-link icons from shrinking in constrained menu rows.

* fix(i18n): translate dashboard granularity options

- call t() for granularity option labels in dashboard system settings.
- keep localized text consistent between the select trigger and dropdown items.

* chore(dev): add backend dev service rebuild target

- add a dev-api-rebuild make target to rebuild and start the docker backend service.
- reuse DEV_COMPOSE_FILE and DEV_BACKEND_SERVICE variables to avoid repeated compose config literals.

* fix(i18n): align interface language option labels

- add shared interface language options to keep display names consistent.
- reuse the shared options in the header switcher and profile preferences.
- normalize language codes so zh-CN and zh_CN resolve to Simplified Chinese.

* fix(i18n): add missing frontend translation keys

- route channel key prompts, form validation messages, and channel fallback text through i18n.
- add missing translations across six locales for channels, rankings, billing, and logs.
- update i18n sync reports so literal t() keys are present in the base locale.
2026-05-17 11:45:27 +08:00
Seefs
68830e6097
feat: support request_header key source (#4903)
* feat: support request_header key source in backend and settings UI

* feat: support request_header channel affinity source
2026-05-17 11:44:38 +08:00
yyhhyyyyyy
2d968c3eab
fix: apply group filter to channel list queries (#4885) 2026-05-17 11:44:07 +08:00
Seefs
cb7a61466e
Merge pull request #4684 from SAY-5/fix/perf-metric-ambiguous-column
fix: qualify column names in PerfMetric upsert to avoid PG ambiguity
2026-05-16 22:11:38 +08:00
DraftGo
132d7b9f94
fix: GetAllChannels ignores group filter parameter (#4847)
When users filter channels by group without entering a search keyword,
the frontend calls GetAllChannels (GET /api/channel/) instead of
SearchChannels. However, GetAllChannels did not process the group
query parameter, causing the filter to have no effect.

Added group filtering logic to GetAllChannels for both normal mode
and tag mode, using the same CONCAT/|| pattern as SearchChannels
for cross-database compatibility (MySQL, PostgreSQL, SQLite).
2026-05-16 14:54:50 +08:00
yyhhyyyyyy
6f8668e4c3
fix: enforce header nav access control for public modules (#4889) 2026-05-16 14:54:47 +08:00
yyhhyyyyyy
8a10dedb7d
fix(web): handle unlimited API key quota validation (#4881) 2026-05-16 14:54:35 +08:00
yyhhyyyyyy
554defe4f4
fix: correct usage logs filtering (#4883) 2026-05-16 14:54:23 +08:00
yyhhyyyyyy
8f9ee9ba88
fix: allow clearing channel remark (#4886) 2026-05-16 14:54:18 +08:00
CaIon
3caa6e467b
fix(web/default): batch fix new UI issues #4880 #4893 #4817 #4877 #4898
- Add singleSelect to status/role filters in API keys, users, and redemptions tables (#4880)
- Fix affiliate link 404 by changing /register to /sign-up (#4893)
- Open FetchModelsDialog in channel creation mode via customFetcher prop (#4817)
- Add TruncatedText component with tooltip for long channel names, token names, and usernames (#4877)
- Elevate forgot-password link z-index to prevent label click interception (#4898)
2026-05-16 14:48:49 +08:00
CaIon
18282e610d
chore(deps): update axios from 1.15.0 to 1.15.2 2026-05-13 22:23:45 +08:00
skynono
51b5cbe1bd
fix: prevent combobox from over-filtering options on focus (#4829) 2026-05-13 22:21:24 +08:00
dependabot[bot]
3e588b4d4f
chore(deps-dev): bump ip-address from 10.1.0 to 10.2.0 in /electron (#4811)
Bumps [ip-address](https://github.com/beaugunderson/ip-address) from 10.1.0 to 10.2.0.
- [Commits](https://github.com/beaugunderson/ip-address/commits)

---
updated-dependencies:
- dependency-name: ip-address
  dependency-version: 10.2.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-13 22:21:03 +08:00
CaIon
0526a22643
feat: require compliance confirmation for paid features
Gate payment, redemption, subscription, and invitation reward flows behind an audited compliance acknowledgement.
2026-05-13 22:18:46 +08:00