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

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

View File

@@ -4,7 +4,6 @@ import type { GenerationTask, TaskStatus } from "@/services/api/task-center";
import type { CanvasDrawingEngineSetting } from "@/lib/canvas/canvas-drawing-engine";
import type { FeatureAvailability } from "@/stores/use-user-store";
import { http, apiBaseURL } from "@/services/api/request";
import type { PublicLogicalModel } from "@/services/api/logical-models";
import type { OSSConnectionTestInput, OSSConnectionTestResult, OSSProvider, S3Preset } from "@/lib/oss-settings";
import type { VerificationPolicy } from "./verification";
@@ -42,7 +41,6 @@ export type AdminUser = LocalUser & {
export type AuthSessionPayload = {
user: LocalUser | null;
logicalModels?: PublicLogicalModel[];
runtimeLimits?: RuntimeLimits;
drawingEngine?: CanvasDrawingEngineSetting;
features?: FeatureAvailability;

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 || "",

View File

@@ -10,6 +10,7 @@ export type DiagnosticExportInput = {
runtime: {
appVersion?: string;
buildCommit?: string;
buildTime?: string;
browser?: string;
os?: string;
timezone?: string;