Repository navigation
refactor(ui): split chat-send.ts along ack/request/drain/lifecycle seams - #113052
Merged
Merged
Conversation
chat-send.ts was ~2,330 lines under a grandfathered max-lines suppression, mixing ack normalization, wire requests/routing, the stored-outbox drain scheduler, retry/steer actions, and the send lifecycle. Mechanical extraction into owned modules: - chat-send-contract.ts absorbs ack normalization (it owns the ack shape) - chat-send-request.ts: wire requests + session routing - chat-outbox-drain.ts: drain lanes, retry timers, head reconciliation — colocated with the outbox ownership boundary from the composer split - chat-send-actions.ts / chat-send-queue-state.ts / chat-send-submit.ts: retry/steer actions, queue-state helpers, submission routing - chat-send.ts keeps the send lifecycle (719 lines); its max-lines suppression and baseline entry are removed No compatibility re-exports; cycles broken by hoisting ChatHost into the contract module and injecting the drain's two lifecycle callbacks. Closes #112742.
steipete
marked this pull request as ready for review
July 23, 2026 14:07
Contributor
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: refactor(ui): split chat-send.ts along ack/request/drain/lifecycle seams This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
… madge type cycle
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 24, 2026
…ams (openclaw#113052) * refactor(ui): split chat-send.ts along ack/request/drain/lifecycle seams chat-send.ts was ~2,330 lines under a grandfathered max-lines suppression, mixing ack normalization, wire requests/routing, the stored-outbox drain scheduler, retry/steer actions, and the send lifecycle. Mechanical extraction into owned modules: - chat-send-contract.ts absorbs ack normalization (it owns the ack shape) - chat-send-request.ts: wire requests + session routing - chat-outbox-drain.ts: drain lanes, retry timers, head reconciliation — colocated with the outbox ownership boundary from the composer split - chat-send-actions.ts / chat-send-queue-state.ts / chat-send-submit.ts: retry/steer actions, queue-state helpers, submission routing - chat-send.ts keeps the send lifecycle (719 lines); its max-lines suppression and baseline entry are removed No compatibility re-exports; cycles broken by hoisting ChatHost into the contract module and injecting the drain's two lifecycle callbacks. Closes openclaw#112742. * fix(ui): extract chat-send ack shapes into a leaf module to break the madge type cycle
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.
What Problem This Solves
Closes #112742.
ui/src/pages/chat/chat-send.tswas ~2,330 lines under a grandfathered max-lines suppression, mixing four concerns: chat.send ack normalization, wire requests/session routing, the stored-outbox drain scheduler, and the send/retry lifecycle. The drain machinery operated on outbox state owned elsewhere since the composer split (#112649), and the file was the hottest merge-conflict zone in chat (it conflicted in two of the last three PRs touching this area).Why This Change Was Made
Mechanical extraction along ownership seams — code moved, not rewritten:
chat-send-contract.tsabsorbs ack normalization (it owns the ack shape)chat-send-request.ts(101 lines): wire requests + session routingchat-outbox-drain.ts(628 lines): drain lanes, retry timers, head reconciliation — colocated with the outbox ownership boundarychat-send-actions.ts/chat-send-queue-state.ts/chat-send-submit.ts: retry/steer actions, queue-state helpers, submission routingchat-send.tskeeps the send lifecycle as its identity: now 719 lines, with its max-lines suppression and baseline entry removedNo compatibility re-exports remain. Runtime import cycles avoided by hoisting
ChatHostinto the contract module, type-only imports, and injecting the drain's two lifecycle callbacks.User Impact
None — behavior-neutral. Lower review cost on the most-touched chat file; drain logic lives next to the outbox modules it operates on; one fewer grandfathered suppression.
Evidence
tsgoclean;check:import-cycles: 0 runtime value cycles; max-lines ratchet OK with the chat-send entry removed (1,130 suppressions remain repo-wide, down 1).