Skip to content

Incorrect operation, please ignore - #6676

Closed
MinTiang wants to merge 6 commits into
QuantumNous:mainfrom
MinTiang:main
Closed

Incorrect operation, please ignore#6676
MinTiang wants to merge 6 commits into
QuantumNous:mainfrom
MinTiang:main

Conversation

@MinTiang

@MinTiang MinTiang commented Aug 6, 2026

Copy link
Copy Markdown

⚠️ 提交说明 / PR Notice

Important

  • 请提供人工撰写的简洁摘要,避免直接粘贴未经整理的 AI 输出。

📝 变更描述 / Description

(简述:做了什么?为什么这样改能生效?请基于你对代码逻辑的理解来写,避免粘贴未经整理的内容)

🚀 变更类型 / Type of change

  • 🐛 Bug 修复 (Bug fix) - 请关联对应 Issue,避免将设计取舍、理解偏差或预期不一致直接归类为 bug
  • ✨ 新功能 (New feature) - 重大特性建议先通过 Issue 沟通
  • ⚡ 性能优化 / 重构 (Refactor)
  • 📝 文档更新 (Documentation)

🔗 关联任务 / Related Issue

  • Closes # (如有)

✅ 提交前检查项 / Checklist

  • 人工确认: 我已亲自整理并撰写此描述,没有直接粘贴未经处理的 AI 输出。
  • 非重复提交: 我已搜索现有的 IssuesPRs,确认不是重复提交。
  • Bug fix 说明: 若此 PR 标记为 Bug fix,我已提交或关联对应 Issue,且不会将设计取舍、预期不一致或理解偏差直接归类为 bug。
  • 变更理解: 我已理解这些更改的工作原理及可能影响。
  • 范围聚焦: 本 PR 未包含任何与当前任务无关的代码改动。
  • 本地验证: 已在本地运行并通过测试或手动验证,维护者可以据此复核结果。
  • 安全合规: 代码中无敏感凭据,且符合项目代码规范。

📸 运行证明 / Proof of Work

(请在此粘贴截图、关键日志或测试报告,以证明变更生效)

Summary by CodeRabbit

  • New Features
    • Added optional registration-code requirements for account creation, including OAuth and WeChat sign-up.
    • Added registration-code management for administrators, with generation, search, status controls, expiration, copying, and cleanup.
    • Added LINUX DO Credit as a top-up payment method with configurable settings.
    • Added request endpoint statistics with time-range filtering and user-scoped views.
    • Added user-agent visibility in usage logs.
  • Bug Fixes
    • Improved client IP detection and redemption-code search behavior.
    • Updated check-in reward inputs to use display currency and token values.
  • Localization
    • Added translations for registration codes, payments, and request statistics.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 89ce3a12-d532-4d8c-b851-b0868b389f70

📥 Commits

Reviewing files that changed from the base of the PR and between 0ab0202 and a030fda.

📒 Files selected for processing (92)
  • .github/workflows/docker-build.yml
  • VERSION
  • common/client_ip.go
  • common/client_ip_test.go
  • common/constants.go
  • controller/audit.go
  • controller/log.go
  • controller/misc.go
  • controller/oauth.go
  • controller/payment_webhook_availability.go
  • controller/payment_webhook_availability_test.go
  • controller/registration_code.go
  • controller/topup.go
  • controller/topup_linuxdo_credit.go
  • controller/user.go
  • controller/wechat.go
  • i18n/keys.go
  • i18n/locales/en.yaml
  • i18n/locales/zh-CN.yaml
  • i18n/locales/zh-TW.yaml
  • middleware/audit.go
  • model/log.go
  • model/log_request_stats_test.go
  • model/main.go
  • model/option.go
  • model/redemption.go
  • model/redemption_test.go
  • model/registration_code.go
  • model/topup.go
  • model/user.go
  • router/api-router.go
  • setting/payment_linuxdo_credit.go
  • web/classic/src/components/settings/personal/cards/NotificationSettings.jsx
  • web/classic/src/components/table/usage-logs/UsageLogsColumnDefs.jsx
  • web/classic/src/hooks/usage-logs/useUsageLogsData.jsx
  • web/default/src/features/auth/api.ts
  • web/default/src/features/auth/lib/storage.ts
  • web/default/src/features/auth/sign-in/components/user-auth-form.tsx
  • web/default/src/features/auth/sign-up/components/sign-up-form.tsx
  • web/default/src/features/auth/types.ts
  • web/default/src/features/profile/components/tabs/notification-tab.tsx
  • web/default/src/features/redemption-codes/components/redemptions-mutate-drawer.tsx
  • web/default/src/features/redemption-codes/components/redemptions-table.tsx
  • web/default/src/features/registration-codes/api.ts
  • web/default/src/features/registration-codes/index.tsx
  • web/default/src/features/registration-codes/registration-codes-table.tsx
  • web/default/src/features/registration-codes/types.ts
  • web/default/src/features/system-settings/auth/basic-auth-section.tsx
  • web/default/src/features/system-settings/auth/index.tsx
  • web/default/src/features/system-settings/auth/section-registry.tsx
  • web/default/src/features/system-settings/billing/index.tsx
  • web/default/src/features/system-settings/billing/section-registry.tsx
  • web/default/src/features/system-settings/general/checkin-settings-section.tsx
  • web/default/src/features/system-settings/integrations/payment-method-dialog.tsx
  • web/default/src/features/system-settings/integrations/payment-methods-visual-editor.tsx
  • web/default/src/features/system-settings/integrations/payment-settings-section.tsx
  • web/default/src/features/system-settings/maintenance/config.ts
  • web/default/src/features/system-settings/maintenance/sidebar-modules-section.tsx
  • web/default/src/features/system-settings/types.ts
  • web/default/src/features/usage-logs/api.ts
  • web/default/src/features/usage-logs/components/columns/common-logs-columns.tsx
  • web/default/src/features/usage-logs/components/dialogs/details-dialog.tsx
  • web/default/src/features/usage-logs/components/request-endpoint-stats.tsx
  • web/default/src/features/usage-logs/index.tsx
  • web/default/src/features/usage-logs/lib/format.ts
  • web/default/src/features/usage-logs/lib/index.ts
  • web/default/src/features/usage-logs/lib/utils.ts
  • web/default/src/features/usage-logs/section-registry.tsx
  • web/default/src/features/usage-logs/types.ts
  • web/default/src/features/wallet/api.ts
  • web/default/src/features/wallet/components/recharge-form-card.tsx
  • web/default/src/features/wallet/components/subscription-plans-card.tsx
  • web/default/src/features/wallet/constants.ts
  • web/default/src/features/wallet/hooks/use-payment.ts
  • web/default/src/features/wallet/lib/billing.ts
  • web/default/src/features/wallet/lib/payment.ts
  • web/default/src/features/wallet/lib/ui.tsx
  • web/default/src/features/wallet/types.ts
  • web/default/src/hooks/use-sidebar-config.ts
  • web/default/src/hooks/use-sidebar-data.ts
  • web/default/src/i18n/locales/en.json
  • web/default/src/i18n/locales/fr.json
  • web/default/src/i18n/locales/ja.json
  • web/default/src/i18n/locales/ru.json
  • web/default/src/i18n/locales/vi.json
  • web/default/src/i18n/locales/zh-TW.json
  • web/default/src/i18n/locales/zh.json
  • web/default/src/i18n/static-keys.ts
  • web/default/src/lib/oauth.ts
  • web/default/src/routeTree.gen.ts
  • web/default/src/routes/_authenticated/registration-codes/index.tsx
  • web/default/src/routes/oauth/$provider.tsx

