Skip to content

fix(gateway): preserve chat media dispatch state - #106702

Merged
steipete merged 1 commit into
mainfrom
codex/fix-chat-reply-dispatch-state
Jul 13, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/fix-chat-reply-dispatch-state

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

#106697 moved the webchat media-append state into chat-send-reply-dispatch.ts, but post-dispatch finalization still referenced the deleted handler-local variable. Current main therefore failed core TypeScript compilation with the stale state reference and also retained an unused import from the extraction.

Why This Change Was Made

  • Expose the dispatcher's live media-append state through a closure-backed getter.
  • Query that owner state during non-agent reply finalization.
  • Remove the stale INTERNAL_MESSAGE_CHANNEL import.
  • Add focused coverage for the exposed initial state.

User Impact

Restores compiler-clean gateway code and preserves suppression of duplicate final payloads after dispatcher-owned media transcript persistence.

Evidence

  • Testbox tbx_01kxeb7fqwcerksnjmabt7e84z: focused reply-dispatch test passed, 1 file and 2 tests.
  • Same Testbox: corepack pnpm tsgo:core passed after reproducing and fixing the stale import/state compile failures.
  • Fresh autoreview clean, no accepted/actionable findings; correctness 0.93.
  • git diff --check origin/main...HEAD passed after rebasing onto current origin/main.
  • Hosted CI intentionally not awaited per maintainer direction.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime size: XS maintainer Maintainer-authored PR labels Jul 13, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for head 1fe7a9e09bd53f196e110a58751ae7125900ad81:

  • Reproduced on Testbox tbx_01kxeb7fqwcerksnjmabt7e84z: core TypeScript compilation reported the stale extraction fallout.
  • corepack pnpm test src/gateway/server-methods/chat-send-reply-dispatch.test.ts — 1 file, 2 tests passed.
  • corepack pnpm tsgo:core — passed after the fix.
  • Fresh autoreview clean; no accepted/actionable findings; correctness 0.93.
  • git diff --check origin/main...HEAD passed after rebasing onto current origin/main.

Known proof gap: hosted CI intentionally not awaited per maintainer direction.

@steipete
steipete merged commit 5f3d56a into main Jul 13, 2026
78 of 81 checks passed
@steipete
steipete deleted the codex/fix-chat-reply-dispatch-state branch July 13, 2026 18:26
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui gateway Gateway runtime maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant