Repository navigation
feat(stats.js): WebMCP dashboard opt-in + load-once guards - #447
Merged
Merged
Conversation
- projects.webmcp_enabled / webmcp_config (migration applied by hand) + Stats -> WebMCP plugin toggle; GET /api/tracker/v1/webmcp?site= serves the public config. stats.js asks only when the browser ships WebMCP and the tag has no data-webmcp; data-webmcp="off" always wins. - stats.js runs once per site per page (a duplicated tag no longer doubles pageviews/clicks); the WebMCP embed is injected at most once and never when the page has its own copy (incl. a not-yet-run module tag). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ThreatCrush Security Scan50 finding(s) HIGH/CRITICAL: 2 | MEDIUM: 30 | LOW: 18
Snippets are redacted; ThreatCrush never prints matched credential material. |
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.
Follow-up to #446.
projects.webmcp_enabled/webmcp_config(migration 20261111100000, already applied to prod by hand + pgrst reload), Stats -> WebMCP plugin toggle, publicGET /api/tracker/v1/webmcp?site=(only whitelisted embed options). stats.js asks only when the browser ships WebMCP and the tag has nodata-webmcp;data-webmcp="off"always wins; tag attributes override dashboard config.Verified in Chrome 155 (WebMCPTesting), rendered stats.js, 6 scenarios all pass: attr, dashboard-only, double tag (1 pageview, 1 embed fetch), off beats dashboard, site's own embed (1 fetch), not enabled (no fetch). Contract assertions checked against the rendered script; changed TS/TSX transpiled.
🤖 Generated with Claude Code