cheogram-www

created pr with cheogram-www/click-nickname.1 on 2026-11-07T22:43:19Z · by 9e834e0d
added cheogram-www/click-nickname.2 on 2026-11-07T22:43:54Z · by 9e834e0d
1: 09a926a ! 1: b380266 Click on nickname to mention
commented on 2026-11-09T14:41:33Z · by 3c31bc8c
lgtm
cmds
checkout latest patchset:
ssh pr.pico.sh pull cheogram-www:click-nickname | git am -3
checkout specific patchset revision:
ssh pr.pico.sh pull cheogram-www:click-nickname [rev] | git am -3
add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh cheogram-www:click-nickname
add comment to patch request:
ssh pr.pico.sh comment cheogram-www:click-nickname "lgtm!"

Patchset cheogram-www/click-nickname.1 on 2026-11-07T22:43:19Z · commit 09a926a

+8 -0 src/App.scss #
......@@ -785,6 +785,14 @@ div.cs-message__content {
785785 border: 0.125em solid lightcoral;
786786 }
787787
788+.clickable {
789+ cursor: pointer;
790+
791+ &:hover {
792+ text-decoration: underline;
793+ }
794+}
795+
788796 .cs-conversation-header__back {
789797 button {
790798 font-size: inherit;
+1 -0 src/components/Chat.tsx #
......@@ -1406,6 +1406,7 @@ export const ChatInner = () => {
14061406 client={client}
14071407 members={members}
14081408 setSelectedThread={setSelectedThread}
1409+ onMention={addMention}
14091410 m={m}
14101411 >
14111412 {m.type !==
+12 -6 src/components/MessageBubble.tsx #
......@@ -221,6 +221,7 @@ export const MessageBubble = ({
221221 setSelectedThread,
222222 className,
223223 children,
224+ onMention,
224225 }: {
225226 chat: borogove.Chat;
226227 client: borogove.Client;
......@@ -230,6 +231,7 @@ export const MessageBubble = ({
230231 setSelectedThread: (id: string | null) => void;
231232 className?: string;
232233 children: ReactNode;
234+ onMention?: (member: borogove.Member) => void;
233235 }) => {
234236 const navigate = useNavigate();
235237
......@@ -265,6 +267,12 @@ export const MessageBubble = ({
265267 .replace(/\s*\b[A-Z]{2,4}$/, ""); // remove trailing TZ abbrev
266268
267269 const sender = members.get(m.senderId);
270+ const showSender =
271+ m.senderId !== chat.chatId &&
272+ ["last", "single"].includes(position) &&
273+ !m.moderationReason() &&
274+ m.isIncoming();
275+ const mention = sender && onMention ? () => onMention(sender) : undefined;
268276
269277 return (
270278 <Message
......@@ -327,13 +335,11 @@ export const MessageBubble = ({
327335 <div className="meta">
328336 <div
329337 className={
330- (m.senderId !== chat.chatId &&
331- ["last", "single"].includes(position) &&
332- !m.moderationReason() &&
333- m.isIncoming()
334- ? ""
335- : "sr-only") + " h-card sender"
338+ (showSender ? "" : "sr-only") +
339+ " h-card sender " +
340+ (mention ? "clickable" : "")
336341 }
342+ onClick={mention}
337343 >
338344 {sender?.displayName}
339345 </div>
Back to top