Add update_professional_contact tool to CRM extension#133
Add update_professional_contact tool to CRM extension#133swhitt wants to merge 3 commits intoNateBJones-Projects:mainfrom
Conversation
Adds the ability to update existing contact fields (name, company, title, email, phone, tags, notes, follow_up_date, etc.) which was proposed in NateBJones-Projects#93 but never implemented. Only provided fields are updated, and the existing updated_at trigger handles timestamping.
|
@claude review this PR |
1 similar comment
|
@claude review this PR |
|
I'll analyze this and get back to you. |
|
@claude review this PR |
|
I'll analyze this and get back to you. |
|
@claude review this PR |
|
I'll analyze this and get back to you. |
|
@claude review this PR |
|
Claude finished @matthallett1's task in 1m 34s —— View job PR Review: Add
|
| Check | Status |
|---|---|
| No credentials or hardcoded secrets | ✅ |
| No destructive SQL | ✅ |
| Remote Edge Function (not local Node.js server) | ✅ |
User-scoped queries (user_id filter on update) |
✅ |
Core thoughts table untouched |
✅ |
| Consistent with existing tool patterns in this file | ✅ |
This is a solid contribution. The implementation is correct and the gap it fills is real. The minor notes above are non-blocking.
|
Claude finished @matthallett1's task in 1m 1s —— View job PR Review: Add
|
| Check | Status |
|---|---|
| No credentials or hardcoded secrets | ✅ |
| No destructive SQL | ✅ |
| Remote Edge Function (not local Node.js) | ✅ |
User-scoped update (user_id filter) |
✅ |
Core thoughts table untouched |
✅ |
| Follows existing tool patterns in this file | ✅ |
| No new dependencies or standalone deployment | ✅ |
The implementation is correct, safe, and fills a real functional gap in the CRM extension. The minor notes above are non-blocking. Good contribution.
matthallett1
left a comment
There was a problem hiding this comment.
Good work, Steve — the partial-update pattern is clean and the user-scoping is correct.
One issue to address before merging: follow_up_date can be set but never cleared. The update loop drops undefined values, and sending an empty string fails against the DATE column. This means once a follow-up is set, the contact is permanently stuck in get_follow_ups_due (which filters on follow_up_date IS NOT NULL).
Fix: Accept null or empty string for follow_up_date and follow_up_notes, and write null to the DB when clearing:
// In the update loop, handle null explicitly for clearable fields
if (key === 'follow_up_date' && (value === null || value === '')) {
updates[key] = null;
} else if (value !== undefined) {
updates[key] = value;
}This unblocks the 'follow-up completed' workflow where users want to clear reminders after acting on them.
Fixes the case where a follow-up date, once set, could never be cleared — leaving contacts permanently stuck in get_follow_ups_due.
|
Good catch, thanks; fixed. |
|
Review feedback from @matthallett1 has been addressed in commit b598fef:
Ready for re-review. |

Contribution Type
What does this do?
Adds the missing
update_professional_contacttool to Extension 5 (Professional CRM), as proposed in #93 but never implemented. Acceptscontact_idplus any combination of optional fields (name,company,title,email,phone,linkedin_url,how_we_met,tags,notes,follow_up_date). Only provided fields are updated. Also fixesfollow_up_datebeing unwritable despiteget_follow_ups_duequerying it.Requirements
Nothing new.
Checklist
README.mdwith prerequisites, step-by-step instructions, and expected outcomemetadata.jsonhas all required fields