Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

fix(rooms): keep long sender names aligned and inside the row

Bruno880b0c09a5e1
diff --git a/src/components/ChatView.tsx b/src/components/ChatView.tsx
index 860df10712..df2596b5d1 100644
--- a/src/components/ChatView.tsx
+++ b/src/components/ChatView.tsx
@@ -420,7 +420,7 @@ const Bubble = memo(function Bubble({
return (
<div {...{ [MESSAGE_ROW]: "" }} className={cn("group flex w-full flex-col", user ? "animate-msg-in items-end" : "items-start", simple && join?.above && SIMPLE_STACKED)}>
{message.relay ? <RelayLabel message={message} /> : peer && <PeerLabel peer={peer} />}
- {speaker && <div className="mb-0.5 px-1 text-[12px] font-medium text-ink-secondary">{speaker}</div>}
+ {speaker && <div className="mb-0.5 px-1 text-right text-[12px] [overflow-wrap:anywhere] font-medium text-ink-secondary">{speaker}</div>}
<div className={cn("flex w-full items-center gap-1.5", user ? "justify-end" : "justify-start")}>
{user && (
<MessageActions
diff --git a/src/components/GroupView.tsx b/src/components/GroupView.tsx
index 83db693785..4e99b1f4aa 100644
--- a/src/components/GroupView.tsx
+++ b/src/components/GroupView.tsx
@@ -203,7 +203,7 @@ function RoomTextMessage({
);
return (
<div {...{ [MESSAGE_ROW]: "" }} className={cn("group flex w-full flex-col", user ? "items-end" : "items-start")}>
- {speaker && <div className="mb-0.5 px-1 text-[12px] font-medium text-ink-secondary">{speaker}</div>}
+ {speaker && <div className="mb-0.5 px-1 text-right text-[12px] [overflow-wrap:anywhere] font-medium text-ink-secondary">{speaker}</div>}
<div className={cn("flex w-full items-end gap-1.5", user ? "justify-end" : "justify-start")}>
{user && (
<MessageActions side="user" menu={[...userMessageMenu({ messageId: m.id, pin }), ...forkAction]}>