Repository navigation
Description
Problem / summary
(measured: owner report, 17 Nov 2026) The Send to agent button in the AI Terminal panel is so small that it can't be seen. It should use the active (primary) button color so it is easy to spot.
(measured: source) The AI Terminal toolbars shrink the composer's control to a 20 px square with a 13 px muted-gray icon. It sits in a translucent toolbar over the terminal output, next to the split and new-terminal icons, which look the same. Nothing marks it as the panel's main action. Area: apps/web.
Evidence tags: (measured) means inspected source, tests, docs or the owner report. It does not mean the app or tests were run. (inferred) is a source-derived conclusion or a proposal. (guess) is unverified.
Current behavior
(measured) Verified at be03142dcd9f14378d4357d83ad65d2cf5af513a (main, merge of PR #379). Every path:line below refers to this SHA.
- The control is the shared
SendToAgentButton. Its trigger isButton variant="ghost" size="icon-sm"with aForwardIconand no visible text. The accessible name is "Send to agent" or "Send to agent, N answers waiting", and the tooltip reads "Send to agent" (SendToAgentButton.tsx:106–133,:185;sendToAgent.logic.ts:121–125). (measured) - On an AI Terminal,
TerminalSendComposerrenders that button followed by the Send requests inbox button (also ghosticon-sm) (TerminalSendComposer.tsx:376–403,TerminalSendRequests.tsx:66–77). Only AI Terminals get it (ThreadTerminalPanel.tsx:3509–3519). (measured) - The terminal panel wraps both buttons in
TOOLBAR_SEND_CLASS = "inline-flex items-center [&_button]:size-5 [&_button]:rounded-none [&_svg]:size-3.25". The in-source comment says: "The control's icon button is sized for the composer; the toolbars are about 22px tall." (ThreadTerminalPanel.tsx:3247–3249). Result: a 20 × 20 px target with a 13 px icon. (measured) - Two placements:
- Floating toolbar. With no terminal sidebar, the toolbar is pinned top-right over the output,
bg-background/70with a thin border (:3564–3576). (measured) - Sidebar toolbar. With a terminal sidebar, the toolbar is a fixed
h-[22px]strip (:3735–3743). (measured)
- Floating toolbar. With no terminal sidebar, the toolbar is pinned top-right over the output,
- The neighbouring split and new-terminal buttons are
p-1withsize-3.25icons andtext-foreground/90(:3580–3624). Send to agent is the same size. The ghost variant also paints its icontext-muted-foreground, so it is fainter than its neighbours (button.tsx:40). (measured) - When answers wait, the control shows a dot with
bg-primary(SendToAgentButton.tsx:124–130). (inferred) On a primary-colored button that dot would disappear unless its color changes. - For comparison, the chat composer. The same
SendToAgentButtonrenders unshrunk in the composer footer, left of History. It is ghosticon-sm: 28 px (sm:size-7; 32 px belowsm) with a 16 px icon (ChatComposer.tsx:455–460,button.tsx:11, :23). (measured) - The active/primary style. It is
Button'sdefaultvariant:border-primary bg-primary text-primary-foregroundwithbg-primary-hover/bg-primary-active(button.tsx:34). The baseline--primaryis#d8610eand follows the active theme (index.css:275,:99–100). Source Control's Stage All uses it. (measured) docs/user/workspace-ui.md:732–738says the control is "in the toolbar of every AI Terminal".UI.md:83says "Make primary actions visually distinct". (measured)
Expected behavior
(measured: owner request) The AI Terminal's Send to agent button is easy to see and uses the active (primary) button color.
(inferred; agent's call) In both terminal toolbars:
- Send to agent renders with the primary color treatment (the
defaultvariant tokens, not a hardcoded orange). - Its target and icon are at least the composer control's size: 28 px target, 16 px icon.
- The rest of the toolbar grows to fit it.
- The menu, preview, tooltip, accessible name, disabled state and focus return stay unchanged.
Goals and non-goals
Goals:
- (inferred) A person sees the AI Terminal's Send to agent button at a glance and can hit it easily, without hunting among the toolbar icons.
- (inferred) The terminal and composer controls look like the same control. The terminal one is never smaller than the composer one.
Non-goals:
- (inferred) Changing Send to agent's actions, menu, preview, delivery or agent messaging.
- (inferred) Restyling the split and new-terminal buttons, beyond the toolbar height they share.
- (inferred) Recoloring the composer's control. In the composer, the primary slot belongs to Send message (see Open questions).
- (inferred) Plain (non-AI) terminals, which have no Send to agent.
Requirements and acceptance criteria
P0
- R1 — Primary color. WHILE an AI Terminal shows Send to agent, its button SHALL use the primary button colors for idle, hover and pressed states (background, foreground, border), matching Stage All in the same theme.
- (inferred) Scenario: GIVEN an AI Terminal in the baseline light or dark theme, WHEN the toolbar renders, THEN the button's background is the theme's primary color, and its icon uses the primary-foreground color.
- R2 — Size. In both the floating toolbar and the sidebar toolbar, the button SHALL have a click target of at least 28 × 28 px (the composer control's desktop size) and a 16 px icon, with nothing clipped.
- The sidebar toolbar's fixed 22 px height grows as needed.
- (inferred) Scenario: GIVEN an AI Terminal with and without the terminal sidebar, WHEN the button's rendered bounds are measured, THEN each side is ≥ 28 px and the icon is ≥ 16 px.
- R3 — Waiting-answers dot stays visible. WHEN answers are waiting, the indicator SHALL contrast with the primary background, and the accessible name SHALL still say "Send to agent, N answers waiting".
- R4 — Behavior unchanged. The menu, preview, tooltip, the disabled state on an old server ("Update the BiBCode server…"), keyboard activation, and focus return to the button after the preview closes all behave as today.
- Existing tests for these keep passing.
P1
- R5 — Send requests button. The Send requests inbox button next to it gets at least the same target size (28 px), but stays ghost-colored as a secondary action.
- R6 — Layout. The floating toolbar does not cover more terminal output than needed, with no more than one row of controls. The sidebar strip stays aligned with the terminal tabs.
- R7 — Docs and checks.
docs/user/workspace-ui.md(Send to agent) mentions that the terminal control is the highlighted button, if the wording needs it. UI.md andvercel-react-best-practicesreviews are recorded in the PR.
Tests to add or update, and repository gates
-
apps/web/src/components/ThreadTerminalPanel.test.tsx("ThreadTerminalPanel Send to agent", around:907, and the floating and sidebar toolbar cases around:630and:670): assert that the Send to agent button carries the primary variant and the new size classes in both toolbars, and no longer carriessize-5/size-3.25. -
apps/web/src/components/sendToAgent/SendToAgentButton.test.tsx: assert that the waiting-answers indicator uses a contrasting color when the trigger is primary, and that the accessible name is unchanged. -
apps/web/src/components/sendToAgent/TerminalSendComposer.test.tsx: the focus-return test (around:569) still passes. -
apps/desktop/e2e/specs/send-to-agent.e2e.ts:- For a visible AI Terminal, assert that the Send to agent button's rendered bounds are ≥ 28 × 28 px.
- Assert that its computed background equals Stage All's in the same theme.
- Keep the existing flows, including "the terminal's requests sit in a popover and focus returns to Send to agent", passing.
- Gates:
vp check,vp run typecheck, and the focused web tests pass. No Rust or contract change is expected; if one happens,cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warningsandvp run check:contractstoo. - Profiler coverage line in the delivery report: presentation only, no new records.
Open questions
- Visible label? (inferred) Should the terminal button show text ("Send to agent" or "Send") as well as the icon, as Source Control: the Review button is a tiny unlabelled icon that's easy to miss #375 does for Review? Recommended: no. The floating toolbar sits over the terminal output, so a label would cover more of it. The primary color and the larger target answer the request. Revisit if it is still missed.
- Composer too? (inferred) Should the composer's Send to agent also turn primary, to match? Recommended: no. In the composer the primary button is Send message, and two primary buttons side by side would compete. Matching the size, icon and tooltip is enough.
- Larger toolbar? (guess) Is a ~30 px toolbar acceptable in the terminal sidebar strip, or should Send to agent move out of the 22 px strip (for example into the terminal header)? Recommended: grow the strip, the smallest change. Decide during the UI.md review.
Duplicate check
(measured) I searched open and closed issues for: send to agent, terminal button, terminal toolbar, button small, button visible, accent color, AI Terminal.
- Related, not a duplicate: Source Control: the Review button is a tiny unlabelled icon that's easy to miss #375 (open), "Source Control: the Review button is a tiny unlabelled icon". It is the same kind of request on a different surface. This issue follows its approach: reuse the primary variant and set a measurable minimum size.
- Related, not a duplicate: AI Terminal: rendering breaks intermittently until a panel is resized #348 (closed), AI Terminal rendering, and Agent activity: open as a collapsible panel inside the AI chat / AI terminal pane, not in the right panel #188 (closed), agent activity panel. Different problems.
- No open or closed issue covers the size or color of the AI Terminal Send to agent button. The feature itself shipped in PR feat: Send to agent and agent messaging #379, which links no issue.
Triage proposal
(inferred; agent's call) Labels: enhancement, needs-triage, size:S. Presentation-only change in two web components plus tests, about 2–4 hours of work. Priority P2: the feature works, but people miss it.
(measured) Privacy check: no usernames, local paths, hostnames, project names or tokens.
Activity
fix: close the open issue batch and the findings its validation showed