📋 Sheet
Chat-Embed Code improvements recommended by Claude
👤 Jayasankar⚠ no ETA🏃 Dec'25
(1)
Hardcoded org check scattered throughout (Maintainability)
The orgId === "ivfindia.com" check appears multiple times:
Line 161, 290, 369
This could be extracted to a constant or config flag. We should move all such hardcodings to a common file.
You can ask Claude to do this and review its work for reliability.
(2)
Please follow DRY principle (Don’t Repeat Yourself)
CSS Duplication mila tha commit m
Location: ChatHead.module.css:227-241 and ChatHead.module.css:244-259 .unmuteButton and .closeVideoButton have nearly identical styles:
.unmuteButton { /* 15 properties */ }
.closeVideoButton { /* Same 15 properties except position */ }
Could be refactored to a shared class with position overrides.
(3)
Memory Leak - setInterval Without Cleanup
Location: ChatHead.jsx:130
notification = setTimeout(handleAddNotification, PROMPT_VISIBLE_MS);
setInterval(handleAddNotification, PROMPT_INTERVAL_MS); // ← NOT CLEANED UP
Issue: The setInterval is never cleared in the cleanup function. Only se
🎯 Goal & proof
📋 SDLC actionables
SDLC checklist
In Sprint (2)
Kickoff call (optional) with owner
Confirm sprint label is set on the row