fix(bridge): 多 Bot 平台状态灯改为任一连接即显示绿色 【已审核 PR】#359
Merged
ErlichLiu merged 1 commit intoErlichLiu:mainfrom Apr 30, 2026
Merged
Conversation
PlatformStatusDot 改用 feishuBotStatesAtom / dingtalkBotStatesAtom 读取 所有 Bot 状态,新增 getPlatformStatus() 按优先级推导平台级状态: 只要任一 Bot 已连接就显示绿色,不再受第一个 Bot 状态影响。 飞书和钉钉均有此问题,已一并修复。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Overview
修复「设置 → 远程连接」页中飞书/钉钉的平台级状态灯在多 Bot 场景下的显示问题。
此前
PlatformStatusDot使用了只取第一个 Bot 状态的 atom(feishuBridgeStateAtom/dingtalkBridgeStateAtom),导致只要第一个 Bot 未启动,即使其他 Bot 正常运行,平台级指示灯也变灰。修复后:读取所有 Bot 的状态(
feishuBotStatesAtom/dingtalkBotStatesAtom),按优先级推导平台级状态——只要任一 Bot 已连接,就显示绿色。Changes
apps/electron/src/renderer/components/settings/BotHubSettings.tsx— 核心改动feishuBridgeStateAtom/dingtalkBridgeStateAtom改为feishuBotStatesAtom/dingtalkBotStatesAtomPlatformStatusDot组件改为读取多 Bot 状态映射,而非取第一个getPlatformStatus()辅助函数,按优先级推导平台级状态Status 优先级
Notes
feishuBridgeStateAtom/dingtalkBridgeStateAtom本身未改动,不影响其他向后兼容的使用方🤖 Generated with Claude Code