diff --git a/ui/colony/src/App.tsx b/ui/colony/src/App.tsx index 77779f4..8a1685b 100644 --- a/ui/colony/src/App.tsx +++ b/ui/colony/src/App.tsx @@ -210,10 +210,12 @@ export default function App() { const prev = i > 0 ? messages[i - 1] : null; const sameSender = prev && prev.user.username === msg.user.username; const withinWindow = prev && (new Date(msg.created_at).getTime() - new Date(prev.created_at).getTime()) < 5 * 60 * 1000; - const compact = !!(sameSender && withinWindow && !msg.reply_to); const prevDate = prev ? new Date(prev.created_at).toDateString() : null; const thisDate = new Date(msg.created_at).toDateString(); const showDate = prevDate !== thisDate; + // Don't compact: after date break, typed messages (non-text), or replies + const isTyped = msg.type !== "text"; + const compact = !!(sameSender && withinWindow && !msg.reply_to && !showDate && !isTyped); return (
diff --git a/ui/colony/src/components/MessageItem.tsx b/ui/colony/src/components/MessageItem.tsx index 96ab5a6..f34e5b1 100644 --- a/ui/colony/src/components/MessageItem.tsx +++ b/ui/colony/src/components/MessageItem.tsx @@ -35,7 +35,8 @@ function timeAgo(dateStr: string): string { function renderContent(text: string) { // Split on @mentions and URLs - const parts = text.split(/((?:https?:\/\/)[^\s]+|@[\w-]+)/g); + // URL regex: stop before trailing punctuation like ),. etc + const parts = text.split(/((?:https?:\/\/)[^\s),.\]}>]+|@[\w-]+)/g); return parts.map((part, i) => { if (part.startsWith("@")) { return (