Beautiful, AI-native markdown IDE and LLM wiki
TypeScript 2nd-brainagent-skillsclaudecodexcompany-braindocsknowledge-knowledge-baseknowledge-managementllmllm-wikillm-wiki-karpathymarkdownmarkdown-editormdmdxnotespkmsecond-brainskills
fix(ok): an app-shell crash no longer deletes the file you are creating, and Try again can recover (#3532)
serafin-garcia713eb723d862
diff --git a/.changeset/crash-create-no-hard-delete.md b/.changeset/crash-create-no-hard-delete.mdnew file mode 100644index 000000000..df4ce7a11--- /dev/null+++ b/.changeset/crash-create-no-hard-delete.md@@ -0,0 +1,17 @@+---+"@inkeep/open-knowledge": patch+---++Stop an app-shell crash from deleting a file you are in the middle of creating, and stop the crash-recovery button from walking you back into the same crash.++If the app shell crashed while an inline file or folder create was still open, the crash unmounted the file tree and its cleanup hard-deleted the file you had just made. The cleanup could not tell an error-boundary unmount apart from you cancelling the rename, so it deleted in both cases. The two are now distinct intents. Cancelling a rename still removes the placeholder exactly as before, including the delete and the return to your previous location. A crash or an ordinary unmount now leaves the created file exactly where it was created. It is not deleted and it is not moved to Trash, because a crash is not a retraction of your request to create the file.++A cleanup failure is now reported to a log channel that lands in the diagnostics bundle, carrying the file kind and path, so a cleanup with no surviving UI to show a toast no longer fails silently. Reporting a failure is no longer tied to whether the cleanup can update the UI.++On the recovery side, the app-shell error screen's Try again no longer replays the document that caused the crash. Previously it remounted the app, which re-read your saved tab session and reopened the very document that had just crashed, so Try again deterministically re-crashed. A repeat crash on the same error now skips the saved tab session restore, and the app comes back without the crashing document. This covers both ways a session is restored, the synchronous web path and the desktop session state, so it holds in the packaged desktop app and not only in the browser. When a restore is skipped, a notice tells you that your last open document could not be restored, so the empty workspace reads as a deliberate recovery rather than a forgotten tab. The notice is translated in every supported locale.++A recovery that skips the restore also stops saving your tab session for the rest of that recovery, so the tabs you had before the crash are still waiting for you the next time you launch. Without that, the first document you opened after the recovery would be written over the whole stored session and every other tab, pin and split would be gone.++Known limitation: the skip lasts for the current session only, so it never becomes permanent and a later reload restores your tabs normally. The trade-off is that if the crashing document is still the one saved in your tab session, relaunching the app can reopen it and reproduce the crash. Durable recovery needs to identify the offending document reliably, which the app-shell error boundary cannot do today because it also catches crashes that originate outside the document view.++The delete endpoint itself and the underlying render loop that triggered these crash reports are unchanged.diff --git a/packages/app/src/App.dom.test.tsx b/packages/app/src/App.dom.test.tsxindex ce9120e56..686978f7a 100644--- a/packages/app/src/App.dom.test.tsx+++ b/packages/app/src/App.dom.test.tsx@@ -7,6 +7,11 @@ import {__resetLocalMenuActionBusForTests,emitLocalMenuAction,} from '@/lib/local-menu-action-bus';+import {+ consumeHashNavigationSuppression,+ recordAppShellCrashTrip,+ resetTabSessionRestoreSuppression,+} from '@/lib/tab-session-restore-suppression';import { expectVisualClassTokens } from '@/test-utils/visual-contract';type NavigationTarget =@@ -816,4 +821,131 @@ describe('App runtime wiring', () => {expect(screen.queryByTestId('editor-window-chrome-drag-strip')).toBeNull();expect(screen.queryByTestId('share-receive-dialog')).toBeNull();});++ // A repeat app-shell crash arms the tab-session restore suppression latch.+ // The suppressed recovery mount must not renavigate into the crashing+ // document through the URL hash either: the active tab is mirrored into the+ // hash, so an unguarded mount-time hash resolution reopens the very document+ // the recovery just dropped and re-enters the crash loop. Ordinary hash+ // navigation must resume immediately after that one mount.+ describe('repeat-crash recovery hash suppression', () => {+ afterEach(() => {+ resetTabSessionRestoreSuppression();+ // A failed assertion can leave the navigation latch armed (a mounted App+ // normally consumes it); drain it so a failure doesn't cascade.+ consumeHashNavigationSuppression();+ });++ test('a mount after a repeat app-shell crash does not reopen the document named in the hash', async () => {+ recordAppShellCrashTrip(new Error('same shell crash'));+ recordAppShellCrashTrip(new Error('same shell crash'));+ setHash('#/poison-doc');++ renderApp();++ await Promise.resolve();+ expect(openTargetTransitionMock).not.toHaveBeenCalled();+ expect(window.location.hash).toBe('');+ });++ test('desktop mode: the suppressed mount drops the hash before the session gate lifts', async () => {+ recordAppShellCrashTrip(new Error('same shell crash'));+ recordAppShellCrashTrip(new Error('same shell crash'));+ tabSessionLoaded = false;+ setHash('#/poison-doc');++ const view = renderApp({ bridge: createBridge() });++ await Promise.resolve();+ expect(window.location.hash).toBe('');++ tabSessionLoaded = true;+ view.rerender(<App />);++ await Promise.resolve();+ expect(openTargetTransitionMock).not.toHaveBeenCalled();+ });++ test('hash navigation resumes immediately after the suppressed mount', async () => {+ recordAppShellCrashTrip(new Error('same shell crash'));+ recordAppShellCrashTrip(new Error('same shell crash'));+ setHash('#/poison-doc');+ renderApp();+ await Promise.resolve();+ openTargetTransitionMock.mockClear();++ window.history.pushState(null, '', `${window.location.pathname}#/other-doc`);+ window.dispatchEvent(new HashChangeEvent('hashchange'));++ await waitFor(() => {+ expect(openTargetTransitionMock).toHaveBeenCalledWith(+ { kind: 'doc', target: 'other-doc', docName: 'other-doc' },+ { disposition: 'permanent', consumeActiveNewTab: true },+ );+ });+ });++ test('a single crash trip leaves mount-time hash navigation intact', async () => {+ recordAppShellCrashTrip(new Error('one-off crash'));+ setHash('#/kept-doc');++ renderApp();++ await waitFor(() => {+ expect(openTargetTransitionMock).toHaveBeenCalledWith(+ { kind: 'doc', target: 'kept-doc', docName: 'kept-doc' },+ { disposition: 'permanent', consumeActiveNewTab: true },+ );+ });+ expect(window.location.hash).toBe('#/kept-doc');+ });++ test('an overlay-dialog hash survives the suppressed mount and still consumes the latch', async () => {+ // The suppression deliberately exempts overlay-dialog hashes: they portal+ // over the editor and cannot reopen a document, so clearing one would+ // dismiss a dialog the user has open. Every other test here uses a+ // document hash, which leaves that exemption asserted only in prose.+ recordAppShellCrashTrip(new Error('same shell crash'));+ recordAppShellCrashTrip(new Error('same shell crash'));+ setHash('#settings');++ renderApp();++ await Promise.resolve();+ expect(window.location.hash).toBe('#settings');++ // The latch is one-shot regardless of which branch ran, so the next mount+ // must navigate normally rather than inheriting an unconsumed suppression.+ cleanup();+ setHash('#/kept-doc');+ renderApp();++ await waitFor(() => {+ expect(openTargetTransitionMock).toHaveBeenCalledWith(+ { kind: 'doc', target: 'kept-doc', docName: 'kept-doc' },+ { disposition: 'permanent', consumeActiveNewTab: true },+ );+ });+ expect(window.location.hash).toBe('#/kept-doc');+ });++ test('suppression is one-mount-scoped: a fresh mount navigates the hash normally', async () => {+ recordAppShellCrashTrip(new Error('same shell crash'));+ recordAppShellCrashTrip(new Error('same shell crash'));+ setHash('#/poison-doc');+ renderApp();+ await Promise.resolve();+ cleanup();++ setHash('#/poison-doc');+ renderApp();++ await waitFor(() => {+ expect(openTargetTransitionMock).toHaveBeenCalledWith(+ { kind: 'doc', target: 'poison-doc', docName: 'poison-doc' },+ { disposition: 'permanent', consumeActiveNewTab: true },+ );+ });+ });+ });});diff --git a/packages/app/src/App.tsx b/packages/app/src/App.tsxindex f141dfef8..88aa6e377 100644--- a/packages/app/src/App.tsx+++ b/packages/app/src/App.tsx@@ -61,6 +61,7 @@ import { isNoteWindow } from '@/lib/note-window-mode';import { isOverlayLayerOpen } from '@/lib/overlay-layers';import { mark, ProfilerBoundary } from '@/lib/perf';import { SingleFileModeProvider, useSingleFileMode } from '@/lib/single-file-mode';+import { consumeHashNavigationSuppression } from '@/lib/tab-session-restore-suppression';import { useServerKeepalive } from '@/lib/use-server-keepalive';import {isSettingsHashOpen,@@ -228,6 +229,25 @@ function NavigationHandler() {targetsSignature,]);+ // A repeat app-shell crash armed recovery suppression. The session-restore+ // paths skip their reads, but the crashed tab is also mirrored into the URL+ // hash, and the hash effect below re-resolves it on mount and on every dep+ // change — reopening the very document the recovery just dropped. Drop the+ // stale hash once instead (no history entry, no hashchange event, storage+ // untouched); the user's next navigation writes a fresh hash and proceeds+ // normally. Declared before the hash effect so it runs first at mount.+ // Overlay-dialog hashes stay: they portal over the editor and cannot reopen+ // a document.+ useEffect(() => {+ if (+ consumeHashNavigationSuppression() &&+ window.location.hash !== '' &&+ !isAuxiliaryDialogHash(window.location.hash)+ ) {+ replaceHashWithoutNavigation('');+ }+ }, []);+useEffect(() => {if (!tabSessionLoaded && window.okDesktop?.config.mode === 'editor') return;// Re-entry from a re-subscribe re-syncs the current URL rather thandiff --git a/packages/app/src/components/AppErrorBoundary.dom.test.tsx b/packages/app/src/components/AppErrorBoundary.dom.test.tsxindex ac2f0ef19..62d708927 100644--- a/packages/app/src/components/AppErrorBoundary.dom.test.tsx+++ b/packages/app/src/components/AppErrorBoundary.dom.test.tsx@@ -9,6 +9,11 @@ import type { OkBugReportCreateResult } from '@inkeep/open-knowledge-core';import { cleanup, render, screen } from '@testing-library/react';import userEvent from '@testing-library/user-event';import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';+import {+ consumeHashNavigationSuppression,+ resetTabSessionRestoreSuppression,+ shouldSuppressTabSessionRestore,+} from '@/lib/tab-session-restore-suppression';import { AppErrorBoundary, CrashReportingBoundary } from './AppErrorBoundary';import { DocumentErrorBoundary } from './DocumentErrorBoundary';@@ -96,6 +101,7 @@ describe('AppErrorBoundary', () => {beforeEach(() => {shouldThrow = false;+ resetTabSessionRestoreSuppression();consoleErrorSpy = vi.spyOn(console, 'error').mockImplementation(() => {});consoleWarnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {});});@@ -103,6 +109,11 @@ describe('AppErrorBoundary', () => {afterEach(() => {cleanup();clearBugReportBridge();+ resetTabSessionRestoreSuppression();+ // The restore reset deliberately leaves the hash-navigation latch armed, so+ // a repeat-crash test would otherwise leak it into the next test in this+ // file (module scope is shared; isolate is per-file).+ consumeHashNavigationSuppression();consoleErrorSpy.mockRestore();consoleWarnSpy.mockRestore();});@@ -160,6 +171,44 @@ describe('AppErrorBoundary', () => {expect(screen.queryByRole('alert')).toBeNull();});+ test('a repeat crash on the same error stops Try again from replaying the persisted tab session', async () => {+ // Stands in for the document workspace: on each mount it consults the real+ // restore-suppression signal and, unless suppressed, "restores" the persisted+ // tab — which reopens the crashing document and re-throws, creating the crash+ // loop that makes Try again non-functional. Rendered state (alert vs recovered) is+ // the signal, not render count: React re-renders a throwing child several+ // times per trip, but onError (which records the trip) fires once.+ function RestoringWorkspace() {+ if (shouldSuppressTabSessionRestore()) {+ return <span data-testid="recovered-empty">recovered without the last document</span>;+ }+ throw new Error('restored-document boom');+ }++ render(+ <AppErrorBoundary>+ <RestoringWorkspace />+ </AppErrorBoundary>,+ );+ const user = userEvent.setup();++ // First trip: restoring the persisted tab crashed the shell.+ expect(screen.getByRole('alert')).not.toBeNull();+ expect(screen.queryByTestId('recovered-empty')).toBeNull();++ // Second trip: the first Try again restored again and the same crash fired+ // again — proof the first trip did NOT suppress (a single crash still restores).+ await user.click(screen.getByRole('button', { name: 'Try again' }));+ expect(screen.getByRole('alert')).not.toBeNull();+ expect(screen.queryByTestId('recovered-empty')).toBeNull();++ // The repeat has now armed suppression, so the next Try again recovers WITHOUT+ // replaying the persisted tab: the crashing document is not reopened.+ await user.click(screen.getByRole('button', { name: 'Try again' }));+ expect(screen.getByTestId('recovered-empty')).not.toBeNull();+ expect(screen.queryByRole('alert')).toBeNull();+ });+test('Report this error opens the report dialog with full detail and the shell crash in the note', async () => {shouldThrow = true;const createCalls = installBugReportBridge('navigator');diff --git a/packages/app/src/components/AppErrorBoundary.tsx b/packages/app/src/components/AppErrorBoundary.tsxindex 19eab40f5..95296b66c 100644--- a/packages/app/src/components/AppErrorBoundary.tsx+++ b/packages/app/src/components/AppErrorBoundary.tsx@@ -20,6 +20,7 @@ import { OkBlobRunnerEasterEgg } from '@/components/OkBlobRunnerEasterEgg';import { ReportBugDialog } from '@/components/ReportBugDialog';import { Button } from '@/components/ui/button';import { recallComponentStack, rememberComponentStack } from '@/lib/component-stack-registry';+import { recordAppShellCrashTrip } from '@/lib/tab-session-restore-suppression';function AppErrorFallback({ error, resetErrorBoundary }: FallbackProps) {const { t } = useLingui();@@ -92,6 +93,10 @@ export function AppErrorBoundary({ children }: { children: React.ReactNode }) {FallbackComponent={AppErrorFallback}onError={(error, info) => {rememberComponentStack(error, info.componentStack);+ // A second trip on the same error is the crash loop "Try again" cannot+ // escape on its own: the remount re-restores the crashing tab. Recording+ // the trip lets the next reset skip that restore.+ recordAppShellCrashTrip(error);// The component stack is logged alongside the error because a packaged// build's minified message + mangled JS stack name nothing on their own.console.error(diff --git a/packages/app/src/components/FileTree.create.dom.test.tsx b/packages/app/src/components/FileTree.create.dom.test.tsxindex 1e32f4565..3ce6b6bbb 100644--- a/packages/app/src/components/FileTree.create.dom.test.tsx+++ b/packages/app/src/components/FileTree.create.dom.test.tsx@@ -9,10 +9,11 @@* Mocks `PageListContext.usePageList` to intercept `addPage`.*/-import { cleanup, render, screen, waitFor } from '@testing-library/react';+import { act, cleanup, render, screen, waitFor } from '@testing-library/react';import userEvent from '@testing-library/user-event';import type { MouseEventHandler, ReactNode } from 'react';import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';+import { folderTabId } from '@/editor/editor-tabs';import type { FileEntry } from './file-tree-utils';type MenuItemProps = {@@ -51,6 +52,10 @@ function MenuSeparator() {const toastSuccessMock = vi.fn(() => {});const toastErrorMock = vi.fn(() => {});const addPageMock = vi.fn(() => {});+// usePageList always returns these alongside addPage; the create flow reads+// pageMeta.get / pages.has while opening the new doc, so stub both.+const pageMetaMock = new Map<string, { size: number }>();+const pagesMock = new Set<string>();const openTargetMock = vi.fn(() => {});const notifySidebarFileSelectedMock = vi.fn(() => {});const closeTabsMock = vi.fn(() => {});@@ -157,14 +162,23 @@ class StubModel {}}+ removeListeners: Array<(event: { path: string }) => void> = [];+subscribe() {return () => {};}- onMutation() {+ onMutation(type: string, listener: (event: { path: string }) => void) {+ if (type === 'remove') this.removeListeners.push(listener);return () => {};}+ // Pierre fires a 'remove' mutation when a user cancels a removeIfCanceled+ // inline rename; the component treats that as the user-cancel signal.+ emitRemove(path: string) {+ for (const listener of this.removeListeners) listener({ path });+ }+isSearchOpen() {return false;}@@ -184,6 +198,12 @@ let createResponse: unknown;let createStatus = 200;let createGate: Promise<void> | null = null;let createFetchError: Error | null = null;+let deletePathStatus = 200;+let deletePathResponse: unknown = { ok: true };+// When set, the delete-path fetch rejects instead of resolving, driving the+// discard cleanup's catch (network-failure) branch — distinct from a non-2xx+// HTTP response, which the deletePathStatus toggle covers.+let deletePathFetchError: Error | null = null;let fetchCalls: FetchCall[] = [];// Drives the folder context-menu's "New from template" smart-hide. The menu// gates the submenu on the resolved cascade being non-empty, so a folder with@@ -214,6 +234,10 @@ function createPageCalls() {return fetchCalls.filter((call) => call.url === '/api/create-page');}+function deletePathCalls() {+ return fetchCalls.filter((call) => call.url === '/api/delete-path');+}+function makeFetchMock() {return vi.fn(async (input: RequestInfo | URL, init?: RequestInit) => {const url = typeof input === 'string' ? input : input instanceof URL ? input.href : input.url;@@ -234,11 +258,15 @@ function makeFetchMock() {if (url === '/api/create-folder') {return jsonResponse(createResponse, createStatus);}- // Test teardown unmounts the FileTree mid-pending-create. The placeholder- // cleanup posts /api/delete-path; resolve as 200 so the cleanup logs no- // unexpected-fetch warning. We don't assert on the call here — the unit- // test exercises the addPage symmetry, not the placeholder rollback path.- if (url === '/api/delete-path') return jsonResponse({ ok: true }, 200);+ // A placeholder discard (user cancel or create failure) posts+ // /api/delete-path. Default 200 completes the discard; a test can force a+ // server error (deletePathStatus) or a rejected fetch (deletePathFetchError)+ // to exercise the two distinct cleanup-failure branches. An unmount teardown+ // detaches without deleting, so it never reaches this branch.+ if (url === '/api/delete-path') {+ if (deletePathFetchError) throw deletePathFetchError;+ return jsonResponse(deletePathResponse, deletePathStatus);+ }if (url === '/api/rename-path') return jsonResponse({ renamed: [] }, 200);throw new Error(`unexpected fetch: ${url}`);});@@ -266,11 +294,12 @@ vi.doMock('@/editor/DocumentContext', () => ({prewarm: () => {},reconcileLocalRemoval: reconcileLocalRemovalMock,reconcileLocalRename: reconcileLocalRenameMock,+ setSkillsSidebar: () => {},}),}));vi.doMock('@/components/PageListContext', () => ({- usePageList: () => ({ addPage: addPageMock }),+ usePageList: () => ({ addPage: addPageMock, pageMeta: pageMetaMock, pages: pagesMock }),}));vi.doMock('./ui/sidebar', () => ({@@ -410,6 +439,7 @@ function renderFileTree() {describe('FileTree startCreating addPage symmetry', () => {let consoleWarnSpy: ReturnType<typeof vi.spyOn>;+ let consoleErrorSpy: ReturnType<typeof vi.spyOn>;beforeEach(() => {model = new StubModel();@@ -422,6 +452,9 @@ describe('FileTree startCreating addPage symmetry', () => {createStatus = 200;createGate = null;createFetchError = null;+ deletePathStatus = 200;+ deletePathResponse = { ok: true };+ deletePathFetchError = null;folderTemplates = [];folderConfigStatus = 'ready';lastFolderConfigPath = null;@@ -433,11 +466,13 @@ describe('FileTree startCreating addPage symmetry', () => {openTargetMock.mockClear();notifySidebarFileSelectedMock.mockClear();consoleWarnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {});+ consoleErrorSpy = vi.spyOn(console, 'error').mockImplementation(() => {});});afterEach(() => {cleanup();consoleWarnSpy.mockRestore();+ consoleErrorSpy.mockRestore();});test('folder context-menu New File registers the created docName via addPage exactly once', async () => {@@ -517,4 +552,167 @@ describe('FileTree startCreating addPage symmetry', () => {expect(await screen.findByRole('menuitem', { name: /new from template/i })).toBeTruthy();});++ describe('pending-create cleanup intent', () => {+ async function startPendingFileCreate(user: ReturnType<typeof userEvent.setup>) {+ const newFile = await screen.findByRole('menuitem', { name: /new file/i });+ fetchCalls = [];+ await user.click(newFile);+ await waitFor(() => expect(createPageCalls()).toHaveLength(1));+ await waitFor(() => expect(model.startRenaming).toHaveBeenCalled());+ return model.startRenaming.mock.calls.at(-1)?.[0] as string;+ }++ async function startPendingFolderCreate(user: ReturnType<typeof userEvent.setup>) {+ const newFolder = await screen.findByRole('menuitem', { name: /new folder/i });+ fetchCalls = [];+ await user.click(newFolder);+ await waitFor(() =>+ expect(fetchCalls.some((call) => call.url === '/api/create-folder')).toBe(true),+ );+ await waitFor(() => expect(model.startRenaming).toHaveBeenCalled());+ return model.startRenaming.mock.calls.at(-1)?.[0] as string;+ }++ test('an unmount with a pending create does not hard-delete the created file', async () => {+ const user = userEvent.setup();+ const view = renderFileTree();+ await startPendingFileCreate(user);++ view.unmount();++ // The crash/unmount path detaches its bookkeeping and leaves the file on+ // disk: no /api/delete-path request is issued.+ expect(deletePathCalls()).toHaveLength(0);+ });++ test('cancelling the inline rename still hard-deletes the placeholder', async () => {+ const user = userEvent.setup();+ renderFileTree();+ const renamePath = await startPendingFileCreate(user);++ act(() => model.emitRemove(renamePath));++ await waitFor(() => expect(deletePathCalls()).toHaveLength(1));+ const [call] = deletePathCalls();+ expect(call?.init?.method).toBe('POST');+ expect(JSON.parse(String(call?.init?.body))).toEqual({+ kind: 'file',+ path: 'notes/Untitled',+ });+ });++ test('cancelling the inline rename closes the placeholder tab and returns to the previous location', async () => {+ // The delete is only part of what a cancel owes the user. Splitting the+ // cleanup into two intents left these two behaviors reachable only on the+ // discard branch, so they are pinned separately from the delete call.+ const user = userEvent.setup();+ window.location.hash = '#/notes/somewhere-else';+ renderFileTree();+ const renamePath = await startPendingFileCreate(user);+ closeDocumentMock.mockClear();++ act(() => model.emitRemove(renamePath));++ await waitFor(() => expect(closeDocumentMock).toHaveBeenCalledWith('notes/Untitled'));+ await waitFor(() => expect(window.location.hash).toBe('#/notes/somewhere-else'));+ });++ test('a failed discard cleanup reports through console.error and still toasts', async () => {+ // A cleanup failure surfaces two decoupled signals: the toast a mounted+ // user sees, and a structured console.error carried in the crash bundle+ // with the kind and path of the file left on disk. Reporting is+ // independent of the UI-update posture. The detach path shares this+ // reporter but has no surviving UI, and its only throw source is a+ // removeEventListener disposer that cannot fail, so it is not separately+ // drivable here without mocking internals.+ const user = userEvent.setup();+ renderFileTree();+ const renamePath = await startPendingFileCreate(user);++ deletePathStatus = 500;+ deletePathResponse = { title: 'disk is full' };++ act(() => model.emitRemove(renamePath));++ await waitFor(() => expect(deletePathCalls()).toHaveLength(1));+ await waitFor(() =>+ expect(consoleErrorSpy).toHaveBeenCalledWith(+ expect.anything(),+ expect.objectContaining({ kind: 'file', path: 'notes/Untitled' }),+ ),+ );+ expect(toastErrorMock).toHaveBeenCalled();+ });++ test('cancelling a folder create closes the folder tab, not a document tab', async () => {+ // The discard cleanup forks on kind: a folder releases its tab through+ // closeTabs([folderTabId(...)]), never closeDocument (which addresses a+ // doc by name). Pinned so an "always closeDocument" simplification cannot+ // silently break folder-cancel tab cleanup.+ createResponse = { kind: 'folder', path: 'notes/SubDir' };+ const user = userEvent.setup();+ renderFileTree();+ const renamePath = await startPendingFolderCreate(user);+ closeTabsMock.mockClear();+ closeDocumentMock.mockClear();++ act(() => model.emitRemove(renamePath));++ await waitFor(() => expect(deletePathCalls()).toHaveLength(1));+ expect(JSON.parse(String(deletePathCalls()[0]?.init?.body))).toEqual({+ kind: 'folder',+ path: 'notes/SubDir',+ });+ expect(closeTabsMock).toHaveBeenCalledWith([folderTabId('notes/SubDir')], { force: true });+ expect(closeDocumentMock).not.toHaveBeenCalled();+ });++ test('a discard whose delete request throws reports the network error and still toasts', async () => {+ // The catch (network-failure) branch: the delete fetch rejects rather+ // than returning a non-2xx. It reports the same structured console.error+ // as the HTTP-error branch — carrying the file left on disk, with the raw+ // error as `cause` rather than a {status, detail} shape — and surfaces a+ // toast. Pinned so dropping either the reporter or the toast turns a+ // network failure into a silent orphaned file.+ const user = userEvent.setup();+ renderFileTree();+ const renamePath = await startPendingFileCreate(user);++ deletePathFetchError = new Error('network down');++ act(() => model.emitRemove(renamePath));++ await waitFor(() => expect(deletePathCalls()).toHaveLength(1));+ await waitFor(() =>+ expect(consoleErrorSpy).toHaveBeenCalledWith(+ expect.anything(),+ expect.objectContaining({+ kind: 'file',+ path: 'notes/Untitled',+ cause: expect.objectContaining({ message: 'network down' }),+ }),+ ),+ );+ expect(toastErrorMock).toHaveBeenCalled();+ });++ test('remounting after a crash-path unmount keeps the file and starts no new rename', async () => {+ const user = userEvent.setup();+ const view = renderFileTree();+ await startPendingFileCreate(user);+ const renameCallsAfterCreate = model.startRenaming.mock.calls.length;++ view.unmount();+ const remounted = renderFileTree();++ // The surviving file loads as an ordinary entry, so the fresh tree mounts+ // without resurrecting the placeholder's inline rename or re-issuing the+ // delete.+ expect(await remounted.findByTestId('fake-pierre-tree')).toBeTruthy();+ expect(model.startRenaming.mock.calls.length).toBe(renameCallsAfterCreate);+ expect(deletePathCalls()).toHaveLength(0);+ expect(toastErrorMock).not.toHaveBeenCalled();+ });+ });});diff --git a/packages/app/src/components/FileTree.tsx b/packages/app/src/components/FileTree.tsxindex 32bf820ae..834b73eee 100644--- a/packages/app/src/components/FileTree.tsx+++ b/packages/app/src/components/FileTree.tsx@@ -444,9 +444,35 @@ interface PendingCreate {disposeCommitListener: () => void;}+// How a pending create is torn down. 'discard' deletes the just-created path+// from disk — the user cancelled the inline rename, or the create failed.+// 'detach' only releases the in-memory bookkeeping and leaves the file on+// disk: a FileTree unmount, including the error-boundary teardown that fires+// after an app-shell crash, is not a retraction of the create, so it must+// never delete.+type PendingCreateCleanupIntent = 'discard' | 'detach';+interface PendingCreateCleanupOptions {- updateUi?: boolean;- restoreLocation?: boolean;+ intent: PendingCreateCleanupIntent;+}++function assertNeverCleanupIntent(intent: never): never {+ throw new Error(`Unhandled pending-create cleanup intent: ${String(intent)}`);+}++// Observable, non-UI failure channel for a pending-create cleanup. A detach+// (FileTree unmount / error-boundary teardown) has no surviving UI to show a+// failed cleanup, and a discard's toast can die with a crashing tree, so every+// cleanup failure also reports here at console.error — captured in the crash+// bundle, distinct from ordinary console.warn — with the kind and path needed+// to find a file that may still be on disk. Reporting is never gated on+// caller intent, so suppressing UI can never again suppress failure reporting.+function reportPendingCreateCleanupFailure(+ kind: PendingCreate['kind'],+ path: string,+ cause: unknown,+): void {+ console.error('[FileTree] pending-create cleanup failed', { kind, path, cause });}interface FileTreeDeleteRequest {@@ -1057,7 +1083,7 @@ export function FileTree({ ref }: { ref?: Ref<FileTreeHandle | null> }) {const activeAncestorTreePathsRef = useRef<string[]>([]);const pendingCreateRef = useRef<PendingCreate | null>(null);const cleanupPendingCreateRef = useRef<- (pending: PendingCreate, options?: PendingCreateCleanupOptions) => Promise<void>+ (pending: PendingCreate, options: PendingCreateCleanupOptions) => Promise<void>>(async () => {});const skipNextResetSignatureRef = useRef<string | null>(null);const hoveredPrewarmDocRef = useRef<string | null>(null);@@ -1529,13 +1555,26 @@ export function FileTree({ ref }: { ref?: Ref<FileTreeHandle | null> }) {async function cleanupPendingCreate(pending: PendingCreate,- options: PendingCreateCleanupOptions = {},+ { intent }: PendingCreateCleanupOptions,) {- const updateUi = options.updateUi ?? true;- const restoreLocation = options.restoreLocation ?? updateUi;-clearPendingCreate(pending);- if (updateUi) setBusyPath(pending.renamePath);++ // A 'detach' releases the pending-create bookkeeping and leaves the file on+ // disk. It is what a FileTree unmount wants — including the error-boundary+ // teardown after an app-shell crash — where deleting the file the user just+ // asked for would be data loss. Only an explicit 'discard' deletes. A new+ // intent must choose its disk behavior here rather than defaulting into the+ // delete path below.+ switch (intent) {+ case 'detach':+ return;+ case 'discard':+ break;+ default:+ return assertNeverCleanupIntent(intent);+ }++ setBusyPath(pending.renamePath);try {const res = await fetch('/api/delete-path', {@@ -1555,67 +1594,48 @@ export function FileTree({ ref }: { ref?: Ref<FileTreeHandle | null> }) {// and short-circuit the unreachable arm without ceremony.if (parsed.ok) return;const detail = parsed.title;- const message = t`${detail} - ${kind} "${createdPath}" still exists on disk`;- if (updateUi) {- toast.error(message);- } else {- console.warn(`[FileTree] cleanup pending create failed: ${message}`);- }- if (updateUi) {- setBusyPath(null);- resetModelToDocuments();- }- return;- }- } catch (err) {- console.warn('[FileTree] cleanup pending create failed:', err);- if (updateUi) {- const kind = pending.kind;- const createdPath = pending.createdPath;- toast.error(t`Network error - ${kind} "${createdPath}" still exists on disk`);- }- if (updateUi) {+ reportPendingCreateCleanupFailure(kind, createdPath, { status: res.status, detail });+ toast.error(t`${detail} - ${kind} "${createdPath}" still exists on disk`);setBusyPath(null);resetModelToDocuments();+ return;}+ } catch (err) {+ const kind = pending.kind;+ const createdPath = pending.createdPath;+ reportPendingCreateCleanupFailure(kind, createdPath, err);+ toast.error(t`Network error - ${kind} "${createdPath}" still exists on disk`);+ setBusyPath(null);+ resetModelToDocuments();return;}- if (updateUi) {- if (pending.kind === 'file') {- closeDocument(pending.createdPath);- } else {- closeTabs([folderTabId(pending.createdPath)], { force: true });- }- }- if (updateUi) {- setDocuments((current) => {- const next = applyDeleteToDocuments(- current,- pending.kind === 'file' ? [pending.createdPath] : [],- pending.kind === 'folder' ? pending.createdPath : undefined,- );- markNextDocumentsAsApplied(next);- return next;- });+ if (pending.kind === 'file') {+ closeDocument(pending.createdPath);+ } else {+ closeTabs([folderTabId(pending.createdPath)], { force: true });}+ setDocuments((current) => {+ const next = applyDeleteToDocuments(+ current,+ pending.kind === 'file' ? [pending.createdPath] : [],+ pending.kind === 'folder' ? pending.createdPath : undefined,+ );+ markNextDocumentsAsApplied(next);+ return next;+ });emitDocumentsChanged(['files', 'backlinks', 'graph']);- if (restoreLocation) window.location.hash = pending.previousHash;- if (updateUi) setBusyPath(null);+ window.location.hash = pending.previousHash;+ setBusyPath(null);}useEffect(() => {return () => {const pending = pendingCreateRef.current;if (pending) {- void cleanupPendingCreateRef- .current(pending, {- restoreLocation: false,- updateUi: false,- })- .catch((err) => {- console.warn('[FileTree] unmount cleanup failed:', err);- });+ void cleanupPendingCreateRef.current(pending, { intent: 'detach' }).catch((err) => {+ reportPendingCreateCleanupFailure(pending.kind, pending.createdPath, err);+ });}};}, []);@@ -1723,7 +1743,7 @@ export function FileTree({ ref }: { ref?: Ref<FileTreeHandle | null> }) {return model.onMutation('remove', (event) => {const pending = pendingCreateRef.current;if (!pending || event.path !== pending.renamePath) return;- void cleanupPendingCreateRef.current(pending);+ void cleanupPendingCreateRef.current(pending, { intent: 'discard' });});}, [model]);@@ -1901,7 +1921,7 @@ export function FileTree({ ref }: { ref?: Ref<FileTreeHandle | null> }) {resetModelToDocuments();const pending = pendingCreateRef.current;if (pending && pending.renamePath === sourceTreePath) {- await cleanupPendingCreate(pending);+ await cleanupPendingCreate(pending, { intent: 'discard' });} else {clearPendingCreate();}@@ -1961,7 +1981,7 @@ export function FileTree({ ref }: { ref?: Ref<FileTreeHandle | null> }) {resetModelToDocuments();const pending = pendingCreateRef.current;if (pending && pending.renamePath === sourceTreePath) {- await cleanupPendingCreate(pending);+ await cleanupPendingCreate(pending, { intent: 'discard' });} else {clearPendingCreate();}@@ -2349,7 +2369,7 @@ export function FileTree({ ref }: { ref?: Ref<FileTreeHandle | null> }) {toast.error(t`Could not start creating a new item`);const pending = pendingCreateRef.current;if (pending) {- await cleanupPendingCreate(pending);+ await cleanupPendingCreate(pending, { intent: 'discard' });} else {clearPendingCreate();}diff --git a/packages/app/src/editor/DocumentContext.dom.test.tsx b/packages/app/src/editor/DocumentContext.dom.test.tsxindex aade6ee68..53e1c0984 100644--- a/packages/app/src/editor/DocumentContext.dom.test.tsx+++ b/packages/app/src/editor/DocumentContext.dom.test.tsx@@ -1,10 +1,17 @@import { act, cleanup, render, screen, waitFor } from '@testing-library/react';import userEvent from '@testing-library/user-event';import { type ReactNode, useLayoutEffect, useState } from 'react';+import { toast } from 'sonner';import { afterEach, describe, expect, test, vi } from 'vitest';+import { Toaster } from '@/components/ui/sonner';import type { OkDesktopBridge } from '@/lib/desktop-bridge-types';import { hashFromAssetPath } from '@/lib/doc-hash';import { emitLocalMenuAction } from '@/lib/local-menu-action-bus';+import {+ consumeHashNavigationSuppression,+ recordAppShellCrashTrip,+ resetTabSessionRestoreSuppression,+} from '@/lib/tab-session-restore-suppression';import { assetTabId, docTabId, localTabSessionStorageKey, skillFileTabId } from './editor-tabs';import {requestPreviewTabPromotion,@@ -1245,6 +1252,85 @@ describe('DocumentContext syncOpenTabsWithKnownTargets — cold-start hash prese});});+describe('DocumentContext repeat-crash recovery notice', () => {+ const RECOVERY_NOTICE = /last open document couldn't be restored/i;++ afterEach(() => {+ cleanup();+ // The notice lives until dismissed; clear it so it cannot bleed across tests.+ toast.dismiss();+ delete window.okDesktop;+ mockCollabUrl = null;+ globalThis.fetch = originalFetch;+ window.localStorage.clear();+ window.location.hash = '';+ resetTabSessionRestoreSuppression();+ // The restore reset deliberately leaves the hash-navigation latch armed, so+ // a repeat-crash test would otherwise leak it into the next test in this+ // file (module scope is shared; isolate is per-file).+ consumeHashNavigationSuppression();+ });++ function renderWithToaster() {+ render(+ <>+ <PaneWorkspaceHarness />+ <Toaster closeButton />+ </>,+ { wrapper: ProviderHarness },+ );+ }++ test('tells the user the last document could not be restored when a repeat crash suppresses the bridge session', async () => {+ mockCollabUrl = 'ws://localhost:1/collab';+ globalThis.fetch = vi.fn(() => new Promise(() => {})) as never;+ // The same OTHER_TAB_ID session the normal-restore test below reopens over+ // the bridge — here a repeat crash armed suppression, so it must not reopen.+ const stub = makeEditorBridgeStub(+ persistedTabSession(+ [OTHER_TAB_ID],+ [],+ OTHER_TAB_ID,+ new Date('2026-07-28T00:00:00.000Z').toISOString(),+ ),+ );+ window.okDesktop = stub.bridge;+ recordAppShellCrashTrip(new Error('same crash'));+ recordAppShellCrashTrip(new Error('same crash'));++ renderWithToaster();++ await waitFor(() => {+ expect(screen.getByTestId('session-loaded').textContent).toBe('true');+ });+ // The crashing document stayed closed AND the empty workspace is explained.+ expect(screen.getByTestId('active-pane-tab').textContent).toBe('');+ await screen.findByText(RECOVERY_NOTICE);+ });++ test('shows no notice when the bridge session restores normally', async () => {+ mockCollabUrl = 'ws://localhost:1/collab';+ globalThis.fetch = vi.fn(() => new Promise(() => {})) as never;+ const stub = makeEditorBridgeStub(+ persistedTabSession(+ [OTHER_TAB_ID],+ [],+ OTHER_TAB_ID,+ new Date('2026-07-28T00:00:00.000Z').toISOString(),+ ),+ );+ window.okDesktop = stub.bridge;++ renderWithToaster();++ await waitFor(() => {+ expect(screen.getByTestId('session-loaded').textContent).toBe('true');+ expect(screen.getByTestId('active-pane-tab').textContent).toBe(OTHER_TAB_ID);+ });+ expect(screen.queryByText(RECOVERY_NOTICE)).toBeNull();+ });+});+describe('DocumentContext tab restore', () => {afterEach(() => {cleanup();@@ -1253,6 +1339,135 @@ describe('DocumentContext tab restore', () => {globalThis.fetch = originalFetch;window.localStorage.clear();window.location.hash = '';+ resetTabSessionRestoreSuppression();+ // The restore reset deliberately leaves the hash-navigation latch armed, so+ // a repeat-crash test would otherwise leak it into the next test in this+ // file (module scope is shared; isolate is per-file).+ consumeHashNavigationSuppression();+ });++ test('suppresses the synchronous web session restore after a repeat app-shell crash', () => {+ // Web mode, so no okDesktop bridge. Leaving collabUrl null keeps the async+ // restore effect early-returning, which isolates the synchronous initializer+ // as the only thing that can decide the first painted workspace. Sibling+ // tests seed the same session and see OTHER_TAB_ID active on first render.+ seedActiveOtherTabSession();+ recordAppShellCrashTrip(new Error('same crash'));+ recordAppShellCrashTrip(new Error('same crash'));++ render(<CloseActiveHarness />, { wrapper: ProviderHarness });++ expect(screen.getByTestId('active-tab').textContent).toBe('');+ expect(screen.getByTestId('open-tabs').textContent).toBe('');+ });++ test('restores the web session on a first crash trip', () => {+ // One trip is not a repeat, so the session still restores. The suppression+ // case records two same-key trips; without this counterpart, a latch that+ // armed on every crash would satisfy that case while breaking ordinary+ // single-crash recovery.+ seedActiveOtherTabSession();+ recordAppShellCrashTrip(new Error('first crash'));++ render(<CloseActiveHarness />, { wrapper: ProviderHarness });++ expect(screen.getByTestId('active-tab').textContent).toBe(OTHER_TAB_ID);+ });++ test('a suppressed recovery leaves the stored session intact while the workspace is empty', async () => {+ // The suppressed branch marks the session loaded, which arms the persist+ // effect. This pins the quiet half: nothing is written before the user+ // touches anything. The bridge and web open-a-tab cases cover the half that+ // actually bites, where the recovered one-tab workspace would otherwise+ // replace the whole stored session.+ mockCollabUrl = 'ws://localhost:1/collab';+ globalThis.fetch = vi.fn(() => new Promise(() => {})) as never;+ const setSessionState = vi.fn(async () => undefined);+ const stub = makeEditorBridgeStub(+ persistedTabSession(+ [OTHER_TAB_ID],+ [],+ OTHER_TAB_ID,+ new Date('2026-07-28T00:00:00.000Z').toISOString(),+ ),+ );+ stub.bridge.project.setSessionState = setSessionState as never;+ window.okDesktop = stub.bridge;+ recordAppShellCrashTrip(new Error('same crash'));+ recordAppShellCrashTrip(new Error('same crash'));++ render(<PaneWorkspaceHarness />, { wrapper: ProviderHarness });++ await waitFor(() => {+ expect(screen.getByTestId('session-loaded').textContent).toBe('true');+ });+ expect(setSessionState).not.toHaveBeenCalled();+ });++ test('opening a tab after a suppressed bridge recovery does not overwrite the stored session', async () => {+ // The recovered workspace is deliberately NOT what the user left behind, so+ // it is never a faithful continuation of the stored session. Persisting it+ // over the readable session we chose not to apply would drop every other+ // tab, pin and pane the user still has stored.+ mockCollabUrl = 'ws://localhost:1/collab';+ globalThis.fetch = vi.fn(() => new Promise(() => {})) as never;+ const setSessionState = vi.fn(async () => undefined);+ const stub = makeEditorBridgeStub(+ persistedTabSession(+ [PINNED_TAB_ID, OTHER_TAB_ID],+ [PINNED_TAB_ID],+ OTHER_TAB_ID,+ new Date('2026-07-28T00:00:00.000Z').toISOString(),+ ),+ );+ stub.bridge.project.setSessionState = setSessionState as never;+ window.okDesktop = stub.bridge;+ recordAppShellCrashTrip(new Error('same crash'));+ recordAppShellCrashTrip(new Error('same crash'));++ render(<PaneWorkspaceHarness />, { wrapper: ProviderHarness });++ await waitFor(() => {+ expect(screen.getByTestId('session-loaded').textContent).toBe('true');+ });+ const user = userEvent.setup();+ await user.click(screen.getByRole('button', { name: 'Open existing third' }));++ // The open itself must land — otherwise the assertion below would hold for+ // the wrong reason.+ await waitFor(() => {+ expect(screen.getByTestId('pane-tabs').textContent).toContain(THIRD_TAB_ID);+ });+ expect(setSessionState).not.toHaveBeenCalled();+ });++ test('opening a tab after a suppressed web recovery does not overwrite the stored session', async () => {+ // Same invariant on the localStorage host, where the write replaces the+ // stored value outright rather than going through the bridge.+ mockCollabUrl = 'ws://localhost:1/collab';+ globalThis.fetch = vi.fn(() => new Promise(() => {})) as never;+ seedTabSession();+ const storageKey = localTabSessionStorageKey(window.location.origin);+ const storedBefore = window.localStorage.getItem(storageKey);+ recordAppShellCrashTrip(new Error('same crash'));+ recordAppShellCrashTrip(new Error('same crash'));++ render(<PaneWorkspaceHarness />, { wrapper: ProviderHarness });++ await waitFor(() => {+ expect(screen.getByTestId('session-loaded').textContent).toBe('true');+ });+ const user = userEvent.setup();+ await user.click(screen.getByRole('button', { name: 'Open existing third' }));++ await waitFor(() => {+ expect(screen.getByTestId('pane-tabs').textContent).toContain(THIRD_TAB_ID);+ });+ const storedAfter = window.localStorage.getItem(storageKey);+ expect(storedAfter).toBe(storedBefore);+ const parsed = JSON.parse(storedAfter ?? '{}');+ expect(parsed.panes[0].openTabs).toEqual([PINNED_TAB_ID, OTHER_TAB_ID]);+ expect(parsed.panes[0].pinnedTabIds).toEqual([PINNED_TAB_ID]);});test('restores the desktop session before collaboration identity resolves', async () => {@@ -1281,6 +1496,66 @@ describe('DocumentContext tab restore', () => {});});+ test('suppresses the desktop bridge session restore after a repeat app-shell crash', async () => {+ mockCollabUrl = 'ws://localhost:1/collab';+ globalThis.fetch = vi.fn(() => new Promise(() => {})) as never;+ // The same OTHER_TAB_ID session the normal-restore case reopens over the+ // bridge — here it must NOT reopen, because a repeat crash armed suppression.+ const stub = makeEditorBridgeStub(+ persistedTabSession(+ [OTHER_TAB_ID],+ [],+ OTHER_TAB_ID,+ new Date('2026-07-28T00:00:00.000Z').toISOString(),+ ),+ );+ window.okDesktop = stub.bridge;+ recordAppShellCrashTrip(new Error('same crash'));+ recordAppShellCrashTrip(new Error('same crash'));++ render(<PaneWorkspaceHarness />, { wrapper: ProviderHarness });++ await waitFor(() => {+ expect(screen.getByTestId('session-loaded').textContent).toBe('true');+ });+ expect(screen.getByTestId('active-pane-tab').textContent).toBe('');+ });++ test('a later mount with no new crash trips restores the session the recovery suppressed', async () => {+ // Pins that the recovery mount RESETS the latch, not merely reads it. A+ // repeat crash suppresses exactly one restore; the very next mount — with+ // no new trips — must restore normally. Without the effect's reset,+ // suppression would outlive its single recovery and strand the tab for the+ // rest of the session.+ mockCollabUrl = 'ws://localhost:1/collab';+ globalThis.fetch = vi.fn(() => new Promise(() => {})) as never;+ const stub = makeEditorBridgeStub(+ persistedTabSession(+ [OTHER_TAB_ID],+ [],+ OTHER_TAB_ID,+ new Date('2026-07-28T00:00:00.000Z').toISOString(),+ ),+ );+ window.okDesktop = stub.bridge;+ recordAppShellCrashTrip(new Error('same crash'));+ recordAppShellCrashTrip(new Error('same crash'));++ const first = render(<PaneWorkspaceHarness />, { wrapper: ProviderHarness });+ await waitFor(() => {+ expect(first.getByTestId('session-loaded').textContent).toBe('true');+ });+ expect(first.getByTestId('active-pane-tab').textContent).toBe('');+ first.unmount();++ // A fresh mount with the latch already consumed: the crashing tab returns.+ const second = render(<PaneWorkspaceHarness />, { wrapper: ProviderHarness });+ await waitFor(() => {+ expect(second.getByTestId('session-loaded').textContent).toBe('true');+ expect(second.getByTestId('active-pane-tab').textContent).toBe(OTHER_TAB_ID);+ });+ });+test('restores an extension-qualified mdx tab over an ambiguous extensionless hash', async () => {mockCollabUrl = 'ws://localhost:1/collab';globalThis.fetch = vi.fn(() => Promise.reject(new Error('unexpected fetch'))) as never;diff --git a/packages/app/src/editor/DocumentContext.tsx b/packages/app/src/editor/DocumentContext.tsxindex 2e9169472..b173b547f 100644--- a/packages/app/src/editor/DocumentContext.tsx+++ b/packages/app/src/editor/DocumentContext.tsx@@ -27,6 +27,11 @@ import { markNoteWindowDocDeleted } from '@/lib/note-window-deleted-store';import { isNoteWindow } from '@/lib/note-window-mode';import { mark } from '@/lib/perf';import { refreshServerInfo } from '@/lib/server-info-refresh';+import { showTabSessionRestoreRecoveryNotice } from '@/lib/tab-session-restore-recovery-notice';+import {+ resetTabSessionRestoreSuppression,+ shouldSuppressTabSessionRestore,+} from '@/lib/tab-session-restore-suppression';import { useCollabUrl } from '@/lib/use-collab-url';import { getEditorForDoc } from './active-editor';import { handleBranchSwitched } from './branch-invalidation';@@ -77,6 +82,7 @@ import {shouldPersistTabSession,skillFileTabId,skillPreviewTabId,+ type TabSessionRestoreOutcome,tabIdForNavigationTarget,writeLocalTabSessionState,} from './editor-tabs';@@ -646,7 +652,12 @@ function workspaceWithResolvedTargets(workspace: EditorWorkspaceState): EditorWo}function readInitialEditorWorkspace(): EditorWorkspaceState {- const session = readInitialLocalTabSession();+ // Only PEEKS the suppression latch — the async restore effect is the single+ // owner that resets it, so this initializer (which renders first) and that+ // effect both observe the same armed value on a suppressed mount.+ const session = shouldSuppressTabSessionRestore()+ ? parseEditorTabSessionState(null)+ : readInitialLocalTabSession();return workspaceWithResolvedTargets(hydrateEditorWorkspace({ panes: session.panes, focusedPaneId: session.focusedPaneId }),);@@ -848,10 +859,11 @@ export function DocumentProvider({ children }: { children: ReactNode }) {// ref — the restore merge is additive, so an opened-during-restore tab// coexists with the restored set without collision.const tabSessionUserClosedRef = useRef(false);- // Only true once a session read RESOLVES this mount. Guards the persist- // effect below so a failed restore never overwrites the stored session with- // our empty in-memory state (a rejected read leaves it false → no write).- const restoreSucceededRef = useRef(false);+ // How this mount's restore ended. Guards the persist effect below so an+ // in-memory workspace that is not a continuation of the stored session never+ // overwrites it. Starts at 'unread': a rejected read leaves it there, and+ // only a resolved read promotes it to 'applied'.+ const restoreOutcomeRef = useRef<TabSessionRestoreOutcome>('unread');const [principal, setPrincipal] = useState<Principal | null>(null);const [systemProvider, setSystemProvider] = useState<HocuspocusProvider | null>(null);const [docPanelMode, setDocPanelModeState] = useState<'doc' | 'agent'>('doc');@@ -999,6 +1011,23 @@ export function DocumentProvider({ children }: { children: ReactNode }) {// biome-ignore lint/correctness/useExhaustiveDependencies: workspace mutations read the live ref; collaboration readiness and load state are the restore triggers.useEffect(() => {if (collabUrl === null || tabSessionLoaded) return;+ // A repeat app-shell crash armed restore suppression. Skip the read that+ // would reopen the crashing document (bridge or localStorage alike, since+ // this precedes that choice), then reset so the next mount or a reload+ // restores normally — suppression covers exactly one recovery, not the+ // session. The stored session is left untouched here, and recording the+ // outcome keeps it that way for the whole recovery mount: what the user+ // builds from the empty workspace is not a continuation of the session we+ // declined to open, so it must not be written over it. A notice tells the+ // user the last document could not be restored, so the recovered empty+ // workspace does not read as a forgotten tab.+ if (shouldSuppressTabSessionRestore()) {+ resetTabSessionRestoreSuppression();+ showTabSessionRestoreRecoveryNotice();+ restoreOutcomeRef.current = 'suppressed';+ setTabSessionLoaded(true);+ return;+ }let cancelled = false;const bridge = getDesktopBridge();const localKey = getLocalTabSessionKey();@@ -1011,7 +1040,7 @@ export function DocumentProvider({ children }: { children: ReactNode }) {loaded.then((raw) => {- restoreSucceededRef.current = true;+ restoreOutcomeRef.current = 'applied';if (cancelled) return;const state = parseEditorTabSessionState(raw);if (tabSessionUserClosedRef.current) return;@@ -1123,7 +1152,7 @@ export function DocumentProvider({ children }: { children: ReactNode }) {useEffect(() => {if (!tabSessionLoaded) return;- if (!shouldPersistTabSession(restoreSucceededRef.current, openTabs.length)) return;+ if (!shouldPersistTabSession(restoreOutcomeRef.current, openTabs.length)) return;const state = createEditorTabSessionState(workspace, activeTabByModeRef.current);const bridge = getDesktopBridge();if (bridge) {diff --git a/packages/app/src/editor/editor-tabs.test.ts b/packages/app/src/editor/editor-tabs.test.tsindex f08755ce7..c16e316cb 100644--- a/packages/app/src/editor/editor-tabs.test.ts+++ b/packages/app/src/editor/editor-tabs.test.ts@@ -748,9 +748,18 @@ describe('preview-tab integration', () => {});test('session persistence waits after a failed empty restore but resumes after a tab opens', () => {- expect(shouldPersistTabSession(false, 0)).toBe(false);- expect(shouldPersistTabSession(false, 1)).toBe(true);- expect(shouldPersistTabSession(true, 0)).toBe(true);+ expect(shouldPersistTabSession('unread', 0)).toBe(false);+ expect(shouldPersistTabSession('unread', 1)).toBe(true);+ expect(shouldPersistTabSession('applied', 0)).toBe(true);+ });++ test('a suppressed restore never persists, however many tabs the user opens', () => {+ // The count-based escape hatch above exists for a session we could not+ // read. A suppressed one IS readable and intact, so opening tabs in the+ // recovered workspace must never earn the right to replace it.+ expect(shouldPersistTabSession('suppressed', 0)).toBe(false);+ expect(shouldPersistTabSession('suppressed', 1)).toBe(false);+ expect(shouldPersistTabSession('suppressed', 12)).toBe(false);});test('workspace sessions preserve the active tab for each surface', () => {diff --git a/packages/app/src/editor/editor-tabs.ts b/packages/app/src/editor/editor-tabs.tsindex c4f90bd1a..93a9cd5a6 100644--- a/packages/app/src/editor/editor-tabs.ts+++ b/packages/app/src/editor/editor-tabs.ts@@ -343,25 +343,49 @@ export function docNameForTabId(tabId: string): string | null {}/**- * True when a plain `doc` name belongs to a skill surface — a project skill's- * SKILL.md / bundle file (under the skill content root) or a global `__skill__/`- * managed artifact. Single source shared with `isSkillFocusedTarget`- * (navigation-targets) so the tab-strip mode filter and the sidebar mode never- * disagree on what counts as a skill.+ * How this mount's attempt to restore the persisted tab session ended.+ *+ * Three outcomes, not two, because "we did not apply the stored session" covers+ * two cases that need OPPOSITE persistence decisions. `unread` means the read+ * never resolved, so we can never learn what is stored. `suppressed` means the+ * read was deliberately skipped, so the stored session is intact and known+ * good. A single boolean collapses them and hands the `unread` escape hatch+ * below to a case where it destroys data.*/+export type TabSessionRestoreOutcome = 'applied' | 'unread' | 'suppressed';+/*** Whether a tab session may be written back to storage.** Not simply "did the restore succeed". A failed restore must not clobber a- * session we could not READ — but gating on success alone meant one transient+ * session we could not READ, but gating on that alone meant one transient* failure disabled persistence for the whole session, silently dropping every* tab opened afterwards. Once the user actually has tabs open, that state is* worth more than the one we failed to read.+ *+ * A SUPPRESSED restore gets no such escape hatch. Crash recovery starts the+ * user from an empty workspace on purpose, so what they build there is never a+ * continuation of the session it declined to open. Letting the first opened tab+ * arm the count-based hatch would replace every stored tab, pin and pane with a+ * one-tab workspace, which is a larger loss than the crash this recovery+ * exists to escape. Suppression covers a single recovery mount, so the next+ * mount restores and persists normally.*/-export function shouldPersistTabSession(restoreSucceeded: boolean, openTabCount: number): boolean {- return restoreSucceeded || openTabCount > 0;+export function shouldPersistTabSession(+ restoreOutcome: TabSessionRestoreOutcome,+ openTabCount: number,+): boolean {+ if (restoreOutcome === 'suppressed') return false;+ return restoreOutcome === 'applied' || openTabCount > 0;}+/**+ * True when a plain `doc` name belongs to a skill surface — a project skill's+ * SKILL.md / bundle file (under the skill content root) or a global `__skill__/`+ * managed artifact. Single source shared with `isSkillFocusedTarget`+ * (navigation-targets) so the tab-strip mode filter and the sidebar mode never+ * disagree on what counts as a skill.+ */export function isSkillDocName(docName: string): boolean {return (parseProjectSkillBundleDoc(docName) != null ||diff --git a/packages/app/src/lib/tab-session-restore-recovery-notice.dom.test.tsx b/packages/app/src/lib/tab-session-restore-recovery-notice.dom.test.tsxnew file mode 100644index 000000000..64c6d4411--- /dev/null+++ b/packages/app/src/lib/tab-session-restore-recovery-notice.dom.test.tsx@@ -0,0 +1,78 @@+/**+ * The notice a user sees after a repeat app-shell crash recovers without the+ * document that caused it.+ *+ * Rendered through the real sonner toaster rather than a captured mock: the+ * claims worth making are user-visible — the notice appears, it says the last+ * document could not be restored, it does not veil the app it just recovered,+ * and it can be dismissed. A call-count assertion would restate the+ * implementation instead of testing what the user gets.+ *+ * The vitest config aliases the Lingui macros to an English passthrough, so this+ * tier cannot prove the sentence came out translated; that is the i18n catalogs'+ * and the drift gate's job.+ */++import { fireEvent, render, screen, waitFor } from '@testing-library/react';+import { toast } from 'sonner';+import { afterEach, describe, expect, test } from 'vitest';+import { Toaster } from '@/components/ui/sonner';+import { showTabSessionRestoreRecoveryNotice } from './tab-session-restore-recovery-notice';++const NOTICE_TEXT = /last open document couldn't be restored/i;++afterEach(() => {+ // The notice lives until dismissed; clear it so it cannot bleed into the next+ // test's toaster.+ toast.dismiss();+});++describe('showTabSessionRestoreRecoveryNotice', () => {+ test('tells the user the last document could not be restored', async () => {+ render(<Toaster closeButton />);++ showTabSessionRestoreRecoveryNotice();++ await screen.findByText(NOTICE_TEXT);+ });++ test('does not veil the app it just recovered', async () => {+ // The recovered workspace behind the notice is fully usable, so nothing here+ // may trap focus or cover what is underneath.+ render(+ <>+ <Toaster closeButton />+ <a href="/somewhere">Underneath</a>+ </>,+ );++ showTabSessionRestoreRecoveryNotice();+ await screen.findByText(NOTICE_TEXT);++ expect(screen.getByRole('link', { name: 'Underneath' })).toBeTruthy();+ expect(document.querySelector('[aria-modal="true"]')).toBeNull();+ });++ test('can be dismissed', async () => {+ render(<Toaster closeButton />);++ showTabSessionRestoreRecoveryNotice();+ fireEvent.click(await screen.findByRole('button', { name: /close toast/i }));++ await waitFor(() => {+ expect(screen.queryByText(NOTICE_TEXT)).toBeNull();+ });+ });++ test('a second recovery replaces the notice rather than stacking another', async () => {+ render(<Toaster closeButton />);++ showTabSessionRestoreRecoveryNotice();+ await screen.findByText(NOTICE_TEXT);+ showTabSessionRestoreRecoveryNotice();++ await waitFor(() => {+ expect(screen.getAllByText(NOTICE_TEXT)).toHaveLength(1);+ });+ });+});diff --git a/packages/app/src/lib/tab-session-restore-recovery-notice.ts b/packages/app/src/lib/tab-session-restore-recovery-notice.tsnew file mode 100644index 000000000..8674f727c--- /dev/null+++ b/packages/app/src/lib/tab-session-restore-recovery-notice.ts@@ -0,0 +1,34 @@+/**+ * The notice a user gets after a repeat app-shell crash is recovered without the+ * document that caused it.+ *+ * A repeat crash arms tab-session-restore suppression, so the recovery mount+ * comes up with an empty workspace instead of reopening the crashing document.+ * With nothing said, that empty workspace is indistinguishable from the app+ * having forgotten the tab. This tells the user the recovery was deliberate: the+ * last document could not be restored, which is why nothing reopened.+ *+ * The copy resolves against the active locale at call time, which is why the `t`+ * macro is called here rather than hoisted to a module-load constant.+ */++import { t } from '@lingui/core/macro';+import { toast } from 'sonner';++/**+ * Shared id, so a recovery that fires the notice more than once — a StrictMode+ * double-invoke, or a second recovery later in the same session — replaces its+ * own notice instead of stacking a duplicate.+ */+const NOTICE_ID = 'ok-tab-session-restore-recovered';++export function showTabSessionRestoreRecoveryNotice(): void {+ toast(t`Your last open document couldn't be restored.`, {+ id: NOTICE_ID,+ description: t`The workspace opened without it so the app could start.`,+ // The user is recovering from a crash and may be looking away; a notice that+ // scrolled itself off would leave the empty workspace unexplained. The+ // toaster's close button is the way out.+ duration: Number.POSITIVE_INFINITY,+ });+}diff --git a/packages/app/src/lib/tab-session-restore-suppression.test.ts b/packages/app/src/lib/tab-session-restore-suppression.test.tsnew file mode 100644index 000000000..2550d5061--- /dev/null+++ b/packages/app/src/lib/tab-session-restore-suppression.test.ts@@ -0,0 +1,116 @@+import { afterEach, describe, expect, test } from 'vitest';+import {+ consumeHashNavigationSuppression,+ recordAppShellCrashTrip,+ resetTabSessionRestoreSuppression,+ shouldSuppressTabSessionRestore,+} from './tab-session-restore-suppression';++describe('tab-session restore suppression', () => {+ afterEach(() => {+ resetTabSessionRestoreSuppression();+ consumeHashNavigationSuppression();+ });++ test('a single crash trip does not suppress restore', () => {+ recordAppShellCrashTrip(new Error('boom'));+ expect(shouldSuppressTabSessionRestore()).toBe(false);+ });++ test('a second trip on the same error suppresses restore', () => {+ recordAppShellCrashTrip(new Error('boom'));+ recordAppShellCrashTrip(new Error('boom'));+ expect(shouldSuppressTabSessionRestore()).toBe(true);+ });++ test('a different second error does not suppress restore', () => {+ recordAppShellCrashTrip(new Error('boom'));+ recordAppShellCrashTrip(new Error('an unrelated crash'));+ expect(shouldSuppressTabSessionRestore()).toBe(false);+ });++ test('a different crash disarms an already-armed suppression', () => {+ // Arm on a repeat of the same error, then take one trip of a DIFFERENT+ // error. A new, single crash is not a repeat, so the latch must disarm —+ // otherwise a lone unrelated crash inherits the armed flag and drops the+ // next mount's tab restore on the strength of a single occurrence.+ recordAppShellCrashTrip(new Error('boom'));+ recordAppShellCrashTrip(new Error('boom'));+ expect(shouldSuppressTabSessionRestore()).toBe(true);++ recordAppShellCrashTrip(new Error('an unrelated crash'));+ expect(shouldSuppressTabSessionRestore()).toBe(false);++ // And the unrelated error now starts its own fresh count: it must trip+ // twice on its own to arm, exactly as the first error did.+ recordAppShellCrashTrip(new Error('an unrelated crash'));+ expect(shouldSuppressTabSessionRestore()).toBe(true);+ });++ test('reset lifts an armed suppression', () => {+ recordAppShellCrashTrip(new Error('boom'));+ recordAppShellCrashTrip(new Error('boom'));+ resetTabSessionRestoreSuppression();+ expect(shouldSuppressTabSessionRestore()).toBe(false);+ });++ test('after a reset the same error must trip twice again to suppress', () => {+ recordAppShellCrashTrip(new Error('boom'));+ recordAppShellCrashTrip(new Error('boom'));+ resetTabSessionRestoreSuppression();++ recordAppShellCrashTrip(new Error('boom'));+ expect(shouldSuppressTabSessionRestore()).toBe(false);+ recordAppShellCrashTrip(new Error('boom'));+ expect(shouldSuppressTabSessionRestore()).toBe(true);+ });++ test('a single trip does not arm hash-navigation suppression', () => {+ recordAppShellCrashTrip(new Error('boom'));++ expect(consumeHashNavigationSuppression()).toBe(false);+ });++ test('a repeat trip arms hash-navigation suppression alongside restore suppression', () => {+ // Exactly two same-key trips. Split from the single-trip case above so the+ // arming threshold is asserted rather than implied: a change that required+ // three trips would still pass a test that made three.+ recordAppShellCrashTrip(new Error('boom'));+ recordAppShellCrashTrip(new Error('boom'));++ expect(consumeHashNavigationSuppression()).toBe(true);+ });++ test('hash-navigation suppression is a one-shot consume', () => {+ recordAppShellCrashTrip(new Error('boom'));+ recordAppShellCrashTrip(new Error('boom'));+ expect(consumeHashNavigationSuppression()).toBe(true);+ expect(consumeHashNavigationSuppression()).toBe(false);+ });++ test('consuming hash-navigation suppression leaves restore suppression armed', () => {+ recordAppShellCrashTrip(new Error('boom'));+ recordAppShellCrashTrip(new Error('boom'));+ consumeHashNavigationSuppression();+ expect(shouldSuppressTabSessionRestore()).toBe(true);+ });++ test('the restore reset leaves an armed hash-navigation suppression consumable', () => {+ // The restore path resets its latch the moment it honors a suppression,+ // which can be before OR after the navigation handler's mount effect runs.+ // If the reset also cleared the navigation latch, an early restore reset+ // would leave the stale hash live and the crashing document would reopen+ // through it.+ recordAppShellCrashTrip(new Error('boom'));+ recordAppShellCrashTrip(new Error('boom'));+ resetTabSessionRestoreSuppression();+ expect(consumeHashNavigationSuppression()).toBe(true);+ });++ test('a different crash disarms hash-navigation suppression with the restore latch', () => {+ recordAppShellCrashTrip(new Error('boom'));+ recordAppShellCrashTrip(new Error('boom'));+ recordAppShellCrashTrip(new Error('an unrelated crash'));+ expect(consumeHashNavigationSuppression()).toBe(false);+ });+});diff --git a/packages/app/src/lib/tab-session-restore-suppression.ts b/packages/app/src/lib/tab-session-restore-suppression.tsnew file mode 100644index 000000000..4f0865fa2--- /dev/null+++ b/packages/app/src/lib/tab-session-restore-suppression.ts@@ -0,0 +1,89 @@+/**+ * Session-scoped latch that suppresses the persisted-tab-session restore for the+ * single mount that follows a REPEAT app-shell crash.+ *+ * Why this exists: the app-shell error fallback's "Try again" remounts the app,+ * which re-runs the tab-session restore and reopens the very document that+ * crashed — so the same crash fires again and the button can never recover.+ * Recording repeat trips here, and skipping the restore on the second trip, lets+ * the app come back without the crashing tab.+ *+ * Lifetime is the crux and easy to get wrong. The latch lives at MODULE scope so+ * it survives the remount a "Try again" reset triggers (the module stays loaded)+ * but not a page reload or a fresh app launch (a new process re-evaluates the+ * module). React state would reset on the remount — too eager, it would never+ * fire. localStorage or sessionStorage would outlive the reload — too durable, it+ * would suppress restore permanently. A plain in-memory latch is the only store+ * with the lifetime this recovery needs.+ *+ * The recovery has TWO consumers with independent timing: the tab-session+ * restore paths (a render-time initializer on web, an async effect behind the+ * collab gate on desktop) and the mount-time hash navigation (the active tab is+ * mirrored into the URL hash — a third restore vector into the crashing+ * document). Each consumer owns its own one-shot latch, armed together on the+ * repeat trip; with a single shared latch, whichever consumer ran first would+ * disarm the other and leave it to reopen the crashing document.+ */++let lastCrashKey: string | null = null;+let suppressNextRestore = false;+let suppressNextHashNavigation = false;++function crashKey(error: unknown): string {+ return error instanceof Error && error.message ? error.message : String(error);+}++/**+ * Record one app-shell crash trip. A second trip carrying the same key as the+ * previous one is the repeat that "Try again" cannot escape on its own, so it+ * arms restore suppression for the next mount. A different key starts a fresh+ * count instead of arming, so an unrelated one-off crash never drops the tab.+ */+export function recordAppShellCrashTrip(error: unknown): void {+ const key = crashKey(error);+ if (key === lastCrashKey) {+ suppressNextRestore = true;+ suppressNextHashNavigation = true;+ return;+ }+ // A different key starts a fresh count. Disarm any suppression the previous+ // error armed: a new, single crash is not a repeat, so it must trip twice on+ // its own before it earns suppression.+ lastCrashKey = key;+ suppressNextRestore = false;+ suppressNextHashNavigation = false;+}++/** Whether the pending mount should skip restoring the persisted tab session. */+export function shouldSuppressTabSessionRestore(): boolean {+ return suppressNextRestore;+}++/**+ * Clear the armed latch and the crash-key memory. The restore path calls this+ * once it has honored a suppression, so the next mount or a reload restores+ * normally and suppression never becomes permanent. Deliberately leaves the+ * hash-navigation latch alone: the restore path resets on its own schedule,+ * which may be before OR after the navigation handler's mount effect, and the+ * navigation side must still observe its armed latch either way.+ */+export function resetTabSessionRestoreSuppression(): void {+ suppressNextRestore = false;+ lastCrashKey = null;+}++/**+ * One-shot check-and-clear for the navigation side of the same recovery. The+ * hash handler consumes this on its first mount after the repeat crash and+ * drops the stale hash instead of navigating it, so the guard covers exactly+ * one mount and ordinary hash navigation resumes immediately after. Owns its+ * own latch rather than reading the restore latch above because the two+ * consumers observe the armed state at different times (render-time on web,+ * behind an async gate on desktop) — reading a shared latch here would return+ * false whenever the restore path consumed first.+ */+export function consumeHashNavigationSuppression(): boolean {+ const armed = suppressNextHashNavigation;+ suppressNextHashNavigation = false;+ return armed;+}diff --git a/packages/app/src/locales/ar/messages.json b/packages/app/src/locales/ar/messages.jsonindex cb8c0338c..588a4541f 100644--- a/packages/app/src/locales/ar/messages.json+++ b/packages/app/src/locales/ar/messages.json@@ -900,6 +900,7 @@"ANFxWn": ["تعذّر حذف هذه السمة. حدّث الصفحة وحاول مرة أخرى."],"APNlbk": ["خروج ", ["0"]],"AQ-Lfg": ["تعذّر تحميل القوالب"],+ "AR4s_6": ["فُتحت مساحة العمل بدونه حتى يتمكن التطبيق من البدء."],"ASqqsQ": ["بحد أقصى ", ["MAX_ATTACHMENTS"], " مرفقات"],"AT0e50": ["الاحتفاظ بكليهما"],"ATGYL1": ["عنوان البريد الإلكتروني"],@@ -1491,6 +1492,7 @@["display"]," بنسخة مستقلة من المهارة؟ لا شيء آخر يتحرك."],+ "HdS4Ft": ["تعذّر استعادة آخر مستند مفتوح لديك."],"HdkSiO": ["ملف جديد"],"HepFJQ": ["تقريرك محفوظ على هذا الجهاز، لذا لم يُفقد شيء. يمكنك إرساله إلينا بالبريد الإلكتروني بدلاً من ذلك."diff --git a/packages/app/src/locales/ar/messages.po b/packages/app/src/locales/ar/messages.poindex 1e8ca6778..979d02ece 100644--- a/packages/app/src/locales/ar/messages.po+++ b/packages/app/src/locales/ar/messages.po@@ -12649,6 +12649,10 @@ msgstr "توقفت الطرفية على نحو غير متوقع."msgid "The token needs the repo and read:user scopes."msgstr "يحتاج الرمز إلى نطاقي repo وread:user."+#: src/lib/tab-session-restore-recovery-notice.ts+msgid "The workspace opened without it so the app could start."+msgstr "فُتحت مساحة العمل بدونه حتى يتمكن التطبيق من البدء."+#: src/components/settings/settings-fields.tsmsgid "Theme"msgstr "السمة"@@ -14273,6 +14277,10 @@ msgstr "ينقص رمز GitHub لديك نطاقات مطلوبة. حاول تسmsgid "Your knowledge base is now on GitHub at <0>{ownerLogin}/{repoName}</0>."msgstr "أصبحت قاعدة معرفتك على GitHub في <0>{ownerLogin}/{repoName}</0>."+#: src/lib/tab-session-restore-recovery-notice.ts+msgid "Your last open document couldn't be restored."+msgstr "تعذّر استعادة آخر مستند مفتوح لديك."+#: src/components/share-receive-miss-content.tsxmsgid "Your local copy is behind."msgstr "نسختك المحلية متأخرة."diff --git a/packages/app/src/locales/bn/messages.json b/packages/app/src/locales/bn/messages.jsonindex 011a0d7de..8f714553c 100644--- a/packages/app/src/locales/bn/messages.json+++ b/packages/app/src/locales/bn/messages.json@@ -753,6 +753,7 @@"ANFxWn": ["এই থিম মুছে ফেলা যায়নি। রিফ্রেশ করে আবার চেষ্টা করুন।"],"APNlbk": ["প্রস্থান ", ["0"]],"AQ-Lfg": ["টেমপ্লেট লোড করা যায়নি"],+ "AR4s_6": ["অ্যাপটি যাতে চালু হতে পারে তাই ওয়ার্কস্পেসটি এটি ছাড়াই খোলা হয়েছে।"],"ASqqsQ": ["সর্বোচ্চ ", ["MAX_ATTACHMENTS"], "টি সংযুক্তি"],"AT0e50": ["দুটোই রাখুন"],"ATGYL1": ["ইমেইল ঠিকানা"],@@ -1257,6 +1258,7 @@"HTW0Zw": ["আরও একটি ধাপ: এই প্রকল্পে <0>claude</0> চালান এবং OpenKnowledge-কে একবার অনুমোদন দিন।"],"HZ7fEu": ["থিমের নাম"],"HbcQYf": [["display"], "-এ থাকা সিমলিংকটি স্কিলের একটি স্বতন্ত্র অনুলিপি দিয়ে বদলাবেন? আর কিছু সরে না।"],+ "HdS4Ft": ["আপনার সর্বশেষ খোলা নথি পুনরুদ্ধার করা যায়নি।"],"HdkSiO": ["নতুন ফাইল"],"HepFJQ": ["আপনার রিপোর্ট এই কম্পিউটারে সংরক্ষিত আছে, তাই কিছুই হারায়নি। আপনি এর বদলে আমাদের ইমেল করতে পারেন।"diff --git a/packages/app/src/locales/bn/messages.po b/packages/app/src/locales/bn/messages.poindex 949d0b514..933981eca 100644--- a/packages/app/src/locales/bn/messages.po+++ b/packages/app/src/locales/bn/messages.po@@ -12645,6 +12645,10 @@ msgstr "টার্মিনাল অপ্রত্যাশিতভাবmsgid "The token needs the repo and read:user scopes."msgstr "টোকেনটির repo ও read:user স্কোপ দরকার।"+#: src/lib/tab-session-restore-recovery-notice.ts+msgid "The workspace opened without it so the app could start."+msgstr "অ্যাপটি যাতে চালু হতে পারে তাই ওয়ার্কস্পেসটি এটি ছাড়াই খোলা হয়েছে।"+#: src/components/settings/settings-fields.tsmsgid "Theme"msgstr "থিম"@@ -14269,6 +14273,10 @@ msgstr "আপনার GitHub টোকেনে আবশ্যক স্কmsgid "Your knowledge base is now on GitHub at <0>{ownerLogin}/{repoName}</0>."msgstr "আপনার জ্ঞানভাণ্ডার এখন GitHub-এ <0>{ownerLogin}/{repoName}</0>-এ আছে।"+#: src/lib/tab-session-restore-recovery-notice.ts+msgid "Your last open document couldn't be restored."+msgstr "আপনার সর্বশেষ খোলা নথি পুনরুদ্ধার করা যায়নি।"+#: src/components/share-receive-miss-content.tsxmsgid "Your local copy is behind."msgstr "আপনার স্থানীয় অনুলিপি পিছিয়ে আছে।"diff --git a/packages/app/src/locales/en/messages.json b/packages/app/src/locales/en/messages.jsonindex 2a55e237c..ad65a50a7 100644--- a/packages/app/src/locales/en/messages.json+++ b/packages/app/src/locales/en/messages.json@@ -773,6 +773,7 @@"ANFxWn": ["Couldn’t delete this theme. Refresh and try again."],"APNlbk": ["exit ", ["0"]],"AQ-Lfg": ["Couldn't load templates"],+ "AR4s_6": ["The workspace opened without it so the app could start."],"ASqqsQ": ["Maximum ", ["MAX_ATTACHMENTS"], " attachments"],"AT0e50": ["Keep both"],"ATGYL1": ["Email address"],@@ -1296,6 +1297,7 @@["display"]," with an independent copy of the skill? Nothing else moves."],+ "HdS4Ft": ["Your last open document couldn't be restored."],"HdkSiO": ["New file"],"HepFJQ": ["Your report is saved on this computer, so nothing was lost. You can email it to us instead."diff --git a/packages/app/src/locales/en/messages.po b/packages/app/src/locales/en/messages.poindex 807e24732..0956ba860 100644--- a/packages/app/src/locales/en/messages.po+++ b/packages/app/src/locales/en/messages.po@@ -12649,6 +12649,10 @@ msgstr "The terminal stopped unexpectedly."msgid "The token needs the repo and read:user scopes."msgstr "The token needs the repo and read:user scopes."+#: src/lib/tab-session-restore-recovery-notice.ts+msgid "The workspace opened without it so the app could start."+msgstr "The workspace opened without it so the app could start."+#: src/components/settings/settings-fields.tsmsgid "Theme"msgstr "Theme"@@ -14273,6 +14277,10 @@ msgstr "Your GitHub token is missing required scopes. Try signing in again."msgid "Your knowledge base is now on GitHub at <0>{ownerLogin}/{repoName}</0>."msgstr "Your knowledge base is now on GitHub at <0>{ownerLogin}/{repoName}</0>."+#: src/lib/tab-session-restore-recovery-notice.ts+msgid "Your last open document couldn't be restored."+msgstr "Your last open document couldn't be restored."+#: src/components/share-receive-miss-content.tsxmsgid "Your local copy is behind."msgstr "Your local copy is behind."diff --git a/packages/app/src/locales/es/messages.json b/packages/app/src/locales/es/messages.jsonindex d8020fa17..c9e4ce2a2 100644--- a/packages/app/src/locales/es/messages.json+++ b/packages/app/src/locales/es/messages.json@@ -910,6 +910,7 @@"ANFxWn": ["No se pudo eliminar este tema. Actualiza e inténtalo de nuevo."],"APNlbk": ["salida ", ["0"]],"AQ-Lfg": ["No se pudieron cargar las plantillas"],+ "AR4s_6": ["El espacio de trabajo se abrió sin él para que la aplicación pudiera iniciarse."],"ASqqsQ": ["Máximo ", ["MAX_ATTACHMENTS"], " adjuntos"],"AT0e50": ["Conservar ambos"],"ATGYL1": ["Dirección de correo"],@@ -1509,6 +1510,7 @@["display"]," por una copia independiente de la habilidad? No se mueve nada más."],+ "HdS4Ft": ["No se pudo restaurar tu último documento abierto."],"HdkSiO": ["Archivo nuevo"],"HepFJQ": ["Tu informe está guardado en este equipo, así que no se perdió nada. Puedes enviárnoslo por correo."diff --git a/packages/app/src/locales/es/messages.po b/packages/app/src/locales/es/messages.poindex 3f8d734cc..8ed6b3944 100644--- a/packages/app/src/locales/es/messages.po+++ b/packages/app/src/locales/es/messages.po@@ -12649,6 +12649,10 @@ msgstr "La terminal se detuvo de forma inesperada."msgid "The token needs the repo and read:user scopes."msgstr "El token necesita los ámbitos repo y read:user."+#: src/lib/tab-session-restore-recovery-notice.ts+msgid "The workspace opened without it so the app could start."+msgstr "El espacio de trabajo se abrió sin él para que la aplicación pudiera iniciarse."+#: src/components/settings/settings-fields.tsmsgid "Theme"msgstr "Tema"@@ -14273,6 +14277,10 @@ msgstr "A tu token de GitHub le faltan ámbitos obligatorios. Prueba a iniciar smsgid "Your knowledge base is now on GitHub at <0>{ownerLogin}/{repoName}</0>."msgstr "Tu base de conocimiento ya está en GitHub, en <0>{ownerLogin}/{repoName}</0>."+#: src/lib/tab-session-restore-recovery-notice.ts+msgid "Your last open document couldn't be restored."+msgstr "No se pudo restaurar tu último documento abierto."+#: src/components/share-receive-miss-content.tsxmsgid "Your local copy is behind."msgstr "Tu copia local está por detrás."diff --git a/packages/app/src/locales/fr/messages.json b/packages/app/src/locales/fr/messages.jsonindex bb676cb47..02ad7cb50 100644--- a/packages/app/src/locales/fr/messages.json+++ b/packages/app/src/locales/fr/messages.json@@ -934,6 +934,7 @@"ANFxWn": ["Impossible de supprimer ce thème. Actualisez la page et réessayez."],"APNlbk": ["quitter ", ["0"]],"AQ-Lfg": ["Impossible de charger les modèles"],+ "AR4s_6": ["L'espace de travail s'est ouvert sans lui pour que l'application puisse démarrer."],"ASqqsQ": [["MAX_ATTACHMENTS"], " pièces jointes maximum"],"AT0e50": ["Conserver les deux"],"ATGYL1": ["Adresse e-mail"],@@ -1536,6 +1537,7 @@["display"]," par une copie indépendante de la compétence ? Rien d'autre ne bouge."],+ "HdS4Ft": ["Impossible de restaurer votre dernier document ouvert."],"HdkSiO": ["Nouveau fichier"],"HepFJQ": ["Votre rapport est enregistré sur cet ordinateur, rien n'a donc été perdu. Vous pouvez nous l'envoyer par e-mail à la place."diff --git a/packages/app/src/locales/fr/messages.po b/packages/app/src/locales/fr/messages.poindex 7da11375d..836507172 100644--- a/packages/app/src/locales/fr/messages.po+++ b/packages/app/src/locales/fr/messages.po@@ -12649,6 +12649,10 @@ msgstr "Le terminal s'est arrêté de façon inattendue."msgid "The token needs the repo and read:user scopes."msgstr "Le jeton doit avoir les portées repo et read:user."+#: src/lib/tab-session-restore-recovery-notice.ts+msgid "The workspace opened without it so the app could start."+msgstr "L'espace de travail s'est ouvert sans lui pour que l'application puisse démarrer."+#: src/components/settings/settings-fields.tsmsgid "Theme"msgstr "Thème"@@ -14273,6 +14277,10 @@ msgstr "Il manque des portées obligatoires à votre jeton GitHub. Essayez de vomsgid "Your knowledge base is now on GitHub at <0>{ownerLogin}/{repoName}</0>."msgstr "Votre base de connaissances est désormais sur GitHub, à l'adresse <0>{ownerLogin}/{repoName}</0>."+#: src/lib/tab-session-restore-recovery-notice.ts+msgid "Your last open document couldn't be restored."+msgstr "Impossible de restaurer votre dernier document ouvert."+#: src/components/share-receive-miss-content.tsxmsgid "Your local copy is behind."msgstr "Votre copie locale est en retard."diff --git a/packages/app/src/locales/hi/messages.json b/packages/app/src/locales/hi/messages.jsonindex b2b89c58b..815e83856 100644--- a/packages/app/src/locales/hi/messages.json+++ b/packages/app/src/locales/hi/messages.json@@ -747,6 +747,7 @@"ANFxWn": ["यह थीम नहीं हटाई जा सकी। रीफ़्रेश करके फिर से कोशिश करें।"],"APNlbk": ["निकास ", ["0"]],"AQ-Lfg": ["टेम्पलेट लोड नहीं हो सके"],+ "AR4s_6": ["ऐप शुरू हो सके इसलिए कार्यक्षेत्र उसके बिना खुला।"],"ASqqsQ": ["अधिकतम ", ["MAX_ATTACHMENTS"], " संलग्नक"],"AT0e50": ["दोनों रखें"],"ATGYL1": ["ईमेल पता"],@@ -1251,6 +1252,7 @@"HTW0Zw": ["एक और क़दम: इस प्रोजेक्ट में <0>claude</0> चलाएँ और OpenKnowledge को एक बार स्वीकृत करें।"],"HZ7fEu": ["थीम का नाम"],"HbcQYf": [["display"], " पर मौजूद सिमलिंक को स्किल की एक स्वतंत्र प्रति से बदलें? और कुछ नहीं हिलता।"],+ "HdS4Ft": ["आपका पिछला खुला दस्तावेज़ पुनर्स्थापित नहीं किया जा सका।"],"HdkSiO": ["नई फ़ाइल"],"HepFJQ": ["आपकी रिपोर्ट इस कंप्यूटर पर सहेजी गई है, इसलिए कुछ भी नहीं खोया। आप इसके बजाय हमें ईमेल कर सकते हैं।"diff --git a/packages/app/src/locales/hi/messages.po b/packages/app/src/locales/hi/messages.poindex 044f271c7..2bce303c1 100644--- a/packages/app/src/locales/hi/messages.po+++ b/packages/app/src/locales/hi/messages.po@@ -12645,6 +12645,10 @@ msgstr "टर्मिनल अप्रत्याशित रूप सेmsgid "The token needs the repo and read:user scopes."msgstr "टोकन को repo और read:user स्कोप चाहिए।"+#: src/lib/tab-session-restore-recovery-notice.ts+msgid "The workspace opened without it so the app could start."+msgstr "ऐप शुरू हो सके इसलिए कार्यक्षेत्र उसके बिना खुला।"+#: src/components/settings/settings-fields.tsmsgid "Theme"msgstr "थीम"@@ -14269,6 +14273,10 @@ msgstr "आपके GitHub टोकन में आवश्यक स्कmsgid "Your knowledge base is now on GitHub at <0>{ownerLogin}/{repoName}</0>."msgstr "आपका ज्ञान आधार अब GitHub पर <0>{ownerLogin}/{repoName}</0> पर है।"+#: src/lib/tab-session-restore-recovery-notice.ts+msgid "Your last open document couldn't be restored."+msgstr "आपका पिछला खुला दस्तावेज़ पुनर्स्थापित नहीं किया जा सका।"+#: src/components/share-receive-miss-content.tsxmsgid "Your local copy is behind."msgstr "आपकी स्थानीय प्रति पीछे है।"diff --git a/packages/app/src/locales/id/messages.json b/packages/app/src/locales/id/messages.jsonindex 42c8137ff..fb4e8d50f 100644--- a/packages/app/src/locales/id/messages.json+++ b/packages/app/src/locales/id/messages.json@@ -768,6 +768,7 @@"ANFxWn": ["Tema ini tidak dapat dihapus. Muat ulang lalu coba lagi."],"APNlbk": ["keluar ", ["0"]],"AQ-Lfg": ["Templat tidak bisa dimuat"],+ "AR4s_6": ["Ruang kerja terbuka tanpanya agar aplikasi dapat dimulai."],"ASqqsQ": ["Maksimal ", ["MAX_ATTACHMENTS"], " lampiran"],"AT0e50": ["Simpan keduanya"],"ATGYL1": ["Alamat surel"],@@ -1296,6 +1297,7 @@["display"]," dengan salinan mandiri keterampilan ini? Tidak ada hal lain yang berpindah."],+ "HdS4Ft": ["Dokumen terakhir yang Anda buka tidak dapat dipulihkan."],"HdkSiO": ["Berkas baru"],"HepFJQ": ["Laporan Anda tersimpan di komputer ini, jadi tidak ada yang hilang. Anda dapat mengirimkannya kepada kami lewat email."diff --git a/packages/app/src/locales/id/messages.po b/packages/app/src/locales/id/messages.poindex 270deffd6..99a78a5bb 100644--- a/packages/app/src/locales/id/messages.po+++ b/packages/app/src/locales/id/messages.po@@ -12645,6 +12645,10 @@ msgstr "Terminal berhenti tak terduga."msgid "The token needs the repo and read:user scopes."msgstr "Token itu memerlukan cakupan repo dan read:user."+#: src/lib/tab-session-restore-recovery-notice.ts+msgid "The workspace opened without it so the app could start."+msgstr "Ruang kerja terbuka tanpanya agar aplikasi dapat dimulai."+#: src/components/settings/settings-fields.tsmsgid "Theme"msgstr "Tema"@@ -14269,6 +14273,10 @@ msgstr "Token GitHub Anda kehilangan cakupan yang wajib. Coba masuk lagi."msgid "Your knowledge base is now on GitHub at <0>{ownerLogin}/{repoName}</0>."msgstr "Basis pengetahuan Anda kini ada di GitHub di <0>{ownerLogin}/{repoName}</0>."+#: src/lib/tab-session-restore-recovery-notice.ts+msgid "Your last open document couldn't be restored."+msgstr "Dokumen terakhir yang Anda buka tidak dapat dipulihkan."+#: src/components/share-receive-miss-content.tsxmsgid "Your local copy is behind."msgstr "Salinan lokal Anda tertinggal."diff --git a/packages/app/src/locales/ko/messages.json b/packages/app/src/locales/ko/messages.jsonindex 8f58d60aa..cc258e5d7 100644--- a/packages/app/src/locales/ko/messages.json+++ b/packages/app/src/locales/ko/messages.json@@ -739,6 +739,7 @@"ANFxWn": ["이 테마를 삭제하지 못했습니다. 새로 고친 후 다시 시도합니다."],"APNlbk": ["exit ", ["0"]],"AQ-Lfg": ["템플릿을 불러오지 못했습니다"],+ "AR4s_6": ["앱을 시작할 수 있도록 해당 문서 없이 워크스페이스를 열었습니다."],"ASqqsQ": ["첨부 파일 최대 ", ["MAX_ATTACHMENTS"], "개"],"AT0e50": ["둘 다 유지"],"ATGYL1": ["이메일 주소"],@@ -1246,6 +1247,7 @@["display"],"의 심볼릭 링크를 스킬의 독립적인 복사본으로 바꿀까요? 다른 항목은 이동하지 않습니다."],+ "HdS4Ft": ["마지막으로 열려 있던 문서를 복원할 수 없습니다."],"HdkSiO": ["새 파일"],"HepFJQ": ["보고서가 이 컴퓨터에 저장되었으므로 아무것도 손실되지 않았습니다. 대신 이메일로 보낼 수 있습니다."diff --git a/packages/app/src/locales/ko/messages.po b/packages/app/src/locales/ko/messages.poindex e34b94ffc..9c1c5d387 100644--- a/packages/app/src/locales/ko/messages.po+++ b/packages/app/src/locales/ko/messages.po@@ -12649,6 +12649,10 @@ msgstr "터미널 예기치 않게 중지됨."msgid "The token needs the repo and read:user scopes."msgstr "토큰에 repo 및 read:user 범위가 필요합니다."+#: src/lib/tab-session-restore-recovery-notice.ts+msgid "The workspace opened without it so the app could start."+msgstr "앱을 시작할 수 있도록 해당 문서 없이 워크스페이스를 열었습니다."+#: src/components/settings/settings-fields.tsmsgid "Theme"msgstr "테마"@@ -14273,6 +14277,10 @@ msgstr "GitHub 토큰에 필요한 범위가 없습니다. 다시 로그인하msgid "Your knowledge base is now on GitHub at <0>{ownerLogin}/{repoName}</0>."msgstr "지식 베이스가 이제 GitHub의 <0>{ownerLogin}/{repoName}</0>에 있습니다."+#: src/lib/tab-session-restore-recovery-notice.ts+msgid "Your last open document couldn't be restored."+msgstr "마지막으로 열려 있던 문서를 복원할 수 없습니다."+#: src/components/share-receive-miss-content.tsxmsgid "Your local copy is behind."msgstr "로컬 사본이 뒤처져 있습니다."diff --git a/packages/app/src/locales/pseudo/messages.json b/packages/app/src/locales/pseudo/messages.jsonindex d1e362d7a..adf1f1066 100644--- a/packages/app/src/locales/pseudo/messages.json+++ b/packages/app/src/locales/pseudo/messages.json@@ -773,6 +773,7 @@"ANFxWn": ["Ćōũĺďń’ţ ďēĺēţē ţĥĩś ţĥēḿē. Ŕēƒŕēśĥ àńď ţŕŷ àĝàĩń."],"APNlbk": ["ēxĩţ ", ["0"]],"AQ-Lfg": ["Ćōũĺďń'ţ ĺōàď ţēḿƥĺàţēś"],+ "AR4s_6": ["Ţĥē ŵōŕķśƥàćē ōƥēńēď ŵĩţĥōũţ ĩţ śō ţĥē àƥƥ ćōũĺď śţàŕţ."],"ASqqsQ": ["Ḿàxĩḿũḿ ", ["MAX_ATTACHMENTS"], " àţţàćĥḿēńţś"],"AT0e50": ["Ķēēƥ ƀōţĥ"],"ATGYL1": ["Ēḿàĩĺ àďďŕēśś"],@@ -1296,6 +1297,7 @@["display"]," ŵĩţĥ àń ĩńďēƥēńďēńţ ćōƥŷ ōƒ ţĥē śķĩĺĺ? Ńōţĥĩńĝ ēĺśē ḿōvēś."],+ "HdS4Ft": ["Ŷōũŕ ĺàśţ ōƥēń ďōćũḿēńţ ćōũĺďń'ţ ƀē ŕēśţōŕēď."],"HdkSiO": ["Ńēŵ ƒĩĺē"],"HepFJQ": ["Ŷōũŕ ŕēƥōŕţ ĩś śàvēď ōń ţĥĩś ćōḿƥũţēŕ, śō ńōţĥĩńĝ ŵàś ĺōśţ. Ŷōũ ćàń ēḿàĩĺ ĩţ ţō ũś ĩńśţēàď."diff --git a/packages/app/src/locales/pseudo/messages.po b/packages/app/src/locales/pseudo/messages.poindex 220c77c17..18c138d5f 100644--- a/packages/app/src/locales/pseudo/messages.po+++ b/packages/app/src/locales/pseudo/messages.po@@ -12645,6 +12645,10 @@ msgstr ""msgid "The token needs the repo and read:user scopes."msgstr ""+#: src/lib/tab-session-restore-recovery-notice.ts+msgid "The workspace opened without it so the app could start."+msgstr ""+#: src/components/settings/settings-fields.tsmsgid "Theme"msgstr ""@@ -14269,6 +14273,10 @@ msgstr ""msgid "Your knowledge base is now on GitHub at <0>{ownerLogin}/{repoName}</0>."msgstr ""+#: src/lib/tab-session-restore-recovery-notice.ts+msgid "Your last open document couldn't be restored."+msgstr ""+#: src/components/share-receive-miss-content.tsxmsgid "Your local copy is behind."msgstr ""diff --git a/packages/app/src/locales/pt-BR/messages.json b/packages/app/src/locales/pt-BR/messages.jsonindex a7b553fff..cc63b2f01 100644--- a/packages/app/src/locales/pt-BR/messages.json+++ b/packages/app/src/locales/pt-BR/messages.json@@ -898,6 +898,7 @@"ANFxWn": ["Não foi possível excluir este tema. Atualize a página e tente novamente."],"APNlbk": ["saída ", ["0"]],"AQ-Lfg": ["Não foi possível carregar os modelos"],+ "AR4s_6": ["O espaço de trabalho abriu sem ele para que o aplicativo pudesse iniciar."],"ASqqsQ": ["No máximo ", ["MAX_ATTACHMENTS"], " anexos"],"AT0e50": ["Manter os dois"],"ATGYL1": ["Endereço de e-mail"],@@ -1495,6 +1496,7 @@["display"]," por uma cópia independente da habilidade? Nada mais se move."],+ "HdS4Ft": ["Não foi possível restaurar seu último documento aberto."],"HdkSiO": ["Novo arquivo"],"HepFJQ": ["Seu relatório está salvo neste computador, então nada foi perdido. Você pode nos enviar por e-mail."diff --git a/packages/app/src/locales/pt-BR/messages.po b/packages/app/src/locales/pt-BR/messages.poindex 0b07224ea..e8627d56d 100644--- a/packages/app/src/locales/pt-BR/messages.po+++ b/packages/app/src/locales/pt-BR/messages.po@@ -12645,6 +12645,10 @@ msgstr "O terminal parou de forma inesperada."msgid "The token needs the repo and read:user scopes."msgstr "O token precisa dos escopos repo e read:user."+#: src/lib/tab-session-restore-recovery-notice.ts+msgid "The workspace opened without it so the app could start."+msgstr "O espaço de trabalho abriu sem ele para que o aplicativo pudesse iniciar."+#: src/components/settings/settings-fields.tsmsgid "Theme"msgstr "Tema"@@ -14269,6 +14273,10 @@ msgstr "Faltam escopos obrigatórios no seu token do GitHub. Tente entrar de novmsgid "Your knowledge base is now on GitHub at <0>{ownerLogin}/{repoName}</0>."msgstr "Sua base de conhecimento já está no GitHub, em <0>{ownerLogin}/{repoName}</0>."+#: src/lib/tab-session-restore-recovery-notice.ts+msgid "Your last open document couldn't be restored."+msgstr "Não foi possível restaurar seu último documento aberto."+#: src/components/share-receive-miss-content.tsxmsgid "Your local copy is behind."msgstr "Sua cópia local está atrasada."diff --git a/packages/app/src/locales/ur/messages.json b/packages/app/src/locales/ur/messages.jsonindex f263a0791..e7feaef7f 100644--- a/packages/app/src/locales/ur/messages.json+++ b/packages/app/src/locales/ur/messages.json@@ -779,6 +779,7 @@"ANFxWn": ["یہ تھیم حذف نہیں کی جا سکی۔ تازہ کر کے دوبارہ کوشش کریں۔"],"APNlbk": [["0"], " سے باہر نکلیں"],"AQ-Lfg": ["ٹیمپلیٹس لوڈ نہیں ہو سکے"],+ "AR4s_6": ["ایپ شروع ہو سکے اس لیے ورک اسپیس اس کے بغیر کھلی۔"],"ASqqsQ": ["زیادہ سے زیادہ ", ["MAX_ATTACHMENTS"], " منسلکات"],"AT0e50": ["دونوں رکھیں"],"ATGYL1": ["ای میل پتہ"],@@ -1316,6 +1317,7 @@["display"]," پر موجود سِم لنک کو مہارت کی خودمختار نقل سے بدل دیا جائے؟ اور کچھ نہیں ہلتا۔"],+ "HdS4Ft": ["آپ کا آخری کھلا دستاویز بحال نہیں کیا جا سکا۔"],"HdkSiO": ["نئی فائل"],"HepFJQ": ["آپ کی رپورٹ اس کمپیوٹر پر محفوظ ہے، اس لیے کچھ ضائع نہیں ہوا۔ آپ اس کے بجائے ہمیں ای میل کر سکتے ہیں۔"diff --git a/packages/app/src/locales/ur/messages.po b/packages/app/src/locales/ur/messages.poindex b47670bd4..ee8ed9d5e 100644--- a/packages/app/src/locales/ur/messages.po+++ b/packages/app/src/locales/ur/messages.po@@ -12649,6 +12649,10 @@ msgstr "ٹرمینل غیر متوقع طور پر رک گیا۔"msgid "The token needs the repo and read:user scopes."msgstr "ٹوکن کو repo اور read:user دائرہ کار درکار ہیں۔"+#: src/lib/tab-session-restore-recovery-notice.ts+msgid "The workspace opened without it so the app could start."+msgstr "ایپ شروع ہو سکے اس لیے ورک اسپیس اس کے بغیر کھلی۔"+#: src/components/settings/settings-fields.tsmsgid "Theme"msgstr "تھیم"@@ -14273,6 +14277,10 @@ msgstr "آپ کے GitHub ٹوکن میں مطلوبہ دائرہ کار غائبmsgid "Your knowledge base is now on GitHub at <0>{ownerLogin}/{repoName}</0>."msgstr "آپ کا نالج بیس اب GitHub پر <0>{ownerLogin}/{repoName}</0> پر ہے۔"+#: src/lib/tab-session-restore-recovery-notice.ts+msgid "Your last open document couldn't be restored."+msgstr "آپ کا آخری کھلا دستاویز بحال نہیں کیا جا سکا۔"+#: src/components/share-receive-miss-content.tsxmsgid "Your local copy is behind."msgstr "آپ کی مقامی نقل پیچھے ہے۔"diff --git a/packages/app/src/locales/zh-Hans/messages.json b/packages/app/src/locales/zh-Hans/messages.jsonindex bdad28bbf..52e04ca03 100644--- a/packages/app/src/locales/zh-Hans/messages.json+++ b/packages/app/src/locales/zh-Hans/messages.json@@ -688,6 +688,7 @@"ANFxWn": ["无法删除此主题。请刷新后重试。"],"APNlbk": ["退出 ", ["0"]],"AQ-Lfg": ["无法加载模板"],+ "AR4s_6": ["工作区在不加载它的情况下打开,以便应用能够启动。"],"ASqqsQ": ["最多 ", ["MAX_ATTACHMENTS"], " 个附件"],"AT0e50": ["两个都保留"],"ATGYL1": ["邮箱地址"],@@ -1140,6 +1141,7 @@"HTW0Zw": ["还差一步:在这个项目中运行 <0>claude</0>,并批准 OpenKnowledge 一次。"],"HZ7fEu": ["主题名称"],"HbcQYf": ["要把 ", ["display"], " 处的符号链接替换为技能的独立副本吗?其他内容不会移动。"],+ "HdS4Ft": ["无法恢复你上次打开的文档。"],"HdkSiO": ["新建文件"],"HepFJQ": ["你的报告已保存在这台电脑上,因此没有丢失任何内容。你可以改为通过电子邮件发送给我们。"diff --git a/packages/app/src/locales/zh-Hans/messages.po b/packages/app/src/locales/zh-Hans/messages.poindex 9dcd0b20d..764d93045 100644--- a/packages/app/src/locales/zh-Hans/messages.po+++ b/packages/app/src/locales/zh-Hans/messages.po@@ -12649,6 +12649,10 @@ msgstr "终端意外停止了。"msgid "The token needs the repo and read:user scopes."msgstr "这个令牌需要 repo 和 read:user 权限范围。"+#: src/lib/tab-session-restore-recovery-notice.ts+msgid "The workspace opened without it so the app could start."+msgstr "工作区在不加载它的情况下打开,以便应用能够启动。"+#: src/components/settings/settings-fields.tsmsgid "Theme"msgstr "主题"@@ -14273,6 +14277,10 @@ msgstr "你的 GitHub 令牌缺少必需的权限范围。请尝试重新登录msgid "Your knowledge base is now on GitHub at <0>{ownerLogin}/{repoName}</0>."msgstr "你的知识库现在已经在 GitHub 上,地址是 <0>{ownerLogin}/{repoName}</0>。"+#: src/lib/tab-session-restore-recovery-notice.ts+msgid "Your last open document couldn't be restored."+msgstr "无法恢复你上次打开的文档。"+#: src/components/share-receive-miss-content.tsxmsgid "Your local copy is behind."msgstr "你的本地副本落后了。"diff --git a/packages/app/src/locales/zh-Hant/messages.json b/packages/app/src/locales/zh-Hant/messages.jsonindex 56b2c0cd9..6d77420b1 100644--- a/packages/app/src/locales/zh-Hant/messages.json+++ b/packages/app/src/locales/zh-Hant/messages.json@@ -690,6 +690,7 @@"ANFxWn": ["無法刪除這個主題。請重新整理後再試一次。"],"APNlbk": ["結束 ", ["0"]],"AQ-Lfg": ["無法載入範本"],+ "AR4s_6": ["工作區在不載入它的情況下開啟,讓應用程式能夠啟動。"],"ASqqsQ": ["最多 ", ["MAX_ATTACHMENTS"], " 個附件"],"AT0e50": ["兩個都保留"],"ATGYL1": ["電子郵件地址"],@@ -1152,6 +1153,7 @@"HTW0Zw": ["還差一步:在這個專案中執行 <0>claude</0>,並核准 OpenKnowledge 一次。"],"HZ7fEu": ["主題名稱"],"HbcQYf": ["要把 ", ["display"], " 處的符號連結換成技能的獨立副本嗎?其他東西都不會動。"],+ "HdS4Ft": ["無法還原你上次開啟的文件。"],"HdkSiO": ["新增檔案"],"HepFJQ": ["你的報告已儲存在這台電腦上,因此沒有遺失任何內容。你可以改用電子郵件寄給我們。"],"HfI1dR": ["我本機已經有了 →"],diff --git a/packages/app/src/locales/zh-Hant/messages.po b/packages/app/src/locales/zh-Hant/messages.poindex d86c3baeb..33d0bc427 100644--- a/packages/app/src/locales/zh-Hant/messages.po+++ b/packages/app/src/locales/zh-Hant/messages.po@@ -12649,6 +12649,10 @@ msgstr "終端機非預期地停止了。"msgid "The token needs the repo and read:user scopes."msgstr "這個權杖需要 repo 和 read:user 權限範圍。"+#: src/lib/tab-session-restore-recovery-notice.ts+msgid "The workspace opened without it so the app could start."+msgstr "工作區在不載入它的情況下開啟,讓應用程式能夠啟動。"+#: src/components/settings/settings-fields.tsmsgid "Theme"msgstr "主題"@@ -14273,6 +14277,10 @@ msgstr "你的 GitHub 權杖缺少必要的權限範圍。請試著重新登入msgid "Your knowledge base is now on GitHub at <0>{ownerLogin}/{repoName}</0>."msgstr "你的知識庫現在已經在 GitHub 上,位置是 <0>{ownerLogin}/{repoName}</0>。"+#: src/lib/tab-session-restore-recovery-notice.ts+msgid "Your last open document couldn't be restored."+msgstr "無法還原你上次開啟的文件。"+#: src/components/share-receive-miss-content.tsxmsgid "Your local copy is behind."msgstr "你的本機副本落後了。"