Repository navigation
Show me cards: highlight the gleap_highlight label on the page; version 19.4.0 - #204
Merged
Merged
Conversation
Kai's show_me chat card opens a page with ?gleap_highlight=<label>, but no SDK read the parameter, so nothing was ever highlighted. On load the SDK now finds the visible button or field with that label (exact text first, then the closest label sharing most of its words, since the label comes from an AI answer), scrolls to it and outlines it for a few seconds, waiting up to 10 s for SPA content. The parameter is removed from the address bar, keeping the router state. capture-capabilities announces highlight: true so the Messenger only offers the Show me button where it works. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Messenger side: GleapSDK/Messenger-App#292 (offers Show me only when this SDK announces highlight). |
LucaB01
approved these changes
Nov 6, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
Kai's Show me chat card opens a page of the customer's app with
?gleap_highlight=<label>. The Messenger has added that parameter since the cards shipped, but no SDK read it, so the page opened with nothing marked.Fix
src/GleapHighlight.js, called fromGleap.checkForUrlParams(sodisableQueryParamsstill turns it off):gleap_highlightand removes it from the address bar withreplaceState, keepinghistory.stateand the rest of the URL.capture-capabilitiesannounceshighlight: true, so the Messenger offers Show me only where it works (Messenger-App PR, linked below).Verification
src/GleapHighlight.test.js(13 tests) covers: scoring, a near-miss label ("Post as draft" → the Save as draft toggle row), aria-label buttons, hidden and Gleap elements, URL stripping that keeps router state, late-rendered SPA content, and auto-fade.webpackbuild OK. Build artifacts are not committed; the release does that.?gleap_highlight=Post+as+draft&v=2. It scrolled to the Save as draft toggle, outlined it, and left?v=2in the URL.Release
Version 19.4.0 (minor: new behaviour). This PR includes the bump:
package.json/package-lock.json, a CHANGELOG entry, and the rebuiltbuild/andpublished/19.4.0/+published/latest/, the same 14 files as the 19.3.8 release commit. Merging deploys the CDN (Workers Builds on master); pushing the19.4.0tag publishes to npm (release.yml).🤖 Generated with Claude Code