+ {/* Header Section */}
+
+
+
+ Transparency & Performance
+
+ {/* DNT Status Badge */}
+
+
+
+ DNT RESPECTED:{' '}
+ {dntEnabled ? 'ENABLED (TELEMETRY PAUSED)' : 'ACTIVE (TELEMETRY ON)'}
+
+
+
+
+
+ Web Vitals Dashboard
+
+
+
+ Real-user monitoring (RUM) performance telemetry for{' '}
+
+ usewraith.xyz
+ {' '}
+ over rolling 30-day windows. We publish metric percentiles openly to enforce
+ performance accountability.
+
+
+
+ {/* Metric Overview Cards */}
+
+ {[
+ { type: 'LCP' as MetricType, summary: lcpSummary },
+ { type: 'INP' as MetricType, summary: inpSummary },
+ { type: 'CLS' as MetricType, summary: clsSummary },
+ ].map(({ type, summary }) => {
+ const def = METRIC_DEFINITIONS[type];
+ const badge = getRatingBadge(summary.rating);
+ const isSelected = selectedMetric === type;
+
+ return (
+
setSelectedMetric(type)}
+ className={`flex flex-col justify-between p-5 text-left transition-all duration-150 border ${
+ isSelected
+ ? 'border-primary bg-surface-container'
+ : 'border-outline-variant bg-surface hover:border-outline hover:bg-surface-container/50'
+ }`}
+ >
+
+
+
+ {def.name}
+
+
+
+ {badge.label}
+
+
+
+ {def.fullName}
+
+
+
+
+
+ {summary.p75Value}
+
+ {summary.unit && (
+ {summary.unit}
+ )}
+ p75 (75th %)
+
+
+
+ Target: {def.targetFormatted}
+ {summary.totalSamples.toLocaleString()} samples
+
+
+ );
+ })}
+
+
+ {/* Controls: Metric Tabs + Page Selector */}
+
+ {/* Metric Switcher */}
+
+ {(['LCP', 'INP', 'CLS'] as MetricType[]).map((m) => (
+ setSelectedMetric(m)}
+ className={`px-4 py-1.5 font-mono text-xs font-semibold uppercase tracking-[1px] transition-colors ${
+ selectedMetric === m
+ ? 'bg-primary text-surface font-bold'
+ : 'bg-surface text-outline hover:text-on-surface hover:bg-surface-bright'
+ }`}
+ >
+ {m}
+
+ ))}
+
+
+ {/* Page Filter Selector */}
+
+
+ Page:
+
+ setSelectedPage(e.target.value as SitePage)}
+ className="w-full sm:w-auto border border-outline-variant bg-surface px-3 py-1.5 font-mono text-xs text-on-surface focus:border-primary focus:outline-none"
+ >
+ {SITE_PAGES.map((page) => (
+
+ {page}
+
+ ))}
+
+
+
+
+ {/* Interactive 30-Day Rolling Chart */}
+
+
+
+
+ Rolling 30-Day {activeDef.fullName} ({activeDef.name})
+
+
+ Daily p75 measurement for{' '}
+ {selectedPage}
+
+
+
+
+ Daily Value
+
+
+ Target (
+ {activeDef.targetFormatted})
+
+
+
+
+ {/* Chart SVG Canvas */}
+
+
+ {/* Target Baseline */}
+ {targetY >= paddingY && targetY <= chartHeight - paddingY && (
+
+ )}
+
+ {/* Grid horizontal lines */}
+ {[0, 0.5, 1].map((ratio) => {
+ const y = paddingY + ratio * innerHeight;
+ return (
+
+ );
+ })}
+
+ {/* Trend Line */}
+
+
+ {/* Data Points */}
+ {points.map((pt, idx) => {
+ const cx = getX(idx);
+ const cy = getY(pt.value);
+ const isHovered = hoveredPointIndex === idx;
+ const isGood = pt.rating === 'good';
+
+ return (
+
+ setHoveredPointIndex(idx)}
+ onMouseLeave={() => setHoveredPointIndex(null)}
+ />
+
+ );
+ })}
+
+
+ {/* Tooltip Overlay */}
+ {hoveredPoint && hoveredPointIndex !== null && (
+
+
{hoveredPoint.formattedDate}
+
{hoveredPoint.date}
+
+ Value:
+
+ {hoveredPoint.value} {activeDef.unit}
+
+
+
+ Samples:
+ {hoveredPoint.samples}
+
+
+ )}
+
+
+ {/* X-Axis Date Labels */}
+
+ {points[0]?.formattedDate}
+ {points[14]?.formattedDate}
+ {points[29]?.formattedDate}
+
+
+
+ {/* Metric Documentation Section */}
+
+
+
+ Documentation
+
+
+ Understanding Core Web Vitals
+
+
+ Web Vitals are standardized performance metrics developed by Google to measure key
+ dimensions of user experience.
+
+
+
+
+ {(['LCP', 'INP', 'CLS'] as MetricType[]).map((metricKey) => {
+ const def = METRIC_DEFINITIONS[metricKey];
+
+ return (
+
+
+
+
+ {def.name}
+
+
+ {def.fullName}
+
+
+
+ Good Target:{' '}
+ {def.targetFormatted}
+
+
+
+
+ {def.description}
+
+
+
+
+
+ User Experience Impact
+
+
{def.impact}
+
+
+
+ Wraith Protocol Optimization
+
+
{def.optimization}
+
+
+
+ );
+ })}
+
+
+ {/* DNT Privacy Statement */}
+
+
+ Do-Not-Track (DNT) Privacy Guarantee
+
+
+ We believe performance monitoring should never compromise user privacy. Client-side
+ telemetry strictly respects browser privacy signals (
+ DNT: 1 or{' '}
+ GPC: true). When enabled, no vitals
+ events are recorded or transmitted. Read our full data practices on our{' '}
+
+ Privacy Policy
+
+ .
+
+
+
+