From d6b7429925fb502e9ade4b02cf7028722f15ab14 Mon Sep 17 00:00:00 2001 From: limiteinductive Date: Sun, 29 Mar 2026 21:16:50 +0200 Subject: [PATCH] reply UX: bigger chip, click-to-scroll with highlight - Reply chip: larger with border-l-4, bg tint, proper padding - Reply context in messages: click to smooth-scroll to quoted message - Quoted message flashes primary/10 bg for 1.5s on scroll - Each message gets id="msg-{id}" for scroll targeting - Reply context text bumped to 11px Co-Authored-By: Claude Opus 4.6 (1M context) --- ui/colony/src/components/ComposeBox.tsx | 13 ++++++++----- ui/colony/src/components/MessageItem.tsx | 24 +++++++++++++++++++----- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/ui/colony/src/components/ComposeBox.tsx b/ui/colony/src/components/ComposeBox.tsx index 0336dce..f7155d4 100644 --- a/ui/colony/src/components/ComposeBox.tsx +++ b/ui/colony/src/components/ComposeBox.tsx @@ -126,14 +126,17 @@ export function ComposeBox({ )}> {/* Reply chip */} {replyTo && ( -
- ^ - {replyTo.username} - {replyTo.content} +
+
+ {replyTo.username} + + {replyTo.content} + +
diff --git a/ui/colony/src/components/MessageItem.tsx b/ui/colony/src/components/MessageItem.tsx index 0303654..0438e45 100644 --- a/ui/colony/src/components/MessageItem.tsx +++ b/ui/colony/src/components/MessageItem.tsx @@ -60,22 +60,36 @@ export function MessageItem({ message, replyTarget, onReply }: Props) { const cfg = TYPE_CONFIG[message.type] || TYPE_CONFIG.text; const meta = message.metadata as Record | null; + function scrollToMessage(id: string) { + const el = document.getElementById(`msg-${id}`); + if (el) { + el.scrollIntoView({ behavior: "smooth", block: "center" }); + el.classList.add("!bg-primary/10"); + setTimeout(() => el.classList.remove("!bg-primary/10"), 1500); + } + } + return (
- {/* Reply context */} + {/* Reply context — click to scroll to quoted message */} {replyTarget && ( -
+
+ {replyTarget.content} + )}