feat: 优化调用方密钥汇总排序#146
Merged
Merged
Conversation
Author
|
希望该功能也合并到CPA-Manager-plus,改完才发现有CPA-Manager-plus已经没有力气单独提交pr了 |
Owner
|
感谢 PR。 我做了一轮代码级审查,整体实现比较清晰,改动范围也很可控。这个 PR 主要是给“调用方密钥汇总”补齐独立排序状态、排序下拉和表头点击排序,并且排序发生在分页之前,和现有“账号汇总”的交互逻辑基本一致。 安全方面没有发现明显问题:没有改后端接口、用量采集、原始密钥处理或脱敏逻辑,只是在前端本地 UI state 中保存排序字段和方向,风险较低。 一个非阻塞的小建议是:下拉里支持成功率、输入/输出/缓存 Token 等排序项,但这些指标不是主表格直接展示的列,后续在 CPAMP 中可以考虑通过列配置或 tooltip 优化一下体验。 考虑到 CPA-Manager 当前处于维护状态,这类低风险体验优化可以作为维护性改进合入。也欢迎你后续把同类优化同步到 CPA-Manager-Plus,因为 CPAMP 会作为后续功能演进的主要方向。 前面合并了一个性能优化的 PR,与当前的 PR 产生了一些冲突,需要解决一下。 |
3c6d1f3 to
f1bc026
Compare
Author
|
已处理 review 里提到的冲突:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更概述
原因
影响范围
验证结果
npm test -- src/pages/MonitoringCenterPage.test.tsx src/features/monitoring/accountOverviewState.test.ts:2 个文件、24 个用例通过。npm run type-check:通过。npm run lint:通过。npm run build:通过。npx prettier --check src/features/monitoring/accountOverviewState.ts src/features/monitoring/accountOverviewState.test.ts src/pages/MonitoringCenterPage.tsx:通过。git diff --check:通过,仅有 Windows LF/CRLF 提示。风险/回滚
apiKeySort时会自动回退到总调用降序。Reviewer Notes
sortApiKeyRows默认比较顺序、调用方密钥汇总下拉选项,以及表头排序是否与账号汇总交互一致。