Repository navigation
Crash reporting: a local log + Copy diagnostics (#138) - #420
Merged
Merged
Conversation
Uncaught exceptions and unhandled promise rejections, kept as a capped (20) JSON file - never sent anywhere. record() is deliberately synchronous, unlike settingsStore.js's shape: it gets called from inside an uncaughtException handler, where the process may be moments from exiting, so there's no Promise chain that might not finish. Claude-Session: https://claude.ai/code/session_0144sxo5CJiyk99vaR7sgjuj
main.js already had uncaughtException/unhandledRejection handlers from #294/#295 - deliberately not force-exiting the process (a dialog for a real error, silence during shutdown). Added crash-log recording inside those existing handlers rather than introducing new ones, so nothing about that established behaviour changes - this only adds a write to disk alongside what already happens. The store itself is lazily constructed on first crash (app.getPath() is never called at module load, only if a crash actually occurs). IPC: app:get-diagnostics (app/OS/Electron versions + the crash log, raw data - the renderer formats it), app:copy-diagnostics, app:clear-crash-log. Claude-Session: https://claude.ai/code/session_0144sxo5CJiyk99vaR7sgjuj
App/OS/Electron versions plus the crash log, formatted as plain text and copied to the clipboard on demand - ready to paste into a bug report. Passive only, per the scoping call: nothing surfaces proactively after a crash, the user has to come looking. A Clear crash log action shows once there's something to clear. Claude-Session: https://claude.ai/code/session_0144sxo5CJiyk99vaR7sgjuj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #138. A local, capped crash log and a "Copy diagnostics" action in Settings - not a telemetry service, per the issue's own preference.
Scope, decided before building
modelSupervisoralready does for the model servers (Surface model-server and transcription failures to the user #254).What's built
crashLogStore.js: a capped (20) local JSON log, same persistence shape assettingsStore.jsbut with a synchronousrecord()- it's called from inside anuncaughtExceptionhandler, where the process may be moments from exiting, so there's no Promise chain that might not finish in time.main.jsalready haduncaughtException/unhandledRejectionhandling from Crash on window close and on tray Open Window (Object has been destroyed) #294/Fix window-close crash and finish the overlay panel border #295 - deliberately not force-exiting the process (an error dialog for a real problem, silence during shutdown). This PR only adds a write to disk alongside what already happens; that established behaviour is otherwise untouched.Tests
crashLogStore.test.js(10 - defaults, capping, persistence, the synchronous contract explicitly asserted). Full suite (417) + typecheck + build green.main.js's own wiring is untested directly, consistent with this codebase's convention (it's thin glue over tested modules).🤖 Generated with Claude Code