Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.
fix(web-app): route "Quit without saving" to exit_without_saving
thinhlpg7fd44fd890a6
diff --git a/web-app/src/lib/__tests__/coworkSync.test.ts b/web-app/src/lib/__tests__/coworkSync.test.tsindex d7b20fe38..a1a48b3f7 100644--- a/web-app/src/lib/__tests__/coworkSync.test.ts+++ b/web-app/src/lib/__tests__/coworkSync.test.ts@@ -64,6 +64,7 @@ const backend = vi.hoisted(() => {return window.hidesOnClosecase 'exit_after_save':case 'cancel_exit_save':+ case 'exit_without_saving':returndefault:throw new Error(`unexpected ${cmd}`)@@ -762,7 +763,7 @@ describe('coworkSync', () => {const action = errorOptions().at(-1).actionexpect(action.label).toBe('common:coworkSync.quitAnyway')action.onClick()- await vi.waitFor(() => expect(backend.log).toContain('exit_after_save'))+ await vi.waitFor(() => expect(backend.log).toContain('exit_without_saving'))})})})diff --git a/web-app/src/lib/coworkSync.ts b/web-app/src/lib/coworkSync.tsindex b714e38d3..a34a241e8 100644--- a/web-app/src/lib/coworkSync.ts+++ b/web-app/src/lib/coworkSync.ts@@ -606,7 +606,7 @@ async function installCloseHandlers() {}await invoke('cancel_exit_save')reportExitSaveFailure('quit', () => {- void invoke('exit_after_save').catch((error) => {+ void invoke('exit_without_saving').catch((error) => {console.warn('[cowork] could not quit:', error)})})