fix: restore correct Path field behavior and hide it for fetch tools

hems and Claude created

- Reverted Path field to always show working directory (p.permission.Path)
  instead of URL for fetch tools, preserving original behavior for other tools
- Hide Path field entirely for fetch tools since it's not relevant
- Fetch tools now only show Tool and URL fields in header

This ensures other permission popups (bash, edit, write) continue to work
correctly while making fetch popups cleaner.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

Change summary

internal/tui/components/dialogs/permissions/permissions.go | 30 +++----
1 file changed, 13 insertions(+), 17 deletions(-)

Detailed changes

internal/tui/components/dialogs/permissions/permissions.go 🔗

@@ -220,19 +220,9 @@ func (p *permissionDialogCmp) renderHeader() string {
 		Render(fmt.Sprintf(" %s", p.permission.ToolName))
 
 	pathKey := t.S().Muted.Render("Path")
-	var pathDisplayValue string
-	if p.permission.ToolName == tools.FetchToolName {
-		if params, ok := p.permission.Params.(tools.FetchPermissionsParams); ok {
-			pathDisplayValue = params.URL
-		} else {
-			pathDisplayValue = p.permission.Path
-		}
-	} else {
-		pathDisplayValue = fsext.PrettyPath(p.permission.Path)
-	}
 	pathValue := t.S().Text.
 		Width(p.width - lipgloss.Width(pathKey)).
-		Render(fmt.Sprintf(" %s", pathDisplayValue))
+		Render(fmt.Sprintf(" %s", fsext.PrettyPath(p.permission.Path)))
 
 	headerParts := []string{
 		lipgloss.JoinHorizontal(
@@ -241,12 +231,18 @@ func (p *permissionDialogCmp) renderHeader() string {
 			toolValue,
 		),
 		baseStyle.Render(strings.Repeat(" ", p.width)),
-		lipgloss.JoinHorizontal(
-			lipgloss.Left,
-			pathKey,
-			pathValue,
-		),
-		baseStyle.Render(strings.Repeat(" ", p.width)),
+	}
+
+	// Only show Path field for non-fetch tools
+	if p.permission.ToolName != tools.FetchToolName {
+		headerParts = append(headerParts,
+			lipgloss.JoinHorizontal(
+				lipgloss.Left,
+				pathKey,
+				pathValue,
+			),
+			baseStyle.Render(strings.Repeat(" ", p.width)),
+		)
 	}
 
 	// Add tool-specific header information