mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 12:56:01 -06:00
test: cover ownerless staged attachment cleanup
This commit is contained in:
+1
-1
@@ -67,7 +67,7 @@ Docs: https://docs.openclaw.ai
|
||||
|
||||
### Fixes
|
||||
|
||||
- **Control UI staged attachments:** preserve unsent images, files, pasted images, and large pasted text across same-tab route and narrow split-pane remounts while keeping pane close, session or Gateway ownership changes, application shutdown, and hard reload as cleanup boundaries. Fixes #121519. Thanks @shakkernerd.
|
||||
- **Control UI staged attachments:** preserve unsent images, files, pasted images, and large pasted text across same-tab route and narrow split-pane remounts while keeping pane close, mismatched pane/session/Gateway remounts, application shutdown, and hard reload as cleanup boundaries. Fixes #121519. Thanks @shakkernerd.
|
||||
- **Control UI browser annotations:** keep marked screenshots and generated page context together in structured composer cards, preserve user-written drafts when annotations are removed or replaced, retain complete unsent annotation packages across same-tab route and active split-pane remounts, and offer bounded Undo without restoring removed context into another session. Fixes #120744. Thanks @shakkernerd.
|
||||
- **Control UI profile avatar refreshes:** carry canonical content revisions through mutation responses and live presence so rapid replacements refresh every connected browser without stale cache rollback. Thanks @shakkernerd.
|
||||
- **Control UI appearance accessibility:** keep the unavailable custom-theme card announced as an Import command while preserving selected-state semantics for selectable themes and text sizes. Thanks @shakkernerd.
|
||||
|
||||
@@ -368,7 +368,7 @@ describe("staged attachment composer adoption", () => {
|
||||
expect(getChatAttachmentDataUrl(ordinary)).toBeNull();
|
||||
});
|
||||
|
||||
it("discards an annotation captured without a client when the first client arrives", () => {
|
||||
it("discards a staged package captured without a client when the first client arrives", () => {
|
||||
const client = {} as GatewayBrowserClient;
|
||||
const { pane, state } = createTestChatPane({
|
||||
client,
|
||||
@@ -381,6 +381,8 @@ describe("staged attachment composer adoption", () => {
|
||||
pane as TestChatPane & { receiveBrowserAnnotation: (candidate: Event) => void }
|
||||
).receiveBrowserAnnotation(annotationEvent());
|
||||
const annotation = state.chatAttachments[0]!;
|
||||
const ordinary = storedAttachment("no-client-ordinary", false);
|
||||
state.chatAttachments.push(ordinary);
|
||||
|
||||
pane.applyGatewaySnapshot({
|
||||
...pane.context.gateway.snapshot,
|
||||
@@ -391,6 +393,7 @@ describe("staged attachment composer adoption", () => {
|
||||
|
||||
expect(state.chatAttachments).toEqual([]);
|
||||
expect(getChatAttachmentDataUrl(annotation)).toBeNull();
|
||||
expect(getChatAttachmentDataUrl(ordinary)).toBeNull();
|
||||
});
|
||||
|
||||
it("invalidates annotation Undo when the logical Gateway client is replaced", async () => {
|
||||
|
||||
Reference in New Issue
Block a user