fix(docs): trust internal links on integration pages#725
Open
allenzhou101 wants to merge 1 commit into
Open
Conversation
Streamdown's link-safety modal is enabled by default (built for AI-generated content) and with no onLinkCheck it interposes an 'Open external link?' dialog on every link in the integrations markdown, including internal /docs/* paths. This copy is static and repo-authored, so disable the modal and let links navigate normally. Signed-off-by: Allen Zhou <[email protected]>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Symptom
On an integrations page (e.g.
/integrations/twilio, added in #672), clicking a link in the markdown copy — including clearly internal ones like/docs/channels/twilio— pops an "Open external link?" confirmation dialog claiming "You're about to visit an external website."Cause
The integration detail sections render through Streamdown, whose link-safety modal is enabled by default (
linkSafety: {enabled: true}in its context defaults). That harness is built for AI-generated streaming content: with noonLinkCheckconfigured, it intercepts every anchor click and shows the confirmation — it never distinguishes internal from external, it just labels everything external.Fix
linkSafety={{ enabled: false }}on the integrationsMarkdowncomponent. This copy is static, repo-authored text fromlib/integrations/data.ts— the same trust level as every other docs page, none of which interpose a dialog. Links now navigate normally (internal paths in-app, external ones as regular anchors).Deliberately not chosen: keeping the modal for true externals via
onLinkCheck— Streamdown opens checked-ok links withwindow.open(_blank), which would force internal docs links into new tabs. If a per-domain policy is ever wanted for docs, it belongs in a shared anchor component, not this AI-content harness.One-line diff plus a comment; no changeset (apps/docs is unpublished).