diff --git a/web/src/components/MemoEditor/index.tsx b/web/src/components/MemoEditor/index.tsx index 2074f90ac..fb75dfe07 100644 --- a/web/src/components/MemoEditor/index.tsx +++ b/web/src/components/MemoEditor/index.tsx @@ -87,6 +87,11 @@ const MemoEditorImpl: React.FC = ({ queryClient.invalidateQueries({ queryKey: userKeys.stats() }), ]; + // Ensure memo detail pages don't keep stale cached content after edits. + if (memoName) { + invalidationPromises.push(queryClient.invalidateQueries({ queryKey: memoKeys.detail(memoName) })); + } + // If this was a comment, also invalidate the comments query for the parent memo if (parentMemoName) { invalidationPromises.push(queryClient.invalidateQueries({ queryKey: memoKeys.comments(parentMemoName) }));