Skip to content

improvement(platform): added more email validation utils, added integrations page, improved enterprise section, update docs generation script#3667

Merged
waleedlatif1 merged 9 commits intostagingfrom
improvement/email-validation
Mar 19, 2026
Merged

improvement(platform): added more email validation utils, added integrations page, improved enterprise section, update docs generation script#3667
waleedlatif1 merged 9 commits intostagingfrom
improvement/email-validation

Conversation

@waleedlatif1
Copy link
Collaborator

  • improvement(platform): added more email validation utils, added integrations page, improved enterprise section, update docs generation script
  • remove unused route

Summary

Brief description of what this PR does and why.

Fixes #(issue)

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: ___________

Testing

How has this been tested? What should reviewers focus on?

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Screenshots/Videos

@vercel
Copy link

vercel bot commented Mar 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Mar 19, 2026 8:01pm

Request Review

…rations page, improved enterprise section, update docs generation script
@waleedlatif1 waleedlatif1 force-pushed the improvement/email-validation branch from e61b415 to 3ee2723 Compare March 19, 2026 19:08
@waleedlatif1 waleedlatif1 changed the title improvement/email validation improvement(platform): added more email validation utils, added integrations page, improved enterprise section, update docs generation script Mar 19, 2026
@waleedlatif1 waleedlatif1 marked this pull request as ready for review March 19, 2026 19:19
@cursor
Copy link

cursor bot commented Mar 19, 2026

PR Summary

Medium Risk
Adds a large new SEO-focused integrations detail route with dynamic metadata/JSON-LD and interactive UI, plus landing-page component changes; risk is mainly around routing/SSR behavior and bundle size, not core backend logic.

Overview
Adds a new integrations/[slug] landing route that renders integration-specific pages from JSON metadata, including generated FAQs, related-integration linking, workflow-template CTAs, and rich SEO metadata/JSON-LD (Breadcrumb/SoftwareApplication/HowTo/FAQPage).

Updates the landing navbar blog dropdown to be data-driven (fed by getAllPostMeta() in landing.tsx) instead of hardcoded posts, and tweaks several landing links (e.g., Pricing anchor uses /#pricing, collaboration CTA points to the multiplayer blog post).

Refreshes the Enterprise section UI by splitting it into Audit Trail and Access Control panels with new animated permission toggles (provider icons via PROVIDER_DEFINITIONS) and updated audit-log preview styling/behavior; expands footer navigation with new product/resource links and an "All Integrations" entry.

Written by Cursor Bugbot for commit cf55363. Configure here.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 19, 2026

Greptile Summary

This PR adds a new /integrations landing section (listing page + per-integration slug pages with FAQs, related integrations, workflow templates, and rich structured data), strengthens the sign-up email validation pipeline with a full disposable-domain list and MX-backend fingerprinting, refactors the blog dropdown to be data-driven from the blog registry, and extends scripts/generate-docs.ts to auto-generate the integrations data assets (integrations.json and icon-mapping.ts).

Key changes:

  • New integrations landing/(landing)/integrations adds a searchable grid page and dynamic [slug] detail pages; all data is derived from the auto-generated integrations.json and committed alongside the source.
  • Email validationisDisposableEmailFull checks the existing inline set plus the disposable-email-domains npm package (~5 300 domains); isDisposableMxBackend resolves MX records and fingerprints known disposable backends (in.mail.gw, smtp.catchmail.io, mx.yopmail.com) with a 5-minute per-domain cache.
  • Auth integration — both new checks are applied sequentially in the betterAuth sign-up hook; the fast sync check runs first, the async DNS check only fires when the domain passes the list check.
  • Docs scriptwriteIntegrationsJson / writeIntegrationsIconMapping extract operations, triggers, auth type, and docs URLs from block source files and write them to the landing data directory; a redundant fs.readFileSync inside the inner config loop reads the same file once per config instead of reusing the already-loaded content.
  • Blog dropdown — hardcoded post list removed; posts are now fetched from the blog registry in Landing and passed down as a prop, keeping the dropdown automatically up to date.
  • Navbar fix — pricing anchor changed from #pricing to /#pricing so it navigates correctly from non-root routes like /integrations.

Confidence Score: 4/5

  • Safe to merge with two minor fixes recommended — the redundant file read in the docs script and the uncached timeout path in MX validation.
  • The integrations landing pages are entirely additive and well-structured. Email validation logic is correct and well-tested with comprehensive new tests. The one actionable bug is a redundant fs.readFileSync in generate-docs.ts that re-reads block files once per config entry rather than reusing the already-loaded content. The MX validation timeout path skips caching, which can cause repeated 5-second delays for users signing up from domains with slow DNS. Neither issue affects correctness in normal operation.
  • scripts/generate-docs.ts (redundant file read) and apps/sim/lib/messaging/email/validation.ts (timeout result not cached).

Important Files Changed

Filename Overview
apps/sim/lib/messaging/email/validation.ts Adds isDisposableEmailFull (npm package + inline set) and isDisposableMxBackend (DNS MX check with 5-minute cache) exports; refactors checkMXRecord to also return isDisposableBackend; timeout result is not cached so slow-DNS domains can each incur a 5 s delay on every attempt.
apps/sim/lib/auth/auth.ts Sign-up path now checks isDisposableEmailFull (fast, sync) and isDisposableMxBackend (async, cached DNS) in addition to the existing manual domain blocklist; logic is correct and changes are well-scoped.
scripts/generate-docs.ts Adds writeIntegrationsJson and writeIntegrationsIconMapping to produce landing-page data assets; contains a redundant fs.readFileSync inside the inner config loop (same file re-read N times instead of reusing the already-read fileContent), plus a type-shape mismatch on BlockConfig.operations.
apps/sim/app/(landing)/integrations/page.tsx New server-rendered integrations listing page with rich structured data (BreadcrumbList, ItemList, SoftwareApplication), SEO metadata, and a client-side IntegrationGrid for search; well-structured and correctly uses static JSON data.
apps/sim/app/(landing)/integrations/[slug]/page.tsx New individual integration detail page with generated FAQs, related integrations scoring, how-to steps, structured data (BreadcrumbList, FAQPage, HowTo, SoftwareApplication), and template matching; byName and byType Maps are used in render (confirmed by senior dev in prior thread).
apps/sim/app/(home)/components/navbar/components/blog-dropdown.tsx Converts from hardcoded post list to data-driven posts prop (sourced from blog registry at build time); exports NavBlogPost type for use by Navbar; clean refactor with graceful empty-state handling.
apps/sim/app/(landing)/integrations/components/integration-grid.tsx Client component with useMemo-powered search filtering across name, description, operations, and triggers; correctly passes IconComponent from the icon map to each card.
apps/sim/app/(landing)/integrations/layout.tsx Wraps integrations routes with shared Navbar/Footer and Organization/WebSite JSON-LD structured data; straightforward and correct.
apps/sim/lib/messaging/email/validation.test.ts Adds comprehensive tests for isDisposableEmailFull and isDisposableMxBackend including case-insensitivity, trailing-dot MX handling, DNS error paths, and the validateEmail disposable-backend integration; beforeEach reset correctly prevents test pollution.
apps/sim/app/(home)/components/enterprise/enterprise.tsx Expands audit log preview from 5 to 6 entries, adjusts opacities and time offsets, removes the resource-type label chip, adds useInView import and PROVIDER_DEFINITIONS usage for new permission panel sections.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Sign-up Request] --> B{blockedSignupDomains\nconfigured?}
    B -- Yes --> C{Domain in\nmanual blocklist?}
    C -- Yes --> D[❌ Throw: domain not allowed]
    C -- No --> E[isDisposableEmailFull]
    B -- No --> E

    E --> F{Domain in\nINLINE set OR\nnpm package list?}
    F -- Yes --> G[❌ Throw: disposable not allowed]
    F -- No --> H[isDisposableMxBackend]

    H --> I{Domain in\nmxCache?}
    I -- Hit --> J{Cached result\ndisposable?}
    J -- Yes --> K[❌ Throw: disposable not allowed]
    J -- No --> L[✅ Allow sign-up]

    I -- Miss --> M[DNS resolveMx\nwith 5s timeout]
    M -- Success --> N{MX exchange in\nDISPOSABLE_MX_BACKENDS?}
    N -- Yes --> O[Cache true, 5 min]
    O --> K
    N -- No --> P[Cache false, 5 min]
    P --> L

    M -- Timeout/Error --> Q[return false\nno cache written]
    Q --> L
Loading

Last reviewed commit: "change ff"

@waleedlatif1
Copy link
Collaborator Author

@greptile

@waleedlatif1
Copy link
Collaborator Author

@cursor review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@waleedlatif1 waleedlatif1 merged commit 17bdc80 into staging Mar 19, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant