claude code vibe feat(nudges): unified registry-driven nudge framework#315
Open
functionstackx wants to merge 1 commit intomasterfrom
Open
claude code vibe feat(nudges): unified registry-driven nudge framework#315functionstackx wants to merge 1 commit intomasterfrom
functionstackx wants to merge 1 commit intomasterfrom
Conversation
Replace eight one-off engagement-nudge implementations (banners, modals,
toasts) with a single registry-driven framework. Each nudge declares its
trigger, audience, dismissal behavior, persistence policy, and optional
schedule in one place; the framework handles route matching, exclusivity,
storage, and analytics uniformly.
Migrated: launch-banner-dsv4, dsv4-launch-modal, github-star-modal,
reproducibility-nudge, star-nudge, export-nudge, gradient-label-nudge,
eval-samples-nudge. Old per-nudge components and storage modules are
deleted; cypress tests now reference the new dismissal-storage keys
(`inferencex-nudge:<id>`).
Key features:
- Registry entry per nudge with declarative trigger (mount, mount-delay,
event with thresholds and optional DOM selector matching)
- Persistence policies: session, forever, cooldown (with timestamp
expiry — preserves the 1-week re-show cadence for star/eval-samples)
- Optional schedule (showAfter / hideAfter) for time-bound campaigns
- Priority-based slot manager so dsv4-modal preempts github-star-modal,
and page-scoped eval-samples-nudge preempts always-on toasts on
/evaluation
- External-dismiss events for state-driven hide (e.g. STARRED_EVENT
hides the star nudges without persisting)
- Unified analytics: nudge_shown / nudge_dismissed /
nudge_action_clicked, each carrying { id, kind }
Co-authored-by: functionstackx <functionstackx@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Closes #271.
Replaces eight one-off engagement-nudge implementations (banners, modals, toasts) with a single registry-driven framework. Each nudge declares its trigger, audience, dismissal behavior, persistence policy, and optional schedule in one place; the framework handles route matching, exclusivity, storage, and analytics uniformly.
Migrated nudges (10 original files deleted)
launch-banner-dsv4— banner, landing, foreverdsv4-launch-modal— modal, landing, forever, priority 100github-star-modal— modal, landing, 1-week cooldown, priority 50reproducibility-nudge— toast, dashboard, sessionstar-nudge— toast, event-triggered, sessionexport-nudge— toast, copy-on-tooltip, sessiongradient-label-nudge— toast, event-triggered, sessioneval-samples-nudge— toast, /evaluation, 1-week cooldownFramework capabilities
mount,mount-delay, oreventwith per-event thresholds,window/document targets, optional CSS selector matching (used for copy-on-chart-tooltip), optional debouncesession,forever,cooldownwithdurationMs(expiring timestamps preserve the 1-week re-show cadence)schedulewithshowAfter/hideAfterISO bounds so time-bound campaigns don't need code changes to retireexternalDismissEventsfor state-driven hide (inferencex:starredhides both star nudges without persisting)nudge_shown,nudge_dismissed,nudge_action_clickedwith{ id, kind }propertiesregistry.ts, no other wiringTests
lib/nudges/persistence.test.ts,scheduling.test.ts,should-show.test.ts,components/nudges/registry.test.tsinferencex-nudge:*storage keysBrowser verification (dev server, Playwright)
dsv4-launch-modalstores"1"(forever),github-star-modal/eval-samples-nudgestore numeric timestamps (cooldown)What I kept separate
mtp-engine-conflict-toast— transient state-driven feedback, not engagementunofficial-run-provider— complex data-overlay state machine (issue explicitly allows this)Generated with Claude Code