Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui: connection badge and expand trigger float inside the terminal preview

They sat in a toolbar row above the terminal box. They now float in
its top-left corner, next to the turn-state badges in the top-right,
and the toolbar row is gone. The full-tab mount keeps the connection
badge and, being the destination already, has no expand trigger.
This commit is contained in:
iris 2026-10-04 16:26:55 +02:00 • committed by mara
commit 9064d8fbd2
2 changed files with 24 additions and 46 deletions

View file

@ -175,37 +175,25 @@ export function AgentTermPreview({
(fullHeight ? " ui-agent-term-preview-full" : "")
}
>
{/* The full-tab mount has no toolbar row: the terminal takes the
whole page below the shell header, and the connection badge
floats inside it with the other badges (below). */}
{!fullHeight && (
<div class="ui-agent-term-preview-toolbar">
<Badge
class="ui-agent-term-preview-status"
tone={CONNECTION_TONE[connection]}
value={CONNECTION_LABEL[connection]}
/>
<Badge
class="ui-agent-term-preview-expand"
variant="quiet"
icon={<ExpandIcon />}
value="expand"
title={`open ${paths.label}'s terminal in its own tab`}
onClick={() => openTab({ href: paths.page, label: paths.label })}
/>
</div>
)}
<div class="terminal-wrap ui-agent-term-preview-wrap">
{/* Full-tab mount only: the connection badge floats in the
{/* The connection badge and the expand trigger float in the
terminal's top-left corner (the other badges own the
top-right), instead of sitting in a toolbar row above it. */}
{fullHeight && (
top-right). The full-tab mount is already the destination, so
it has no expand trigger. */}
<div class="ui-agent-term-preview-controls">
<Badge
class="ui-agent-term-preview-status ui-agent-term-preview-live"
tone={CONNECTION_TONE[connection]}
value={CONNECTION_LABEL[connection]}
/>
)}
{!fullHeight && (
<Badge
icon={<ExpandIcon />}
value="expand"
title={`open ${paths.label}'s terminal in its own tab`}
onClick={() => openTab({ href: paths.page, label: paths.label })}
/>
)}
</div>
{header && showHeaderBadges && (
<div class="ui-agent-term-preview-header-badges">
<Badge