Walkthrough

The change adds registration-code enforcement and administration, LinuxDO Credit payments, request endpoint statistics, centralized client-IP capture, user-agent logging, related UI changes, localization, and Docker publishing updates.

Changes

Registration-code lifecycle

Layer / File(s) Summary
Backend validation and persistence
model/registration_code.go, controller/registration_code.go, controller/user.go, controller/oauth.go, controller/wechat.go
Registration codes can be generated, searched, updated, deleted, redeemed transactionally, and enforced during account creation.
Administration and authentication UI
web/default/src/features/registration-codes/*, web/default/src/features/auth/*, web/default/src/routes/_authenticated/registration-codes/*
The web application adds registration-code management, storage, authentication inputs, validation, route protection, and sidebar navigation.

LinuxDO Credit payments

Layer / File(s) Summary
Payment processing
controller/topup_linuxdo_credit.go, model/topup.go, router/api-router.go, setting/payment_linuxdo_credit.go
LinuxDO Credit supports amount calculation, payment creation, callback verification, idempotent recharge processing, and configuration validation.
Settings and wallet integration
web/default/src/features/system-settings/integrations/*, web/default/src/features/wallet/*
The web application adds LinuxDO Credit settings, payment selection, wallet requests, icons, minimum amounts, and payment-flow documentation.

Observability

Layer / File(s) Summary
Client metadata and aggregation
common/client_ip.go, model/log.go, controller/log.go
Client IP resolution now accepts valid Cloudflare headers, user-agent metadata is persisted, and endpoint statistics aggregate request outcomes, tokens, quota, and response time.
Statistics and usage-log UI
web/default/src/features/usage-logs/*, web/classic/src/components/table/usage-logs/*
The interfaces add request statistics views and display recorded IP addresses and user agents.

Supporting updates

Layer / File(s) Summary
Redemption and settings updates
model/redemption.go, web/default/src/features/redemption-codes/*, web/default/src/features/system-settings/general/*, web/default/src/features/profile/*
Redemption searches include code substrings, generated codes remain visible for copying, check-in rewards use display units, and record-IP preference controls are removed.
Localization and release metadata
web/default/src/i18n/locales/*, VERSION, .github/workflows/docker-build.yml
New interface strings are localized, the version is set to v1.0.3, and Docker publishing targets mintiang/new-api.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related PRs

Suggested reviewers: calcium-ion, t0ng7u

Poem

A rabbit checks each code with care,
And sends LinuxDO coins through air.
Logs count requests, clear and bright,
IPs and agents come to light.
New routes bloom in version three—
Hop, hop, shipped successfully!

✨ Finishing Touches 💡 1
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch main
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Warning

⚠️ This pull request has been flagged as potential spam (promotional) by CodeRabbit slop detection and should be reviewed carefully.

@MinTiang MinTiang closed this Aug 6, 2026
@MinTiang MinTiang reopened this Aug 6, 2026
@MinTiang MinTiang closed this Aug 6, 2026
@MinTiang MinTiang changed the title 同步主项目代码 Incorrect operation, please ignore Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant