fix(home): keep the delay chip inside the current node card for long node names (#8633)

The node row is a space-between flex row, but the name column had the
default min-width: auto and the name was not truncated. A long name with
no break opportunity (for example xxx@host:443) widened the column to the
full text, pushed the delay chip past the card edge and made the main
content area scroll horizontally on narrow windows.

Let the name column shrink, truncate the name with an ellipsis (the full
name is in the title tooltip), and keep the chip from shrinking.

Fixes #8589

Co-authored-by: toBerlinWay <toBerlinWay@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Murphy
2026-11-12 16:45:05 +00:00
committed by GitHub
co-authored by toBerlinWay Claude Opus 5.5
parent 03d5c3715f
commit c2e36ab733
2 changed files with 9 additions and 2 deletions
+8 -2
View File
@@ -1008,8 +1008,13 @@ export const CurrentProxyCard = () => {
border: `1px solid ${alpha(theme.palette.primary.main, 0.1)}`,
}}
>
<Box>
<Typography variant="body1" sx={{ fontWeight: 'medium' }}>
<Box sx={{ minWidth: 0, flex: 1 }}>
<Typography
variant="body1"
noWrap
title={currentProxy?.name}
sx={{ fontWeight: 'medium' }}
>
{currentProxy?.name ??
t('home.components.currentProxy.labels.noActiveNode')}
</Typography>
@@ -1063,6 +1068,7 @@ export const CurrentProxyCard = () => {
size="small"
label={delayManager.formatDelay(currentDelay)}
color={convertDelayColor(currentDelay)}
sx={{ flexShrink: 0, ml: 1 }}
/>
)}
</Box>