Commit 4679a8c
fix(election): bot 不参与 inbox 执行者选举 — setLocalState(null) + 前端 filter user
bot 反向通道的 yjs provider 默认会进 awareness states. clientID 比
用户 cc 小时被 isElectedExecutor 选成"最小者", 用户的 BottomAIBar
isElectedExecutor 返回 false → 不 fire → inbox pending 永远卡死.
双重保险:
1. bot: provider.awareness.setLocalState(null) — 在 awareness 里隐身
2. 前端: 选举只数有 state.user 字段的 awareness — 没 user 的 spectator
(bot daemon / inspect 脚本) 自然被排除
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 9127625 commit 4679a8c
2 files changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
543 | 543 | | |
544 | 544 | | |
545 | 545 | | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
546 | 549 | | |
547 | 550 | | |
548 | 551 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
40 | 45 | | |
41 | 46 | | |
42 | 47 | | |
| |||
0 commit comments