🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix(comments): fix display order of comments (#10434)
Michael Fröhlicha1e3ebb23338
diff --git a/web/src/features/comments/CommentList.tsx b/web/src/features/comments/CommentList.tsxindex 9e69603d98..e74b4217ac 100644--- a/web/src/features/comments/CommentList.tsx+++ b/web/src/features/comments/CommentList.tsx@@ -324,16 +324,18 @@ export function CommentList({});const commentsWithFormattedTimestamp = useMemo(() => {- return comments.data?.map((comment) => ({- ...comment,- timestamp: getRelativeTimestampFromNow(comment.createdAt),- strippedLower: stripMarkdown(comment.content).toLowerCase(),- authorLower: (- comment.authorUserName ||- comment.authorUserId ||- ""- ).toLowerCase(),- }));+ return comments.data+ ?.map((comment) => ({+ ...comment,+ timestamp: getRelativeTimestampFromNow(comment.createdAt),+ strippedLower: stripMarkdown(comment.content).toLowerCase(),+ authorLower: (+ comment.authorUserName ||+ comment.authorUserId ||+ ""+ ).toLowerCase(),+ }))+ .sort((a, b) => a.createdAt.getTime() - b.createdAt.getTime());}, [comments.data]);// stripMarkdown imported from utils