fix(*): 平台稳定性 - 修复会话隔离、运行时缓存与部署镜像更新链路

This commit is contained in:
ddcat666
2026-09-24 06:05:04 +08:00
parent 10c8e19d94
commit a79b54ada5
32 changed files with 788 additions and 116 deletions

View File

@@ -111,8 +111,9 @@ export function initializeClientDiagnostics() {
export function setDiagnosticUserScope(userId: string) {
const next = userId.trim();
if (next === scopedUserId) return;
const preserveStartupEvents = !scopedUserId && Boolean(next);
scopedUserId = next;
events.length = 0;
if (!preserveStartupEvents) events.length = 0;
activeTraceId = createDiagnosticId("trace");
}
@@ -153,6 +154,7 @@ export function getDiagnosticRuntime() {
return {
appVersion: String(import.meta.env.VITE_APP_VERSION || "dev"),
buildCommit: String(import.meta.env.VITE_BUILD_COMMIT || "unknown"),
buildTime: String(import.meta.env.VITE_BUILD_TIME || "unknown"),
browser: typeof navigator !== "undefined" ? navigator.userAgent : "",
os: typeof navigator !== "undefined" ? navigator.platform : "",
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone || "",