Skip to content

Commit 2ee355f

Browse files
authored
🤖 Make runtime badge icon-only to save horizontal space (#429)
**Changes:** - Remove hostname text from badge (icon-only) - Reduce horizontal padding from `px-1.5` to `px-1` - Simplify tooltip to "SSH: hostname" - Hostname still visible on hover **Benefits:** - Saves horizontal space in workspace lists - Less visual clutter - Maintains full functionality via tooltip **Before:** `[icon] hostname` with `px-1.5` **After:** `[icon]` with `px-1` and tooltip --- **Review Note:** This PR is based on the `rt-badge` branch and will have merge conflicts until #427 is merged. Once #427 is merged to main, rebase this PR onto main and the conflicts will be resolved. _Generated with `cmux`_
1 parent d8180e9 commit 2ee355f

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)