claude-code-session-manager 0.17.2 → 0.17.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{TiptapBody-B16U7NOC.js → TiptapBody-8BWmdZaW.js} +1 -1
- package/dist/assets/{cssMode-BlRHn_L6.js → cssMode-BDpLlH5R.js} +1 -1
- package/dist/assets/{freemarker2-Bk2fXLx4.js → freemarker2-CkC8ydXL.js} +1 -1
- package/dist/assets/{handlebars-eLqjBxBa.js → handlebars-BDtW8qF8.js} +1 -1
- package/dist/assets/{html-BzvHaJnM.js → html-BtBFsoaA.js} +1 -1
- package/dist/assets/{htmlMode-C9rcOKw8.js → htmlMode-CIkNmEpe.js} +1 -1
- package/dist/assets/{index-DqO1hmJF.js → index-eVpHUwxK.js} +392 -391
- package/dist/assets/{javascript-BAOAmGHx.js → javascript-iwGMs0GW.js} +1 -1
- package/dist/assets/{jsonMode-CM0KALCa.js → jsonMode-C_uHUcGc.js} +1 -1
- package/dist/assets/{liquid-Bi-cszJ-.js → liquid-DcCA4gOa.js} +1 -1
- package/dist/assets/{lspLanguageFeatures-BxkipFwP.js → lspLanguageFeatures-B0pbksf_.js} +1 -1
- package/dist/assets/{mdx-DwbRtWl-.js → mdx-DNgSs4ym.js} +1 -1
- package/dist/assets/{python-D-IprHOk.js → python-U-Ln7aQn.js} +1 -1
- package/dist/assets/{razor-CC6ogdu3.js → razor-CP9dyqZw.js} +1 -1
- package/dist/assets/{tsMode-BJR_Ezbp.js → tsMode-DjCDF-t0.js} +1 -1
- package/dist/assets/{typescript-FkJpv2Nj.js → typescript-DNPiGbRp.js} +1 -1
- package/dist/assets/{xml-BVuV92it.js → xml-CQ2LZN0I.js} +1 -1
- package/dist/assets/{yaml-CKj9MriX.js → yaml-CXIPQJpq.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/src/main/crashDiagnostics.cjs +12 -1
- package/src/main/index.cjs +21 -3
package/src/main/index.cjs
CHANGED
|
@@ -276,6 +276,7 @@ async function rebootApp() {
|
|
|
276
276
|
logReboot('falling back to app.relaunch()');
|
|
277
277
|
app.relaunch();
|
|
278
278
|
}
|
|
279
|
+
runShutdownCleanup(); // app.exit bypasses will-quit
|
|
279
280
|
app.exit(0);
|
|
280
281
|
}
|
|
281
282
|
|
|
@@ -338,6 +339,7 @@ function createWindow() {
|
|
|
338
339
|
// instead of blindly trying http://localhost:5173, which would (a) load
|
|
339
340
|
// remote content and (b) almost always fail in a packaged install.
|
|
340
341
|
console.error('[main] dist/index.html missing and SM_DEV is not set — refusing to load remote content. Reinstall or set SM_DEV=1 for dev.');
|
|
342
|
+
runShutdownCleanup(); // app.exit bypasses will-quit
|
|
341
343
|
app.exit(1);
|
|
342
344
|
return;
|
|
343
345
|
}
|
|
@@ -732,7 +734,13 @@ app.whenReady().then(async () => {
|
|
|
732
734
|
// uncleanly (the silent OOM-kill we've been chasing), then starts the memory
|
|
733
735
|
// heartbeat + render/child-process-gone hooks for this run. See
|
|
734
736
|
// crashDiagnostics.cjs for the full rationale.
|
|
735
|
-
crashDiagnostics.init({
|
|
737
|
+
crashDiagnostics.init({
|
|
738
|
+
logs,
|
|
739
|
+
getPowerBlockerId: () => powerBlockerId,
|
|
740
|
+
// If a suspend ever fires while we're alive, the OS lock lapsed — re-assert
|
|
741
|
+
// our block-mode systemd-inhibit so the next idle window stays covered.
|
|
742
|
+
onSuspendWhileAlive: () => { stopSystemdInhibit(); startSystemdInhibit(); },
|
|
743
|
+
});
|
|
736
744
|
|
|
737
745
|
// Boot-time detection 1: surface `claude` binary resolution so a missing
|
|
738
746
|
// install becomes visible to the renderer instead of failing silently on
|
|
@@ -941,7 +949,15 @@ app.whenReady().then(async () => {
|
|
|
941
949
|
});
|
|
942
950
|
});
|
|
943
951
|
|
|
944
|
-
|
|
952
|
+
// Centralized teardown. `will-quit` fires on a normal quit, but `app.exit()`
|
|
953
|
+
// (in-app reboot, dist-missing abort) bypasses will-quit entirely — so those
|
|
954
|
+
// sites must call this directly, otherwise markCleanShutdown never runs and the
|
|
955
|
+
// next boot misreports a clean reboot as an UNCLEAN OOM crash, and the
|
|
956
|
+
// powerSaveBlocker/inhibitor leak until process death.
|
|
957
|
+
let teardownDone = false;
|
|
958
|
+
function runShutdownCleanup() {
|
|
959
|
+
if (teardownDone) return; // idempotent — will-quit may still fire after an app.exit path
|
|
960
|
+
teardownDone = true;
|
|
945
961
|
// Mark a clean exit so the next boot can distinguish a graceful quit from an
|
|
946
962
|
// OOM-kill / native crash (which leaves the sentinel `open`).
|
|
947
963
|
crashDiagnostics.markCleanShutdown();
|
|
@@ -953,7 +969,9 @@ app.on('will-quit', () => {
|
|
|
953
969
|
powerBlockerId = -1;
|
|
954
970
|
}
|
|
955
971
|
stopSystemdInhibit();
|
|
956
|
-
}
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
app.on('will-quit', runShutdownCleanup);
|
|
957
975
|
|
|
958
976
|
app.on('window-all-closed', () => {
|
|
959
977
|
if (rebooting) return; // new window is about to be created
|