feat: write crash reports with stack traces to the logs folder

This commit is contained in:
Alvin-Zilverstand committed 2026-09-14 11:20:45 +02:00
1 parent 9c221cb101
commit 7be5517d18
5 files changed
+188 -1

No files matched your search

+19
View File
@@ -640,6 +640,12 @@ function renderSettingsView() {
<h2>50 GB cap</h2>
<p class="muted">Old temporary buffer segments are removed automatically; saved clips are kept.</p>
</article>
<article class="settings-panel">
<p class="eyebrow">Support</p>
<h2>Crash logs</h2>
<p class="muted">Panic details are written to the logs folder so issues can be investigated.</p>
<button data-action="reveal-crash-logs">Reveal Crash Logs</button>
</article>
<article class="settings-panel">
<p class="eyebrow">Hotkeys</p>
<h2>Customizable</h2>
@@ -830,6 +836,10 @@ function bindEvents() {
void saveHotkeys();
});
appRoot.querySelector<HTMLButtonElement>("[data-action='reveal-crash-logs']")?.addEventListener("click", () => {
void revealCrashLogs();
});
appRoot.querySelectorAll<HTMLButtonElement>("[data-action='reveal-screenshot']").forEach((button) => {
button.addEventListener("click", () => {
const path = button.dataset.screenshotPath;
@@ -1192,6 +1202,15 @@ async function revealScreenshot(path: string) {
}
}
async function revealCrashLogs() {
try {
await window.__TAURI__?.core?.invoke?.("reveal_crash_logs");
} catch (error) {
console.error("Could not reveal crash logs", error);
showNotice(`Could not reveal crash logs: ${String(error)}`);
}
}
async function uploadSelectedClip() {
if (!tauriInvoke || !state.selectedClipId) {
return;