feat: 升级至 v0.3.16 — 工单修复 51 项 + 审查修复 30 项(安全加固/适配器/工具系统/数据层/前端)

This commit is contained in:
2026-07-22 10:31:13 +08:00
parent 516d8a728f
commit 2c2ca4a692
43 changed files with 1454 additions and 301 deletions
+13
View File
@@ -26,6 +26,19 @@ export class ErrorBoundary extends Component<Props, State> {
}
componentDidCatch(error: Error, info: { componentStack: string }): void {
// #49 修复: 上报错误到主进程,便于记录到 electron-log 与审计日志,集中排查
// 主进程可注册 ipcMain.on('error:report', ...) 接收;未注册时 send 为静默失败,不影响兜底
try {
window.metona?.app?.reportError({
type: 'react_error_boundary',
error: error.message,
stack: error.stack,
componentStack: info.componentStack,
timestamp: Date.now(),
});
} catch {
// 上报失败不影响兜底逻辑
}
console.error('[ErrorBoundary]', error, info.componentStack);
}