Repository navigation
推送断线超过 2 秒顶上提示连不上、正在重试,连回来收起 - #84
Merged
Merged
Conversation
This was referenced Oct 23, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Be3SZps2JjqvyrJ1vbLmni
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Be3SZps2JjqvyrJ1vbLmni
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Be3SZps2JjqvyrJ1vbLmni
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Be3SZps2JjqvyrJ1vbLmni
joesmart
force-pushed
the
joesmart/fix-reconnect-banner
branch
from
October 23, 2026 15:27
761683e to
eeaacc6
Compare
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.
改了什么
ReadyState.pushLink,字面量联合"down" | "open"。WebSocketopen置open,close置down,初始down。PushBanner:pushLink不是open且持续超过宽限期(PUSH_GRACE_MS = 2 * reconnectDelay(0),现在是 2 秒),就在顶部显示「连不上服务,正在重试。连上后会补上这段时间的消息」。外层aria-live="polite"区域一直挂着,读屏才会念后插进来的字。连回来就收起。.window改成两行网格,侧栏跨两行。横幅定高--control-h-md、不换行,OAuth 和新 Bot 的浮动提示在横幅出现时往下让一个横幅高度,不再重叠。只用设计系统 token。POST /api/test/sockets/refuse,拒掉之后的推送握手,让断线能持续下去。为什么
断线和退避重连期间 HTTP 还通,界面看着是活的,其实收不到推送,用户以为 Bot 没反应。补拉逻辑本来就有(
push_reconnected),缺的是让人知道。宽限期跟着首次重连的退避值走,断一下马上连回来的情况不打扰人。怎么验证
新增
packages/web/e2e/push-banner.spec.ts:断线超过宽限期就提示找不到元素),修复后绿。另外用 Playwright 起 mock 手点了一遍,亮色和暗色都看了,截图没进仓库。
Closes #31
🤖 Generated with Claude Code
https://claude.ai/code/session_01Be3SZps2JjqvyrJ1vbLmni