Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(crm): allow a misclassified business domain (#8836)

gbirmand162c740c965
diff --git a/crates/crm/AGENTS.md b/crates/crm/AGENTS.md
index 99fb06ebb3..aaf465e732 100644
--- a/crates/crm/AGENTS.md
+++ b/crates/crm/AGENTS.md
@@ -61,6 +61,9 @@ tools/HTTP/GraphQL surfaces over them.
## Gotchas
+- `src/domain/generic_email_domains.rs` filters both manual company creation
+ and email-driven contact population. Cover legitimate company-domain
+ exceptions with regression tests when correcting the blocklist.
- `resolve_association` also accepts `CrmAssociation::Activity`: all records in
CRM-enabled teams within the viewer/verified-bot scope, excluding hidden rows
even for admins. Preserve distinct contact IDs that share an email; returned
diff --git a/crates/crm/src/domain/generic_email_domains.rs b/crates/crm/src/domain/generic_email_domains.rs
index da1908b976..6fe3bf59f3 100644
--- a/crates/crm/src/domain/generic_email_domains.rs
+++ b/crates/crm/src/domain/generic_email_domains.rs
@@ -510,7 +510,6 @@ const SAAS_VENDOR_DOMAINS: &[&str] = &[
"stripe.com",
"brex.com",
"mercury.com",
- "ramp.com",
"tryramp.com",
"pave.com",
"guideline.com",
diff --git a/crates/crm/src/domain/generic_email_domains/test.rs b/crates/crm/src/domain/generic_email_domains/test.rs
index 395195b4a3..a1801ea3f0 100644
--- a/crates/crm/src/domain/generic_email_domains/test.rs
+++ b/crates/crm/src/domain/generic_email_domains/test.rs
@@ -208,6 +208,16 @@ fn matches_bulk_mail_senders() {
}
}
+#[test]
+fn ramp_is_a_company_domain() {
+ for domain in ["ramp.com", "RAMP.COM", " ramp.com ", "www.ramp.com"] {
+ assert!(
+ !is_generic_email_domain(domain),
+ "expected {domain} to be allowed as a company domain"
+ );
+ }
+}
+
#[test]
fn legitimate_company_domains_pass_through() {
for domain in [
diff --git a/docs/agent-guide/crm.md b/docs/agent-guide/crm.md
index 904a2a24b0..b7908a25cd 100644
--- a/docs/agent-guide/crm.md
+++ b/docs/agent-guide/crm.md
@@ -131,6 +131,10 @@ a company domain, not a personal email provider. The company, contact and pipeli
task/project composer layout: name on the first row beside **Close**, details
below, and a **Create …** button that also submits on Command-Enter.
+Verify company domain validation by creating a company with an allowed business
+domain, then adding a contact whose email matches it. Personal email provider
+domains must still be rejected as company domains.
+
Desktop `Search companies` and `Search people` start as outlined icon buttons
and expand into the shared Email/Tasks search bar. Command-F expands and focuses
the field; Close or Escape clears the query and returns to the icon.