Skip to content

fix(channel): 修复多密钥管理弹窗索引显示,将索引值调整为从1开始#4231

Merged
Calcium-Ion merged 1 commit intoQuantumNous:mainfrom
wans10:main
Apr 15, 2026
Merged

fix(channel): 修复多密钥管理弹窗索引显示,将索引值调整为从1开始#4231
Calcium-Ion merged 1 commit intoQuantumNous:mainfrom
wans10:main

Conversation

@wans10
Copy link
Copy Markdown
Contributor

@wans10 wans10 commented Apr 14, 2026

⚠️ 提交说明 / PR Notice

Important

  • 统一了“查看密钥”与“多密钥管理”界面的索引编号逻辑,解决了 0 索引与 1 编号混用导致的视觉不一致问题。

📝 变更描述 / Description

优化了多密钥管理界面的交互体验。原本“查看密钥”弹窗使用 1-based 编号(如:密钥 1),而“多密钥管理”使用 0-based 索引(如:#0),这种不一致给用户带来了认知负担。

本次改动仅针对前端显示逻辑,在 MultiKeyManageModal 的表格渲染器中将 index 加 1 显示(#1, #2...),从而确保两个界面的编号完全对齐。该改动不影响后端数据交互逻辑,所有后台请求依然匹配原始索引。

🚀 变更类型 / Type of change

  • 🐛 Bug 修复 (Bug fix)
  • ✨ 新功能 (New feature)
  • ⚡ 性能优化 / 重构 (Refactor) - UI/UX 体验一致性优化
  • 📝 文档更新 (Documentation)

🔗 关联任务 / Related Issue

  • Closes #

✅ 提交前检查项 / Checklist

  • 人工确认: 我已亲自整理并撰写此描述,没有直接粘贴未经处理的 AI 输出。
  • 非重复提交: 我已搜索现有的 Issues 与 PRs,确认不是重复提交。
  • 变更理解: 我已理解这些更改的工作原理及可能影响。
  • 范围聚焦: 本 PR 未包含任何与当前任务无关的代码改动。
  • 本地验证: 已在测试环境下验证索引编号已正确对齐。
  • 安全合规: 代码中无敏感凭据,且符合项目代码规范。

📸 运行证明 / Proof of Work

修改后,“多密钥管理”弹窗中的 #0, #1 索引现已显示为 #1, #2,完美对应“查看密钥”中的 密钥 1, 密钥 2

Summary by CodeRabbit

  • Bug Fixes
    • Fixed table index column display to use 1-based numbering for improved clarity.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ce5f019e-5bc6-4df2-ad3b-c33ff42ff06b

📥 Commits

Reviewing files that changed from the base of the PR and between 8c8661d and 11a4237.

📒 Files selected for processing (1)
  • web/src/components/table/channels/modals/MultiKeyManageModal.jsx

Walkthrough

A single line modification to a table column's render function updates how index values are displayed by coercing them to numbers and incrementing by 1, changing from #${text} to #${Number(text) + 1}.

Changes

Cohort / File(s) Summary
Index Display Update
web/src/components/table/channels/modals/MultiKeyManageModal.jsx
Modified the "索引" column render function to coerce text to a number and add 1 to the displayed index value.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 One little number, a hop and a bound,
Now displayed with precision so sound,
Plus one makes it right, from zero it grows,
A counting fix swift as the wind blows!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly describes the main change: fixing the index display in the multi-key management modal by adjusting it to start from 1, which aligns with the file-level summary and PR objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 and usage tips.

@Calcium-Ion Calcium-Ion merged commit d0c2d2c into QuantumNous:main Apr 15, 2026
2 checks passed
icepie pushed a commit to NiceAIGC/new-api-code that referenced this pull request Apr 17, 2026
icepie pushed a commit to icepie/new-api that referenced this pull request Apr 17, 2026
icepie pushed a commit to icepie/new-api that referenced this pull request Apr 17, 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.

2 participants