Skip to content

Commit 026b53d

Browse files
committed
🤖 Make runtime badge icon-only to save space
Remove hostname text from badge, showing only the server icon. Hostname is still visible in tooltip on hover. Changes: - Remove hostname span from badge - Reduce horizontal padding from px-1.5 to px-1 - Simplify tooltip text to "SSH: hostname" - Remove unused font/gap classes This saves horizontal space in workspace lists and headers while maintaining full functionality through the tooltip. Generated with `cmux`
1 parent 4eeb49a commit 026b53d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/components/RuntimeBadge.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ interface RuntimeBadgeProps {
1111

1212
/**
1313
* Badge to display SSH runtime information.
14-
* Shows compute icon + hostname for SSH runtimes, nothing for local.
14+
* Shows icon-only badge for SSH runtimes with hostname in tooltip.
1515
*/
1616
export function RuntimeBadge({ runtimeConfig, className }: RuntimeBadgeProps) {
1717
const hostname = extractSshHostname(runtimeConfig);
@@ -24,7 +24,7 @@ export function RuntimeBadge({ runtimeConfig, className }: RuntimeBadgeProps) {
2424
<TooltipWrapper inline>
2525
<span
2626
className={cn(
27-
"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-xs font-medium",
27+
"inline-flex items-center rounded px-1 py-0.5",
2828
"bg-accent/10 text-accent border border-accent/30",
2929
className
3030
)}
@@ -46,10 +46,9 @@ export function RuntimeBadge({ runtimeConfig, className }: RuntimeBadgeProps) {
4646
<line x1="5" y1="4" x2="5" y2="4" />
4747
<line x1="5" y1="12" x2="5" y2="12" />
4848
</svg>
49-
<span className="truncate">{hostname}</span>
5049
</span>
5150
<Tooltip align="right">
52-
Running on SSH host: {runtimeConfig?.type === "ssh" ? runtimeConfig.host : hostname}
51+
SSH: {runtimeConfig?.type === "ssh" ? runtimeConfig.host : hostname}
5352
</Tooltip>
5453
</TooltipWrapper>
5554
);

0 commit comments

Comments
 (0)