docs: route support questions to the Intercom chat instead of email - #88
Conversation
Steer docs readers to the support chat instead of the Ask AI deflection email. Mintlify boots Intercom itself from `integrations.intercom`, so it owns `window.intercomSettings` and Intercom `custom_launcher_selector` is unavailable; a click delegate on links ending in #chat calls the global Intercom() API instead. Mirrors the #manage-cookies handling already in cookie-consent.js. - intercom-chat.js: capture-phase delegate for a[href$="#chat"], retries for up to 5s while the snippet boots, no-ops if the widget is blocked - docs.json: "Chat with us" navbar link - v3/general/support.mdx: Live Chat said the chat was dashboard-only; it runs on every docs page too `mint broken-links` unchanged at 172 in 50 files. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The assistant's Scope section pointed billing and account questions at edenai.co or "the in-app Intercom chat", so unanswered questions ended up in the Ask AI deflection contact form and reached us as Mintlify emails rather than as Intercom conversations. Replace it with an explicit Escalation section naming the chat available on the docs page itself. Note this steers what the assistant says; the deflection contact form is platform behaviour driven by the support/sales addresses in the Mintlify dashboard and has to be cleared there too. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
WalkthroughThe documentation now provides live-chat escalation guidance, adds a navbar chat link, and loads an Intercom launcher for ChangesLive chat support
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant DocumentationNavbar
participant intercom-chat.js
participant IntercomMessenger
DocumentationNavbar->>intercom-chat.js: User clicks "Chat with us"
intercom-chat.js->>IntercomMessenger: Call Intercom("show") when available
IntercomMessenger-->>DocumentationNavbar: Display chat
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.mintlify/Assistant.md (1)
44-51: 📐 Maintainability & Code Quality | 🔵 TrivialUpdate the dashboard deflection setting before release.
These instructions change assistant responses only. They do not stop dashboard contact-form submissions from being sent by email. Apply the separate Mintlify dashboard setting and verify the production configuration.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.mintlify/Assistant.md around lines 44 - 51, Update the Mintlify dashboard deflection setting separately from the documentation in Assistant.md before release, and verify the production configuration. Keep the documented escalation instructions unchanged, including directing users to live support chat rather than email.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@intercom-chat.js`:
- Around line 20-28: Register intercom-chat.js in the tracked Mintlify script
configuration so it is loaded on the documentation pages containing `#chat` links,
using the existing configuration mechanism for site scripts. Preserve the
script’s current SPA guard and avoid changing its runtime behavior.
---
Nitpick comments:
In @.mintlify/Assistant.md:
- Around line 44-51: Update the Mintlify dashboard deflection setting separately
from the documentation in Assistant.md before release, and verify the production
configuration. Keep the documented escalation instructions unchanged, including
directing users to live support chat rather than email.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 6bad013f-fa6a-44af-acc8-18702adbcd8b
📒 Files selected for processing (4)
.mintlify/Assistant.mddocs.jsonintercom-chat.jsv3/general/support.mdx
| (function () { | ||
| var SELECTOR = 'a[href$="#chat"]'; | ||
| var BOOT_TIMEOUT_MS = 5000; | ||
| var POLL_INTERVAL_MS = 150; | ||
|
|
||
| // Mintlify is a SPA; guard against re-registering the listener on | ||
| // client-side navigation. | ||
| if (window.__edenaiChatLauncherLoaded) return; | ||
| window.__edenaiChatLauncherLoaded = true; |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Expect: the Mintlify script configuration references intercom-chat.js.
rg -n -C 4 'intercom-chat\.js|cookie-consent\.js' \
--glob '*.json' --glob '*.js' --glob '*.md' --glob '*.mdx' || trueRepository: edenai/docs
Length of output: 149
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== tracked files matching likely config/js/mdx docs =="
git ls-files | rg '(^docs|\.mintlify|mintlify|docs\.json|support\.mdx|intercom-chat\.js|cookie-consent\.js|\.json$|\.mdx$)' | sed -n '1,200p'
echo
echo "== candidate filenames =="
git ls-files | rg 'intercom-chat\.js|cookie-consent\.js|docs\.json|general/support\.mdx|docs.json|mintlify|mintlify|docs' | sed -n '1,200p'
echo
echo "== search intercom-chat references =="
rg -n -C 3 'intercom-chat\.js|integrations|script|script-loads|scripting|cookie-consent|Intercom|chat' --glob '*.json' --glob '*.js' --glob '*.md' --glob '*.mdx' || trueRepository: edenai/docs
Length of output: 4461
Register intercom-chat.js in the Mintlify script config.
The #chat links in docs.json and v3/general/support.mdx depend on this file running, but there is no tracked Mintlify reference to intercom-chat.js. Add it as a loaded script; otherwise those links can silently prevent navigation without opening Intercom.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@intercom-chat.js` around lines 20 - 28, Register intercom-chat.js in the
tracked Mintlify script configuration so it is loaded on the documentation pages
containing `#chat` links, using the existing configuration mechanism for site
scripts. Preserve the script’s current SPA guard and avoid changing its runtime
behavior.
Why
Questions the Ask AI assistant can't answer currently land in the Mintlify deflection contact form, which emails
noreply@mintlify.comtocontact@. We would rather people ask in Intercom, which is already loaded on every docs page viaintegrations.intercomand feeds our normal triage.Nothing in the docs pointed at that chat, and two places actively pointed elsewhere.
Changes
intercom-chat.js(new): capture-phase click delegate ona[href$="#chat"]that callswindow.Intercom("show"). Mintlify boots Intercom itself and ownswindow.intercomSettings, so Intercom'scustom_launcher_selectoris unavailable to us. Retries for up to 5s while the snippet boots and no-ops if the widget is blocked. Same pattern as the#manage-cookiesdelegate incookie-consent.js.docs.json:Chat with usnavbar link.v3/general/support.mdx: the Live Chat section said the chat was dashboard-only. It runs on every docs page too..mintlify/Assistant.md: the Scope section sent billing and account questions toedenai.coor "the in-app Intercom chat". Replaced with an Escalation section naming the chat on the docs page, and explicitly not an email address.Checks
docs.jsonparses,intercom-chat.jsparses.mint broken-links: 172 in 50 files, identical with and without this branch. The#chatanchor is not reported.Needs a human
mint dev, so this could not be verified locally.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation