fix: codex review — compact across midnight, typed msg badges, URL punct

- Don't compact after date separator (show full header on new day)
- Don't compact typed messages (result/error/plan keep their badges)
- URL regex stops before trailing ),. so links don't grab punctuation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-29 21:51:49 +02:00
parent 448030fcee
commit 43fa95d7fe
2 changed files with 5 additions and 2 deletions

View File

@@ -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 (
<div key={msg.id}>