Repository navigation
feat(card): 实时卡片新增本群替身模式开关 - #2862
Merged
deepcoldy merged 4 commits intoNov 6, 2026
Merged
Conversation
added 2 commits
November 5, 2026 23:12
superShen0916
requested review from
47seek,
LucasIcarus,
deepcoldy,
xiaoxueSunn and
xiongz-c
as code owners
November 5, 2026 15:18
主提交新增 toggle_substitute 敏感动作、substitute 实时卡按钮以及 buildStreamingCard 的 substituteControl 尾参后,三处既有的一致性断言未同步: - card-action-routes: EXPECTED 敏感动作清单补 toggle_substitute,denyToast 清单补 cmd.substitute.owner_only - dashboard-bot-defaults-cliid: 紧凑按钮网格枚举数 6 → 7 - recall-frozen-cards: buildStreamingCard 全参断言补 screenshotUnavailable 与 substituteControl 两个尾参 纯测试对齐,无 src 改动。 Co-Authored-By: Claude Code <[email protected]>
Owner
|
自动评审已完成首轮,先说结论:src 改动质量没有发现阻断问题(0 个 P1 / 0 个 P2),但本 head 的 CI 首跑有 4 处红灯,全部是「新增动作/参数后没有同步既有一致性断言」,不是 flake。因为本分支允许维护者修改,我已追加一个纯测试 commit 对齐,没有改动任何 src,也没有改写已有提交:
三处在本地(作者 head 树)复现、修复后 vitest 862 测全绿,dashboard 文件 bun 腿 96 测全绿;对三处断言做了摘除式变异(删敏感动作注册 / 删按钮 id),断言均按预期变红。新 head 的 CI 已在跑。 另外有 6 条非阻断的 P3 建议,不影响本次合入,供后续按需处理:
以上为自动评审初步意见,最终以维护者复审为准。 |
Owner
|
已合并 🎉 感谢贡献!双审对核心安全面(点击段最终同步复核、真实群身份校验、per-chat 持久化、ACK 真实超时态)评价很高,测试也覆盖得比较扎实(真实文件 store 的 handler→dispatcher 闭环、异步竞态、权限、双腿)。 评审中发现的非阻断项留作后续 follow-up,欢迎继续提 PR:
自动评审初步意见,最终以维护者审阅为准。再次感谢! |
This was referenced Nov 6, 2026
|
🚀 Released in v3.58.0 |
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.
实时状态卡增加本群替身模式开关:当前开启时显示「在本群关闭替身模式」,关闭后显示「在本群开启替身模式」,可直接恢复。Dashboard 的实时卡片按钮区域同时增加显示开关,保存后刷新可恢复配置。
实现复用现有按机器人和群保存的状态,以及 canOperate 操作权限。按钮携带明确的目标 on/off,重复点击不反向翻转;点击时核实当前卡片和实际所在群,异步查询完成后重新检查会话、权限、配置和严格群形态。关闭状态下,单独 @ 配置替身对象的消息直接让路,避免被普通免 @ 规则继续送入会话;直接 @ 机器人的交互照常执行。超时失败通知依据实际 ACK 超时状态发送。
影响范围为飞书实时卡和独立状态卡,包括动态单卡模式下的 /card 入口、各 CLI 的共享卡片重建路径,以及群消息的替身触发判断。验证在 Linux / Node 22.16.0 执行;本地 Bun 1.4.0 构建通过,CI 使用仓库钉住的 1.4.3。
验证:
实时卡片示意(来自 builder 产物,本地预览):
Dashboard 实际页面:
验证边界:未验证真实飞书客户端的卡片渲染、真人点击和 Lark callback 传输。Dashboard 验证使用隔离配置和模拟应用,证明本机页面、daemon IPC 和持久化链路。