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(web): group collapsed replies and hide tool server labels (#6946)

Eric Hayes8806f14784b8
diff --git a/apps/web/src/features/block-agent/component/parts/DisplayResultsToolCall.test.tsx b/apps/web/src/features/block-agent/component/parts/DisplayResultsToolCall.test.tsx
index bfe4a93b33..439ef281c9 100644
--- a/apps/web/src/features/block-agent/component/parts/DisplayResultsToolCall.test.tsx
+++ b/apps/web/src/features/block-agent/component/parts/DisplayResultsToolCall.test.tsx
@@ -47,7 +47,6 @@ function common(
return {
id: 'display-results',
label: 'DisplayResults',
- server: 'macro',
status,
muted: status === 'failed',
trailing: status === 'failed' ? 'Failed' : undefined,
diff --git a/apps/web/src/features/block-agent/component/parts/DisplayResultsToolCall.tsx b/apps/web/src/features/block-agent/component/parts/DisplayResultsToolCall.tsx
index 95a77891b5..6069b82eb6 100644
--- a/apps/web/src/features/block-agent/component/parts/DisplayResultsToolCall.tsx
+++ b/apps/web/src/features/block-agent/component/parts/DisplayResultsToolCall.tsx
@@ -33,7 +33,6 @@ export function DisplayResultsToolCall(props: {
fallback={
<ToolCard
title={props.common.label}
- subtitle={props.common.server}
status="failed"
muted
trailing="Failed"
diff --git a/apps/web/src/features/block-agent/component/parts/ElicitationPart.tsx b/apps/web/src/features/block-agent/component/parts/ElicitationPart.tsx
index 6d6ca50f92..2eb58bf95e 100644
--- a/apps/web/src/features/block-agent/component/parts/ElicitationPart.tsx
+++ b/apps/web/src/features/block-agent/component/parts/ElicitationPart.tsx
@@ -189,7 +189,6 @@ function ResolvedElicitation(props: { part: ElicitationPartData }) {
common={{
id: props.part.toolCall ?? String(props.part.requestId),
label: reviewed().request.tool,
- server: undefined,
status:
reviewed().toolOutcome.kind === 'failed' ? 'failed' : 'completed',
muted: reviewed().toolOutcome.kind === 'failed',
diff --git a/apps/web/src/features/block-agent/component/parts/ExchangeToolCall.tsx b/apps/web/src/features/block-agent/component/parts/ExchangeToolCall.tsx
index bdac34c480..0dd462e2ec 100644
--- a/apps/web/src/features/block-agent/component/parts/ExchangeToolCall.tsx
+++ b/apps/web/src/features/block-agent/component/parts/ExchangeToolCall.tsx
@@ -1,7 +1,7 @@
/**
* A summary-only row for calls without a registered result renderer.
- * The MCP server stays beside the tool name; raw arguments and results are
- * never exposed as a fallback disclosure.
+ * The row shows only the tool name; raw arguments and results are never
+ * exposed as a fallback disclosure.
*/
import type { ToolDetail } from '@service-agent-fold/generated/types';
@@ -18,7 +18,6 @@ export function ExchangeToolCall(props: {
return (
<ToolCard
title={props.common.label}
- subtitle={props.common.server}
status={props.common.status}
muted={props.common.muted || props.detail.error != null}
trailing={
diff --git a/apps/web/src/features/block-agent/component/parts/MacroToolCall.tsx b/apps/web/src/features/block-agent/component/parts/MacroToolCall.tsx
index cd37868dc5..3584a0f79b 100644
--- a/apps/web/src/features/block-agent/component/parts/MacroToolCall.tsx
+++ b/apps/web/src/features/block-agent/component/parts/MacroToolCall.tsx
@@ -77,7 +77,7 @@ export function MacroToolCall(props: {
) {
return input.name;
}
- return props.common.server;
+ return undefined;
};
const error = () => props.detail.error ?? responseError(response());
const failure = () => error() != null;
diff --git a/apps/web/src/features/block-agent/component/parts/ToolCallPart.test.tsx b/apps/web/src/features/block-agent/component/parts/ToolCallPart.test.tsx
index 2998c3fa76..9296b0d046 100644
--- a/apps/web/src/features/block-agent/component/parts/ToolCallPart.test.tsx
+++ b/apps/web/src/features/block-agent/component/parts/ToolCallPart.test.tsx
@@ -163,7 +163,7 @@ describe('ToolCallPart routing', () => {
);
});
- it('shows an MCP tool by its own name, with the server beside it', () => {
+ it('shows an MCP tool by its own name without the server label', () => {
const rendered = render(() => (
<ToolCallPart
part={{
@@ -180,7 +180,7 @@ describe('ToolCallPart routing', () => {
/>
));
expect(rendered.getByTestId('title').textContent).toBe('ask');
- expect(rendered.getByTestId('subtitle').textContent).toBe('deepwiki');
+ expect(rendered.getByTestId('subtitle').textContent).toBe('');
});
it('reuses a known renderer for calls from the explicit Macro MCP server', () => {
@@ -223,7 +223,7 @@ describe('ToolCallPart routing', () => {
/>
));
expect(rendered.getByTestId('tool-card').dataset.muted).toBe('true');
- expect(rendered.getByTestId('subtitle').textContent).toBe('ops');
+ expect(rendered.getByTestId('subtitle').textContent).toBe('');
expect(rendered.getByTestId('trailing').textContent).toBe('Failed');
expect(rendered.getByTestId('tool-card').dataset.expandable).toBe('false');
expect(rendered.getByTestId('body').textContent).toBe('');
@@ -246,7 +246,7 @@ describe('ToolCallPart routing', () => {
/>
));
expect(rendered.queryByTestId('macro-tool')).toBeNull();
- expect(rendered.getByTestId('subtitle').textContent).toBe('external');
+ expect(rendered.getByTestId('subtitle').textContent).toBe('');
expect(rendered.getByTestId('tool-card').dataset.expandable).toBe('false');
expect(rendered.getByTestId('body').textContent).toBe('');
});
diff --git a/apps/web/src/features/block-agent/component/parts/ToolCallPart.tsx b/apps/web/src/features/block-agent/component/parts/ToolCallPart.tsx
index 171d3d08a5..6b34968fdd 100644
--- a/apps/web/src/features/block-agent/component/parts/ToolCallPart.tsx
+++ b/apps/web/src/features/block-agent/component/parts/ToolCallPart.tsx
@@ -26,7 +26,6 @@ import {
type ToolCallContext,
type ToolUsePart,
toolLabel,
- toolServer,
} from './shared';
import { TerminalToolCall } from './TerminalToolCall';
import { UserToolCall } from './UserToolCall';
@@ -47,7 +46,6 @@ export function ToolCallPart(props: {
const common = (): ToolCallCommon => ({
id: props.part.id,
label: toolLabel(props.part.name),
- server: toolServer(props.part.name),
status: status(),
muted: failed(),
trailing: failed()
diff --git a/apps/web/src/features/block-agent/component/parts/shared.ts b/apps/web/src/features/block-agent/component/parts/shared.ts
index d5314d8a81..53ff547d60 100644
--- a/apps/web/src/features/block-agent/component/parts/shared.ts
+++ b/apps/web/src/features/block-agent/component/parts/shared.ts
@@ -37,8 +37,6 @@ export type ToolCallCommon = {
/** The ACP tool call id. */
id: string;
label: string;
- /** The MCP server the tool was reached over, for a tool that was. */
- server: string | undefined;
status: ToolStatus;
/** The chat block's failed treatment: faded row, quiet trailing label. */
muted: boolean;
@@ -53,11 +51,6 @@ export function toolLabel(name: ToolName): string {
return name.kind === 'mcp' ? name.tool : name.name;
}
-/** The MCP server a tool was reached over, when it was one. */
-export function toolServer(name: ToolName): string | undefined {
- return name.kind === 'mcp' ? name.server : undefined;
-}
-
/** Subtitle for a call that touched paths: the path, or how many. */
export function pathsSubtitle(paths: string[]): string | undefined {
if (paths.length === 0) return undefined;
diff --git a/apps/web/src/features/channel/StandaloneThread/Replies.tsx b/apps/web/src/features/channel/StandaloneThread/Replies.tsx
index 19359ebd3a..5dda480e55 100644
--- a/apps/web/src/features/channel/StandaloneThread/Replies.tsx
+++ b/apps/web/src/features/channel/StandaloneThread/Replies.tsx
@@ -4,7 +4,6 @@ import { Thread } from '../Thread';
import { buildThreadReplyListMeta } from '../Thread/reply-list-meta';
import { ThreadReplyRail } from '../Thread/ThreadReplyRail';
import {
- DEFAULT_VISIBLE_REPLY_COUNT,
getCollapsedRepliesCount,
getThreadLatestReplyAt,
getUniqueReplyUserIds,
@@ -28,11 +27,11 @@ export function Replies(props: RepliesProps) {
const collapsedRepliesCount = () =>
getCollapsedRepliesCount(
ctx.parent()?.thread.reply_count ?? ctx.replies().length,
- DEFAULT_VISIBLE_REPLY_COUNT
+ ctx.displayReplies().length
);
const collapsedReplyUsers = () =>
- getUniqueReplyUserIds(ctx.replies().slice(DEFAULT_VISIBLE_REPLY_COUNT));
+ getUniqueReplyUserIds(ctx.replies().slice(ctx.displayReplies().length));
const collapsedLatestReplyAt = () =>
getThreadLatestReplyAt(ctx.parent()?.thread.latest_reply_at, ctx.replies());
diff --git a/apps/web/src/features/channel/StandaloneThread/Root.tsx b/apps/web/src/features/channel/StandaloneThread/Root.tsx
index 61d31b8c88..0aae26d634 100644
--- a/apps/web/src/features/channel/StandaloneThread/Root.tsx
+++ b/apps/web/src/features/channel/StandaloneThread/Root.tsx
@@ -7,7 +7,7 @@ import type {
} from '@service-storage/messages';
import { createSignal, type ParentProps } from 'solid-js';
import { createFocusRequest } from '../Thread/focus-request';
-import { DEFAULT_VISIBLE_REPLY_COUNT } from '../Thread/utils/thread-reply-indicator-helpers';
+import { getVisibleReplyCount } from '../Thread/utils/thread-reply-indicator-helpers';
import { StandaloneThreadContext } from './context';
type RootProps = ParentProps<{
@@ -51,7 +51,7 @@ function RootInner(props: RootProps) {
const displayReplies = (): EntityMessage[] => {
const all = replies();
if (isExpanded()) return all;
- return all.slice(0, DEFAULT_VISIBLE_REPLY_COUNT);
+ return all.slice(0, getVisibleReplyCount(all));
};
return (
diff --git a/apps/web/src/features/channel/Thread/ChannelThread.tsx b/apps/web/src/features/channel/Thread/ChannelThread.tsx
index 6462676bc7..0df9974753 100644
--- a/apps/web/src/features/channel/Thread/ChannelThread.tsx
+++ b/apps/web/src/features/channel/Thread/ChannelThread.tsx
@@ -8,6 +8,7 @@ import { useThreadRepliesQuery } from '@queries/messages/thread-replies';
import type { Message as EntityMessage } from '@service-storage/messages';
import {
createEffect,
+ createMemo,
createSignal,
on,
onCleanup,
@@ -26,10 +27,10 @@ import { ThreadTypingIndicator } from './ThreadTypingIndicator';
import type { ThreadProps } from './types';
import { channelReplyInputOffsetX } from './utils/thread-rail-geometry';
import {
- DEFAULT_VISIBLE_REPLY_COUNT,
getCollapsedRepliesCount,
getThreadLatestReplyAt,
getUniqueReplyUserIds,
+ getVisibleReplyCount,
} from './utils/thread-reply-indicator-helpers';
export function ChannelThread(props: ThreadProps) {
@@ -78,20 +79,16 @@ export function ChannelThread(props: ThreadProps) {
return queryReplies() ?? thread().preview ?? [];
};
- const displayReplies = (): Array<EntityMessage> => {
- const preview = thread().preview ?? [];
- // When collapsed, use preview directly without reading query state.
- if (!props.isExpanded()) {
- return preview.length > DEFAULT_VISIBLE_REPLY_COUNT
- ? preview.slice(0, DEFAULT_VISIBLE_REPLY_COUNT)
- : preview;
- }
-
- // When expanded, prefer fetched data (full reply list).
- const fetched = queryReplies();
- if (fetched) return fetched;
- return preview;
- };
+ // Full replies can extend the server preview's final group. The guarded
+ // query read lets collapsed threads update without suspending while fetching.
+ const visibleReplyCount = createMemo(() =>
+ getVisibleReplyCount(activeReplies())
+ );
+ const displayReplies = createMemo(() =>
+ props.isExpanded()
+ ? activeReplies()
+ : activeReplies().slice(0, visibleReplyCount())
+ );
// Thread-local reply selection
const replySelection = createMessageSelection({
@@ -177,13 +174,13 @@ export function ChannelThread(props: ThreadProps) {
});
const collapsedRepliesCount = () =>
- getCollapsedRepliesCount(thread().reply_count, DEFAULT_VISIBLE_REPLY_COUNT);
+ getCollapsedRepliesCount(thread().reply_count, visibleReplyCount());
const collapsedRepliesContainsNewMessages = () =>
activeReplies()
- .slice(DEFAULT_VISIBLE_REPLY_COUNT)
+ .slice(visibleReplyCount())
.some((reply: EntityMessage) => props.isNewMessage?.(reply));
const collapsedReplyUsers = () =>
- getUniqueReplyUserIds(activeReplies().slice(DEFAULT_VISIBLE_REPLY_COUNT));
+ getUniqueReplyUserIds(activeReplies().slice(visibleReplyCount()));
const collapsedLatestReplyAt = () =>
getThreadLatestReplyAt(thread().latest_reply_at, activeReplies());
// Replying to this thread — inline input open, or the unified input bound.
diff --git a/apps/web/src/features/channel/Thread/create-thread-replies-fetch-gate.ts b/apps/web/src/features/channel/Thread/create-thread-replies-fetch-gate.ts
index 6c3b04dc13..d0ee58c75b 100644
--- a/apps/web/src/features/channel/Thread/create-thread-replies-fetch-gate.ts
+++ b/apps/web/src/features/channel/Thread/create-thread-replies-fetch-gate.ts
@@ -1,6 +1,6 @@
import { deferredGate } from '@core/util/debounce';
import type { Accessor } from 'solid-js';
-import { DEFAULT_VISIBLE_REPLY_COUNT } from './utils/thread-reply-indicator-helpers';
+import { DEFAULT_VISIBLE_REPLY_GROUP_COUNT } from './utils/thread-reply-indicator-helpers';
export const THREAD_REPLIES_FETCH_DEBOUNCE_MS = 300;
@@ -27,7 +27,7 @@ export function createThreadRepliesFetchGate(
const shouldFetchReplies = () =>
isTargetedReply() ||
options.isExpanded() ||
- options.replyCount() > DEFAULT_VISIBLE_REPLY_COUNT;
+ options.replyCount() > DEFAULT_VISIBLE_REPLY_GROUP_COUNT;
const debouncedFetchReplies = deferredGate(
shouldFetchReplies,
THREAD_REPLIES_FETCH_DEBOUNCE_MS
diff --git a/apps/web/src/features/channel/Thread/tests/create-thread-replies-fetch-gate.test.ts b/apps/web/src/features/channel/Thread/tests/create-thread-replies-fetch-gate.test.ts
index 10567a3d92..3cbb4e53cb 100644
--- a/apps/web/src/features/channel/Thread/tests/create-thread-replies-fetch-gate.test.ts
+++ b/apps/web/src/features/channel/Thread/tests/create-thread-replies-fetch-gate.test.ts
@@ -4,7 +4,7 @@ import {
createThreadRepliesFetchGate,
THREAD_REPLIES_FETCH_DEBOUNCE_MS,
} from '../create-thread-replies-fetch-gate';
-import { DEFAULT_VISIBLE_REPLY_COUNT } from '../utils/thread-reply-indicator-helpers';
+import { DEFAULT_VISIBLE_REPLY_GROUP_COUNT } from '../utils/thread-reply-indicator-helpers';
type FixtureOptions = {
isExpanded?: boolean;
@@ -50,7 +50,7 @@ describe('createThreadRepliesFetchGate', () => {
it('waits 300ms before enabling an ordinary thread reply fetch', async () => {
const fixture = createFixture({
- replyCount: DEFAULT_VISIBLE_REPLY_COUNT + 1,
+ replyCount: DEFAULT_VISIBLE_REPLY_GROUP_COUNT + 1,
});
await flushEffects();
diff --git a/apps/web/src/features/channel/Thread/tests/thread-reply-indicator-helpers.test.ts b/apps/web/src/features/channel/Thread/tests/thread-reply-indicator-helpers.test.ts
index 992935f3ec..118cb550cc 100644
--- a/apps/web/src/features/channel/Thread/tests/thread-reply-indicator-helpers.test.ts
+++ b/apps/web/src/features/channel/Thread/tests/thread-reply-indicator-helpers.test.ts
@@ -1,6 +1,6 @@
import { describe, expect, it } from 'vitest';
import {
- DEFAULT_VISIBLE_REPLY_COUNT,
+ DEFAULT_VISIBLE_REPLY_GROUP_COUNT,
getCollapsedRepliesCount,
getThreadLatestReplyAt,
getThreadReplyCountLabel,
@@ -9,9 +9,15 @@ import {
describe('thread-reply-indicator-helpers', () => {
it('computes the number of collapsed replies', () => {
- expect(getCollapsedRepliesCount(0, DEFAULT_VISIBLE_REPLY_COUNT)).toBe(0);
- expect(getCollapsedRepliesCount(2, DEFAULT_VISIBLE_REPLY_COUNT)).toBe(0);
- expect(getCollapsedRepliesCount(5, DEFAULT_VISIBLE_REPLY_COUNT)).toBe(2);
+ expect(getCollapsedRepliesCount(0, DEFAULT_VISIBLE_REPLY_GROUP_COUNT)).toBe(
+ 0
+ );
+ expect(getCollapsedRepliesCount(2, DEFAULT_VISIBLE_REPLY_GROUP_COUNT)).toBe(
+ 0
+ );
+ expect(getCollapsedRepliesCount(5, DEFAULT_VISIBLE_REPLY_GROUP_COUNT)).toBe(
+ 2
+ );
});
it('formats collapsed reply labels', () => {
diff --git a/apps/web/src/features/channel/Thread/tests/visible-reply-count.test.ts b/apps/web/src/features/channel/Thread/tests/visible-reply-count.test.ts
new file mode 100644
index 0000000000..c99f3d3e01
--- /dev/null
+++ b/apps/web/src/features/channel/Thread/tests/visible-reply-count.test.ts
@@ -0,0 +1,107 @@
+import { senderFromStorageId } from '@queries/messages/message-sender';
+import { describe, expect, it } from 'vitest';
+import type { GroupableMessage } from '../../Channel/message-grouping-meta';
+import {
+ getCollapsedRepliesCount,
+ getUniqueReplyUserIds,
+ getVisibleReplyCount,
+} from '../utils/thread-reply-indicator-helpers';
+
+function repliesFromSenders(senders: string[]): GroupableMessage[] {
+ return senders.map((senderId, index) => ({
+ id: `reply-${index}`,
+ sender_id: senderId,
+ sender: senderFromStorageId(senderId),
+ created_at: new Date(Date.UTC(2026, 8, 24, 9, index)).toISOString(),
+ attachments: [],
+ deleted_at: null,
+ }));
+}
+
+describe('collapsed reply groups', () => {
+ it('shows no replies for an empty thread', () => {
+ expect(getVisibleReplyCount([])).toBe(0);
+ });
+
+ it('keeps a long run from one sender fully visible', () => {
+ const replies = repliesFromSenders(Array(10).fill('user-a'));
+ const visibleCount = getVisibleReplyCount(replies);
+ expect(visibleCount).toBe(10);
+ expect(getCollapsedRepliesCount(replies.length, visibleCount)).toBe(0);
+ });
+
+ it('shows exactly three complete groups and counts only hidden replies', () => {
+ const replies = repliesFromSenders([
+ 'user-a',
+ 'user-a',
+ 'user-b',
+ 'user-b',
+ 'user-c',
+ 'user-c',
+ 'user-d',
+ 'user-d',
+ ]);
+ const visibleCount = getVisibleReplyCount(replies);
+ expect(visibleCount).toBe(6);
+ expect(getCollapsedRepliesCount(replies.length, visibleCount)).toBe(2);
+ expect(getUniqueReplyUserIds(replies.slice(visibleCount))).toEqual([
+ 'user-d',
+ ]);
+ });
+
+ it('counts a returning sender as a new group', () => {
+ const replies = repliesFromSenders([
+ 'user-a',
+ 'user-b',
+ 'user-a',
+ 'user-b',
+ ]);
+ expect(getVisibleReplyCount(replies)).toBe(3);
+ });
+
+ it('keeps replies at the five-minute boundary together but splits longer gaps', () => {
+ const replies = repliesFromSenders(Array(5).fill('user-a'));
+ const minutes = [0, 5, 11, 17, 23];
+ replies.forEach((reply, index) => {
+ reply.created_at = new Date(
+ Date.UTC(2026, 8, 24, 9, minutes[index])
+ ).toISOString();
+ });
+ expect(getVisibleReplyCount(replies)).toBe(4);
+ });
+
+ it('respects deleted-message group boundaries', () => {
+ const replies = repliesFromSenders(Array(5).fill('user-a'));
+ replies[1].deleted_at = replies[1].created_at;
+ replies[3].deleted_at = replies[3].created_at;
+ expect(getVisibleReplyCount(replies)).toBe(3);
+ });
+
+ it('separates agent replies triggered by different users', () => {
+ const replies = repliesFromSenders(Array(5).fill('bot|macro'));
+ const triggers = ['user-a', 'user-a', 'user-b', 'user-c', 'user-d'];
+ replies.forEach((reply, index) => {
+ reply.sender = {
+ type: 'bot',
+ id: 'macro',
+ name: 'Macro',
+ triggered_by: triggers[index],
+ };
+ });
+ expect(getVisibleReplyCount(replies)).toBe(4);
+ });
+
+ it('extends a truncated preview when more replies in the group load', () => {
+ const replies = repliesFromSenders([
+ 'user-a',
+ 'user-a',
+ 'user-a',
+ 'user-a',
+ 'user-b',
+ 'user-c',
+ 'user-d',
+ ]);
+ expect(getVisibleReplyCount(replies.slice(0, 3))).toBe(3);
+ expect(getVisibleReplyCount(replies)).toBe(6);
+ });
+});
diff --git a/apps/web/src/features/channel/Thread/utils/thread-reply-indicator-helpers.ts b/apps/web/src/features/channel/Thread/utils/thread-reply-indicator-helpers.ts
index f7fd263899..7bc426886d 100644
--- a/apps/web/src/features/channel/Thread/utils/thread-reply-indicator-helpers.ts
+++ b/apps/web/src/features/channel/Thread/utils/thread-reply-indicator-helpers.ts
@@ -1,13 +1,33 @@
-export const DEFAULT_VISIBLE_REPLY_COUNT = 3;
+import {
+ type GroupableMessage,
+ shouldGroupWithPreviousMessage,
+} from '../../Channel/message-grouping-meta';
+
+export const DEFAULT_VISIBLE_REPLY_GROUP_COUNT = 3;
type ThreadReplyMeta = {
sender_id: string;
created_at: string;
};
+/** Keep complete avatar groups visible, including every reply in the last group. */
+export function getVisibleReplyCount(
+ replies: ReadonlyArray<GroupableMessage>,
+ maxGroups: number = DEFAULT_VISIBLE_REPLY_GROUP_COUNT
+): number {
+ let groupCount = 0;
+ for (let index = 0; index < replies.length; index += 1) {
+ if (!shouldGroupWithPreviousMessage(replies[index], replies[index - 1])) {
+ groupCount += 1;
+ if (groupCount > maxGroups) return index;
+ }
+ }
+ return replies.length;
+}
+
export function getCollapsedRepliesCount(
totalReplies: number,
- visibleReplies: number = DEFAULT_VISIBLE_REPLY_COUNT
+ visibleReplies: number
): number {
return Math.max(totalReplies - visibleReplies, 0);
}
diff --git a/apps/web/src/lib/core/component/AI/component/tool/McpToolCall.tsx b/apps/web/src/lib/core/component/AI/component/tool/McpToolCall.tsx
index 990035dfce..9170c4ce27 100644
--- a/apps/web/src/lib/core/component/AI/component/tool/McpToolCall.tsx
+++ b/apps/web/src/lib/core/component/AI/component/tool/McpToolCall.tsx
@@ -20,8 +20,6 @@ export function McpToolCall(props: {
type="call"
>
<div class="flex min-w-0 flex-1 items-center gap-2 overflow-hidden">
- <span class="shrink-0 text-ink-muted">{props.service}</span>
- <span class="text-ink-extra-muted">/</span>
<span class="min-w-0 truncate">{props.display_name ?? props.name}</span>
</div>
</BaseTool>
diff --git a/docs/AGENT_GUIDE/ai-chat.md b/docs/AGENT_GUIDE/ai-chat.md
index 760b8a9833..abf0fbc48a 100644
--- a/docs/AGENT_GUIDE/ai-chat.md
+++ b/docs/AGENT_GUIDE/ai-chat.md
@@ -514,6 +514,9 @@ to open the PR entity in a split; until GitHub has synced the entity the
chip is a GitHub link instead. The icon and status word follow open /
merged / closed.
+Tool rows show the tool's own name without an MCP server or workspace prefix.
+Chat MCP rows retain their service icon.
+
Individual tools appear as bare rows with an icon, tool name, optional detail,
and a right-aligned result summary. The caret on the right opens the results;
it points right when collapsed and down when expanded. Individual results start
diff --git a/docs/AGENT_GUIDE/channels.md b/docs/AGENT_GUIDE/channels.md
index f517e674e2..a790b08e26 100644
--- a/docs/AGENT_GUIDE/channels.md
+++ b/docs/AGENT_GUIDE/channels.md
@@ -10,6 +10,20 @@
Team channels are always discoverable to the team. Private channels can only be viewed or joined by invitation. A DM is a channel between two users.
An external email can be selected as a channel participant. For an unregistered recipient, clicking `Add` sends an email invite.
+## Collapsed reply chains
+
+Collapsed threads show the first three complete message groups. Consecutive
+replies from the same sender within the five-minute avatar-grouping window count
+as one group, so a run of short messages stays together. A different sender or a
+longer gap starts another group; returning to an earlier sender also starts a new
+group. Deleted replies and agent replies triggered by different users keep the
+same group boundaries as their avatar display.
+
+The `N more replies` control counts individual hidden replies and expands the
+whole thread. Check a thread with more than three consecutive replies from one
+sender (all remain visible), then one with four groups (the first three groups
+remain visible in full). Standalone thread previews follow the same rule.
+
## Agent session entities
The Agents list includes owned and shared sessions. Rows show the shared agent
@@ -22,9 +36,9 @@ session-specific.
A session transcript shows each tool call as a collapsible row (consecutive calls
fold into a `Called N tools` group; click it to see the rows). A tool reached over
-an MCP server - Macro's own (`ReadContent · macro`) from a Cursor, Claude, or
-Codex session, or a third-party server (`ask_question · deepwiki`) - is titled by
-the tool's name with the server as its subtitle, never by the harness's dispatcher
+an MCP server - Macro's own (`ReadContent`) from a Cursor, Claude, or
+Codex session, or a third-party server (`ask_question`) - is titled by
+the tool's own name, without a server or workspace label, never by the harness's dispatcher
(`mcp`). Clicking the row expands the exchange: a `Request` section with the
tool's own arguments and a `Response` section with what it returned, both as
syntax-lit, pretty-printed JSON (prose results show as text), each with a copy