feat(chat-widget): opt-in nudge above the launcher - #1132
Merged
Merged
Conversation
Adds data-munin-nudge, data-munin-nudge-delay and data-munin-nudge-color. The nudge shows a teaser message with an inline input; sending opens the panel into a new conversation. It is suppressed once the panel has been opened or the session has messages, and snoozed for 7 days per channel after a dismissal or open. The launcher now follows data-munin-corners (square by default), the unread badge is larger, borderless and centered on the square corner, and opening the widget with no conversations goes straight to a new chat. Co-Authored-By: Claude Opus 5.5 (1M context) <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.
What
An opt-in nudge for the chat widget: a short teaser above the closed launcher with an eyebrow (
<org name> · now), a message bubble, a dismiss button and an inline input. Plus a few launcher refinements that came out of the same design pass.New embed attributes
data-munin-nudgetrue) uses a localized default in all 21 bundled languages. Max 280 chars.data-munin-nudge-delay8, range0–3600.data-munin-nudge-colorBehaviour
1; real unread messages always take precedence.localStorage,munin-widget-nudge-snoozed:<channelId>).Launcher changes
data-munin-corners:square(still the default) gives a square launcher,roundedkeeps the circle. There's no separate shape attribute.window.mn.widget.open()) when the visitor has no past or current conversation goes straight to a new chat instead of the welcome screen.Docs
skill://conv/setup-chat-widgetand the chat-widget docs guide document the three nudge attributes anddata-munin-corners, which wasn't documented before.docs-fixtures/skills.jsonis regenerated.Notes
Testing
apps/chat-widget: typecheck, lint and 251 tests pass. New coverage: nudge config parsing (config.test.ts), the snooze window (nudge.test.ts), and nudge UI (badge precedence, dismiss, send, open, explicit color). The two old launcher tests are rewritten for the direct-to-chat behaviour.🤖 Generated with Claude Code