Add channel concurrency settings section to default console - #741
Merged
Conversation
Mirror the classic console's channel concurrency panel in the default console: a new Channel Concurrency Limits section under System Settings > Operations exposing queueing (wait_enabled, timeout, per-channel cap), cooldown (master switch, duration, 429 trigger, keyword-match trigger), and the load snapshot cache toggle, persisted per changed key through the existing option update flow. Constraint: The section follows the PerformanceSection pattern — nested form schema flattened to channel_concurrency_setting.* keys on save, because react-hook-form treats dotted names as nested paths. Confidence: high Scope-risk: narrow Tested: web/default tsc 0 new errors; bun test src/i18n/config.test.ts (14 pass, locale parity for the new keys across 8 languages); eslint errors limited to pre-existing files. Not-tested: visual check in a running console.
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.
目标
把渠道并发/冷却设置面板补进 default(新 UI)管理台。#739 的面板只做在了 classic 里,而生产管理员日常用的是 default——这组配置在新 UI 里没有任何入口。
实现
系统设置 → Operations 新增 "Channel Concurrency Limits" section(侧边导航自动出现,路由
/system-settings/operations/channel-concurrency):实现沿用 PerformanceSection 的既有模式:react-hook-form 嵌套 schema(避开 dotted-name 陷阱)+ zod 校验(数字字段整数且非负/≥1,杜绝空值落库)+ 仅保存变更的 key +
getOptionValue按默认值类型解析 option 字符串("false" 不会被当 truthy)。#739 OCR 指出的 classic 面板两个问题(类型反序列化、保存前校验)在这套模式里天然不存在。验证
tsc0 新增错误(存量 rsbuild.config process 报错除外)bun test src/i18n/config.test.ts14 项全过(新增 15 个 key 8 语言齐全)Follow-up to #739(classic 面板)/ #735(实时并发展示)