KamoCRM

Fix autocomplete — infinite loop, missing API, auth

Fixkamo-internal
Shipped
20 மார்ச், 2026 அன்று 3:55 PM UTC
Author
kamo
Commit
1e30896

Three root causes fixed: 1. Infinite re-render loop: existingEmails was a new array reference every render, causing the search useEffect to re-fire endlessly. Switched to a stable ref (existingEmailsRef). 2. Non-existent endpoint: /api/email/recent-recipients was never created. Replaced with real /api/email/search against the Sent folder, extracting To/CC addresses from results and matching against the query. 3. Missing OTK auth: email search requires X-OTK header. Added generateOTK() call before the sent-folder search request.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing