You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.
背景
Dashboard 的群元数据读取目前每次都会 fan-out 到全部在线 daemon;每个 daemon 再翻页读取飞书群列表,中央 Dashboard 随后为每个群补齐全部 Bot 的
memberBots。这使群列表请求同时承担大量飞书请求、矩阵构造和网络传输开销。在 devbox 的实际数据上:
GET /api/groups约 6.51 MB、约 3.9 秒memberBots,真实在群关系为 2,634 条chatId/name/avatar的展示投影约 264 KB这也会让只需要群名/头像的客户端被迫下载完整管理矩阵。
改动
GET /api/groups?view=compact仅返回群展示字段chatId/name/avatarGET /api/groups?refresh=1支持已认证 Dashboard 手动强制刷新;公开只读请求不能绕过缓存GET /api/sessions从现有快照补全群聊chatDisplayNameGET /api/groups响应结构保持不变,Dashboard 群管理页和内部groups-matrix/overview-snapshot继续使用完整矩阵影响面
验证
pnpm build:通过(含 TypeScript、Dashboard bundle、dist audit)pnpm vitest run test/dashboard-groups-matrix-snapshot.test.ts test/groups-action-helpers.test.ts test/daemon-internal-api.test.ts test/dashboard-public-redact.test.ts:4 files / 144 tests 通过pnpm test全量单测;当前 Codex 运行环境没有系统级node/npm,导致codex-app-threads的隔离子进程报env: node: No such file or directory,plugin-init的 npm fixture 报spawnSync npm ENOENT。本 PR 相关测试及正式构建均已通过。