Adds a better diff design and removes the select and copy feature

This commit is contained in:
2026-09-10 08:36:42 +02:00
parent bb012702fe
commit 008adbfdb6
19 changed files with 582 additions and 2756 deletions

View File

@@ -1,3 +1,4 @@
import { mkdirSync } from 'node:fs'
import { app, crashReporter, dialog, shell, BrowserWindow, type WebContents } from 'electron'
import { formatErr, getLogDir, getLogPath, initLogger, log, logger } from './logger'
@@ -26,10 +27,22 @@ let fatalDialogOpen = false
* native crashes, and the log file should exist before anything can fail. */
export function initDiagnostics(isDev: boolean): void {
// app.getPath('logs') is ~/Library/Logs/<name> on macOS, so the name must be
// set before we ask for the path or the folder is called "Electron".
// set first or the folder is called "Electron". The name later becomes the
// project's own, hence the paths are read here and pinned to "Helder".
app.setName('Helder')
let pinErr: unknown = null
try {
for (const name of ['userData', 'logs'] as const) {
const dir = app.getPath(name)
mkdirSync(dir, { recursive: true }) // setPath throws on a directory that does not exist yet
app.setPath(name, dir)
}
} catch (e) {
pinErr = e // startup must survive this; the logger does not exist yet
}
initLogger({ dir: app.getPath('logs'), mirror: isDev })
if (pinErr) logger.warn('session', 'could not pin the app paths — a rename may move them', { err: formatErr(pinErr) })
// Native minidumps for crashes no JS handler can see. Local only — nothing is
// uploaded anywhere (there is no server, and this is a personal tool).