ops: finalize production domain and hardware benchmark tooling

Add /version.json build identity, deploy 16e7930 release markers,
DNS/Named Tunnel prep docs, portable browser benchmark, and replay
stability probe. Keep Quick Tunnel until permanent domain cutover.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Даня Архипов
2026-07-15 22:21:13 +00:00
parent 16e7930304
commit 4fcce5bff9
29 changed files with 1068 additions and 138 deletions

View File

@@ -0,0 +1,51 @@
import { useEffect, useState } from 'react';
export interface VersionInfo {
commit: string;
branch: string;
builtAt: string;
release: string;
}
/**
* Engineering-only build chip. Hidden in presentation mode.
* Visible with ?perf=1 or ?build=1.
*/
export default function BuildIdentityBadge() {
const [info, setInfo] = useState<VersionInfo | null>(null);
const [show, setShow] = useState(false);
const [inPresentation, setInPresentation] = useState(false);
useEffect(() => {
const params = new URLSearchParams(window.location.search);
setShow(params.get('perf') === '1' || params.get('build') === '1');
}, []);
useEffect(() => {
if (!show) return;
let cancelled = false;
fetch('/version.json', { cache: 'no-store' })
.then((r) => (r.ok ? r.json() : null))
.then((j) => {
if (!cancelled && j?.commit) setInfo(j as VersionInfo);
})
.catch(() => undefined);
const id = window.setInterval(() => {
setInPresentation(!!document.querySelector('.presentation-mode'));
}, 500);
return () => {
cancelled = true;
window.clearInterval(id);
};
}, [show]);
if (!show || !info || inPresentation) return null;
return (
<div className="build-identity" data-testid="build-identity" title={`${info.branch} · ${info.builtAt}`}>
<span className="build-identity-label">build</span>
<span className="build-identity-commit">{info.commit}</span>
<span className="build-identity-release">{info.release}</span>
</div>
);
}

View File

@@ -49,6 +49,22 @@ export default function PerfOverlay({ enabled }: PerfOverlayProps) {
const soft = !snap.hardwareAccelerated;
const exportBenchmark = () => {
const payload = {
exportedAt: new Date().toISOString(),
url: window.location.href,
userAgent: navigator.userAgent,
viewport: { width: window.innerWidth, height: window.innerHeight },
snapshot: snap,
};
const blob = new Blob([JSON.stringify(payload, null, 2)], { type: 'application/json' });
const a = document.createElement('a');
a.href = URL.createObjectURL(blob);
a.download = `sorter-benchmark-${Date.now()}.json`;
a.click();
URL.revokeObjectURL(a.href);
};
return (
<div
className="perf-overlay"
@@ -86,6 +102,14 @@ export default function PerfOverlay({ enabled }: PerfOverlayProps) {
{soft ? 'SW' : 'GPU'} {snap.renderer.slice(0, 42)}
{snap.renderer.length > 42 ? '…' : ''}
</div>
<button
type="button"
className="perf-export-btn"
data-testid="perf-export"
onClick={exportBenchmark}
>
Export benchmark
</button>
</div>
);
}

View File

@@ -9,6 +9,7 @@ import { getMeasurementData, shouldShowMeasurement } from '../domain/measurement
import { getViewportType, type ViewportType } from '../domain/cinematicCamera';
import { detectQualityMode } from '../domain/qualityMode';
import { resolveItem } from '../data/resolveItem';
import BuildIdentityBadge from '../components/BuildIdentityBadge';
import CVInspectionOverlay from '../components/CVInspectionOverlay';
const SorterDigitalTwinContinuous = lazy(() => import('../components/ThreeD/SorterDigitalTwinContinuous'));
@@ -391,6 +392,8 @@ export default function MainPage({
Exit presentation (P)
</button>
)}
<BuildIdentityBadge />
</div>
);
}

View File

@@ -2992,7 +2992,7 @@ button:disabled {
color: #e8f0f7;
background: rgba(8, 14, 22, 0.78);
border: 1px solid rgba(120, 160, 200, 0.35);
pointer-events: none;
pointer-events: auto;
user-select: none;
}
.perf-overlay-title {
@@ -3004,7 +3004,39 @@ button:disabled {
.perf-overlay .perf-muted { color: rgba(200, 220, 240, 0.55); }
.perf-overlay .perf-soft { color: #f0b4a0; margin-top: 4px; }
.perf-overlay .perf-hw { color: #a8e0b8; margin-top: 4px; }
.main-page.presentation-mode .perf-overlay { display: none; }
.perf-export-btn {
margin-top: 8px;
width: 100%;
padding: 4px 6px;
font: inherit;
font-size: 10px;
color: #0b1220;
background: #9fd0ff;
border: none;
cursor: pointer;
}
.perf-export-btn:hover { background: #c5e4ff; }
.build-identity {
position: absolute;
bottom: 10px;
left: 10px;
z-index: 35;
display: flex;
gap: 8px;
align-items: baseline;
padding: 4px 8px;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
font-size: 10px;
color: #c8d8e8;
background: rgba(8, 14, 22, 0.7);
border: 1px solid rgba(120, 160, 200, 0.3);
pointer-events: none;
}
.build-identity-label { text-transform: uppercase; letter-spacing: 0.08em; color: #7aa8cc; }
.build-identity-commit { color: #e8f4ff; font-weight: 600; }
.build-identity-release { color: rgba(200, 220, 240, 0.55); }
.main-page.presentation-mode .perf-overlay,
.main-page.presentation-mode .build-identity { display: none; }
.main-page.presentation-mode .main-hud,
.main-page.presentation-mode .main-progress,