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.

chore(agents): harness row for in-memory agent sessions (#6735)

Wolf Mermelstein3c6f3896dbab
diff --git a/apps/web/src/features/block-agent/component/compose-agent-session-options.test.ts b/apps/web/src/features/block-agent/component/compose-agent-session-options.test.ts
index 57539f9a42..9de680da0e 100644
--- a/apps/web/src/features/block-agent/component/compose-agent-session-options.test.ts
+++ b/apps/web/src/features/block-agent/component/compose-agent-session-options.test.ts
@@ -7,6 +7,7 @@ import {
harnessTitle,
sessionHarnessTitle,
sessionRepositoryUrl,
+ showsSessionHarness,
} from './compose-agent-session-options';
describe('sessionRepositoryUrl', () => {
@@ -87,3 +88,24 @@ describe('sessionHarnessTitle', () => {
expect(sessionHarnessTitle({ harness: 'in-memory' })).toBe('Macro Agent');
});
});
+
+describe('showsSessionHarness', () => {
+ it('hides the Details row for in-memory chat agents', () => {
+ expect(showsSessionHarness({ harness: 'in-memory' })).toBe(false);
+ expect(showsSessionHarness({ harness: 'macro-inmem' })).toBe(false);
+ expect(showsSessionHarness({})).toBe(false);
+ });
+
+ it('keeps the Details row for coding runtimes', () => {
+ expect(showsSessionHarness({ harness: 'cursor' })).toBe(true);
+ expect(showsSessionHarness({ harness: 'claude-cloud' })).toBe(true);
+ expect(showsSessionHarness({ harness: 'sandbox' })).toBe(true);
+ expect(showsSessionHarness({ harness: 'my-laptop' })).toBe(true);
+ });
+
+ it('keeps the Details row for first-party coding bots stamped opencode', () => {
+ expect(
+ showsSessionHarness({ harness: 'opencode', botId: CURSOR_BOT_ID })
+ ).toBe(true);
+ });
+});
diff --git a/apps/web/src/features/block-agent/component/compose-agent-session-options.ts b/apps/web/src/features/block-agent/component/compose-agent-session-options.ts
index fb6c9aa4c9..7f46e626e3 100644
--- a/apps/web/src/features/block-agent/component/compose-agent-session-options.ts
+++ b/apps/web/src/features/block-agent/component/compose-agent-session-options.ts
@@ -87,6 +87,19 @@ export function harnessDisplayName(harness: string): string {
}
}
+/**
+ * Session Details lists a harness only for coding runtimes. In-memory chat
+ * agents have no user-facing harness, so the row stays off. Uses the same
+ * slug as `sessionHarnessTitle` so a first-party coding bot still shows even
+ * when an older row was stamped `opencode`.
+ */
+export function showsSessionHarness(session: {
+ harness?: string;
+ botId?: string;
+}): boolean {
+ return isCoderHarness(sessionHarnessSlug(session));
+}
+
/** A model's display name, or its id when the runtime lists no name for it. */
export function modelDisplayName(
id: string,
diff --git a/apps/web/src/features/block-agent/component/sidepanel/AgentSidePanelSections.tsx b/apps/web/src/features/block-agent/component/sidepanel/AgentSidePanelSections.tsx
index cfd7e0d53b..942bfc1d69 100644
--- a/apps/web/src/features/block-agent/component/sidepanel/AgentSidePanelSections.tsx
+++ b/apps/web/src/features/block-agent/component/sidepanel/AgentSidePanelSections.tsx
@@ -24,6 +24,7 @@ import { AgentPullRequestChip } from '../AgentPullRequestChip';
import {
sessionHarnessTitle,
sessionRepositoryUrl,
+ showsSessionHarness,
} from '../compose-agent-session-options';
export function AgentSidePanelSections() {
@@ -51,13 +52,15 @@ export function AgentSidePanelSections() {
</SidePanel.Row>
)}
</Show>
- <SidePanel.Row label="Harness">
- <SidePanel.Pill>
- <span class="truncate">
- {sessionHarnessTitle(session() ?? {})}
- </span>
- </SidePanel.Pill>
- </SidePanel.Row>
+ <Show when={showsSessionHarness(session() ?? {})}>
+ <SidePanel.Row label="Harness">
+ <SidePanel.Pill>
+ <span class="truncate">
+ {sessionHarnessTitle(session() ?? {})}
+ </span>
+ </SidePanel.Pill>
+ </SidePanel.Row>
+ </Show>
<Show when={metadata()?.model ?? session()?.model}>
{(model) => (
<SidePanel.Row label="Model">
diff --git a/docs/AGENT_GUIDE/ai-chat.md b/docs/AGENT_GUIDE/ai-chat.md
index f8a5d8b86f..d0f86eb4da 100644
--- a/docs/AGENT_GUIDE/ai-chat.md
+++ b/docs/AGENT_GUIDE/ai-chat.md
@@ -122,8 +122,9 @@
saved-title precedence, and title menu as `/app/agent/<id>`; click the caret
beside the title for shared block actions such as Rename, Copy link, Favorite,
and Delete
- (Rename, Copy link, Delete). A metadata strip lists the agent, runtime,
- model, repository, and status. Chat and Code session inputs
+ (Rename, Copy link, Delete). A metadata strip lists the agent, model,
+ repository, and status. Coding sessions also list the harness; in-memory
+ chat agents omit that row. Chat and Code session inputs
use the same growing, initially single-line input with the model selector on
the right.
Existing sessions retain their agent and kind; use **New conversation** to
@@ -394,6 +395,8 @@ There is no breadcrumb because Agents has no subspaces. Unknown model providers
fall back to the chat icon. The toggle (or `]`) opens the session's Details, Plan,
Changes, and Activity sections when available, beside the transcript in wide
layouts or over it in narrow layouts; it does not open another split.
+Details lists Status, Agent, Model, and dates for every session; the Harness
+row appears only for coding runtimes, never for in-memory chat agents.
New conversation pages have no disabled session action buttons. Older chats
also have one header row, and empty chats show a simple conversation prompt
instead of the standalone recent-sessions and tips surface.