fix(aws): the copy-at-connect warning gets its own toast topic

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shadowdaoandClaude Opus 5.5 committed 2026-11-16 12:08:46 -08:00
1 parent ff5ae9862b
commit be96b5f68f
3 files changed
+39 -10

No files matched your search

@@ -55,4 +55,21 @@ describe("useWorkspaceWarnings", () => {
expect(toasts).toHaveLength(2);
expect(toasts[1].detail).toContain("already in use");
});
it("keeps a copy-at-connect warning beside the start's own warning", async () => {
renderHook(() => useWorkspaceWarnings());
await vi.waitFor(() => expect(handler).not.toBeNull());
handler!({ payload: { project_id: "p1", message: "started", detail: "clone failed" } });
handler!({
payload: {
project_id: "p1",
message: "“demo”: the credentials could not be copied into the workspace",
detail: "upload failed",
topic: "connect",
},
});
const { toasts } = useAppState.getState();
expect(toasts).toHaveLength(2);
expect(toasts.map((t) => t.detail)).toEqual(["clone failed", "upload failed"]);
});
});
+1 -1
View File
@@ -10,7 +10,7 @@ export interface WorkspaceWarningEvent {
message: string;
detail: string;
/** Set when the warning is about something else than the start's own
* follow (`"ports"`): keeps it from replacing that toast. */
* follow (`"ports"`, `"connect"`): keeps it from replacing that toast. */
topic?: string;
}