Merge pull request #28230 from overleaf/dp-remove-gutter-ai-interstitial

[New Editor] Don't show AI paywall modal if clicking suggest fix from gutter

GitOrigin-RevId: b8a18db30edacfe7e169d87942de4d46455ea279
This commit is contained in:
David
2025-09-02 11:24:46 +01:00
committed by Copybot
parent ca4a515ce5
commit 299feb3c69

View File

@@ -64,8 +64,12 @@ export const useLogEvents = (setShowLogs: (show: boolean) => void) => {
const handleViewCompileLogEntryEventNewEditor = useCallback(
(event: Event) => {
const { id, suggestFix } = (
event as CustomEvent<{ id: string; suggestFix?: boolean }>
const { id, suggestFix, showPaywallIfOutOfSuggestions } = (
event as CustomEvent<{
id: string
suggestFix?: boolean
showPaywallIfOutOfSuggestions?: boolean
}>
).detail
openRailTab('errors')
@@ -99,7 +103,7 @@ export const useLogEvents = (setShowLogs: (show: boolean) => void) => {
'button[data-action="suggest-fix"]'
)
?.click()
} else {
} else if (showPaywallIfOutOfSuggestions) {
window.dispatchEvent(
new CustomEvent('aiAssist:showPaywall', {
detail: { origin: 'suggest-fix' },