diff --git a/desktop/src/features/channels/ui/BotActivityBar.tsx b/desktop/src/features/channels/ui/BotActivityBar.tsx index 9f488540f..5fcd84f71 100644 --- a/desktop/src/features/channels/ui/BotActivityBar.tsx +++ b/desktop/src/features/channels/ui/BotActivityBar.tsx @@ -99,6 +99,10 @@ export function BotActivityBar({ typingAgents.length === 1 ? typingAgents[0]?.name : `${typingAgents[0]?.name ?? "Agent"} +${typingAgents.length - 1}`; + const activeAgentCountLabel = + typingAgents.length === 1 + ? "1 active agent" + : `${typingAgents.length} active agents`; const visibleInlineAgents = typingAgents.slice(0, MAX_INLINE_AGENT_AVATARS); return ( @@ -153,7 +157,7 @@ export function BotActivityBar({ sideOffset={8} >
- Active agents + {activeAgentCountLabel}
{typingAgents.map((agent) => ( - ); - } - - return ( - - - {/* biome-ignore lint/a11y/noStaticElementInteractions: span delegates hover/focus to disabled button */} - - - - - e.preventDefault()} - onCloseAutoFocus={(e) => e.preventDefault()} - > - - - - ); -} diff --git a/desktop/src/features/messages/ui/MessageRow.tsx b/desktop/src/features/messages/ui/MessageRow.tsx index a840cdb5e..eb0a9f8e8 100644 --- a/desktop/src/features/messages/ui/MessageRow.tsx +++ b/desktop/src/features/messages/ui/MessageRow.tsx @@ -1,7 +1,6 @@ import * as React from "react"; import type { TimelineMessage } from "@/features/messages/types"; -import { MessageReactions } from "@/features/messages/ui/MessageReactions"; import { useReactionHandler } from "@/features/messages/ui/useReactionHandler"; import type { UserProfileLookup } from "@/features/profile/lib/identity"; import { UserProfilePopover } from "@/features/profile/ui/UserProfilePopover"; @@ -223,15 +222,6 @@ export const MessageRow = React.memo( const messageBodyNode = ( <> {renderBody()} - { - void handleReactionSelect(emoji); - }} - /> {reactionErrorMessage ? (

{reactionErrorMessage} diff --git a/desktop/src/features/messages/ui/MessageThreadSummaryRow.tsx b/desktop/src/features/messages/ui/MessageThreadSummaryRow.tsx index 30f316b22..3ed50e92b 100644 --- a/desktop/src/features/messages/ui/MessageThreadSummaryRow.tsx +++ b/desktop/src/features/messages/ui/MessageThreadSummaryRow.tsx @@ -29,25 +29,28 @@ function ParticipantAvatar({ } export function MessageThreadSummaryRow({ + alignWithText = true, depth = 0, message, onOpenThread, summary, }: { + alignWithText?: boolean; depth?: number; message: TimelineMessage; onOpenThread: (message: TimelineMessage) => void; summary: TimelineThreadSummary; }) { const visibleDepth = Math.min(Math.max(depth, 0), 6); - const marginLeftPx = visibleDepth * 28; + const messageTextOffsetPx = 60; + const marginLeftPx = visibleDepth * 28 + messageTextOffsetPx; const depthGuideOffsets = Array.from( { length: visibleDepth }, (_, index) => 14 + index * 28, ); return ( -

+
{depthGuideOffsets.length > 0 ? (
onOpenThread(message)} - style={{ marginLeft: `${marginLeftPx}px` }} + style={alignWithText ? { marginLeft: `${marginLeftPx}px` } : undefined} type="button" > -
+ {summary.participants.map((participant, index) => ( ))} -
-
-
- - {summary.replyCount}{" "} - {summary.replyCount === 1 ? "reply" : "replies"} - -
-
+ + + {summary.replyCount} {summary.replyCount === 1 ? "reply" : "replies"} +
); diff --git a/desktop/src/features/messages/ui/SystemMessageRow.tsx b/desktop/src/features/messages/ui/SystemMessageRow.tsx index a333e602d..64a02a710 100644 --- a/desktop/src/features/messages/ui/SystemMessageRow.tsx +++ b/desktop/src/features/messages/ui/SystemMessageRow.tsx @@ -4,7 +4,6 @@ import data from "@emoji-mart/data"; import * as React from "react"; import type { TimelineMessage } from "@/features/messages/types"; -import { MessageReactions } from "@/features/messages/ui/MessageReactions"; import { useReactionHandler } from "@/features/messages/ui/useReactionHandler"; import type { UserProfileLookup } from "@/features/profile/lib/identity"; import { resolveUserLabel } from "@/features/profile/lib/identity"; @@ -98,7 +97,6 @@ export const SystemMessageRow = React.memo(function SystemMessageRow({ }) { const [isReactionPickerOpen, setIsReactionPickerOpen] = React.useState(false); const { - reactions, canToggle: canToggleReactions, pending: reactionPending, errorMessage: reactionErrorMessage, @@ -214,15 +212,6 @@ export const SystemMessageRow = React.memo(function SystemMessageRow({
- { - void handleReactionSelect(emoji); - }} - /> {reactionErrorMessage ? (

{reactionErrorMessage} diff --git a/desktop/src/features/messages/ui/TimelineMessageList.tsx b/desktop/src/features/messages/ui/TimelineMessageList.tsx index 54e630e73..ed8f8b9bb 100644 --- a/desktop/src/features/messages/ui/TimelineMessageList.tsx +++ b/desktop/src/features/messages/ui/TimelineMessageList.tsx @@ -61,6 +61,11 @@ export const TimelineMessageList = React.memo(function TimelineMessageList({ [messages], ); + function getTextColumnOffsetPx(depth = 0) { + const visibleDepth = Math.min(Math.max(depth, 0), 6); + return visibleDepth * 28 + 60; + } + for (let i = 0; i < entries.length; i++) { const { message, summary } = entries[i]; const prev = i > 0 ? entries[i - 1]?.message : null; @@ -119,12 +124,16 @@ export const TimelineMessageList = React.memo(function TimelineMessageList({ renderedTrailingContent = true; elements.push(

, ); } + } else if (trailingContent && i === entries.length - 1) { + renderedTrailingContent = true; + elements.push( +
+ {trailingContent} +
, + ); } } } diff --git a/desktop/src/features/messages/useChannelTyping.ts b/desktop/src/features/messages/useChannelTyping.ts index 69975b949..36d1867aa 100644 --- a/desktop/src/features/messages/useChannelTyping.ts +++ b/desktop/src/features/messages/useChannelTyping.ts @@ -8,7 +8,7 @@ import { relayClient } from "@/shared/api/relayClient"; import type { Channel, RelayEvent } from "@/shared/api/types"; import { KIND_STREAM_MESSAGE, - KIND_STREAM_MESSAGE_DIFF, + KIND_STREAM_MESSAGE_V2, KIND_TYPING_INDICATOR, } from "@/shared/constants/kinds"; import { resolveEventAuthorPubkey } from "@/shared/lib/authors"; @@ -52,8 +52,7 @@ function isTypingCompletionEvent(event: RelayEvent | null | undefined) { } return ( - event.kind === KIND_STREAM_MESSAGE || - event.kind === KIND_STREAM_MESSAGE_DIFF + event.kind === KIND_STREAM_MESSAGE || event.kind === KIND_STREAM_MESSAGE_V2 ); }