From 171339c78dc1f5c11fcb02a1f5f5d59bce08709b Mon Sep 17 00:00:00 2001 From: hems Date: Sun, 13 Jul 2025 05:27:48 +0100 Subject: [PATCH] fix: make URL field layout consistent with other fields in permission popup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The URL field in fetch permission popups was styled differently than other fields (Tool, Path, File). It used a bold standalone label instead of the consistent key-value horizontal layout. Now the URL field follows the same pattern as other fields for visual consistency. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .../components/dialogs/permissions/permissions.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/internal/tui/components/dialogs/permissions/permissions.go b/internal/tui/components/dialogs/permissions/permissions.go index 8d8efcd65ecbf3f1c27eeaea48950df72d1b53b7..9ba737a596a3fd62efe9400aaf3be687e376ddc8 100644 --- a/internal/tui/components/dialogs/permissions/permissions.go +++ b/internal/tui/components/dialogs/permissions/permissions.go @@ -283,7 +283,20 @@ func (p *permissionDialogCmp) renderHeader() string { baseStyle.Render(strings.Repeat(" ", p.width)), ) case tools.FetchToolName: - headerParts = append(headerParts, t.S().Muted.Width(p.width).Bold(true).Render("URL")) + if params, ok := p.permission.Params.(tools.FetchPermissionsParams); ok { + urlKey := t.S().Muted.Render("URL") + urlValue := t.S().Text. + Width(p.width - lipgloss.Width(urlKey)). + Render(fmt.Sprintf(" %s", params.URL)) + headerParts = append(headerParts, + lipgloss.JoinHorizontal( + lipgloss.Left, + urlKey, + urlValue, + ), + baseStyle.Render(strings.Repeat(" ", p.width)), + ) + } } return baseStyle.Render(lipgloss.JoinVertical(lipgloss.Left, headerParts...))