Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(mobile channels): "Replying to thread" input when thread has existing replies (#4943)

Peter Chinman2083b76ad90f
diff --git a/apps/web/src/features/channel/Channel/Channel.tsx b/apps/web/src/features/channel/Channel/Channel.tsx
index bce659fd04..5162701034 100644
--- a/apps/web/src/features/channel/Channel/Channel.tsx
+++ b/apps/web/src/features/channel/Channel/Channel.tsx
@@ -810,6 +810,10 @@ export function Channel(props: ChannelProps) {
if (target?.replyId) return undefined;
return messageById().get(threadId);
}}
+ threadHasReplies={() =>
+ (messageById().get(threadId)?.thread
+ .reply_count ?? 0) > 0
+ }
onNavigateToTarget={() =>
goToMessage(
threadId,
diff --git a/apps/web/src/features/channel/Channel/UnifiedReplyInput.tsx b/apps/web/src/features/channel/Channel/UnifiedReplyInput.tsx
index 1902e7ef03..028cfb86f2 100644
--- a/apps/web/src/features/channel/Channel/UnifiedReplyInput.tsx
+++ b/apps/web/src/features/channel/Channel/UnifiedReplyInput.tsx
@@ -20,6 +20,11 @@ export function UnifiedReplyInput(props: {
* otherwise the thread root.
*/
getTargetMessage: () => MessageData | undefined;
+ /**
+ * Whether the target thread already has replies. When it does, the flag
+ * reads "Replying to thread"; otherwise it names the message's sender.
+ */
+ threadHasReplies: () => boolean;
onNavigateToTarget: () => void;
onExit: () => void;
}) {
@@ -31,7 +36,7 @@ export function UnifiedReplyInput(props: {
<InputFlag
label={
<Show
- when={props.getTargetMessage()}
+ when={!props.threadHasReplies() && props.getTargetMessage()}
keyed
fallback="Replying to thread"
>