Skip to content

Commit 9dd861b

Browse files
committed
feat: tidy tunnel rows and point HOME at the local origin
Widen the provider label column so localhost.run no longer collides with its URL, drop the repeated https:// prefix from tunnel link rows, and show the local homepage origin on the overview HOME row instead of the public tunnel URL.
1 parent aa5caab commit 9dd861b

2 files changed

Lines changed: 14 additions & 7 deletions

File tree

src/ui/monitor.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,6 +1043,10 @@ fn render_header(
10431043
);
10441044
let inner = block.inner(area);
10451045
frame.render_widget(block, area);
1046+
let local_home = config
1047+
.local_health_url
1048+
.trim_end_matches("/healthz")
1049+
.to_owned();
10461050

10471051
if compact || inner.width < 76 {
10481052
let lines = vec![
@@ -1064,7 +1068,7 @@ fn render_header(
10641068
Line::from(vec![
10651069
Span::styled("HOME ", Style::default().fg(DIM)),
10661070
Span::styled(
1067-
truncate_middle(&config.setup_url(), inner.width.saturating_sub(8) as usize),
1071+
truncate_middle(&local_home, inner.width.saturating_sub(8) as usize),
10681072
Style::default().fg(BLUE),
10691073
),
10701074
]),
@@ -1148,10 +1152,7 @@ fn render_header(
11481152
Line::from(vec![
11491153
Span::styled("HOME ", Style::default().fg(DIM)),
11501154
Span::styled(
1151-
truncate_middle(
1152-
&config.setup_url(),
1153-
columns[0].width.saturating_sub(9) as usize,
1154-
),
1155+
truncate_middle(&local_home, columns[0].width.saturating_sub(9) as usize),
11551156
Style::default().fg(BLUE),
11561157
),
11571158
]),

src/ui/monitor_detail.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,16 @@ fn tunnel_lines(snapshot: &MonitorSnapshot, width: usize) -> Vec<Line<'static>>
198198
.tunnels
199199
.iter()
200200
.map(|(provider, url)| {
201+
// Host + /mcp without the repeated https:// prefix keeps rows
202+
// readable when four providers are listed at once.
203+
let host = url
204+
.trim_start_matches("https://")
205+
.trim_start_matches("http://")
206+
.trim_end_matches('/');
201207
Line::from(vec![
202-
Span::styled(format!(" {provider:<12}"), Style::default().fg(DIM)),
208+
Span::styled(format!(" {provider:<13}"), Style::default().fg(DIM)),
203209
Span::styled(
204-
truncate_middle(&format!("{url}/mcp"), width),
210+
truncate_middle(&format!("{host}/mcp"), width),
205211
Style::default().fg(BLUE),
206212
),
207213
])

0 commit comments

Comments
 (0)