Skip to content

feat: optimize legacy top-up warning banner copy (#5851) - #5855

Merged
Calcium-Ion merged 2 commits into
QuantumNous:mainfrom
Gravirei:bug-fix-01
Jul 6, 2026
Merged

feat: optimize legacy top-up warning banner copy (#5851)#5855
Calcium-Ion merged 2 commits into
QuantumNous:mainfrom
Gravirei:bug-fix-01

Conversation

@Gravirei

@Gravirei Gravirei commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

📝 变更描述 / Description

优化了“充值(Top-up)”日志详情中对于旧版本/历史记录审计信息缺少的提示文案(修复了 Issue #5851)。

此前,当充值日志行因在审计功能启用前被写入而缺少 admin_info 时,系统会弹出警告横幅,推荐用户“将实例升级至最新版本”。然而,即使当前运行实例已是最新版本,该历史记录也无法补全审计信息,因而在当前运行实例已经是最新的情况下,该升级建议容易误导管理员。

本变更仅为极其局限的文案/国际化 (i18n) 键值与翻译调整(不包含任何行为或逻辑变更),将该横幅文案调整为说明该日志是历史记录、无法自动补齐,并明确指出当前实例已经支持在新记录中写入完整的审计字段:

  • zh (Simplified): 该条历史记录缺少审计字段。当前版本已支持记录服务器 IP、回调 IP、支付方式与系统版本等审计信息;这些字段仅会写入后续新产生的记录,历史记录无法自动补齐。
  • zh-TW (Traditional): 該筆歷史記錄缺少審計欄位。目前版本已支援記錄伺服器 IP、回調 IP、付款方式與系統版本等審計資訊;這些欄位僅會寫入後續新產生的記錄,歷史記錄無法自動補齊。
  • en: This historical record predates audit-info tracking and cannot be backfilled. The current instance already records server IP, callback IP, payment method, and system version for new top-ups going forward.
  • ru: Эта историческая запись была создана до появления функции аудита и не содержит данных аудита. Текущая версия уже поддерживает запись IP-адреса сервера, IP обратного вызова, способа оплаты и версии системы, но эти поля будут заполняться только в новых записях — восполнить их в старых записях задним числом невозможно.
  • ja: このレコードは監査情報の記録に対応する前の履歴データのため、監査情報がありません。現在のバージョンではサーバーIP、コールバックIP、支払い方法、システムバージョンなどの監査情報を記録できますが、これらは今後新しく作成されるレコードにのみ適用され、過去のレコードを遡って補完することはできません。
  • vi: Bản ghi lịch sử này được tạo trước khi tính năng thông tin kiểm toán ra đời nên thiếu dữ liệu kiểm toán. Phiên bản hiện tại đã hỗ trợ ghi lại IP máy chủ, IP gọi lại, phương thức thanh toán và phiên bản hệ thống, nhưng các trường này chỉ được ghi cho các bản ghi mới về sau — không thể bổ sung hồi tố cho bản ghi cũ.
  • fr: Cet enregistrement historique date d'avant le suivi des informations d'audit et ne peut pas être complété rétroactivement. La version actuelle enregistre déjà l'IP du serveur, l'IP de rappel, le mode de paiement et la version du système pour les nouveaux paiements à venir.

此变更同时覆盖了 default 主题和 classic 主题,且为纯粹的行内文本替换,未引入任何排序或冗余键变动。

🚀 变更类型 / Type of change

🔗 关联任务 / Related Issue

✅ 提交前检查项 / Checklist

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

📸 运行证明 / Proof of Work

由验证人员依据修复指南,在本地移除对应充值日志的 admin_info 字段后,分别针对 defaultclassic 主题在页面弹窗进行视觉确认及截图。

Summary by CodeRabbit

  • Bug Fixes
    • Updated the warning shown for historical top-up/audit records to clearly explain that older records can’t be backfilled with audit details.
    • Clarified that future records will include server IP, callback IP, payment method, and system version.
    • Refined the warning text across multiple languages for consistent, updated wording.

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Updated the historical top-up audit warning in both classic and default usage-log views, along with the matching locale strings in all supported languages. The text now states the record predates audit-info tracking, cannot be backfilled, and only future top-ups will include the listed audit fields.

Changes

Audit-info warning text update

Layer / File(s) Summary
Classic UI audit warning and translations
web/classic/src/hooks/usage-logs/useUsageLogsData.jsx, web/classic/src/i18n/locales/en.json, fr.json, ja.json, ru.json, vi.json, zh-CN.json, zh-TW.json
Fallback text for missing admin_info and the classic locale entries were changed from upgrade guidance to historical-record/backfill wording.
Default UI audit warning and translations
web/default/src/features/usage-logs/components/dialogs/details-dialog.tsx, web/default/src/i18n/locales/en.json, fr.json, ja.json, ru.json, vi.json, zh.json
The legacy top-up warning text and matching default locale entries were updated to the same historical-record clarification.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Poem

A bunny read the logs with care,
And tidied warnings everywhere.
Old records stay, new fields begin,
The right words hop to users in. 🐰

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: updating the legacy top-up warning copy.
Linked Issues check ✅ Passed The copy changes match issue #5851 by clarifying historical records, no backfill, and future audit fields across both themes and locales.
Out of Scope Changes check ✅ Passed All changes are limited to banner copy and locale strings, with no unrelated logic or behavior changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches
🧪 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@web/default/src/i18n/locales/vi.json`:
- Line 4357: The Vietnamese translation string in vi.json uses a full-width CJK
period at the end instead of the standard Latin period, which is inconsistent
with the rest of the locale file. Update the affected JSON entry in the locale
map to use a regular "." at the end of the translated text, keeping the rest of
the string unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7ff19e10-7bae-4faf-82f9-75a042ed78c4

📥 Commits

Reviewing files that changed from the base of the PR and between 52858ad and a2bc58c.

📒 Files selected for processing (15)
  • web/classic/src/hooks/usage-logs/useUsageLogsData.jsx
  • web/classic/src/i18n/locales/en.json
  • web/classic/src/i18n/locales/fr.json
  • web/classic/src/i18n/locales/ja.json
  • web/classic/src/i18n/locales/ru.json
  • web/classic/src/i18n/locales/vi.json
  • web/classic/src/i18n/locales/zh-CN.json
  • web/classic/src/i18n/locales/zh-TW.json
  • web/default/src/features/usage-logs/components/dialogs/details-dialog.tsx
  • 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.json

Comment thread web/default/src/i18n/locales/vi.json Outdated
@Calcium-Ion
Calcium-Ion merged commit 1e80ce0 into QuantumNous:main Jul 6, 2026
1 check passed
52assert added a commit to 52assert/new-api that referenced this pull request Jul 7, 2026
…codes

* origin/main: (180 commits)
  fix(billing): extend quantity validation and saturating conversions to remaining paths
  fix(billing): validate quantity parameters and harden quota calculations
  Fix/build date dns error (QuantumNous#5945)
  fix: avoid stale stream writes after client disconnect (QuantumNous#5710)
  feat(group): enhance group ratio editor with improved visibility rules and JSON parsing
  feat: optimize legacy top-up warning banner copy (QuantumNous#5851) (QuantumNous#5855)
  fix(web): redirect authenticated users away from sign-up page (QuantumNous#5910)
  feat(ssrf): implement SSRF protection in HTTP clients and validation functions
  feat(user): better messages for redeem failures
  fix(html): 修复 Shadow DOM 隔离渲染下深浅色模式无法自动切换的问题 (QuantumNous#5890)
  fix(web): sync home iframe theme and language (QuantumNous#5917)
  fix: 任务差额结算后 quota 和阿里视频时长优化 (QuantumNous#5923)
  fix(web): refine mobile user cards
  test(user): cover self-service password update guard
  feat(session): support opt-in Secure session cookies
  fix(auth): allow read-only access for non-disabled tokens
  fix(user): harden account email and password handling
  fix: align dynamic pricing style with log details dialog sections
  fix(channels): show field passthrough controls for Codex (QuantumNous#5902)
  fix(user): trim whitespace from username and validate input
  ...

# Conflicts:
#	controller/redemption.go
#	controller/user.go
#	model/option.go
#	model/redemption.go
#	model/user.go
#	web/default/src/features/auth/api.ts
#	web/default/src/features/redemption-codes/api.ts
#	web/default/src/features/redemption-codes/components/redemptions-provider.tsx
#	web/default/src/features/redemption-codes/components/redemptions-table.tsx
#	web/default/src/features/redemption-codes/constants.ts
#	web/default/src/hooks/use-sidebar-data.ts
#	web/default/src/i18n/static-keys.ts
#	web/default/src/routes/__root.tsx
xiaomingchen pushed a commit to xiaomingchen/new-api that referenced this pull request Jul 10, 2026
…uantumNous#5855)

* feat: optimize legacy top-up warning banner copy (QuantumNous#5851)

* fix(i18n): use standard Latin period at the end of Vietnamese translations
Jacobinwwey pushed a commit to Jacobinwwey/new-api that referenced this pull request Jul 11, 2026
…uantumNous#5855)

* feat: optimize legacy top-up warning banner copy (QuantumNous#5851)

* fix(i18n): use standard Latin period at the end of Vietnamese translations
ruanhangjian pushed a commit to ruanhangjian/new-api that referenced this pull request Jul 11, 2026
…uantumNous#5855)

* feat: optimize legacy top-up warning banner copy (QuantumNous#5851)

* fix(i18n): use standard Latin period at the end of Vietnamese translations
lizhongyi1209 pushed a commit to lizhongyi1209/new-api that referenced this pull request Jul 13, 2026
…uantumNous#5855)

* feat: optimize legacy top-up warning banner copy (QuantumNous#5851)

* fix(i18n): use standard Latin period at the end of Vietnamese translations

(cherry picked from commit 1e80ce0)
zhaodechao2008 pushed a commit to zhaodechao2008/new-api that referenced this pull request Jul 27, 2026
…uantumNous#5855)

* feat: optimize legacy top-up warning banner copy (QuantumNous#5851)

* fix(i18n): use standard Latin period at the end of Vietnamese translations
330079598 pushed a commit to 330079598/new-api that referenced this pull request Aug 19, 2026
…uantumNous#5855)

* feat: optimize legacy top-up warning banner copy (QuantumNous#5851)

* fix(i18n): use standard Latin period at the end of Vietnamese translations
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.

充值日志详情中旧版本审计信息提示文案容易误导

2 participants