-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
Problem
The current implementation of getIcons is overly complex and entangled, making it difficult to trace logic and contributing to a range of recurring avatar-related bugs. This has created both developer overhead and inconsistent user experiences.
Proposed Solution
Refactor getIcons to separate concerns and simplify the underlying logic. This will reduce the surface area for bugs and make future maintenance and enhancements easier.
Plan
Add Tests for Existing Logic
• Write comprehensive test coverage for the current implementation.
• Ensure the existing behavior is documented to prevent regressions during refactor.
Refactor the Function
• Modularize and decouple logic without changing any avatar outputs. (Tests still pass)
• Improve readability, maintainability, and debuggability of the function.
Fix Broken Avatars (IOU)
• Once refactored, identify and resolve any avatar bugs that persist.
• Update tests
• Validate with visual tests & QA verification