Fix Discord reply typing lifecycle#76091
Conversation
|
Codex review: needs maintainer review before merge. Reviewed May 30, 2026, 1:36 PM ET / 17:36 UTC. Summary PR surface: Source +268, Tests +331, Docs 0. Total +599 across 11 files. Reproducibility: yes. by source inspection: current main and v2026.5.27 only send the accepted preflight typing cue for DMs, while the linked reports and earlier video describe the Discord guild delay. I did not run a live Discord account in this read-only review. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land this scoped Discord plugin fix after maintainer review of the proof override and keep the broader shared typing cleanup in #75403 separate. Do we have a high-confidence way to reproduce the issue? Yes, by source inspection: current main and v2026.5.27 only send the accepted preflight typing cue for DMs, while the linked reports and earlier video describe the Discord guild delay. I did not run a live Discord account in this read-only review. Is this the best way to solve the issue? Yes, the current branch is the narrowest maintainable fix I found: it keeps the lifecycle in the Discord plugin, avoids shared SDK/API changes, preserves default unmentioned group behavior, and adds focused coverage for the risky queue/restart paths. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 8d3fe21b5368. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +268, Tests +331, Docs 0. Total +599 across 11 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
3f81d74 to
81075df
Compare
d9bede5 to
f84526c
Compare
Thanks, this is very helpful confirmation. That matches the case this PR is targeting: accepted Discord guild messages can be processed successfully, but the published bundle does not start the native typing cue during the wait, so users see no feedback until the final reply lands. Your setup ( A real deployment retest after merge would be useful. The expected behavior is that the typing indicator starts after preflight acceptance and remains refreshed through queued processing/final reply dispatch, without needing the ack reaction workaround. |
|
Follow-up comparison with #79104 and #75403:
If maintainers want a broader shared typing lifecycle pass later, #75403’s pending-start cleanup serialization can be combined separately with this PR’s active-keepalive refresh behavior. I would not fold that into this PR unless requested, because it broadens scope beyond the Discord delay regression. |
|
@clawsweeper re-review I narrowed the branch to the Discord reply typing lifecycle fix. The PR diff no longer includes the unrelated cron compatibility change, macOS, oc-path, LINE, GitHub Copilot, or incidental test drift. Local validation passed:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review I removed the remaining shared Local validation passed on this narrower head:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
ClawSweeper PR egg: ✨ hatched 🌱 uncommon Mossy Patch Peep. Rarity: 🌱 uncommon. Trait: sparkles near resolved comments. DetailsShare on X: post this hatch
About:
|
|
@clawsweeper re-review I narrowed the branch to remove the remaining compatibility-risk scope. The PR no longer changes core The projected diff is now limited to the Discord accepted typing lifecycle, Discord queued-run cleanup, the shared channel run-queue skipped-work cleanup hook contract, docs/changelog, and focused tests. Local validation passed:
|
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review I updated this branch against current
Latest local validation on head
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Summary
Rewrites the Discord accepted-reply typing change around a Discord-owned feedback object instead of a one-shot early typing request.
typingMode: "instant", and message-tool-only group replies can prestart; unmentioned automatic group replies, room events, and non-instant configured modes do not./typingkeepalive loops.Verification
Behavior addressed: accepted Discord replies keep showing typing while work is queued and while the eventual reply dispatch runs, without changing default unmentioned group typing behavior.
Real environment tested: local OpenClaw checkout plus Blacksmith Testbox changed-surface gate.
Exact steps or command run after this patch:
node scripts/run-vitest.mjs extensions/discord/src/monitor/message-handler.queue.test.ts extensions/discord/src/monitor/message-handler.process.test.ts extensions/discord/src/monitor/message-handler.reply-typing-policy.test.tspnpm tsgo:extensionspnpm tsgo:test:extensionsgit diff --checkpnpm check:changedvia Blacksmith Testbox run https://github.com/openclaw/openclaw/actions/runs/26689351476/Users/steipete/Projects/agent-skills/skills/autoreview/scripts/autoreview --mode branch --base origin/mainEvidence after fix: focused Discord monitor tests cover prestart policy, carried feedback reuse, stale carried-controller restart, and queue-key dedupe.
check:changedcompleted with exit code 0. Autoreview reported no accepted/actionable findings after fixing the stale-controller, test-fixture, and duplicate-keepalive findings.Observed result after fix: 114 focused Discord tests passed; extension prod/test type lanes passed; Testbox changed-surface gate passed.
What was not tested: no fresh live Discord recording was captured after the maintainer rewrite.