Repository navigation
Conversation
…Lab#3359) The paused-chat card's `social/paused` read swallowed its rejection, so a read that failed was drawn exactly like "this chat is not paused": the card vanished, and a card read before the failure stayed on screen with stale words. The failure now has its own state and is drawn as one quiet status line; a later success replaces it. The 5 s poll is the retry, and the card still has no button. Docs-not-needed: the card's own copy is unchanged; a failed read shows the existing `errorText()` sentence in a quiet status row, and the issue scopes the diff to `plugins/social/client.js:4010-4034` plus the new test file.
|
@Birfy — verdict request for this tip, once:
At that exact tip: 18 checks = 14 success + 1 cancelled ( What the change is, in one line: Red-first evidence in the body: the new |
|
Repackaged for FlyBot 2.0 / OpenTeamily in #3382 — same behaviour, reimplemented against the 2.0 tree ( Ported part: a failed Repo-wide evidence: |
|
按旧布局退役关闭。 本 PR 改的是 同一批修正在新布局上已有一份移植版 #3382(改
|
Fixes #3359
Bot: FlyBot Dev-3
Owner: Dev-3
Written-by: Dev-3
Reviewer: Birfy
What was wrong
PausedChat(plugins/social/client.js:4010-4034at basebab1fe963b65913f5cd1021d30e6598a7f571627) readssocial/pausedevery 5 s, and its rejection branch was the empty function:A read that failed therefore wrote nothing, and the draw returned
nullfor both answers:so "this chat is not paused" and "this read did not succeed" were the same picture: a paused card that was on screen silently vanished when the next read failed, and a card read before a failure stayed on screen with stale words (
Send your message again: it starts a new chat) from a read that no longer succeeded. The friends list fixed exactly this gap in#3323/#3325; this is the card.What changes
Only
PausedChat:pausedfor the failure;load, success setspausedand clears the failure, failure setserrorText(e)and leavespausedalone, so a failed read never invents "not paused";if (!handle) return null, then a non-empty failure returns one quiet status rowdata-flybot="social-paused-error"(role: 'status', classfs-hold), then thechat-pausedbranch as before;errorText()at:88-96already turnsNETWORKintoCould not reach FlyBot. Check that it is still running.), no button, no input, no Extend, no turn count (owner 2026-10-19) — the 5 spollWhileVisibleread is the retry, so the row disappears on the next read that succeeds.Red first
New file
plugins/social/test/paused-chat-read-error.test.js(harness frompoll-visibility.test.js:16-120: hook runner,mountthat runs effects, queuedcallanswers,rerender()that reuses the hook table and does not re-run effects). On the test-only commit1da5e3aeb4acf1828f112150a176209a7c4ec941(treea5f55e894a43a6ea3b7e064f680a229549410c3e, basebab1fe963b65913f5cd1021d30e6598a7f571627), same command twice:cd plugins/social && node --import ./test/resolve.mjs --test test/paused-chat-read-error.test.jsBoth runs
# tests 5 | # pass 1 | # fail 4, identical:not ok 1 - a paused-chat read that fails writes one quiet error row—expected: 1/actual: 0,:158(the row does not exist today).not ok 2 - a NETWORK failure names the reason the users can act on—expected: 'Could not reach FlyBot. Check that it is still running.'/actual: '',:169.not ok 3 - a card read before the failure is dropped when the next read fails—expected: 0/actual: 1,:184(the stale card stays). The first assertion of the same test,:180, is the green control: the first answer does draw the card.not ok 4 - the next read that succeeds clears the error and draws the card again—expected: 1/actual: 0,:200(in the base the sequence starts from the swallow of ①, so the card never comes back);:196and:201follow it.ok 5 - the failed read draws no button, input or form— the green control on the base: the quiet notice stays quiet (owner 2026-10-19).Each assertion has exactly one expected value; ⑤ is green at the base by design, so the red is 4 real failures, not 5.
Ran / Not run
test/paused-chat-read-error.test.js→ 5/5, 0 fail.test/paused-chat-i18n.test.js→ 5/5 (unchanged).test/poll-visibility.test.js→ 8/8 (unchanged; not edited — open#3356owns it).npm --prefix plugins/social test→ 785/785, 0 fail, rc 0 (baseline on this base: 780 + the 5 new).node scripts/i18n-usage.mjs check→12 bare draws in 4 files, rc 0 — unchanged; no new bare draw.ARCH_DOCS_BASE=bab1fe963b65913f5cd1021d30e6598a7f571627 node core/scripts/check-arch-docs.mjs→arch-docs: OK (2 changed file(s)); the fix commit carries the requiredDocs-not-needed:trailer (the card's own copy is unchanged).npm run verifyas one command: the other plugin suites and the interop stages are outside this change; each stage this change touches is listed above.No changelog fragment and no docs line: the issue scopes the diff to
plugins/social/client.js:4010-4034plus the new test file, and no copy is added — the row reuseserrorText(), the same sentence the friends list already shows (#3323).Screenshots
Both rendered from the real client module in Chromium (DOM captured, not a mock): the card is on screen from a successful read, then the next 5 s read fails — the exact sequence of case ③.
bab1fe963b65913f5cd1021d30e6598a7f571627):Chat paused/Bot Social paused the last chat with this Bot (loop detected). Send your message again: it starts a new chat.dd6a8ea2f091c509a2d928eae90be67ddc4079ab):Could not reach FlyBot. Check that it is still running.Evidence branch
evidence/3359carries the two PNGs only (no code, no PR); the raw links are pinned to33f58d1f11359999a2ea41c82212c1d048858de4, so a later rewrite of that branch cannot change what this body shows.Verification at tip
dd6a8ea2f091c509a2d928eae90be67ddc4079abdd6a8ea2f091c509a2d928eae90be67ddc4079ab, tree7c130f8c7e5658f64318374535d32284df2fc675, basebab1fe963b65913f5cd1021d30e6598a7f571627plugins/social/client.js+14/−2,plugins/social/test/paused-chat-read-error.test.js+216/−0 (new)poll-visibility.test.js, noplugins/social/src/social.js, nocore/src/client/**, nocore/client.js, nopatches/**Checkpoint
{ "pr": 3364, "claim": "Dev-3", "issue": 3359, "summary": "The paused-chat card reads `social/paused` every 5 s; its rejection branch was an empty function, so a read that failed wrote nothing and was drawn exactly like "this chat is not paused" — the card vanished when it had been there, and a card read before a failure stayed on screen with stale words. The read now keeps one failure state beside `paused`: success sets the card and clears the error, a failure sets `errorText(e)` and leaves `paused` alone, and the draw shows one quiet `social-paused-error` line before the card branch (no button, no Extend — the 5 s poll is the retry). The friends-list error surface (#3323/#3325) is the precedent.", "files": [ "plugins/social/client.js", "plugins/social/test/paused-chat-read-error.test.js" ], "checks": { "ran": "npm --prefix plugins/social test", "result": "green", "at": "dd6a8ea2f091c509a2d928eae90be67ddc4079ab" }, "next": "none — ready for review" }