OpenClawKit: stabilize iOS ChatUI updates after gateway replies#18165
OpenClawKit: stabilize iOS ChatUI updates after gateway replies#18165
Conversation
|
The formal models extracted constants ( This check is informational (not blocking merges yet). If this change is intentional, follow up by updating the formal models repo or regenerating the extracted artifacts there. |
489c9c7 to
454dc51
Compare
|
The formal models extracted constants ( This check is informational (not blocking merges yet). If this change is intentional, follow up by updating the formal models repo or regenerating the extracted artifacts there. |
454dc51 to
f45eff9
Compare
|
The formal models extracted constants ( This check is informational (not blocking merges yet). If this change is intentional, follow up by updating the formal models repo or regenerating the extracted artifacts there. |
f45eff9 to
c7a2734
Compare
c7a2734 to
9b6e38d
Compare
|
The formal models extracted constants ( This check is informational (not blocking merges yet). If this change is intentional, follow up by updating the formal models repo or regenerating the extracted artifacts there. |
…claw#18165) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 9b6e38d Co-authored-by: mbelinky <[email protected]> Co-authored-by: mbelinky <[email protected]> Reviewed-by: @mbelinky
…claw#18165) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 9b6e38d Co-authored-by: mbelinky <[email protected]> Co-authored-by: mbelinky <[email protected]> Reviewed-by: @mbelinky (cherry picked from commit 6effcdb) # Conflicts: # CHANGELOG.md
…claw#18165) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 9b6e38d Co-authored-by: mbelinky <[email protected]> Co-authored-by: mbelinky <[email protected]> Reviewed-by: @mbelinky (cherry picked from commit 6effcdb) # Conflicts: # CHANGELOG.md # apps/shared/MoltbotKit/Sources/MoltbotChatUI/ChatViewModel.swift
…claw#18165) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 9b6e38d Co-authored-by: mbelinky <[email protected]> Co-authored-by: mbelinky <[email protected]> Reviewed-by: @mbelinky
Summary
Ports chat update stabilization for iOS shared OpenClawKit ChatUI.
Included
Scope
Testing
cd apps/shared/OpenClawKit && swift test --filter ChatViewModelTestsGreptile Summary
This PR stabilizes iOS ChatUI updates after gateway replies with two key changes:
reconcileMessageIDsandmessageIdentityKeyto preserve SwiftUI-stableUUIDs when messages are re-decoded from history payloads. Without this, every history refresh generates new UUIDs, causing SwiftUI to treat all messages as new items and triggering unnecessary re-renders and visual flicker.handleChatEventso that events belonging to the view's own pending run are never dropped due to a session key mismatch (e.g. gateway publishes"agent:main:main"while the view uses"main"). This prevents the UI from getting stuck in a "thinking" state.Both new tests (
acceptsCanonicalSessionKeyEventsForOwnPendingRun,preservesMessageIDsAcrossHistoryRefreshes) directly cover the new behaviors. Note: the pre-existing testsessionChoicesPreferMainAndRecentis failing in the test output — this appears unrelated to this PR's changes, but should be investigated separately.Confidence Score: 4/5
sessionChoicesPreferMainAndRecenttest failure in the test output should be investigated separately.Last reviewed commit: 489c9c7