From 368bddc00c6dea8ca4df7b54b8fa0740332a5d21 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 21 Jan 2026 11:23:09 +0000 Subject: [PATCH] refactor(post): use Promise.allSettled for relay publishing Use Promise.allSettled instead of Promise.all to wait for all relay publish attempts to complete, regardless of individual success/failure. More defensive and semantically correct since we're handling errors individually per relay and want all attempts to finish. --- src/components/PostViewer.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/PostViewer.tsx b/src/components/PostViewer.tsx index 70c8915..8613336 100644 --- a/src/components/PostViewer.tsx +++ b/src/components/PostViewer.tsx @@ -480,8 +480,8 @@ export function PostViewer({ windowId }: PostViewerProps = {}) { } }); - // Wait for all publishes to complete - await Promise.all(publishPromises); + // Wait for all publishes to complete (settled = all finished, regardless of success/failure) + await Promise.allSettled(publishPromises); // Add to event store for immediate local availability eventStore.add(event);