-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat(client): add BetterBugs recording links with airgap and disable … #41576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,6 +41,7 @@ | |
| const CLOUD_HOSTING = parseConfig('{{env "APPSMITH_CLOUD_HOSTING"}}'); | ||
| const AIRGAPPED = parseConfig('{{env "APPSMITH_AIRGAP_ENABLED"}}'); | ||
| const REO_CLIENT_ID = parseConfig('{{env "APPSMITH_REO_CLIENT_ID"}}'); | ||
| const DISABLE_BETTERBUGS = parseConfig('{{env "APPSMITH_DISABLE_BETTERBUGS"}}'); | ||
| </script> | ||
| <script> | ||
| window.__APPSMITH_CHUNKS_TO_PRELOAD = | ||
|
|
@@ -71,6 +72,28 @@ | |
| } | ||
| </script> | ||
| <!-- End of Reo Javascript --> | ||
|
|
||
| <!-- Start of BetterBugs Recording Links (logs + recorder; only when BetterBugs enabled and not airgapped) --> | ||
| <script type="text/javascript"> | ||
| if (!DISABLE_BETTERBUGS && !AIRGAPPED) { | ||
| window.__BetterbugsRecordingLinkConfig = { | ||
| styles: { theme: "light", primaryColor: "#E15615", primaryTextColor: "#ffffff" }, | ||
| successMessageHeaderText: "Information received", | ||
| successMessageSubHeaderText: "Our support team will use it to review the issue", | ||
| }; | ||
| (function () { | ||
| var s1 = document.createElement("script"); | ||
| s1.src = "https://cdn.betterbugs.io/scripts/latest/logs-capture.js"; | ||
| s1.async = true; | ||
| document.head.appendChild(s1); | ||
| var s2 = document.createElement("script"); | ||
| s2.src = "https://cdn.betterbugs.io/scripts/latest/recorder.js"; | ||
| s2.async = true; | ||
| document.head.appendChild(s2); | ||
| })(); | ||
| } | ||
| </script> | ||
| <!-- End of BetterBugs Recording Links --> | ||
|
Comment on lines
+76
to
+96
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result: BetterBugs’ own docs currently instruct loading these mutable (“latest”) CDN assets (so you can’t safely “pin” + SRI them unless BetterBugs also offers immutable, versioned file URLs):
What that means for “version-pinned URLs + SRI”
Practical options
If you tell me your deployment preference (self-host vs CDN) and whether BetterBugs provides any versioned script paths in your dashboard/UI, I can give you the exact snippet format to use (including Sources: [1] BetterBugs “Recording Links” docs (shows the 🌐 Web query:
💡 Result: BetterBugs’ official Web SDK CDN install snippet uses a “moving” alias (no pinned version in the URL):
In the official docs, there isn’t any documented alternative CDN URL format for pinning a specific version (e.g., If you need explicit versioning / reproducible builds, the docs recommend installing the SDK via npm/yarn, where you can pin a semver version in
Sources: [1] BetterBugs Doc – “Start widget with CDN Script” • [2] BetterBugs Doc – “Start widget with npm or yarn” • [3] jsDelivr – Use npm/yarn to pin BetterBugs SDK version instead of mutable CDN Lines 86 and 90 load third-party scripts from 🤖 Prompt for AI Agents |
||
| </head> | ||
|
|
||
| <body class="appsmith-light-theme"> | ||
|
|
@@ -160,7 +183,6 @@ | |
| parseConfig("%REACT_APP_INTERCOM_APP_ID%") || | ||
| parseConfig('{{env "APPSMITH_INTERCOM_APP_ID"}}'); | ||
| const DISABLE_INTERCOM = parseConfig('{{env "APPSMITH_DISABLE_INTERCOM"}}'); | ||
| const DISABLE_BETTERBUGS = parseConfig('{{env "APPSMITH_DISABLE_BETTERBUGS"}}'); | ||
|
|
||
| // Initialize the Intercom library | ||
| if (INTERCOM_APP_ID.length && !DISABLE_INTERCOM) { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.