feat: add desktop bug report collection

This commit is contained in:
2026-05-31 21:55:29 +08:00
parent 0a9dcec70f
commit e490a267ff
27 changed files with 2938 additions and 3 deletions
+18
View File
@@ -33,6 +33,11 @@ import {
type DesktopAppSettingKey,
} from './app-settings'
import { getDesktopAppVersion, getDesktopReleaseChannel } from './app-version'
import {
initDesktopBugReporter,
submitManualDesktopBugReport,
syncDesktopBugReporterSession,
} from './bug-reporter'
import {
defaultDesktopUpdateChannel,
startDesktopClientUpdate,
@@ -131,6 +136,7 @@ function silencePackagedConsole(): void {
}
silencePackagedConsole()
initDesktopBugReporter()
if (isDevelopmentRuntime) {
installObservedGlobalFetch()
}
@@ -957,6 +963,17 @@ function registerBridgeHandlers(): void {
ipcMain.handle('desktop:runtime-account-snapshot', (_event, accountId: string) =>
captureRuntimeAccountSnapshot(accountId),
)
safeHandle(
'desktop:submit-bug-report',
async (
_event,
input: {
title?: string
description?: string
severity?: string
},
) => submitManualDesktopBugReport(input ?? {}),
)
safeHandle('desktop:bind-publish-account', async (_event, platformId: string) => {
const account = (await bindPublishAccount(platformId)) as DesktopAccountInfo
noteRuntimeAccountBound(account)
@@ -1052,6 +1069,7 @@ function registerBridgeHandlers(): void {
'desktop:runtime-session-sync',
(_event, session: DesktopRuntimeSessionSyncRequest | null) => {
syncRuntimeSession(session)
syncDesktopBugReporterSession(session)
return null
},
)