fix: complete channel model batch testing - #5532
Conversation
WalkthroughThe channel test dialog gains stop-testing support and live batch progress display. The batch handler is replaced with a concurrency-limited, delay-paced implementation using ChangesBatch Test Stop and Progress Feature
Sequence Diagram(s)sequenceDiagram
participant User
participant Toolbar as Models Toolbar
participant handleBatchTest
participant Chunk as Promise.allSettled (chunk)
participant BatchProgressSummary
participant ChannelList
User->>Toolbar: click "Test N models"
Toolbar->>handleBatchTest: invoke with filteredModels
handleBatchTest->>handleBatchTest: trim/dedupe, init batchProgress
loop Each concurrency chunk
handleBatchTest->>Chunk: run N model tests in parallel
Chunk-->>handleBatchTest: settled results
handleBatchTest->>BatchProgressSummary: update completed/success/failed
handleBatchTest->>handleBatchTest: check stop ref → break if set
handleBatchTest->>handleBatchTest: sleep(BATCH_TEST_DELAY_MS)
end
alt User clicks "Stop testing"
User->>Toolbar: click Stop testing
Toolbar->>handleBatchTest: set batchStopRequestedRef + isBatchStopRequested
end
handleBatchTest->>ChannelList: refresh with resultPatch
handleBatchTest->>BatchProgressSummary: clear progress state
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
web/default/src/features/channels/components/dialogs/channel-test-dialog.tsx (1)
974-980: 💤 Low valueConsider using
props.xxxpattern instead of destructuring props.Per coding guidelines, component props should not be destructured. However, the existing components in this file (
TestStatusCell,FailureStatusContent, etc.) all use destructuring, so this is consistent with the current codebase pattern. Consider aligning with the guideline in a future refactor.🤖 Prompt for 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. In `@web/default/src/features/channels/components/dialogs/channel-test-dialog.tsx` around lines 974 - 980, The BatchProgressSummary component currently uses destructured props in its function signature, but the coding guidelines recommend using the props.xxx pattern instead. Refactor the BatchProgressSummary function to accept a single props parameter of the same type as currently destructured, then replace all references to the destructured variables (progress and isStopping) with props.progress and props.isStopping throughout the function body to align with the established coding guidelines.Source: Coding guidelines
🤖 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/fr.json`:
- Line 1248: The French translation of the legal disclaimer contains multiple
misspellings and missing diacritical marks that reduce readability and legal
clarity. Correct the following words in the translation string by adding the
appropriate accents: replace "prerequis" with "prérequis", "necessite" with
"nécessite", "prealable" with "préalable", "reserves" with "réservés", and
"destines" with "destinés". These corrections ensure proper French spelling and
maintain the professional legal tone of the disclaimer for francophone users.
---
Nitpick comments:
In
`@web/default/src/features/channels/components/dialogs/channel-test-dialog.tsx`:
- Around line 974-980: The BatchProgressSummary component currently uses
destructured props in its function signature, but the coding guidelines
recommend using the props.xxx pattern instead. Refactor the BatchProgressSummary
function to accept a single props parameter of the same type as currently
destructured, then replace all references to the destructured variables
(progress and isStopping) with props.progress and props.isStopping throughout
the function body to align with the established coding guidelines.
🪄 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: 22a2f428-39d2-4602-b618-cce1c456dd84
📒 Files selected for processing (7)
web/default/src/features/channels/components/dialogs/channel-test-dialog.tsxweb/default/src/i18n/locales/en.jsonweb/default/src/i18n/locales/fr.jsonweb/default/src/i18n/locales/ja.jsonweb/default/src/i18n/locales/ru.jsonweb/default/src/i18n/locales/vi.jsonweb/default/src/i18n/locales/zh.json
| "Disabled Reason": "Raison de la désactivation", | ||
| "Disabled Time": "Heure de désactivation", | ||
| "Disabling...": "Désactivation en cours...", | ||
| "Disclaimer: Personal use only. Do not distribute or share any credentials. This channel has prerequisites and requires prior setup; use it only if you understand the flow and risks, and comply with OpenAI's terms and policies. Credentials and configuration are for Codex CLI integration only, and are not intended for any other client, platform, or channel.": "Avertissement : usage personnel uniquement. Ne distribuez ni ne partagez aucun identifiant. Ce canal a des prerequis et necessite une configuration prealable ; utilisez-le uniquement si vous comprenez la procedure et les risques, et respectez les conditions et politiques d'OpenAI. Les identifiants et la configuration sont reserves a l'integration Codex CLI et ne sont pas destines a d'autres clients, plateformes ou canaux.", |
There was a problem hiding this comment.
Improve legal disclaimer French spelling/diacritics for clarity
Line 1248 contains multiple misspellings in a legal warning string; this can weaken readability and legal precision for francophone users.
Suggested text correction
- "Disclaimer: Personal use only. Do not distribute or share any credentials. This channel has prerequisites and requires prior setup; use it only if you understand the flow and risks, and comply with OpenAI's terms and policies. Credentials and configuration are for Codex CLI integration only, and are not intended for any other client, platform, or channel.": "Avertissement : usage personnel uniquement. Ne distribuez ni ne partagez aucun identifiant. Ce canal a des prerequis et necessite une configuration prealable ; utilisez-le uniquement si vous comprenez la procedure et les risques, et respectez les conditions et politiques d'OpenAI. Les identifiants et la configuration sont reserves a l'integration Codex CLI et ne sont pas destines a d'autres clients, plateformes ou canaux.",
+ "Disclaimer: Personal use only. Do not distribute or share any credentials. This channel has prerequisites and requires prior setup; use it only if you understand the flow and risks, and comply with OpenAI's terms and policies. Credentials and configuration are for Codex CLI integration only, and are not intended for any other client, platform, or channel.": "Avertissement : usage personnel uniquement. Ne distribuez ni ne partagez aucun identifiant. Ce canal a des prérequis et nécessite une configuration préalable ; utilisez-le uniquement si vous comprenez la procédure et les risques, et respectez les conditions et politiques d'OpenAI. Les identifiants et la configuration sont réservés à l'intégration Codex CLI et ne sont pas destinés à d'autres clients, plateformes ou canaux.",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "Disclaimer: Personal use only. Do not distribute or share any credentials. This channel has prerequisites and requires prior setup; use it only if you understand the flow and risks, and comply with OpenAI's terms and policies. Credentials and configuration are for Codex CLI integration only, and are not intended for any other client, platform, or channel.": "Avertissement : usage personnel uniquement. Ne distribuez ni ne partagez aucun identifiant. Ce canal a des prerequis et necessite une configuration prealable ; utilisez-le uniquement si vous comprenez la procedure et les risques, et respectez les conditions et politiques d'OpenAI. Les identifiants et la configuration sont reserves a l'integration Codex CLI et ne sont pas destines a d'autres clients, plateformes ou canaux.", | |
| "Disclaimer: Personal use only. Do not distribute or share any credentials. This channel has prerequisites and requires prior setup; use it only if you understand the flow and risks, and comply with OpenAI's terms and policies. Credentials and configuration are for Codex CLI integration only, and are not intended for any other client, platform, or channel.": "Avertissement : usage personnel uniquement. Ne distribuez ni ne partagez aucun identifiant. Ce canal a des prérequis et nécessite une configuration préalable ; utilisez-le uniquement si vous comprenez la procédure et les risques, et respectez les conditions et politiques d'OpenAI. Les identifiants et la configuration sont réservés à l'intégration Codex CLI et ne sont pas destinés à d'autres clients, plateformes ou canaux.", |
🤖 Prompt for 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.
In `@web/default/src/i18n/locales/fr.json` at line 1248, The French translation of
the legal disclaimer contains multiple misspellings and missing diacritical
marks that reduce readability and legal clarity. Correct the following words in
the translation string by adding the appropriate accents: replace "prerequis"
with "prérequis", "necessite" with "nécessite", "prealable" with "préalable",
"reserves" with "réservés", and "destines" with "destinés". These corrections
ensure proper French spelling and maintain the professional legal tone of the
disclaimer for francophone users.
Important
📝 变更描述 / Description
(简述:做了什么?为什么这样改能生效?请基于你对代码逻辑的理解来写,避免粘贴未经整理的内容)
完善
default前端渠道模型批量测试只覆盖当前页,新增按当前筛选结果全量测试的入口,并支持实时进度更新。🚀 变更类型 / Type of change
🔗 关联任务 / Related Issue
✅ 提交前检查项 / Checklist
Bug fix,我已提交或关联对应 Issue,且不会将设计取舍、预期不一致或理解偏差直接归类为 bug。📸 运行证明 / Proof of Work
(请在此粘贴截图、关键日志或测试报告,以证明变更生效)
iShot_2026-06-16_14.34.36.mp4
Summary by CodeRabbit
New Features
Internationalization