Beautiful, AI-native markdown IDE and LLM wiki
TypeScript 2nd-brainagent-skillsclaudecodexcompany-braindocsknowledge-knowledge-baseknowledge-managementllmllm-wikillm-wiki-karpathymarkdownmarkdown-editormdmdxnotespkmsecond-brainskills
fix(upload): explain why a dropped file failed to upload (PRD-7731) (#3139)
Andrew Mikofalvy65c1e7d3bf21
diff --git a/.changeset/upload-failure-diagnosis.md b/.changeset/upload-failure-diagnosis.mdnew file mode 100644index 000000000..e7672c8c5--- /dev/null+++ b/.changeset/upload-failure-diagnosis.md@@ -0,0 +1,7 @@+---+"@inkeep/open-knowledge": patch+---++Dropping a file into a document now explains why an upload failed instead of showing a bare "Upload failed" toast. When the dropped file's contents can no longer be read — it was moved, deleted, or had not finished downloading between the drop and the upload — the message names the file and says so, rather than implying a server problem. Genuine connectivity failures are now reported as such. The same distinction applies to uploads started from the property panel's file picker.++Both paths also record the file's name, type, size at drop time, size at send time, and the underlying error, so a failed upload leaves enough evidence in a diagnostic bundle to identify which file failed and why. Previously the entire record of a failure was `TypeError: Failed to fetch`, which is the same message the browser produces for an unreachable server, a denied read, and a vanished file alike — and because the request never leaves the app in these cases, nothing was recorded on the server either.diff --git a/packages/app/src/components/PageHeaderWidgets.tsx b/packages/app/src/components/PageHeaderWidgets.tsxindex cce9973aa..da2d69a32 100644--- a/packages/app/src/components/PageHeaderWidgets.tsx+++ b/packages/app/src/components/PageHeaderWidgets.tsx@@ -34,6 +34,7 @@ import type { CommonWidgetProps } from '@/components/PropertyWidgets';import { resolvePageCover, resolvePageIcon } from '@/components/page-header-utils';import { Button } from '@/components/ui/button';import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';+import { UploadFailedError } from '@/editor/image-upload/upload-failure';import { uploadFile } from '@/editor/image-upload/upload-file';import { cn } from '@/lib/utils';@@ -194,13 +195,11 @@ export function PageCoverWidget({ keyName, value, onCommit }: CommonWidgetProps<if (!mountedRef.current) return;// Map known error shapes to user-facing strings; raw `err.message`// can leak parser diagnostics ("Upload response is not JSON.") or- // stack-trace fragments that confuse end users. `TypeError` from a- // failed `fetch()` indicates a connectivity problem; everything- // else collapses into a generic retry hint.+ // stack-trace fragments that confuse end users. A classified failure+ // already carries a complete, translated sentence naming the file and+ // the cause; everything else collapses into a generic retry hint.const message =- err instanceof TypeError- ? t`Network error — check your connection and try again`- : t`Upload failed — please try again`;+ err instanceof UploadFailedError ? err.message : t`Upload failed — please try again`;setUploadError(message);setUploading(false);}diff --git a/packages/app/src/editor/components/PropPanel.tsx b/packages/app/src/editor/components/PropPanel.tsxindex 364cede07..2a44df3ed 100644--- a/packages/app/src/editor/components/PropPanel.tsx+++ b/packages/app/src/editor/components/PropPanel.tsx@@ -36,6 +36,7 @@ import { Switch } from '@/components/ui/switch';import { ColorPickerInput } from '@/editor/components/ColorPickerInput.tsx';import { IconPickerInput } from '@/editor/components/IconPickerInput.tsx';import { SrcAutocomplete } from '@/editor/components/SrcAutocomplete.tsx';+import { UploadFailedError } from '@/editor/image-upload/upload-failure.ts';import { uploadFile } from '@/editor/image-upload/upload-file.ts';import type { JsxComponentDescriptor } from '@/editor/registry/types.ts';import { getAutoFocusedPropName, humanizePropName } from '@/editor/utils/editor-strings.ts';@@ -123,6 +124,14 @@ async function runUpload(const { url } = await uploadFile(file, accept);onUploaded(url);} catch (err) {+ // A classified failure already carries a complete, translated sentence.+ // Prefixing it with "Upload failed:" would put the server-implying framing+ // back in front of a message whose whole point is that the file, not the+ // server, is the problem.+ if (err instanceof UploadFailedError) {+ toast.error(err.message);+ return;+ }const message = err instanceof Error ? err.message : String(err);toast.error(t`Upload failed: ${message}`);}diff --git a/packages/app/src/editor/image-upload/index.ts b/packages/app/src/editor/image-upload/index.tsindex 323d34345..94cc544a4 100644--- a/packages/app/src/editor/image-upload/index.ts+++ b/packages/app/src/editor/image-upload/index.ts@@ -20,6 +20,7 @@ import { toast } from 'sonner';import { getEditorDocName } from '../extensions/doc-context.ts';import { buildUnresolvedWikiLinkAttrs } from '../extensions/wiki-link-helpers.ts';import { HttpResponseParseError } from '../http-client.ts';+import { reportUploadFailure, type UploadFailureReport } from './upload-failure.ts';const uploadPluginKey = new PluginKey<UploadPluginState>('imageUpload');@@ -290,6 +291,9 @@ export async function uploadAndInsert(return;}const uploadId = crypto.randomUUID();+ // Sampled before any await: `File.size` re-stats the backing store, so once+ // that store is gone it reads 0 and the original size is unrecoverable.+ const sizeAtDrop = file.size;const skeletonWidget = createSkeletonWidget(file);editor.view.dispatch(@@ -309,8 +313,33 @@ export async function uploadAndInsert(try {res = await fetch('/api/upload', { method: 'POST', body: formData });} catch (networkError) {- console.error('[uploadAndInsert] Network error:', networkError);- showError(editor, uploadId);+ // `TypeError: Failed to fetch` on its own says nothing: the request never+ // left the renderer, so neither this log nor the server's access log can+ // say which file failed or why. Probe the file and record the shape of the+ // failure while the evidence is still in hand.+ //+ // Diagnosis must never become the reason the user is told nothing. If the+ // report itself fails, the skeleton still has to come down: it is the only+ // thing standing between a failed upload and a placeholder that never+ // resolves.+ let report: UploadFailureReport | undefined;+ try {+ report = await reportUploadFailure({ file, sizeAtDrop, error: networkError });+ } catch (reportError) {+ console.error('[uploadAndInsert] upload failed, and diagnosing it failed too', {+ docName: parentDocName,+ networkError,+ reportError,+ });+ }+ if (report) {+ console.error('[uploadAndInsert] upload failed before reaching the server', {+ ...report.log,+ docName: parentDocName,+ });+ }+ // Undefined falls back to the generic toast rather than showing nothing.+ showError(editor, uploadId, report?.message);return;}diff --git a/packages/app/src/editor/image-upload/upload-failure.test.ts b/packages/app/src/editor/image-upload/upload-failure.test.tsnew file mode 100644index 000000000..c3bdd3c0c--- /dev/null+++ b/packages/app/src/editor/image-upload/upload-failure.test.ts@@ -0,0 +1,152 @@+/**+ * Unit tests for the upload-failure probe, classifier and report.+ *+ * The vanished-backing-store case is modelled with a zero-length Blob and a+ * non-zero `sizeAtDrop`, which is exactly what Chromium presents once the file+ * behind a dropped `File` is gone: `size` reads 0 while the object itself stays+ * usable.+ */+import { describe, expect, test } from 'vitest';+import {+ classifyUploadFailure,+ probeFileReadable,+ reportUploadFailure,+ uploadFailureMessage,+} from './upload-failure.ts';++/** A Blob whose `arrayBuffer()` rejects — models a read denied by the OS. */+function unreadableBlob(size: number): Blob {+ const blob = new Blob(['x'.repeat(size)]);+ return Object.assign(blob, {+ slice: () =>+ Object.assign(new Blob(), {+ arrayBuffer: () => Promise.reject(new DOMException('denied', 'NotReadableError')),+ }),+ }) as unknown as Blob;+}++/** A Blob whose read never settles — models a stalled cloud materialization. */+function stalledBlob(size: number): Blob {+ const blob = new Blob(['x'.repeat(size)]);+ return Object.assign(blob, {+ slice: () =>+ Object.assign(new Blob(), {+ arrayBuffer: () => new Promise<ArrayBuffer>(() => {}),+ }),+ }) as unknown as Blob;+}++function fileOf(parts: BlobPart[], name: string, type = 'image/png'): File {+ return new File(parts, name, { type });+}++describe('probeFileReadable', () => {+ test('reports readable when the bytes are still there', async () => {+ const file = new Blob(['hello world']);+ const probe = await probeFileReadable(file, file.size);+ expect(probe.readable).toBe(true);+ expect(probe.bytesRead).toBe(1);+ });++ test('reports UNREADABLE when the backing store vanished (size collapsed to 0)', async () => {+ // The file was 788646 bytes at drop; its bytes are now gone.+ const probe = await probeFileReadable(new Blob([]), 788646);+ expect(probe.readable).toBe(false);+ expect(probe.bytesRead).toBe(0);+ });++ test('reports UNREADABLE when the read itself throws', async () => {+ const probe = await probeFileReadable(unreadableBlob(10), 10);+ expect(probe.readable).toBe(false);+ expect(probe.error).toContain('NotReadableError');+ });++ test('treats a genuinely empty file as readable', async () => {+ const probe = await probeFileReadable(new Blob([]), 0);+ expect(probe.readable).toBe(true);+ });++ test('bounds the read by the drop-time size, not the current size', async () => {+ // Guards the regression that made the first version of this probe useless:+ // slicing against the CURRENT size yields an empty buffer for a vanished+ // file and resolves successfully, reporting "readable".+ const vanished = await probeFileReadable(new Blob([]), 1024);+ const genuinelyEmpty = await probeFileReadable(new Blob([]), 0);+ expect(vanished.readable).toBe(false);+ expect(genuinelyEmpty.readable).toBe(true);+ });++ test('gives up on a read that never settles instead of hanging', async () => {+ // The probe sits in front of the error UI, so an unbounded read would+ // replace a wrong toast with no toast at all.+ const probe = await probeFileReadable(stalledBlob(1024), 1024, 20);+ expect(probe.timedOut).toBe(true);+ expect(probe.readable).toBe(false);+ });+});++describe('classifyUploadFailure', () => {+ test('an unreadable file classifies as file-unreadable', () => {+ expect(classifyUploadFailure({ readable: false, bytesRead: 0 })).toBe('file-unreadable');+ });++ test('a readable file classifies as network', () => {+ expect(classifyUploadFailure({ readable: true, bytesRead: 1 })).toBe('network');+ });++ test('a stalled read is not reported as a server problem', () => {+ expect(classifyUploadFailure({ readable: false, bytesRead: 0, timedOut: true })).toBe(+ 'file-unreadable',+ );+ });+});++describe('uploadFailureMessage', () => {+ test('the unreadable message names the file and does not blame the server', () => {+ const message = uploadFailureMessage('file-unreadable', 'shot.png');+ expect(message).toContain('shot.png');+ expect(message.toLowerCase()).not.toContain('server');+ });++ test('the network message names the file and points at the server', () => {+ const message = uploadFailureMessage('network', 'shot.png');+ expect(message).toContain('shot.png');+ expect(message.toLowerCase()).toContain('server');+ });++ test('the two kinds do not share copy', () => {+ expect(uploadFailureMessage('file-unreadable', 'a.png')).not.toBe(+ uploadFailureMessage('network', 'a.png'),+ );+ });+});++describe('reportUploadFailure', () => {+ test('a vanished file yields the unreadable kind, message and log', async () => {+ const report = await reportUploadFailure({+ file: fileOf([], 'shot.png'),+ sizeAtDrop: 788646,+ error: new TypeError('Failed to fetch'),+ });+ expect(report.kind).toBe('file-unreadable');+ expect(report.message).toContain('shot.png');+ expect(report.log).toMatchObject({+ kind: 'file-unreadable',+ name: 'shot.png',+ type: 'image/png',+ sizeAtDrop: 788646,+ sizeAtSend: 0,+ error: 'TypeError: Failed to fetch',+ });+ });++ test('a readable file yields the network kind', async () => {+ const report = await reportUploadFailure({+ file: fileOf(['hello'], 'ok.png'),+ sizeAtDrop: 5,+ error: new TypeError('Failed to fetch'),+ });+ expect(report.kind).toBe('network');+ expect(report.log).toMatchObject({ sizeAtDrop: 5, sizeAtSend: 5, bytesRead: 1 });+ });+});diff --git a/packages/app/src/editor/image-upload/upload-failure.ts b/packages/app/src/editor/image-upload/upload-failure.tsnew file mode 100644index 000000000..2e78d6386--- /dev/null+++ b/packages/app/src/editor/image-upload/upload-failure.ts@@ -0,0 +1,146 @@+/**+ * Classification for an upload that failed before the server saw it.+ *+ * `fetch` collapses every pre-network failure into an opaque+ * `TypeError: Failed to fetch`: a vanished backing file, an OS read denial and+ * an unreachable server are indistinguishable from the error alone. None of+ * them reach the server either, so there is no server-side record to correlate+ * against — the failure is invisible on both sides of the wire.+ *+ * The distinguishing fact is that Chromium materializes a `File`'s bytes+ * lazily, when it builds the request body. A file that was readable when the+ * user dropped it can therefore fail at send time, and once its backing store+ * is gone `File.size` reads 0 while the object itself stays usable.+ *+ * That last detail is why the probe takes `sizeAtDrop`. Bounding the read by+ * the file's CURRENT size cannot detect anything: for a vanished file+ * `slice(0, 1)` spans zero bytes, resolves to an empty buffer, and reports+ * success for precisely the case worth catching.+ */+import { t } from '@lingui/core/macro';++export type UploadFailureKind = 'file-unreadable' | 'network';++/**+ * Ceiling on the probe's read.+ *+ * The probe sits between a failed upload and the error UI, so it must not+ * become a second way for the user to be left waiting. A local read of one+ * byte is sub-millisecond; the case that can stall is a cloud placeholder+ * whose bytes the OS tries to materialize on demand, which is one of the+ * causes the user-facing copy names. The File API sets no deadline on a read,+ * so without this bound a stalled materialization would leave the upload+ * skeleton spinning forever and emit no log at all.+ */+const PROBE_TIMEOUT_MS = 1000;++export interface FileReadProbe {+ /** False when the bytes promised at drop time can no longer be read. */+ readable: boolean;+ /** Bytes the probe actually obtained. */+ bytesRead: number;+ /** Present only when the read threw, e.g. a `NotReadableError` denial. */+ error?: string;+ /** True when the read did not settle within `PROBE_TIMEOUT_MS`. */+ timedOut?: boolean;+}++/** Error thrown by `uploadFile`, carrying the classification for its callers. */+export class UploadFailedError extends Error {+ readonly kind: UploadFailureKind;++ constructor(message: string, kind: UploadFailureKind) {+ super(message);+ this.name = 'UploadFailedError';+ this.kind = kind;+ }+}++/**+ * Re-read the head of `file`, bounded both by the size observed when the user+ * handed it over and by a wall-clock deadline. Runs only on an already-failed+ * upload, so the cost is one byte on a path that is about to show an error.+ */+export async function probeFileReadable(+ file: Blob,+ sizeAtDrop: number,+ timeoutMs: number = PROBE_TIMEOUT_MS,+): Promise<FileReadProbe> {+ // A genuinely empty file has nothing to prove — reading zero bytes from it+ // succeeds and says nothing about the backing store either way.+ if (sizeAtDrop <= 0) return { readable: true, bytesRead: 0 };++ let timer: ReturnType<typeof setTimeout> | undefined;+ const deadline = new Promise<FileReadProbe>((resolve) => {+ timer = setTimeout(() => resolve({ readable: false, bytesRead: 0, timedOut: true }), timeoutMs);+ });+ const read = (async (): Promise<FileReadProbe> => {+ try {+ const head = await file.slice(0, 1).arrayBuffer();+ return { readable: head.byteLength === 1, bytesRead: head.byteLength };+ } catch (error) {+ return {+ readable: false,+ bytesRead: 0,+ error: error instanceof Error ? `${error.name}: ${error.message}` : String(error),+ };+ }+ })();++ try {+ return await Promise.race([read, deadline]);+ } finally {+ clearTimeout(timer);+ }+}++export function classifyUploadFailure(probe: FileReadProbe): UploadFailureKind {+ // A read that never answered is not evidence of a healthy file. Reporting it+ // as a server problem would send the user to the wrong place, and the+ // unreadable copy ("moved, deleted, or not finished downloading") describes a+ // stalled materialization accurately.+ return probe.readable ? 'network' : 'file-unreadable';+}++export function uploadFailureMessage(kind: UploadFailureKind, fileName: string): string {+ return kind === 'file-unreadable'+ ? t`Couldn't read ${fileName}. It may have been moved, deleted, or not finished downloading. Try adding it again.`+ : t`Couldn't reach the Open Knowledge server to upload ${fileName}.`;+}++export interface UploadFailureReport {+ kind: UploadFailureKind;+ /** Translated, user-facing sentence for `kind`. */+ message: string;+ /** Structured record for the diagnostics bundle. */+ log: Record<string, unknown>;+}++/**+ * Single decision point for a failed upload, shared by the editor drop path and+ * the file pickers so both classify, phrase and log identically.+ */+export async function reportUploadFailure(input: {+ file: File;+ sizeAtDrop: number;+ error: unknown;+}): Promise<UploadFailureReport> {+ const { file, sizeAtDrop, error } = input;+ const probe = await probeFileReadable(file, sizeAtDrop);+ const kind = classifyUploadFailure(probe);+ return {+ kind,+ message: uploadFailureMessage(kind, file.name),+ log: {+ kind,+ name: file.name,+ type: file.type,+ sizeAtDrop,+ sizeAtSend: file.size,+ bytesRead: probe.bytesRead,+ readError: probe.error,+ readTimedOut: probe.timedOut,+ error: error instanceof Error ? `${error.name}: ${error.message}` : String(error),+ },+ };+}diff --git a/packages/app/src/editor/image-upload/upload-file.test.ts b/packages/app/src/editor/image-upload/upload-file.test.tsindex f676f121f..f8f7adf85 100644--- a/packages/app/src/editor/image-upload/upload-file.test.ts+++ b/packages/app/src/editor/image-upload/upload-file.test.ts@@ -7,6 +7,7 @@* proved flaky on Linux Bun. DI tests are platform-stable.*/import { describe, expect, test } from 'vitest';+import { UploadFailedError } from './upload-failure.ts';import { uploadFile } from './upload-file.ts';interface FetchCall {@@ -178,9 +179,37 @@ describe('uploadFile', () => {});const file = new File(['x'], 'x.png', { type: 'image/png' });+ // The file is readable, so the failure is genuinely the transport.await expect(uploadFile(file, ['image/png'], { fetch, docName: TEST_DOC_NAME }),- ).rejects.toThrow(/Upload failed.*connection refused/);+ ).rejects.toMatchObject({ name: 'UploadFailedError', kind: 'network' });+ });++ test('a network failure on an unreadable file is reported as the file, not the server', async () => {+ // Drives the classification through the public entry point: with the+ // classification removed this test fails, where a readable-file test would+ // still pass.+ const { fetch } = captureFetch(() => {+ throw new TypeError('Failed to fetch');+ });+ const file = new File(['xxxxx'], 'shot.png', { type: 'image/png' });+ // Model an OS read denial on bytes that were present when the file was+ // picked: the upload fails, and re-reading the head then fails too.+ Object.defineProperty(file, 'slice', {+ value: () => ({+ arrayBuffer: () => Promise.reject(new DOMException('denied', 'NotReadableError')),+ }),+ });++ const err = await uploadFile(file, ['image/png'], {+ fetch,+ docName: TEST_DOC_NAME,+ }).catch((e: unknown) => e);++ expect(err).toBeInstanceOf(UploadFailedError);+ expect((err as UploadFailedError).kind).toBe('file-unreadable');+ expect((err as Error).message).toContain('shot.png');+ expect((err as Error).message).not.toMatch(/upload failed/i);});test('throws when no document is open', async () => {diff --git a/packages/app/src/editor/image-upload/upload-file.ts b/packages/app/src/editor/image-upload/upload-file.tsindex 74f206bd8..22805469e 100644--- a/packages/app/src/editor/image-upload/upload-file.ts+++ b/packages/app/src/editor/image-upload/upload-file.ts@@ -11,6 +11,11 @@import { ProblemDetailsSchema, UploadAssetSuccessSchema } from '@inkeep/open-knowledge-core';import { HttpResponseParseError } from '../http-client.ts';import { getCurrentDocName } from './current-doc-name.ts';+import {+ reportUploadFailure,+ UploadFailedError,+ type UploadFailureReport,+} from './upload-failure.ts';interface UploadFileResult {url: string;@@ -41,6 +46,9 @@ export async function uploadFile(deps: UploadFileDeps = {},): Promise<UploadFileResult> {const fetchImpl = deps.fetch ?? globalThis.fetch;+ // Sampled before any await: `File.size` re-stats the backing store, so once+ // that store is gone it reads 0 and the original size is unrecoverable.+ const sizeAtPick = file.size;const docName = deps.docName !== undefined ? deps.docName : getCurrentDocName();if (!docName) {@@ -61,8 +69,40 @@ export async function uploadFile(try {res = await fetchImpl(UPLOAD_ENDPOINT, { method: 'POST', body: formData });} catch (networkError) {- const message = networkError instanceof Error ? networkError.message : String(networkError);- throw new Error(`Upload failed: ${message}`);+ // The request never left the renderer, so nothing about this failure is+ // recorded server-side. Probe the file before reporting, so the thrown+ // error names a cause the user can act on rather than the opaque+ // `Failed to fetch` that covers every pre-network failure alike.+ //+ // The classification rides on the error rather than the message: callers+ // render their own translated copy, so wrapping this message in another+ // caller's "Upload failed:" prefix would reintroduce exactly the+ // server-implying framing this reporting exists to remove.+ //+ // Diagnosis must never become the reason the caller is told nothing: if the+ // report itself fails, degrade to the raw error rather than replacing a+ // failed upload with an uncharacterized rejection.+ let report: UploadFailureReport | undefined;+ try {+ report = await reportUploadFailure({ file, sizeAtDrop: sizeAtPick, error: networkError });+ } catch (reportError) {+ console.error('[uploadFile] upload failed, and diagnosing it failed too', {+ docName,+ networkError,+ reportError,+ });+ }+ if (!report) {+ // Bare message, like the sibling throws in this file: callers supply+ // their own framing, and prefixing here renders as "Upload failed:+ // Upload failed: ..." once the property panel wraps it.+ throw new Error(networkError instanceof Error ? networkError.message : String(networkError));+ }+ console.error('[uploadFile] upload failed before reaching the server', {+ ...report.log,+ docName,+ });+ throw new UploadFailedError(report.message, report.kind);}let rawBody: unknown;diff --git a/packages/app/src/locales/en/messages.json b/packages/app/src/locales/en/messages.jsonindex 03e7487ac..71dbc51ce 100644--- a/packages/app/src/locales/en/messages.json+++ b/packages/app/src/locales/en/messages.json@@ -177,7 +177,6 @@"2IYGkU": ["This doc has unpushed changes. Recipients will see the last pushed version."],"2M0JF6": ["Auto-update"],"2QM24L": ["All tags"],- "2RBzMG": ["Network error — check your connection and try again"],"2Snes1": ["This sends the link's address off your machine"],"2UgoBZ": ["gone"],"2XQ8Ww": ["Open preview when agent edits"],@@ -1076,6 +1075,7 @@"H-hzll": ["Please choose Good or Not great."],"H-vDm3": ["Relaunching to install the update…"],"H08D2X": ["Open a single markdown file in a temporary session, without project setup."],+ "H0VUMo": ["Couldn't reach the Open Knowledge server to upload ", ["fileName"], "."],"H0WlWQ": ["Grid of rows and columns with a header row."],"H1TmTu": ["Stopped fixing. Files already fixed stay fixed."],"H3oH0g": ["Redo"],@@ -2074,6 +2074,11 @@["behind", "plural", { "one": ["#", " commit behind"], "other": ["#", " commits behind"] }]],"YwPUUP": ["This pack is already set up here."],+ "YxZDGh": [+ "Couldn't read ",+ ["fileName"],+ ". It may have been moved, deleted, or not finished downloading. Try adding it again."+ ],"Yy90sM": ["Skill \"", ["name"], "\" created"],"YyXtnN": ["Underline"],"Yzs3QX": ["More skill actions"],diff --git a/packages/app/src/locales/en/messages.po b/packages/app/src/locales/en/messages.poindex 45b9ce69e..f5b547353 100644--- a/packages/app/src/locales/en/messages.po+++ b/packages/app/src/locales/en/messages.po@@ -3089,6 +3089,14 @@ msgstr "Couldn't reach the embeddings provider — retry"msgid "Couldn't reach the endpoint. Check the URL and that the server is up."msgstr "Couldn't reach the endpoint. Check the URL and that the server is up."+#: src/editor/image-upload/upload-failure.ts+msgid "Couldn't reach the Open Knowledge server to upload {fileName}."+msgstr "Couldn't reach the Open Knowledge server to upload {fileName}."++#: src/editor/image-upload/upload-failure.ts+msgid "Couldn't read {fileName}. It may have been moved, deleted, or not finished downloading. Try adding it again."+msgstr "Couldn't read {fileName}. It may have been moved, deleted, or not finished downloading. Try adding it again."+#: src/comments/store.tsmsgid "Couldn't read the queued comments — nothing was sent."msgstr "Couldn't read the queued comments — nothing was sent."@@ -6621,10 +6629,6 @@ msgstr "Nested fields"msgid "Network error - {kind} \"{createdPath}\" still exists on disk"msgstr "Network error - {kind} \"{createdPath}\" still exists on disk"-#: src/components/PageHeaderWidgets.tsx-msgid "Network error — check your connection and try again"-msgstr "Network error — check your connection and try again"-#: src/components/EditorTabs.tsx#: src/components/FileTree.tsx#: src/components/NewItemDialog.tsxdiff --git a/packages/app/src/locales/pseudo/messages.json b/packages/app/src/locales/pseudo/messages.jsonindex db7d78715..6bd7e65bc 100644--- a/packages/app/src/locales/pseudo/messages.json+++ b/packages/app/src/locales/pseudo/messages.json@@ -177,7 +177,6 @@"2IYGkU": ["Ţĥĩś ďōć ĥàś ũńƥũśĥēď ćĥàńĝēś. Ŕēćĩƥĩēńţś ŵĩĺĺ śēē ţĥē ĺàśţ ƥũśĥēď vēŕśĩōń."],"2M0JF6": ["Àũţō-ũƥďàţē"],"2QM24L": ["Àĺĺ ţàĝś"],- "2RBzMG": ["Ńēţŵōŕķ ēŕŕōŕ — ćĥēćķ ŷōũŕ ćōńńēćţĩōń àńď ţŕŷ àĝàĩń"],"2Snes1": ["Ţĥĩś śēńďś ţĥē ĺĩńķ'ś àďďŕēśś ōƒƒ ŷōũŕ ḿàćĥĩńē"],"2UgoBZ": ["ĝōńē"],"2XQ8Ww": ["Ōƥēń ƥŕēvĩēŵ ŵĥēń àĝēńţ ēďĩţś"],@@ -1076,6 +1075,7 @@"H-hzll": ["Ƥĺēàśē ćĥōōśē Ĝōōď ōŕ Ńōţ ĝŕēàţ."],"H-vDm3": ["Ŕēĺàũńćĥĩńĝ ţō ĩńśţàĺĺ ţĥē ũƥďàţē…"],"H08D2X": ["Ōƥēń à śĩńĝĺē ḿàŕķďōŵń ƒĩĺē ĩń à ţēḿƥōŕàŕŷ śēśśĩōń, ŵĩţĥōũţ ƥŕōĴēćţ śēţũƥ."],+ "H0VUMo": ["Ćōũĺďń'ţ ŕēàćĥ ţĥē Ōƥēń Ķńōŵĺēďĝē śēŕvēŕ ţō ũƥĺōàď ", ["fileName"], "."],"H0WlWQ": ["Ĝŕĩď ōƒ ŕōŵś àńď ćōĺũḿńś ŵĩţĥ à ĥēàďēŕ ŕōŵ."],"H1TmTu": ["Śţōƥƥēď ƒĩxĩńĝ. Ƒĩĺēś àĺŕēàďŷ ƒĩxēď śţàŷ ƒĩxēď."],"H3oH0g": ["Ŕēďō"],@@ -2074,6 +2074,11 @@["behind", "plural", { "one": ["#", " ćōḿḿĩţ ƀēĥĩńď"], "other": ["#", " ćōḿḿĩţś ƀēĥĩńď"] }]],"YwPUUP": ["Ţĥĩś ƥàćķ ĩś àĺŕēàďŷ śēţ ũƥ ĥēŕē."],+ "YxZDGh": [+ "Ćōũĺďń'ţ ŕēàď ",+ ["fileName"],+ ". Ĩţ ḿàŷ ĥàvē ƀēēń ḿōvēď, ďēĺēţēď, ōŕ ńōţ ƒĩńĩśĥēď ďōŵńĺōàďĩńĝ. Ţŕŷ àďďĩńĝ ĩţ àĝàĩń."+ ],"Yy90sM": ["Śķĩĺĺ \"", ["name"], "\" ćŕēàţēď"],"YyXtnN": ["Ũńďēŕĺĩńē"],"Yzs3QX": ["Ḿōŕē śķĩĺĺ àćţĩōńś"],diff --git a/packages/app/src/locales/pseudo/messages.po b/packages/app/src/locales/pseudo/messages.poindex cb12df2b7..94ee9990a 100644--- a/packages/app/src/locales/pseudo/messages.po+++ b/packages/app/src/locales/pseudo/messages.po@@ -3085,6 +3085,14 @@ msgstr ""msgid "Couldn't reach the endpoint. Check the URL and that the server is up."msgstr ""+#: src/editor/image-upload/upload-failure.ts+msgid "Couldn't reach the Open Knowledge server to upload {fileName}."+msgstr ""++#: src/editor/image-upload/upload-failure.ts+msgid "Couldn't read {fileName}. It may have been moved, deleted, or not finished downloading. Try adding it again."+msgstr ""+#: src/comments/store.tsmsgid "Couldn't read the queued comments — nothing was sent."msgstr ""@@ -6617,10 +6625,6 @@ msgstr ""msgid "Network error - {kind} \"{createdPath}\" still exists on disk"msgstr ""-#: src/components/PageHeaderWidgets.tsx-msgid "Network error — check your connection and try again"-msgstr ""-#: src/components/EditorTabs.tsx#: src/components/FileTree.tsx#: src/components/NewItemDialog.tsx