diff --git a/src/renderer/src/components/editor/EditorFileLoadErrorView.tsx b/src/renderer/src/components/editor/EditorFileLoadErrorView.tsx index 0ab91c5ebe5..361e869d4ad 100644 --- a/src/renderer/src/components/editor/EditorFileLoadErrorView.tsx +++ b/src/renderer/src/components/editor/EditorFileLoadErrorView.tsx @@ -10,7 +10,7 @@ function localizeFileLoadError(message: string, code: string | undefined): strin if (code === WORKTREE_HOST_UNRESOLVED_CODE) { return translate( 'editor.fileLoad.hostUnresolved', - "The host couldn't find this file's workspace. It may have been removed, or the host may still be scanning. Retry, or close the tab." + "The host couldn't find this file's workspace. It may have been removed, or the host may not know about it yet. Retry, or close this tab from the tab strip." ) } return message diff --git a/src/renderer/src/components/editor/editor-panel-content-types.ts b/src/renderer/src/components/editor/editor-panel-content-types.ts index e4e20cab05a..e9d2b02916b 100644 --- a/src/renderer/src/components/editor/editor-panel-content-types.ts +++ b/src/renderer/src/components/editor/editor-panel-content-types.ts @@ -21,25 +21,30 @@ export const WORKTREE_OWNER_UNREACHABLE_ERROR = /** * Machine code the runtime host returns when its worktree resolver cannot place * the file's workspace. It is UNKNOWN, not absence: the same code covers a deleted - * worktree and a cold or failing scan (see remote-browser-stream-errors.ts), and - * the file-read path has no definitive "gone" answer. The retry gate bounds it, - * then swaps in the terminal message below — never an automatic close (#21041). + * git worktree, a cold or failing scan (see remote-browser-stream-errors.ts), and + * a synchronous miss for an unregistered folder-workspace id or removed repo. For + * git worktrees the file-read path has no definitive "gone" answer; the codes that + * are definitive (`folder_workspace_path_missing:`, + * `worktree_execution_host_unresolved`) are not classified here yet and still land + * on their raw text. The retry gate bounds this one, then swaps in the terminal + * message below — never an automatic close (#21041). */ export const WORKTREE_HOST_SELECTOR_NOT_FOUND_CODE = 'selector_not_found' /** * Client-side sentinel stored on `loadErrorCode` once the selector-not-found retry - * budget is spent. The comparison key is deliberately not the display text, so - * localizing the message can never break the terminal-state check. Truthful about - * what is known (the host could not resolve the workspace) and what is not (whether - * it still exists); Retry starts a fresh budget, Close is the user's call so an - * unsaved draft is never discarded on the host's behalf (#21041). + * budget is spent. Namespaced `editor_` so it cannot be confused with the CLI's + * `worktree_host_unresolved` client error. The comparison key is deliberately not + * the display text, so localizing the message can never break the terminal-state + * check. Truthful about what is known (the host could not resolve the workspace) + * and what is not (whether it still exists); Retry starts a fresh budget, and the + * only close path is the tab strip's own, so nothing here discards a draft (#21041). */ -export const WORKTREE_HOST_UNRESOLVED_CODE = 'worktree_host_unresolved' +export const WORKTREE_HOST_UNRESOLVED_CODE = 'editor_host_workspace_unresolved' /** English fallback for `loadError` alongside the code above; the error view localizes it by code. */ export const WORKTREE_HOST_UNRESOLVED_ERROR = - "The host couldn't find this file's workspace. It may have been removed, or the host may still be scanning. Retry, or close the tab." + "The host couldn't find this file's workspace. It may have been removed, or the host may not know about it yet. Retry, or close this tab from the tab strip." export type FileContent = { content: string diff --git a/src/renderer/src/i18n/locales/en.json b/src/renderer/src/i18n/locales/en.json index 6292a9f74f8..cab25284cc7 100644 --- a/src/renderer/src/i18n/locales/en.json +++ b/src/renderer/src/i18n/locales/en.json @@ -120,7 +120,7 @@ "openAnyway": "Open anyway" }, "fileLoad": { - "hostUnresolved": "The host couldn't find this file's workspace. It may have been removed, or the host may still be scanning. Retry, or close the tab." + "hostUnresolved": "The host couldn't find this file's workspace. It may have been removed, or the host may not know about it yet. Retry, or close this tab from the tab strip." } }, "githubChecks": {