feat(help): include native crash stack traces in session uploads

RY
9h ago
+1921-91

Crash telemetry carries only the faulting frame of a native crash, which on Windows is usually KERNELBASE.dll and says little about the cause. Dyad keeps the last 5 minidumps, but they hold memory, so they never leave the machine.

A chat session upload now includes a stack trace for each of the newest 5 crash dumps, including any written since startup, behind a new "Native crash stack traces" checkbox (ticked by default, and only available with the session). For each dump the parser scans the crashing thread's stack, and the main thread's when another thread crashed, keeping each value that points into a loaded module as a module-relative offset. No stack memory, absolute address, or file path is included, and annotations are limited to the keys crash telemetry already keeps. Modules are named by basename with control characters stripped and the length capped.
Nothing is added to telemetry.

A report started from the "last session ended unexpectedly" dialog also names the dump that crash left, or null when it left none. The GitHub issue lists only how many dumps went with the session; their contents and crash times stay in the private upload.

The bundle field is optional and additive, so the schema version stays put. scripts/resolve-crash-frames.mjs gains --bundle <session.json>, which resolves every dump's threads against Electron's public symbols and drops scanned candidates that are not return addresses (--all shows them).

Verified with real Windows, macOS, and Linux dumps.