:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(mcp-analytics): resolve harness from session-pinned client name (#65174)
Paul D'Ambra6f502103b11c
diff --git a/products/mcp_analytics/frontend/MCPAnalyticsDashboard.stories.tsx b/products/mcp_analytics/frontend/MCPAnalyticsDashboard.stories.tsxindex 9735cea3d1cd..40978afcf767 100644--- a/products/mcp_analytics/frontend/MCPAnalyticsDashboard.stories.tsx+++ b/products/mcp_analytics/frontend/MCPAnalyticsDashboard.stories.tsx@@ -306,7 +306,10 @@ const meta: Meta = {'/api/environments/:team_id/query/:kind': async ({ request }) => {const body = (await request.json()) as Record<string, any>const query: string = body?.query?.query ?? ''- if (query.includes('$mcp_client_name')) {+ // The harness breakdown resolves the client from several signals and+ // aliases the result `AS client`; match that output alias rather than any+ // one input property so the mock survives changes to the resolution.+ if (query.includes('AS client')) {return [200, { results: HARNESS_RESULTS }]}if (query.includes('AS session_id')) {diff --git a/products/mcp_analytics/frontend/dashboard/harnessRegistry.ts b/products/mcp_analytics/frontend/dashboard/harnessRegistry.tsindex eca650619315..55ef59c0ec97 100644--- a/products/mcp_analytics/frontend/dashboard/harnessRegistry.ts+++ b/products/mcp_analytics/frontend/dashboard/harnessRegistry.ts@@ -1,9 +1,20 @@import { type ChartTheme } from '@posthog/quill-charts'+import antigravityLogo from '../harness-logos/antigravity.png'import claudeLogo from '../harness-logos/claude.svg'+import coderabbitLogo from '../harness-logos/coderabbit.svg'import cursorLogo from '../harness-logos/cursor.svg'+import librechatLogo from '../harness-logos/librechat.svg'+import linearLogo from '../harness-logos/linear.svg'+import lovableLogo from '../harness-logos/lovable.png'+import manusLogo from '../harness-logos/manus.svg'+import notionLogo from '../harness-logos/notion.svg'import openaiLogo from '../harness-logos/openai.svg'+import opencodeLogo from '../harness-logos/opencode.svg'+import piLogo from '../harness-logos/pi.svg'+import replitLogo from '../harness-logos/replit.svg'import vscodeLogo from '../harness-logos/vscode.svg'+import windsurfLogo from '../harness-logos/windsurf.svg'export interface HarnessLogo {src: string@@ -115,14 +126,26 @@ const HARNESS_REGISTRY: HarnessDescriptor[] = [logo: { src: vscodeLogo, alt: 'VS Code logo' },colorIndex: 11,},- { category: 'Windsurf', match: (n) => n === 'windsurf' },- { category: 'Replit', match: (n) => n.startsWith('replit') },- { category: 'Lovable', match: (n) => n.startsWith('lovable') },- { category: 'Manus', match: (n) => n === 'manus' },- { category: 'CodeRabbit', match: (n) => n === 'coderabbit' },- { category: 'Notion', match: (n) => n.startsWith('notion') },+ { category: 'Windsurf', match: (n) => n === 'windsurf', logo: { src: windsurfLogo, alt: 'Windsurf logo' } },+ { category: 'Replit', match: (n) => n.startsWith('replit'), logo: { src: replitLogo, alt: 'Replit logo' } },+ { category: 'Lovable', match: (n) => n.startsWith('lovable'), logo: { src: lovableLogo, alt: 'Lovable logo' } },+ { category: 'Manus', match: (n) => n === 'manus', logo: { src: manusLogo, alt: 'Manus logo' } },+ { category: 'CodeRabbit', match: (n) => n === 'coderabbit', logo: { src: coderabbitLogo, alt: 'CodeRabbit logo' } },+ { category: 'Notion', match: (n) => n.startsWith('notion'), logo: { src: notionLogo, alt: 'Notion logo' } },+ { category: 'Linear', match: (n) => n.startsWith('linear'), logo: { src: linearLogo, alt: 'Linear logo' } },+ {+ category: 'LibreChat',+ match: (n) => n.includes('librechat'),+ logo: { src: librechatLogo, alt: 'LibreChat logo' },+ },+ { category: 'Pi', match: (n) => n.startsWith('pi-client'), logo: { src: piLogo, alt: 'Pi logo' } },+ {+ category: 'Antigravity',+ match: (n) => n.startsWith('antigravity'),+ logo: { src: antigravityLogo, alt: 'Antigravity logo' },+ },{ category: 'Poke', match: (n) => n === 'poke' },- { category: 'opencode', match: (n) => n === 'opencode' },+ { category: 'opencode', match: (n) => n === 'opencode', logo: { src: opencodeLogo, alt: 'opencode logo' } },{ category: 'Kiro', match: (n) => n.startsWith('kiro') },{ category: 'Desktop Commander', match: (n) => n.startsWith('desktop-commander') },]diff --git a/products/mcp_analytics/frontend/harness-logos/antigravity.png b/products/mcp_analytics/frontend/harness-logos/antigravity.pngnew file mode 100644index 000000000000..c677e4f5f75bBinary files /dev/null and b/products/mcp_analytics/frontend/harness-logos/antigravity.png differdiff --git a/products/mcp_analytics/frontend/harness-logos/coderabbit.svg b/products/mcp_analytics/frontend/harness-logos/coderabbit.svgnew file mode 100644index 000000000000..231d82a37f46--- /dev/null+++ b/products/mcp_analytics/frontend/harness-logos/coderabbit.svg@@ -0,0 +1 @@+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>CodeRabbit</title><path d="M23.9913 13.0494C23.7481 6.864 18.747 1.8204 12.5667 1.535 5.678 1.2229 0 6.7106 0 13.5252c0 2.6011.8247 5.0066 2.231 6.968.8089 1.1314 2.0724 1.8451 3.4417 1.9614-2.0143-2.284-.3013-4.1924-.3013-4.1924-.7983.386-1.1261 1.6865-1.1261 1.6865-1.512-.9305-1.1631-2.0407-1.1631-2.0407.0951-.2326.3119-.8723 1.475-.6397 2.2522-7.4173 9.6695-3.5527 9.6695-3.5527-.1163-.2327-.5023-1.5544-.5023-1.5544-4.8162-.6978-6.4445-4.113-6.4445-4.113 4.4673-1.3587 7.1847 2.3314 7.1847 2.3314-1.2424-3.0293-4.2294-1.824-5.0066-6.7935 5.1864.8618 5.937 4.9273 6.0428 5.8049.074-.1692.4864-.3965 2.1887-.296 2.6381.1532 4.737 2.8337 4.737 2.8337 0 5.4347-6.6402 4.1236-6.6402 8.2314 0 .9623 1.0468.9041 1.3957 1.3693.2855.3807.164.8036.1057.941h.6292c1.4909 0 2.9077-.6872 3.7853-1.8926 1.5279-2.0988 2.3949-4.7105 2.2891-7.5337zm-8.3953 9.4264c-1.1525-.3806-2.268-2.9817-3.6532-2.9817 1.9403 1.1683 1.1156 2.7174.957 2.9817h2.7015z"/></svg>\ No newline at end of filediff --git a/products/mcp_analytics/frontend/harness-logos/librechat.svg b/products/mcp_analytics/frontend/harness-logos/librechat.svgnew file mode 100644index 000000000000..36a536d654bf--- /dev/null+++ b/products/mcp_analytics/frontend/harness-logos/librechat.svg@@ -0,0 +1,32 @@+<svg width="512" height="512" version="1.1" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">+ <defs>+ <linearGradient id="linearGradient22708">+ <stop stop-color="#21facf" offset="0"/>+ <stop stop-color="#0970ef" offset="1"/>+ </linearGradient>+ <linearGradient id="linearGradient6949" x1="68.454" x2="198.59" y1="246.73" y2="96.35" gradientTransform="translate(-5.754,-56.594)" gradientUnits="userSpaceOnUse">+ <stop stop-color="#72004e" offset="0"/>+ <stop stop-color="#0015b1" offset="1"/>+ </linearGradient>+ <linearGradient id="linearGradient22718" x1="56.735" x2="155.2" y1="246.96" y2="58.575" gradientUnits="userSpaceOnUse">+ <stop stop-color="#4f00da" offset="0"/>+ <stop stop-color="#e5311b" offset="1"/>+ </linearGradient>+ <linearGradient id="linearGradient23463" x1="68.454" x2="198.59" y1="246.73" y2="96.35" gradientUnits="userSpaceOnUse" xlink:href="#linearGradient22708"/>+ <linearGradient id="linearGradient903" x1="54.478" x2="192.1" y1="247.56" y2="9.8095" gradientTransform="matrix(.87923 0 0 .87923 -9.551 48.787)" gradientUnits="userSpaceOnUse">+ <stop stop-color="#dc180d" offset="0"/>+ <stop stop-color="#f96e20" offset=".5"/>+ <stop stop-color="#f4ce41" offset="1"/>+ </linearGradient>+ <linearGradient id="linearGradient918" x1="39.468" x2="154.99" y1="204.22" y2="124.47" gradientUnits="userSpaceOnUse" xlink:href="#linearGradient22708"/>+ </defs>+ <g transform="matrix(2.473 0 0 2.473 -4.8978 -4.8812)">+ <path transform="translate(-5.5496,-57.412)" d="m148.16 59.393c-7.7098 9.3985-19.951 42.888-20.696 49.204-0.16994 4.6737 1.3731 14.231 0.67182 15.805-0.71909 1.6134-5.117-9.4461-7.2151-6.3266-12.219 18.168-10.7 17.731-15.582 31.378-1.8357 5.1315-0.42447 21.99-1.5666 23.773-1.273 1.9866-3.962-12.31-6.8063-9.236-11.603 12.54-16.279 20.379-22.336 30.607-3.3589 5.6725-2.1817 23.33-3.506 24.674-1.3023 1.3215-3.8566-18.326-7.6437-14.309-8.5193 9.038-14.054 13.441-18.946 19.252-5.1981 6.1739-0.78251 17.584-5.0672 35.383l0.1448 0.22073c77.447-50.308 101.52-127.16 107.61-181.19-0.68051 63.93-29.41 142.78-105.33 184.65l0.1127 0.17141c20.241-2.181 22.307 10.458 44.562-4.2837 55.792-48.277 81.856-124.29 61.593-199.78z" display="none" fill="url(#linearGradient903)"/>+ <path transform="translate(-5.5498,-57.412)" d="m148.16 59.393c-7.7098 9.3985-19.951 42.888-20.696 49.204-0.16994 4.6737 1.3731 14.231 0.67182 15.805-0.71909 1.6134-5.117-9.4461-7.2151-6.3266-12.219 18.168-10.7 17.731-15.582 31.378-1.8357 5.1315-0.42447 21.99-1.5666 23.773-1.273 1.9866-3.962-12.31-6.8063-9.236-11.603 12.54-16.279 20.379-22.336 30.607-3.3589 5.6725-2.1817 23.33-3.506 24.674-1.3023 1.3215-3.8566-18.326-7.6437-14.309-8.5193 9.038-14.054 13.441-18.946 19.252-5.1981 6.1739-0.78251 17.584-5.0672 35.383l0.1448 0.22073c77.447-50.308 101.52-127.16 107.61-181.19-0.68051 63.93-29.41 142.78-105.33 184.65l0.1127 0.17141c20.241-2.181 22.307 10.458 44.562-4.2837 55.792-48.277 81.856-124.29 61.593-199.78z" fill="url(#linearGradient918)"/>+ <g transform="translate(0 2.0218e-5)">+ <path transform="translate(-5.7543,-56.594)" d="m111.25 81.024c-48.394-1.5e-5 -87.625 39.231-87.625 87.625 0.0174 20.443 7.1818 40.236 20.253 55.954 0.2523-0.42224 0.53629-0.82423 0.85783-1.2061 4.892-5.8104 10.427-10.214 18.946-19.252 3.7871-4.0176 6.3412 15.63 7.6435 14.309 1.3243-1.3439 0.1473-19.001 3.5062-24.674 6.0563-10.228 10.733-18.067 22.336-30.607 2.8443-3.0741 5.5333 11.223 6.8063 9.2361 1.1421-1.7823-0.26941-18.641 1.5663-23.773 4.8819-13.647 3.3631-13.21 15.582-31.378 2.098-3.1195 6.496 7.9402 7.2151 6.3268 0.70126-1.5734-0.84173-11.131-0.67179-15.805 0.37161-3.1498 3.6036-13.059 7.7055-23.367-7.8432-2.2472-15.962-3.3881-24.12-3.3895zm43.142 11.356c5.5662 61.595-18.426 120.7-62.796 161.65 6.446 1.4857 13.04 2.2367 19.655 2.2386 48.394 1e-5 87.625-39.231 87.625-87.625-3.1e-4 -31.581-16.995-60.719-44.484-76.268z" display="none" fill="url(#linearGradient22718)"/>+ <path transform="translate(-5.754,-56.594)" d="m111.25 81.024c-48.394-1.5e-5 -87.625 39.231-87.625 87.625 0.0174 20.443 7.1818 40.236 20.253 55.954 0.2523-0.42224 0.53629-0.82423 0.85783-1.2061 4.892-5.8104 10.427-10.214 18.946-19.252 3.7871-4.0176 6.3412 15.63 7.6435 14.309 1.3243-1.3439 0.1473-19.001 3.5062-24.674 6.0563-10.228 10.733-18.067 22.336-30.607 2.8443-3.0741 5.5333 11.223 6.8063 9.2361 1.1421-1.7823-0.26941-18.641 1.5663-23.773 4.8819-13.647 3.3631-13.21 15.582-31.378 2.098-3.1195 6.496 7.9402 7.2151 6.3268 0.70126-1.5734-0.84173-11.131-0.67179-15.805 0.37161-3.1498 3.6036-13.059 7.7055-23.367-7.8432-2.2472-15.962-3.3881-24.12-3.3895zm43.142 11.356c5.5662 61.595-18.426 120.7-62.796 161.65 6.446 1.4857 13.04 2.2367 19.655 2.2386 48.394 1e-5 87.625-39.231 87.625-87.625-3.1e-4 -31.581-16.995-60.719-44.484-76.268z" display="none" fill="url(#linearGradient23463)"/>+ <path d="m105.5 24.43c-48.394-1.5e-5 -87.625 39.231-87.625 87.625 0.0174 20.443 7.1818 40.236 20.253 55.954 0.2523-0.42224 0.53629-0.82423 0.85783-1.2061 4.892-5.8104 10.427-10.214 18.946-19.252 3.7871-4.0176 6.3412 15.63 7.6435 14.309 1.3243-1.3439 0.1473-19.001 3.5062-24.674 6.0563-10.228 10.733-18.067 22.336-30.607 2.8443-3.0741 5.5333 11.223 6.8063 9.2361 1.1421-1.7823-0.26941-18.641 1.5663-23.773 4.8819-13.647 3.3631-13.21 15.582-31.378 2.098-3.1195 6.496 7.9402 7.2151 6.3268 0.70126-1.5734-0.84173-11.131-0.67179-15.805 0.37161-3.1498 3.6036-13.059 7.7055-23.367-7.8432-2.2472-15.962-3.3881-24.12-3.3895zm43.142 11.356c5.5662 61.595-18.426 120.7-62.796 161.65 6.446 1.4857 13.04 2.2367 19.655 2.2386 48.394 1e-5 87.625-39.231 87.625-87.625-3.1e-4 -31.581-16.995-60.719-44.484-76.268z" fill="url(#linearGradient6949)"/>+ </g>+ </g>+</svg>diff --git a/products/mcp_analytics/frontend/harness-logos/linear.svg b/products/mcp_analytics/frontend/harness-logos/linear.svgnew file mode 100644index 000000000000..f3770d654ec5--- /dev/null+++ b/products/mcp_analytics/frontend/harness-logos/linear.svg@@ -0,0 +1 @@+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Linear</title><path d="M2.886 4.18A11.982 11.982 0 0 1 11.99 0C18.624 0 24 5.376 24 12.009c0 3.64-1.62 6.903-4.18 9.105L2.887 4.18ZM1.817 5.626l16.556 16.556c-.524.33-1.075.62-1.65.866L.951 7.277c.247-.575.537-1.126.866-1.65ZM.322 9.163l14.515 14.515c-.71.172-1.443.282-2.195.322L0 11.358a12 12 0 0 1 .322-2.195Zm-.17 4.862 9.823 9.824a12.02 12.02 0 0 1-9.824-9.824Z"/></svg>\ No newline at end of filediff --git a/products/mcp_analytics/frontend/harness-logos/lovable.png b/products/mcp_analytics/frontend/harness-logos/lovable.pngnew file mode 100644index 000000000000..e3e7463da78bBinary files /dev/null and b/products/mcp_analytics/frontend/harness-logos/lovable.png differdiff --git a/products/mcp_analytics/frontend/harness-logos/manus.svg b/products/mcp_analytics/frontend/harness-logos/manus.svgnew file mode 100644index 000000000000..fcfd81daf9a3--- /dev/null+++ b/products/mcp_analytics/frontend/harness-logos/manus.svg@@ -0,0 +1,6 @@+<svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg">+<path fill-rule="evenodd" clip-rule="evenodd" d="M9.40053 8.55905C8.88268 9.6224 9.31868 10.9073 10.3744 11.4289C11.8907 12.1781 13.2065 12.9168 14.5094 14.3964C15.2896 15.2825 16.6353 15.3637 17.515 14.5777C18.3947 13.7918 18.4753 12.4364 17.695 11.5503C15.8385 9.44198 13.9275 8.40713 12.2497 7.57813C11.194 7.05652 9.91838 7.49569 9.40053 8.55905Z" fill="#34322D"/>+<path fill-rule="evenodd" clip-rule="evenodd" d="M20.9079 2.3149C19.7672 2.60216 19.0736 3.76651 19.3588 4.91555C19.558 5.71831 19.7438 6.40473 19.9139 7.03309C20.2395 8.23578 20.5075 9.22579 20.7019 10.4119C20.8934 11.5804 21.9892 12.3714 23.1493 12.1785C24.3095 11.9856 25.0947 10.8818 24.9032 9.71326C24.6735 8.31142 24.3157 6.98504 23.9566 5.65374C23.7976 5.06422 23.6383 4.47373 23.4898 3.87529C23.2046 2.72625 22.0487 2.02764 20.9079 2.3149Z" fill="#34322D"/>+<path fill-rule="evenodd" clip-rule="evenodd" d="M33.0786 3.63426C32.0734 3.01986 30.7639 3.34265 30.154 4.35522C29.0225 6.23356 28.4277 8.08306 27.8752 10.3089C27.59 11.458 28.2836 12.6223 29.4244 12.9096C30.5651 13.1968 31.7211 12.4982 32.0063 11.3492C32.5183 9.28598 32.9881 7.91866 33.7944 6.58017C34.4044 5.5676 34.0839 4.24867 33.0786 3.63426Z" fill="#34322D"/>+<path fill-rule="evenodd" clip-rule="evenodd" d="M43.9331 56.6116C48.0617 53.9731 50.9164 39.8228 50.2884 35.6091C50.2884 35.6091 49.634 33.3469 48.0372 33.3468C46.8137 33.3468 46.1377 34.3415 45.8884 34.8067C45.6728 34.7269 45.4533 34.6547 45.2792 34.5985C45.1853 34.5681 45.0537 34.5263 44.9304 34.4871L44.6964 34.4125C44.5053 34.3512 44.3255 34.2922 44.1561 34.2338L44.1566 34.1738C44.164 32.8061 44.025 30.6718 42.6083 28.4481C42.3816 28.0922 42.1677 27.7741 41.9848 27.5042L41.8701 27.3352C41.734 27.1348 41.6272 26.9775 41.5245 26.8205C41.2723 26.4354 41.2034 26.2871 41.1767 26.2187L41.1755 26.2156C41.1651 26.1891 41.1438 26.1351 41.138 25.9704C41.1309 25.7681 41.1481 25.3852 41.2793 24.7155L41.9612 21.9906L41.9637 21.9766C42.0087 21.7265 42.0491 21.5016 42.0711 21.1356C42.0914 20.7986 42.0956 20.3088 42.01 19.7408C41.8478 18.6648 41.2257 16.6253 39.0332 15.4429C38.4974 15.154 37.8556 14.9811 37.2229 14.8983C36.7976 14.8427 36.229 14.8047 35.5687 14.8557C34.2216 14.9597 32.4539 15.4447 30.8803 16.8875L30.4884 17.2997C29.5737 18.4044 28.6076 19.7723 27.8747 20.9829C25.6495 19.9355 23.0302 18.733 21.2001 18.0864C19.1915 17.3769 16.9497 16.7831 14.843 16.8595C12.5099 16.9441 9.88675 17.9222 8.51344 20.6906C7.94928 21.8279 7.70856 23.1561 7.99827 24.5403C8.27511 25.8631 8.95981 26.8748 9.61373 27.5807C10.8279 28.8914 12.4542 29.7033 13.6004 30.1954C14.478 30.5722 15.3797 30.8857 16.178 31.1395C16.0937 31.2921 16.0092 31.4501 15.9278 31.6103C15.6864 32.085 15.3976 32.7201 15.2075 33.4466C15.0179 34.1711 14.8684 35.2035 15.1387 36.368C15.4161 37.5632 15.965 38.4967 16.6189 39.2106C16.5941 39.5819 16.5848 39.9731 16.5986 40.3779C16.6906 43.0818 18.3417 44.8845 19.7939 45.9067C21.1776 46.8806 22.8071 47.4783 24.1246 47.8802C25.3968 48.2683 26.7402 48.5762 27.8317 48.8265L28.0653 48.88C29.2286 49.1473 30.3783 49.4564 31.5285 49.7657C32.833 50.1165 34.1381 50.4674 35.4641 50.7575C35.8978 50.8524 36.3192 50.9432 36.7069 51.0259L36.8481 51.3939C38.5683 55.7897 40.8651 58.5723 43.9331 56.6116ZM28.2156 38.6202C27.9801 38.5246 27.845 38.4612 27.7251 38.4007C26.6832 37.8586 25.4015 38.2672 24.8596 39.3157C24.3165 40.3662 24.723 41.6619 25.7659 42.2088C25.8514 42.2535 25.9381 42.2955 26.0253 42.3366C26.1714 42.4055 26.3749 42.4973 26.6227 42.598C27.1114 42.7965 27.8062 43.0437 28.5938 43.212C29.9917 43.5107 32.5756 43.7384 34.3274 41.716C35.1684 40.7451 35.5727 39.4694 35.7263 38.2766C35.8845 37.0476 35.8056 35.6995 35.4968 34.3874C34.8887 31.8026 33.2785 28.9743 30.272 27.6329C27.6959 26.4835 25.1502 26.2133 23.0033 26.4557C21.57 26.6176 20.2006 27.0239 19.1006 27.6431V27.5954C16.4105 26.8216 11.0571 25.2818 12.3754 22.6242C13.3748 20.6096 16.1129 20.7761 19.8267 22.0881C21.3351 22.621 23.4312 23.5706 25.4084 24.4966C26.0213 24.7836 26.6228 25.0684 27.1918 25.3378C28.0211 25.7305 29.4076 26.3772 29.4076 26.3772C30.9845 24.471 31.5968 23.4209 32.1372 22.4941C32.5089 21.8566 32.8466 21.2775 33.4408 20.5182C34.2818 19.4434 35.6412 18.7792 37.0357 19.1681C38.0076 19.6922 37.7607 21.0159 37.7607 21.0159L37.0852 23.7151C36.4404 26.8915 37.1541 27.9426 38.3305 29.6751C38.5371 29.9793 38.7581 30.3048 38.9884 30.6663C39.9266 32.139 39.8833 33.5552 39.8479 34.711C39.8251 35.4544 39.8057 36.0901 40.0528 36.5639C40.5618 37.5397 42.4666 38.1448 43.7154 38.5415C44.0155 38.6368 44.2777 38.7201 44.4736 38.7936L44.6074 38.8467C44.4314 39.3965 44.2715 39.9656 44.1117 40.5342C43.4013 43.0628 42.6941 45.5801 40.5854 46.3344C37.9241 47.2863 35.2627 46.3856 35.2627 46.3856C34.783 46.2444 34.2945 46.1351 33.806 46.0257C33.1971 45.8894 32.588 45.7531 31.9952 45.555C31.1691 45.2461 30.0119 44.9805 28.7543 44.692C25.7598 44.005 22.1958 43.1872 21.1752 41.3416C21.0033 41.0306 20.9035 40.6906 20.8908 40.317C20.8331 38.6196 21.4235 37.0999 21.4235 37.0999C21.4235 37.0999 20.5079 37.1038 19.8658 36.4816C19.6264 36.2496 19.4251 35.9307 19.3233 35.4922C19.12 34.6163 19.2946 33.3466 20.3591 32.2743L20.8926 31.7384C21.1621 31.4669 21.961 30.8894 23.4778 30.7181C24.9176 30.5555 26.7 30.7302 28.5474 31.5544C29.9644 32.1867 30.9442 33.6372 31.3534 35.3765C31.5534 36.2265 31.5901 37.0517 31.5034 37.725C31.4121 38.4344 31.211 38.7897 31.1188 38.8962C31.0042 39.0285 30.6006 39.2562 29.4775 39.0163C29.0047 38.9152 28.5556 38.7584 28.2156 38.6202Z" fill="#34322D"/>+</svg>diff --git a/products/mcp_analytics/frontend/harness-logos/notion.svg b/products/mcp_analytics/frontend/harness-logos/notion.svgnew file mode 100644index 000000000000..2917f42eebd0--- /dev/null+++ b/products/mcp_analytics/frontend/harness-logos/notion.svg@@ -0,0 +1 @@+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Notion</title><path d="M4.459 4.208c.746.606 1.026.56 2.428.466l13.215-.793c.28 0 .047-.28-.046-.326L17.86 1.968c-.42-.326-.981-.7-2.055-.607L3.01 2.295c-.466.046-.56.28-.374.466zm.793 3.08v13.904c0 .747.373 1.027 1.214.98l14.523-.84c.841-.046.935-.56.935-1.167V6.354c0-.606-.233-.933-.748-.887l-15.177.887c-.56.047-.747.327-.747.933zm14.337.745c.093.42 0 .84-.42.888l-.7.14v10.264c-.608.327-1.168.514-1.635.514-.748 0-.935-.234-1.495-.933l-4.577-7.186v6.952L12.21 19s0 .84-1.168.84l-3.222.186c-.093-.186 0-.653.327-.746l.84-.233V9.854L7.822 9.76c-.094-.42.14-1.026.793-1.073l3.456-.233 4.764 7.279v-6.44l-1.215-.139c-.093-.514.28-.887.747-.933zM1.936 1.035l13.31-.98c1.634-.14 2.055-.047 3.082.7l4.249 2.986c.7.513.934.653.934 1.213v16.378c0 1.026-.373 1.634-1.68 1.726l-15.458.934c-.98.047-1.448-.093-1.962-.747l-3.129-4.06c-.56-.747-.793-1.306-.793-1.96V2.667c0-.839.374-1.54 1.447-1.632z"/></svg>\ No newline at end of filediff --git a/products/mcp_analytics/frontend/harness-logos/opencode.svg b/products/mcp_analytics/frontend/harness-logos/opencode.svgnew file mode 100644index 000000000000..1e0da06f9793--- /dev/null+++ b/products/mcp_analytics/frontend/harness-logos/opencode.svg@@ -0,0 +1 @@+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>OpenCode</title><path d="M22 24H2V0h20zM17 4.8H7v14.4h10z"/></svg>\ No newline at end of filediff --git a/products/mcp_analytics/frontend/harness-logos/pi.svg b/products/mcp_analytics/frontend/harness-logos/pi.svgnew file mode 100644index 000000000000..c403a4ea012a--- /dev/null+++ b/products/mcp_analytics/frontend/harness-logos/pi.svg@@ -0,0 +1,28 @@+<?xml version="1.0" encoding="UTF-8"?>+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 800">+ <style>+ .logo-mark { fill: #000; }+ @media (prefers-color-scheme: dark) {+ .logo-mark { fill: #fff; }+ }+ </style>+ <!-- P shape: outer boundary clockwise, inner hole counter-clockwise -->+ <path class="logo-mark" fill-rule="evenodd" d="+ M165.29 165.29+ H517.36+ V400+ H400+ V517.36+ H282.65+ V634.72+ H165.29+ Z+ M282.65 282.65+ V400+ H400+ V282.65+ Z+ "/>+ <!-- i dot -->+ <path class="logo-mark" d="M517.36 400 H634.72 V634.72 H517.36 Z"/>+</svg>diff --git a/products/mcp_analytics/frontend/harness-logos/replit.svg b/products/mcp_analytics/frontend/harness-logos/replit.svgnew file mode 100644index 000000000000..21b7620b187f--- /dev/null+++ b/products/mcp_analytics/frontend/harness-logos/replit.svg@@ -0,0 +1 @@+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Replit</title><path d="M2 1.5A1.5 1.5 0 0 1 3.5 0h7A1.5 1.5 0 0 1 12 1.5V8H3.5A1.5 1.5 0 0 1 2 6.5ZM12 8h8.5A1.5 1.5 0 0 1 22 9.5v5a1.5 1.5 0 0 1-1.5 1.5H12ZM2 17.5A1.5 1.5 0 0 1 3.5 16H12v6.5a1.5 1.5 0 0 1-1.5 1.5h-7A1.5 1.5 0 0 1 2 22.5Z"/></svg>\ No newline at end of filediff --git a/products/mcp_analytics/frontend/harness-logos/windsurf.svg b/products/mcp_analytics/frontend/harness-logos/windsurf.svgnew file mode 100644index 000000000000..bb77fc9348b5--- /dev/null+++ b/products/mcp_analytics/frontend/harness-logos/windsurf.svg@@ -0,0 +1 @@+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Windsurf</title><path d="M23.55 5.067c-1.2038-.002-2.1806.973-2.1806 2.1765v4.8676c0 .972-.8035 1.7594-1.7597 1.7594-.568 0-1.1352-.286-1.4718-.7659l-4.9713-7.1003c-.4125-.5896-1.0837-.941-1.8103-.941-1.1334 0-2.1533.9635-2.1533 2.153v4.8957c0 .972-.7969 1.7594-1.7596 1.7594-.57 0-1.1363-.286-1.4728-.7658L.4076 5.1598C.2822 4.9798 0 5.0688 0 5.2882v4.2452c0 .2147.0656.4228.1884.599l5.4748 7.8183c.3234.462.8006.8052 1.3509.9298 1.3771.313 2.6446-.747 2.6446-2.0977v-4.893c0-.972.7875-1.7593 1.7596-1.7593h.003a1.798 1.798 0 0 1 1.4718.7658l4.9723 7.0994c.4135.5905 1.05.941 1.8093.941 1.1587 0 2.1515-.9645 2.1515-2.153v-4.8948c0-.972.7875-1.7594 1.7596-1.7594h.194a.22.22 0 0 0 .2204-.2202v-4.622a.22.22 0 0 0-.2203-.2203Z"/></svg>\ No newline at end of filediff --git a/products/mcp_analytics/frontend/mcpDashboardOverviewLogic.test.ts b/products/mcp_analytics/frontend/mcpDashboardOverviewLogic.test.tsindex a3c4dfbd08ea..e24377d505ac 100644--- a/products/mcp_analytics/frontend/mcpDashboardOverviewLogic.test.ts+++ b/products/mcp_analytics/frontend/mcpDashboardOverviewLogic.test.ts@@ -10,6 +10,7 @@ import { urls } from 'scenes/urls'import { initKeaTests } from '~/test/init'import { AnyPropertyFilter, PropertyFilterType, PropertyOperator } from '~/types'+import { harnessLogo } from './dashboard/harnessRegistry'import {type ActivityRow,aggregateHarnessRows,@@ -69,6 +70,22 @@ describe('mcpDashboardOverviewLogic', () => {['cursor/0.42', 'Cursor'],['cursor darwin arm64', 'Cursor'],['codex-cli', 'OpenAI Codex'],+ // Raw clientInfo.name tokens the harness coalesce now surfaces from+ // mcp_session_client_name (these clients send no useful User-Agent).+ ['codex-mcp-client', 'OpenAI Codex'],+ ['cursor-vscode', 'Cursor'],+ ['opencode', 'opencode'],+ ['Lovable MCP Client', 'Lovable'],+ ['linear-agent', 'Linear'],+ ['@librechat/api-client', 'LibreChat'],+ ['pi-client', 'Pi'],+ ['antigravity-client', 'Antigravity'],+ ['coderabbit', 'CodeRabbit'],+ ['notion-mcp-client', 'Notion'],+ ['replit-agent-mcp-client', 'Replit'],+ ['windsurf', 'Windsurf'],+ ['claude-code sdk-cli', 'Claude Agent SDK'],+ ['claude-code sdk-py', 'Claude Agent SDK'],['visual studio code', 'VS Code'],['something-nobody-knows', 'Other'],['', 'Other'],@@ -79,6 +96,32 @@ describe('mcpDashboardOverviewLogic', () => {it('strips the "(via mcp-remote …)" suffix before matching', () => {expect(categorizeHarness('claude-code (via mcp-remote 1.2.3)')).toBe('Claude Code')})++ it.each([+ 'Claude Code',+ 'OpenAI',+ 'Cursor',+ 'Linear',+ 'CodeRabbit',+ 'Notion',+ 'Replit',+ 'Windsurf',+ 'opencode',+ 'Lovable',+ 'Manus',+ 'LibreChat',+ 'Pi',+ 'Antigravity',+ ])('resolves a logo for the %s category', (category) => {+ expect(harnessLogo(category)?.src).toBeTruthy()+ })++ it.each(['Anthropic API', 'Poke', 'Kiro', 'Desktop Commander', 'Other'])(+ 'has no logo for the logo-less %s category',+ (category) => {+ expect(harnessLogo(category)).toBeUndefined()+ }+ )})describe('deltaPct', () => {diff --git a/products/mcp_analytics/frontend/mcpDashboardOverviewLogic.ts b/products/mcp_analytics/frontend/mcpDashboardOverviewLogic.tsindex 73a788e5eed2..d9da724669e3 100644--- a/products/mcp_analytics/frontend/mcpDashboardOverviewLogic.ts+++ b/products/mcp_analytics/frontend/mcpDashboardOverviewLogic.ts@@ -91,32 +91,54 @@ ORDER BY total_calls DESCLIMIT 50`-// Newer Anthropic clients stopped sending clientInfo.name ($mcp_client_name) and-// now report identity only via the x-anthropic-client header (mcp_vendor_client)-// or the User-Agent, so reading $mcp_client_name alone buckets nearly everything-// as "Other". Resolve an effective client per call: prefer the self-reported-// name, then the vendor header (matched case-insensitively, as the MCP service's-// own client detection does), then the User-Agent's leading product token plus-// the first parenthetical token as a surface suffix — e.g. "claude-code cli",-// "claude-code claude-desktop", "openai-mcp chatgpt". The version segment between-// them is dropped so claude-code/2.1.x folds to one token; categorizeHarness then-// buckets surface-specific tokens (Claude Desktop, ChatGPT, …) and folds the rest.+// Resolve an effective client per tool call from the strongest identity signal+// available. The order matters and each step exists for a measured reason:+//+// 1. x-anthropic-client header (mcp_vendor_client). Anthropic pools every UI+// surface behind one transport that self-reports the generic clientInfo.name+// "Anthropic/ClaudeAI", so this header is the only thing that separates+// Cowork / Claude.ai / Claude Design. It is absent for every non-Anthropic+// client and for Claude Code's CLI/SDK/IDE builds (whose surface rides in the+// User-Agent instead), so resolving it first never masks a finer signal.+// 2. Claude Code's User-Agent surface. Every Claude Code build reports the same+// clientInfo.name ("claude-code"); the build (cli / sdk-ts / claude-vscode /+// claude-desktop) lives only in the User-Agent parenthetical. Lift it out so+// the SDK/IDE/Desktop split survives. Gated on the claude-code product token+// because other clients' User-Agents are often bare HTTP libraries (node,+// undici) that must not win over a real clientInfo.name.+// 3. The session-pinned clientInfo.name (mcp_session_client_name). The per-request+// $mcp_client_name is stamped only on $mcp_initialize, never on $mcp_tool_call,+// so reading it here bucketed every self-identifying client — Codex, Cursor,+// opencode, … — as "Other". The generic "mcp" SDK default is dropped so those+// rows fall through to the User-Agent.+// 4. The User-Agent product token + first parenthetical, for hosted clients that+// send a product User-Agent but no clientInfo.name (e.g. "openai-mcp/1.0.0").+// 5. The OAuth client_name from token introspection, the only identity an+// OAuth-registered client (vibe-coding platforms, ChatGPT) carries per request.+//+// The version segment is dropped so claude-code/2.1.x folds to one token;+// categorizeHarness then buckets surface-specific tokens and folds the rest.+//+// The User-Agent token is the leading product name plus the first parenthetical+// (the surface, e.g. "cli"); steps 2 and 4 both need it, so it lives here once.+// HogQL has no scalar WITH alias, but this is a JS template literal — interpolating+// a const keeps the source DRY while the generated SQL stays identical.+const UA_PRODUCT = `extract(toString(properties.$mcp_client_user_agent), '^([^/]+)')`+const UA_TOKEN = `trim(concat(${UA_PRODUCT}, ' ', extract(toString(properties.$mcp_client_user_agent), '[(]([^,)]+)')))`const HARNESS_ROWS_QUERY = `SELECTcoalesce(- nullIf(toString(properties.$mcp_client_name), ''),multiIf(lower(toString(properties.mcp_vendor_client)) = 'claudecode', 'claude-code',lower(toString(properties.mcp_vendor_client)) = 'claudeai', 'claude-ai',lower(toString(properties.mcp_vendor_client)) = 'cowork', 'cowork',lower(toString(properties.mcp_vendor_client)) = 'claudedesign', 'claude-design',- nullIf(toString(properties.mcp_vendor_client), '')+ NULL),- nullIf(trim(concat(- extract(toString(properties.$mcp_client_user_agent), '^([^/]+)'),- ' ',- extract(toString(properties.$mcp_client_user_agent), '[(]([^,)]+)')- )), ''),+ if(lower(${UA_PRODUCT}) = 'claude-code', ${UA_TOKEN}, NULL),+ nullIf(nullIf(toString(properties.mcp_session_client_name), ''), 'mcp'),+ nullIf(${UA_TOKEN}, ''),+ nullIf(toString(properties.$mcp_oauth_client_name), ''),'') AS client,count() AS total_calls,