feat(modal): add rollout telemetry foundation

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-04 21:23:04 +08:00
co-authored by Claude Fable 5
parent 8b728295a9
commit 113a6bcab0
14 changed files with 320 additions and 1 deletions
+15 -1
View File
@@ -63,8 +63,20 @@
var currentUuid = config.currentUuid || '';
var pollTimer = null;
var shouldPoll = false;
var telemetry = window.AksrtModalTelemetry;
var telemetryId = '';
function open() { modal.classList.add('is-open'); modal.setAttribute('aria-hidden', 'false'); document.body.style.overflow = 'hidden'; }
function telemetryMark(event) {
if (telemetry && telemetryId && typeof telemetry.mark === 'function') telemetry.mark(telemetryId, event);
}
function open() {
telemetryId = telemetry && typeof telemetry.start === 'function' ? telemetry.start('identity') : '';
modal.classList.add('is-open');
modal.setAttribute('aria-hidden', 'false');
document.body.style.overflow = 'hidden';
telemetryMark('shell');
}
function close() { modal.classList.remove('is-open'); modal.setAttribute('aria-hidden', 'true'); document.body.style.overflow = ''; }
root.querySelectorAll('[data-auth-modal-open]').forEach(function (button) { button.addEventListener('click', open); });
modal.querySelectorAll('[data-auth-modal-close]').forEach(function (button) { button.addEventListener('click', close); });
@@ -80,6 +92,7 @@
function render(data) {
if (!data) return;
telemetryMark('first-content');
currentUuid = data.uuid || currentUuid;
if (statusBox) statusBox.hidden = false;
if (createForm) createForm.hidden = true;
@@ -102,6 +115,7 @@
} else {
stopPolling();
}
telemetryMark('ready');
}
function refresh() {