fix(webchat): render read tool output and fix exec output overflow + migrateLinearTranscript idempotent#77076
fix(webchat): render read tool output and fix exec output overflow + migrateLinearTranscript idempotent#77076z0650115 wants to merge 4 commits intoopenclaw:mainfrom
Conversation
Expose httpTimeoutMs in Telegram network config (similar to Feishu implementation) to allow users to reduce the probe timeout for faster fail-fast when Telegram is unreachable due to IPv6 issues or high latency. Users can now configure: channels.telegram.network.httpTimeoutMs: 5000 # 5 second timeout This prevents the gateway event loop from blocking for 10-15 seconds when the Telegram health probe encounters IPv6 blackhole issues. Fixes openclaw#77060
Fix for issue openclaw#77012 - WebChat session transcript overwritten every turn. The migration function was not idempotent - running it multiple times would regenerate IDs for entries that already had valid IDs, breaking the parent chain and causing entries to become orphaned. The root cause was that existingIds was an empty Set at the start of each migration run. When processing entries, if an entry already had an ID but that ID wasn't in existingIds (because existingIds was empty), a new ID would be generated. This would break the parentId chain since the parentId would still point to the old ID. Fix by: 1. First pass: collect all existing IDs from the file 2. Initialize existingIds with these IDs so they're preserved 3. Only assign new IDs to entries that don't have valid existing IDs This ensures that running migration multiple times produces the same result, preventing orphaned entries and broken parent chains.
Fixes issue openclaw#77054: 1. Bug 1 - read tool output not rendered: - extractToolText() only handled item.text and item.content as strings - Modern tool results have item.content as array: [{ type: 'text', text: '...' }] - Added array content block handling to extract text from nested blocks 2. Bug 2 - exec output text clipped: - .chat-tool-card had overflow:hidden which clipped long content - Changed to overflow:auto to allow scrolling when content exceeds max-height Added tests for extractToolCards with array content blocks.
Fixes issue openclaw#77063: lossless-claw selected and enabled but not registered as context engine after plugin cache restore. Root cause: When a cached plugin registry is reused, the cached state restoration restores agent harnesses, commands, compaction providers, and memory embedding providers, but NOT registered context engines. This causes context engines registered by plugins (like lossless-claw) to be lost when the plugin loader uses cached state. Changes: - src/context-engine/registry.ts: Add RegisteredContextEngineEntry type, listRegisteredContextEngines(), and restoreRegisteredContextEngines() functions for cache snapshot/restore support - src/plugins/loader.ts: Add contextEngines field to CachedPluginState, call restoreRegisteredContextEngines() when using cached state, and save contextEngines to cache when storing registry
|
Codex review: found issues before merge. Summary Reproducibility: Partially: #77054 has source-level and current-main proof, but #77012 remains unverified against current main and is being narrowed by #77051. The Telegram/config and context-engine pieces rely on related issue evidence rather than a single high-confidence reproduction path for this mixed PR. Next step before merge Security Review findings
Review detailsBest possible solution: Split or replace the PR: keep the current-main #77054/#77063 fixes, coordinate #77012 through the focused #77051 path, and handle #77060's Telegram timeout work in a dedicated config-contract PR with docs, generated metadata, tests, and changelog aligned. Do we have a high-confidence way to reproduce the issue? Partially: #77054 has source-level and current-main proof, but #77012 remains unverified against current main and is being narrowed by #77051. The Telegram/config and context-engine pieces rely on related issue evidence rather than a single high-confidence reproduction path for this mixed PR. Is this the best way to solve the issue? No: this is not the best current shape because it mixes four concerns, two of which are already solved on main, and the new Telegram config key lacks the required public config surface updates. A split, focused set of PRs is safer and easier to validate. Full review comments:
Overall correctness: patch is incorrect What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 484195d14e6d. |
Summary
This PR contains two fixes:
Fix 1: WebChat session transcript overwritten every turn (fixes #77012)
Makes migrateLinearTranscriptToParentLinked idempotent by collecting existing IDs before processing.
Fix 2: Control UI webchat tool output issues (fixes #77054)
Bug 1 - read tool output not rendered:
Bug 2 - exec output text clipped:
Files Changed