fix: proactive teaser scroll trigger, jump-back-down chip, and on-topic replies - #240
Open
HardeepAsrani wants to merge 1 commit into
Open
fix: proactive teaser scroll trigger, jump-back-down chip, and on-topic replies#240HardeepAsrani wants to merge 1 commit into
HardeepAsrani wants to merge 1 commit into
Conversation
…n chip, on-topic prompt The proactive teaser's scroll trigger only evaluated on scroll events, so a visitor already past the configured depth when it armed (anchor link, restored scroll position, page shorter than the viewport) never saw it; it now also evaluates once at arm time. The chat window gains a jump-back-down chip that appears when the visitor scrolls up through the conversation and returns them to the latest message. The system prompt gains an explicit rule declining general-purpose tasks (fixing code, translating, generating unrelated content) that the site content does not cover. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
🌍 i18n String Review Report📊 Summary
➕ Added Strings (1) - Click to expand
|
Soare-Robert-Daniel
approved these changes
Aug 19, 2026
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.
Summary
Code-side items from Codeinwp/hyve#299 (the knowledge base edits from that issue are content tasks on the site itself).
Proactive message now fires for already-scrolled visitors. The scroll trigger only checked the depth when a scroll event fired, so a visitor who was already past the configured depth when the widget loaded (arrived via an anchor link, the browser restored their scroll position, or the page is shorter than the viewport) never saw the teaser. The depth is now also checked once when the trigger arms.
New: jump back to the latest message. When a visitor scrolls up through a long conversation, a small arrow chip appears above the input; clicking it returns them to the bottom. It hides on its own near the bottom or when a new reply arrives, stays out of keyboard focus while hidden, and its label is translatable.
The bot stays on topic. Asking it to perform a general-purpose task the site content does not cover (the issue's example: "fix this CSS") now gets the not-answered fallback instead of a generated answer. This matches the product positioning that answers come from the knowledge base and avoids unneeded API usage. The same rule ships to Hyve Connect so hosted sites behave identically.
Note: the issue's "looks vs appears" search-matching item is addressed by the retrieval changes in #239.
QA instructions