Skip to content

fix: cleanup dead code and improve error display#96

Merged
mikolajbadyl merged 1 commit intomainfrom
fix/cleanup-and-error-display
Feb 28, 2026
Merged

fix: cleanup dead code and improve error display#96
mikolajbadyl merged 1 commit intomainfrom
fix/cleanup-and-error-display

Conversation

@mikolajbadyl
Copy link
Member

  • Removed dead ExecuteTest handler from executeTool() and handleToolResult() — agent only uses ExecuteTestGroup
  • Inlined deprecated showToolWidget() wrapper into call sites
  • Removed stale ExecuteTest case from conversation restore display names
  • Fixed headless exit code: connection errors (e.g. connection refused) now correctly set exit code 1 instead of reporting success
  • Added friendlyError() helper — HTTP errors display as connection refused instead of full Go error chain

@kilo-code-bot
Copy link

kilo-code-bot bot commented Feb 28, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

The PR performs cleanup and refactoring:

  • Removes deprecated/internal ToolExecuteTest handling (now dispatched internally via ExecuteTestGroup)
  • Replaces deprecated showToolWidget() with proper showToolMessage() + updateViewport() pattern
  • Adds friendlyError() function for human-readable error messages
  • Sets headlessExitCode = 1 on test failures in headless mode

All changes appear intentional and correct. The ToolExecuteTest tool is marked as "internal" in tools.go:12 and is never exposed to the LLM, so removing its direct handlers is safe.

Files Reviewed (4 files)
  • internal/cli/handlers.go - Removed ToolExecuteTest handling (internal tool)
  • internal/cli/update.go - Replaced deprecated showToolWidget calls
  • internal/cli/update_tests.go - Added friendlyError and headless exit code handling
  • internal/cli/utils.go - Added friendlyError function

@mikolajbadyl mikolajbadyl merged commit 75178e2 into main Feb 28, 2026
1 check passed
@mikolajbadyl mikolajbadyl deleted the fix/cleanup-and-error-display branch February 28, 2026 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant