client icon indicating copy to clipboard operation
client copied to clipboard

Fix memory leaks, improve error messages, and clean up technical debt

Open DavidLiedle opened this issue 5 months ago • 0 comments

This PR addresses several maintenance items I noticed while exploring the codebase. These are mostly small improvements that help with code quality and user experience. They were done with Claude Code.

Changes Made

Bug Fixes

  • Fixed a memory leak from setInterval in debug code that wasn't being cleaned up on reset
  • Fixed a missing closing quote in an error message string

Code Cleanup

  • Removed the deprecated btc command that was just returning an error message
  • Removed ~160 lines of commented-out code that had been sitting unused
  • Replaced console.log/console.warn statements with proper logger calls

User Experience Improvements

  • Standardized generic error messages (replaced "Whoops!", "Oops", etc. with clearer messages)
  • Added the missing UI component for git repository rename notifications (the backend already supported this)
  • Modernized the browser extension's SPA monitoring from polling to MutationObserver

Performance

  • Optimized slice operations in teams/member_set.go to reduce memory allocations

Testing

  • Go tests pass for affected packages
  • Code compiles without errors
  • Changes follow existing patterns in the codebase

Notes

These are mostly small, unglamorous fixes, but I hope they help make the codebase a bit cleaner and more maintainable. Happy to make any adjustments based on your team's preferences or coding standards.

DavidLiedle avatar Aug 09 '25 22:08 DavidLiedle