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: remove sandbox size selector from agent session info panel (#6020)

Wolf Mermelstein22234c9461ba
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 e315c8532e..e5ec4d8755 100644
--- a/apps/web/src/features/block-agent/component/sidepanel/AgentSidePanelSections.tsx
+++ b/apps/web/src/features/block-agent/component/sidepanel/AgentSidePanelSections.tsx
@@ -12,14 +12,12 @@
import { SidePanel, useSidePanel } from '@components/app/side-panel';
import { useSplitPanel } from '@components/app/split-layout/layoutUtils';
-import { toast } from '@core/component/Toast/Toast';
import { registerHotkey } from '@core/hotkey/hotkeys';
import { TOKENS } from '@core/hotkey/tokens';
import { formatDate } from '@core/util/date';
import { openExternalUrl } from '@core/util/url';
import GitBranch from '@phosphor/git-branch.svg';
-import { agentHarnessServiceClient } from '@service-agent-harness/client';
-import { createMemo, createSignal, For, onCleanup, Show } from 'solid-js';
+import { createMemo, For, onCleanup, Show } from 'solid-js';
import { useAgentSession } from '../../context/AgentSessionContext';
import {
activityCounts,
@@ -29,35 +27,13 @@ import {
import {
CountSummary,
DiffChanges,
- type SandboxSize,
- SandboxSizeSelector,
SessionStatusPill,
TodoList,
} from '../../ui';
import { harnessTitle } from '../AgentSplitHeader';
export function AgentSidePanelSections() {
- const { session, sessionId, bot, metadata, messages, status, loadFailed } =
- useAgentSession();
- const [pendingSize, setPendingSize] = createSignal<SandboxSize>();
- const [resizing, setResizing] = createSignal(false);
- const size = () => pendingSize() ?? session()?.sandboxSize ?? 'default';
-
- const setSandboxSize = async (next: SandboxSize) => {
- const id = sessionId();
- if (!id || next === size() || resizing()) return;
- const previous = size();
- setPendingSize(next);
- setResizing(true);
- const result = await agentHarnessServiceClient
- .setSessionSandboxSize(id, next)
- .catch(() => undefined);
- setResizing(false);
- if (result === undefined || result.isErr()) {
- setPendingSize(previous);
- toast.failure('Could not resize the sandbox');
- }
- };
+ const { session, bot, metadata, messages, status } = useAgentSession();
const plan = createMemo(() => latestPlan(messages()));
const files = createMemo(() => changedFiles(messages()));
@@ -108,13 +84,6 @@ export function AgentSidePanelSections() {
<span class="truncate">{harnessTitle(session()?.harness)}</span>
</SidePanel.Pill>
</SidePanel.Row>
- <SidePanel.Row label="Sandbox size">
- <SandboxSizeSelector
- size={size()}
- disabled={loadFailed() || resizing() || !sessionId()}
- onSelect={setSandboxSize}
- />
- </SidePanel.Row>
<Show when={metadata()?.model ?? session()?.model}>
{(model) => (
<SidePanel.Row label="Model">
diff --git a/apps/web/src/features/block-agent/ui/SandboxSizeSelector.tsx b/apps/web/src/features/block-agent/ui/SandboxSizeSelector.tsx
deleted file mode 100644
index 4c449554a8..0000000000
--- a/apps/web/src/features/block-agent/ui/SandboxSizeSelector.tsx
+++ /dev/null
@@ -1,67 +0,0 @@
-import CaretDown from '@phosphor-icons/core/regular/caret-down.svg?component-solid';
-import sizes from '@sandbox-sizes';
-import { Dropdown } from '@ui';
-import { For } from 'solid-js';
-
-/** Named compute tier for a managed coding-agent sandbox. */
-export type SandboxSize = 'small' | 'default' | 'large';
-
-const TIER_LABELS: Record<SandboxSize, string> = {
- small: 'Small',
- default: 'Default',
- large: 'Large',
-};
-
-const TIERS = (Object.keys(TIER_LABELS) as SandboxSize[]).map((id) => {
- const { cpu, memoryGib, diskGib } = sizes[id];
- return {
- id,
- label: TIER_LABELS[id],
- detail: `${cpu} vCPU · ${memoryGib} GiB · ${diskGib} GiB`,
- };
-});
-
-export interface SandboxSizeSelectorProps {
- size: SandboxSize;
- disabled?: boolean;
- onSelect: (size: SandboxSize) => void;
-}
-
-export function SandboxSizeSelector(props: SandboxSizeSelectorProps) {
- const selected = () =>
- TIERS.find((tier) => tier.id === props.size) ?? TIERS[1]!;
-
- return (
- <Dropdown placement="bottom-end">
- <Dropdown.Trigger
- variant="ghost"
- size="sm"
- class="rounded-lg gap-1.5 text-xs"
- disabled={props.disabled}
- label={selected().label}
- >
- {selected().label}
- <CaretDown />
- </Dropdown.Trigger>
- <Dropdown.Content>
- <Dropdown.Group>
- <For each={TIERS}>
- {(tier) => (
- <Dropdown.Item
- class="gap-2"
- onSelect={() => props.onSelect(tier.id)}
- >
- <span class="flex min-w-0 flex-col">
- <span class="text-xs">{tier.label}</span>
- <span class="text-[11px] text-ink-extra-muted">
- {tier.detail}
- </span>
- </span>
- </Dropdown.Item>
- )}
- </For>
- </Dropdown.Group>
- </Dropdown.Content>
- </Dropdown>
- );
-}
diff --git a/apps/web/src/features/block-agent/ui/index.ts b/apps/web/src/features/block-agent/ui/index.ts
index 3486b3ae38..a8aeffecfa 100644
--- a/apps/web/src/features/block-agent/ui/index.ts
+++ b/apps/web/src/features/block-agent/ui/index.ts
@@ -30,11 +30,6 @@ export {
QueuedPromptList,
type QueuedPromptListProps,
} from './QueuedPromptList';
-export {
- type SandboxSize,
- SandboxSizeSelector,
- type SandboxSizeSelectorProps,
-} from './SandboxSizeSelector';
export {
type SessionStatusLike,
SessionStatusPill,