Objective
Replace direct Lipgloss style usage in mcp_inspect_mcp.go with appropriate console package helpers for consistency.
Context
From discussion #11611: The mcp_inspect_mcp.go file directly uses styles.ServerName, styles.ServerType, and styles.ErrorBox.Render() instead of going through the console package abstraction layer.
Current Issues: Lines 54-57, 73 use direct Lipgloss styles.
Approach
-
Review current usage in pkg/cli/mcp_inspect_mcp.go:
- Identify all direct
styles.* usage (lines ~54-57, ~73)
- Determine appropriate console package alternatives
-
Replace with console helpers:
- Use existing console formatters where applicable
- Consider creating new helpers if needed (e.g.,
FormatListItem())
- Maintain the same visual appearance
-
Test the output:
- Verify output looks the same in terminal
- Test non-TTY mode works correctly
- Ensure error boxes render properly
Files to Modify
- Update:
pkg/cli/mcp_inspect_mcp.go (lines ~54-57, ~73)
- Consider:
pkg/console/*.go (if new helpers are needed)
Implementation Guidance
// Before (mcp_inspect_mcp.go:54-57):
serverNameStyled := styles.ServerName.Render(serverName)
serverTypeStyled := styles.ServerType.Render(fmt.Sprintf("(%s)", mcpConfig.Mode))
// After (option 1 - use existing formatter):
serverInfo := console.FormatInfoMessage(fmt.Sprintf("%s (%s)", serverName, mcpConfig.Mode))
// After (option 2 - create new helper if needed):
serverInfo := console.FormatListItem(fmt.Sprintf("%s (%s)", serverName, mcpConfig.Mode))
// Before (mcp_inspect_mcp.go:73):
fmt.Fprintln(os.Stderr, styles.ErrorBox.Render(errorMsg))
// After:
fmt.Fprintln(os.Stderr, console.RenderErrorBox(errorMsg))
Acceptance Criteria
Priority
Phase 1: Critical Fix (1-2 hours estimated)
AI generated by Plan Command for discussion #11611
Objective
Replace direct Lipgloss style usage in
mcp_inspect_mcp.gowith appropriate console package helpers for consistency.Context
From discussion #11611: The
mcp_inspect_mcp.gofile directly usesstyles.ServerName,styles.ServerType, andstyles.ErrorBox.Render()instead of going through the console package abstraction layer.Current Issues: Lines 54-57, 73 use direct Lipgloss styles.
Approach
Review current usage in
pkg/cli/mcp_inspect_mcp.go:styles.*usage (lines ~54-57, ~73)Replace with console helpers:
FormatListItem())Test the output:
Files to Modify
pkg/cli/mcp_inspect_mcp.go(lines ~54-57, ~73)pkg/console/*.go(if new helpers are needed)Implementation Guidance
Acceptance Criteria
styles.*usage replaced with console helpersmake fmtandmake lintmake agent-finishcompletes successfullyPriority
Phase 1: Critical Fix (1-2 hours estimated)