Repository navigation
refactor(gateway): split chat display projection - #113806
Merged
Merged
Conversation
steipete
marked this pull request as ready for review
July 25, 2026 19:02
steipete
force-pushed
the
refactor/chat-display-projection-split
branch
from
July 25, 2026 19:11
403280f to
00b33f6
Compare
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 26, 2026
* refactor(gateway): split chat display projection * refactor(gateway): trim projection imports * refactor(gateway): keep projection helper private
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
The gateway’s client-consumed chat display projection had grown to 2,181 lines behind a grandfathered max-lines suppression. Its canvas handling, sanitizer, message-tool mirroring, history filtering, and public projection pipeline were interleaved in one module, making byte-stable client behavior harder to review safely. This is the maintainer-requested wave 7 behavior-neutral split.
Why This Change Was Made
This preserves
chat-display-projection.tsas the stable public facade and moves existing logic into focused modules for shared predicates, canvas/tool-result projection, payload sanitization, message-tool mirrors, history/TTS/turn-boundary projection, and the final public pipeline. The pipeline order and every public export remain unchanged; all production modules are at most 537 lines and the max-lines baseline entry is removed.User Impact
No user-visible behavior changes. Control UI and gateway clients receive the same projected messages, ordering, suppression behavior, error fallback text, media metadata, message-tool mirrors, TTS merges, and turn-boundary annotations as before.
Evidence
node scripts/run-vitest.mjs src/gateway/chat-display-projection.test.ts src/gateway/server-methods/server-methods.test.ts— 190/190 passed after the final rebase.node scripts/check-changed.mjs -- <touched paths>— hosted Blacksmith Testboxtbx_01kyd95ad97eeqrj2egk23hy7wpassed formatting, max-lines, prod/test typechecks, lint, guards, and zero runtime import cycles: https://github.com/openclaw/openclaw/actions/runs/30170041239pnpm deadcode:exports— hosted Blacksmith Testboxtbx_01kyd91ap034g2rwdsm0jhfvrspassed all production, full-tree, and script unused-export scans: https://github.com/openclaw/openclaw/actions/runs/30169971561AI-assisted: yes. The implementation and proof were reviewed by the maintainer-authorized Codex worker.