MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / announceBackup

Function announceBackup

apps/desktop/src/main/reset-state.ts:85–104  ·  view source on GitHub ↗
(backupDir: string)

Source from the content-addressed store, hash-verified

83 * is safe somewhere but has no way to act on it.
84 */
85export const announceBackup = async (backupDir: string): Promise<void> => {
86 // Same test seam as confirmResetState: a modal with no one to dismiss it
87 // would hang the e2e reset path.
88 if (process.env.EXECUTOR_TEST_AUTO_CONFIRM_RESET === "1") {
89 log.info("[reset-state] backup announced (test mode, dialog skipped)", { backupDir });
90 return;
91 }
92 const { response } = await dialog.showMessageBox({
93 type: "info",
94 title: "Executor data reset",
95 message: "Your previous data has been backed up.",
96 detail:
97 `If you need anything from before the reset, it's all here:\n\n${backupDir}\n\n` +
98 "You can ignore this folder otherwise — Executor is now running on a fresh data directory.",
99 buttons: ["Show in folder", "OK"],
100 defaultId: 1,
101 cancelId: 1,
102 });
103 if (response === 0) shell.showItemInFolder(backupDir);
104};

Callers 2

registerIpcHandlersFunction · 0.90

Calls 1

infoMethod · 0.65

Tested by

no test coverage detected