Skip to content

Conversation

@derekg
Copy link
Owner

@derekg derekg commented Nov 4, 2025

Remove obsolete files and internationalization system to further simplify the codebase and reduce maintenance burden.

Changes:

  • Remove _old_complex/ directory (15 files, 240 KB)
  • Remove main_simple.go.bak backup file
  • Remove test-version and test-version-fixed binaries (76 MB)
  • Remove internal/i18n/ internationalization system
  • Replace i18n.T() calls with plain English strings
  • Update tests to reflect plain English error messages

Impact:

  • 5,971 lines removed
  • 20 lines added (replacements)
  • All tests passing
  • Build successful

This continues the simplification effort to keep ts-ssh minimal and maintainable, consistent with the "simplicity over features" philosophy.

Remove obsolete files and internationalization system to further simplify
the codebase and reduce maintenance burden.

Changes:
- Remove _old_complex/ directory (15 files, 240 KB)
- Remove main_simple.go.bak backup file
- Remove test-version and test-version-fixed binaries (76 MB)
- Remove internal/i18n/ internationalization system
- Replace i18n.T() calls with plain English strings
- Update tests to reflect plain English error messages

Impact:
- 5,971 lines removed
- 20 lines added (replacements)
- All tests passing
- Build successful

This continues the simplification effort to keep ts-ssh minimal and
maintainable, consistent with the "simplicity over features" philosophy.
@claude
Copy link
Contributor

claude bot commented Nov 4, 2025

Claude finished @derekg's task —— View job


PR Review: Remove dead code and cleanup codebase

I've completed a comprehensive review of this cleanup PR. This is an excellent simplification effort that aligns perfectly with the project's "simplicity over features" philosophy.

Review Tasks:

  • Read repository context and guidelines
  • Analyze the scope of deletions and modifications
  • Review i18n removal implementation
  • Check test updates for correctness
  • Assess security implications
  • Evaluate performance impact
  • Provide final recommendations

Code Quality Assessment ✅

Excellent Work Overall: This PR demonstrates disciplined code cleanup with careful attention to detail.

Strengths

  1. Massive Size Reduction: 5,971 lines deleted vs 20 lines added - a 99.7% net reduction that significantly reduces maintenance burden

  2. Clean i18n Removal: The internationalization system has been properly removed and replaced with plain English strings throughout the codebase:

    • internal/client/scp/client.go: Error messages converted to plain English
    • internal/client/ssh/helpers.go: Function documentation updated
    • internal/security/tty.go: Security error messages standardized
    • Tests updated to expect plain English error messages
  3. No Functionality Loss: Core SSH/SCP functionality remains intact while removing complexity

  4. Proper Test Updates: All modified test files properly expect plain English error messages instead of i18n keys

  5. Binary Cleanup: Removed 76MB of test binaries that shouldn't be in version control

  6. Backup Cleanup: Removed .bak files that were development artifacts

Minor Issues Found

  1. Stale Comment in /home/runner/work/ts-ssh/ts-ssh/internal/client/ssh/client.go:116:
    // Show escape sequence info (would need T() function from i18n)
    This comment references the removed i18n system but can remain as historical context.

Security Analysis ✅

No Security Concerns: The cleanup maintains all security features:

  • Password reading security (ReadPasswordSecurely)
  • TTY validation
  • SSH key handling
  • Host key verification
  • All security modules remain unchanged

Performance Impact ✅

Positive Performance Impact:

  • Reduced binary size (no i18n data to load)
  • Faster compilation (fewer files to process)
  • Lower memory footprint
  • No runtime i18n lookups

Test Coverage ✅

Maintained Coverage: All tests have been properly updated to expect plain English strings instead of i18n keys. The validation logic and error handling remain robust.

Recommendations

  1. Consider updating the stale comment in client.go:116 to reflect that escape sequence info now uses plain English, but this is very minor.

  2. The PR is ready to merge - this is exactly the kind of simplification the project needs.

Final Assessment

This PR exemplifies excellent software engineering:

  • Reduces complexity without sacrificing functionality
  • Improves maintainability by removing unnecessary abstraction layers
  • Maintains code quality through careful testing updates
  • Aligns with project vision of "simplicity over features"

Recommendation: ✅ APPROVE and MERGE

This cleanup moves the project closer to its goal of being a simple, focused SSH/SCP tool while removing 69% of the codebase complexity.


@derekg derekg merged commit 56da8af into main Nov 4, 2025
1 check passed
@derekg derekg deleted the claude/cleanup-deadcode-011CUR5afesWAAziovUb9b5i branch January 16, 2026 00:39
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.

3 participants