Files
openclaw/ui
Peter Steinberger db6e238aff fix(ui): gateway client rotation silently discards plain staged attachments (#123628)
* fix(ui): gateway client rotation silently discarded plain staged attachments

replacePaneStagedAttachmentGatewayOwner discarded every staged
attachment when the gateway client object rotated — which happens on
event-gap recovery (laptop sleep/wake reconnect) and after plugin
install/enable, not just on real credential changes. Draft text
survived; attachments vanished with no error, so a user who staged
screenshots before sleeping delivered a text-only message.

Only browser-annotation attachments actually depend on the old client
(their Undo context dies with it). Plain file/image payloads are
client-local data URLs; rotation now drops annotation-backed
attachments and keeps the rest, in both live state and memory
fallbacks.

* test: align annotation-lifecycle rotation tests with selective discard

Three tests pinned the old wholesale-discard contract; rotation now
drops only annotation-backed attachments while plain payloads survive
(live state, fallbacks, and post-undo-toast state).
2026-08-14 05:33:25 -07:00
..