website refactor

This commit is contained in:
2026-01-12 01:01:49 +01:00
parent 5ca6023a5a
commit fefd8d1cd6
294 changed files with 4628 additions and 4991 deletions

View File

@@ -78,7 +78,7 @@ export class ErrorReplaySystem {
status: log.response?.status,
error: log.error?.message,
})),
reactErrors: (window as any).__GRIDPILOT_REACT_ERRORS__?.slice(-5).map((e: any) => ({
reactErrors: (window as { __GRIDPILOT_REACT_ERRORS__?: Array<{ error?: { message?: string }; componentStack?: string }> }).__GRIDPILOT_REACT_ERRORS__?.slice(-5).map((e) => ({
message: e.error?.message || 'Unknown React error',
componentStack: e.componentStack,
})) || [],
@@ -176,14 +176,13 @@ export class ErrorReplaySystem {
console.log('Metadata:', replay.metadata);
// Recreate the error
const error = replay.error.type === 'ApiError'
const error = replay.error.type === 'ApiError'
? new ApiError(
replay.error.message,
(replay.error.context as any)?.type || 'UNKNOWN_ERROR',
((replay.error.context as { type?: string } | undefined)?.type as import('../api/base/ApiError').ApiErrorType) || 'UNKNOWN_ERROR',
{
timestamp: replay.timestamp,
...(replay.error.context as any),
replayId: replay.metadata.replayId,
...(replay.error.context as Record<string, unknown> | undefined),
}
)
: new Error(replay.error.message);