Beautiful, AI-native markdown IDE and LLM wiki
TypeScript 2nd-brainagent-skillsclaudecodexcompany-braindocsknowledge-knowledge-baseknowledge-managementllmllm-wikillm-wiki-karpathymarkdownmarkdown-editormdmdxnotespkmsecond-brainskills
feat(ok): Excalidraw embeds in documents + rename doc-class fix (#3975)
Abrahameb66bbc21850
diff --git a/.changeset/excalidraw-embed-and-rename-class.md b/.changeset/excalidraw-embed-and-rename-class.mdnew file mode 100644index 000000000..73eb82b5f--- /dev/null+++ b/.changeset/excalidraw-embed-and-rename-class.md@@ -0,0 +1,7 @@+---+"@inkeep/open-knowledge": minor+---++Embed an Excalidraw board in a document.++A new `<Excalidraw src="board.excalidraw" />` block embeds a board by reference: it renders a live snapshot of the scene (dark-mode aware) that follows edits made on the board without a reload, expands to a full-screen viewer with pan and zoom from the block's chrome, and carries a control that opens the board's own collaborative canvas editor. The scene JSON stays in the `.excalidraw` file — nothing bulky lands in the document source. The block sits in the slash menu's Embeds group.diff --git a/.changeset/rename-doc-class-skeleton.md b/.changeset/rename-doc-class-skeleton.mdnew file mode 100644index 000000000..8266d4b65--- /dev/null+++ b/.changeset/rename-doc-class-skeleton.md@@ -0,0 +1,5 @@+---+"@inkeep/open-knowledge": patch+---++Renaming an open document to a different kind — `.excalidraw`, `.mmd`, or a plain text extension — now drops straight to the new surface's loading skeleton instead of flashing the old markdown text while the new editor loads.diff --git a/docs/content/reference/components/excalidraw.mdx b/docs/content/reference/components/excalidraw.mdxnew file mode 100644index 000000000..e891cf097--- /dev/null+++ b/docs/content/reference/components/excalidraw.mdx@@ -0,0 +1,34 @@+---+title: "Excalidraw"+description: "Embedded snapshot of an `.excalidraw` board, linking to its canvas editor"+keywords: "excalidraw, board, whiteboard, sketch, drawing, canvas"+---++## Example++```mdx+<Excalidraw src="diagrams/board.excalidraw" title="Title" />+```++## Props++<TypeTable+ type={{+ "src": {+ description: "Path to the \\`.excalidraw\\` board this embed renders",+ type: "string",+ required: true,+ },+ "title": {+ description: "Accessible label for the embedded board",+ type: "string",+ required: false,+ },+}}+/>++_Also matches:_ `excalidraw`, `board`, `whiteboard`, `sketch`, `drawing`, `canvas`++## Author it++Type `/excalidraw` in the editor to insert it from the slash menu, or write the tag directly in source mode. The Properties panel on the right of the editor exposes every prop above as a form field once the block is selected.diff --git a/docs/content/reference/components/index.mdx b/docs/content/reference/components/index.mdxindex 8e76facbc..a2547f41c 100644--- a/docs/content/reference/components/index.mdx+++ b/docs/content/reference/components/index.mdx@@ -29,6 +29,7 @@ Every block on this page uses the same tag syntax in the raw markdown file:- [Pdf](/docs/reference/components/pdf) — embedded multi-page PDF viewer- [File](/docs/reference/components/file) — inline download row for arbitrary attachments- [Embed](/docs/reference/components/embed) — sandboxed iframe for external URLs+- [Excalidraw](/docs/reference/components/excalidraw) — live snapshot of an `.excalidraw` board, with a full-screen viewer and a jump to its canvas editor## Transclusiondiff --git a/docs/content/reference/components/meta.json b/docs/content/reference/components/meta.jsonindex 6ebd4003b..7b6f2c4de 100644--- a/docs/content/reference/components/meta.json+++ b/docs/content/reference/components/meta.json@@ -16,6 +16,7 @@"pdf","file","embed",+ "excalidraw","mirror"]}diff --git a/docs/scripts/generate-component-docs.ts b/docs/scripts/generate-component-docs.tsindex 2cac51b04..0ab82f740 100644--- a/docs/scripts/generate-component-docs.ts+++ b/docs/scripts/generate-component-docs.ts@@ -39,6 +39,7 @@ const PAGE_ORDER = ['Pdf','File','Embed',+ 'Excalidraw','Mirror',] as const;@@ -226,7 +227,7 @@ function renderExample(meta: (typeof builtInComponents)[number]): string {const defaultStr ='defaultValue' in p && p.defaultValue !== undefined? String(p.defaultValue)- : placeholderFor(p.name);+ : placeholderFor(p.name, meta.name);return `${p.name}="${defaultStr}"`;}).filter(Boolean)@@ -240,18 +241,32 @@ function renderExample(meta: (typeof builtInComponents)[number]): string {return `<${name}${attrPart} />`;}-function placeholderFor(propName: string): string {- const map: Record<string, string> = {- src: 'https://example.com/asset.png',- href: 'https://example.com',- alt: 'A short description',- title: 'Title',- formula: 'E = mc^2',- chart: 'graph LR; A --> B',- id: 'demo-1',- name: 'group-a',- };- return map[propName] ?? '…';+/**+ * Component-specific placeholder values, keyed `ComponentName.propName` —+ * same per-component override shape as `PREVIEWS` below. Consulted before+ * the generic per-prop-name map, for props whose sensible sample value+ * depends on which component they sit on (e.g. Excalidraw's `src` is a+ * board path, not an asset URL).+ */+const PLACEHOLDER_OVERRIDES: Partial<Record<string, string>> = {+ 'Excalidraw.src': 'diagrams/board.excalidraw',+};++const GENERIC_PLACEHOLDERS: Record<string, string> = {+ src: 'https://example.com/asset.png',+ href: 'https://example.com',+ alt: 'A short description',+ title: 'Title',+ formula: 'E = mc^2',+ chart: 'graph LR; A --> B',+ id: 'demo-1',+ name: 'group-a',+};++function placeholderFor(propName: string, componentName: string): string {+ return (+ PLACEHOLDER_OVERRIDES[`${componentName}.${propName}`] ?? GENERIC_PLACEHOLDERS[propName] ?? '…'+ );}/**diff --git a/packages/app/BUNDLE-SIZE.md b/packages/app/BUNDLE-SIZE.mdindex d33276122..e92e8d621 100644--- a/packages/app/BUNDLE-SIZE.md+++ b/packages/app/BUNDLE-SIZE.md@@ -74,3 +74,7 @@ Combined-chunks 4.85->4.95 MB for Korean (`ko`), the twelfth supported locale. ICombined-chunks 4.95->6.55 MB for the `.excalidraw` canvas doc editor (`@excalidraw/excalidraw@^0.18.1`, matched to Excalidraw's own file format via `serializeAsJSON` / `restore`). Weight is entirely on-demand: `ExcalidrawDocEditor` mounts through `EditorActivityPool` behind the existing `React.lazy` gate, and Excalidraw itself defers its scene renderer, mermaid-to-excalidraw importer, and rough.js / perfect-freehand stack into its own async chunks — the eager main bundle is unaffected (measured 421.2 kB against its 487 kB limit). The gzipped total across the added `chunk-EIO257PC-*.js` + `dist-*.js` + `ExcalidrawDocEditor-*.js` chunks measures 6.41 MB locally, ~1.46 MB above the prior 4.95 MB ceiling; 6.55 MB carries the addition with ~140 kB headroom for the local-to-CI variance recorded above. No smaller Excalidraw slice exists on npm (the package ships one entry with the scene renderer, roughjs, perfect-freehand, `@excalidraw/laser-pointer`, and `@excalidraw/mermaid-to-excalidraw` all wired together), and the workspace deliberately vendors the fonts to `packages/app/public/excalidraw-assets/` rather than accepting the upstream `esm.sh` CDN fallback (see `scripts/copy-excalidraw-assets.mjs`) — the vendored assets are static files under `public/`, not JS, so they do not count against this budget.Combined-chunks 6.55->6.56 MB for reload-safe terminal consent across config-epoch rebuilds. The gate retains the last fully synced project-local value so a live adopted PTY is not unmounted during the transient unsynced window, while an explicit opt-out remains closed. Exact CI measured 6,550,051 B, 51 B over the former ceiling; the eager main bundle remained at 438.61 kB against 487 kB because the terminal session surface is lazy. The 10 kB ratchet records the measured state-machine cost without changing the eager-load budget.++The `<Excalidraw src>` document embed adds a second reachability path into the same chunk: it lazy-imports `@excalidraw/excalidraw` on first embed mount, so the download now also fires when a markdown document containing the block renders — a passive document view, not just the explicit act of opening a `.excalidraw` doc. The bytes dedupe into the same chunk (byte-neutral for the budget); only *when* they arrive changed.++Combined-chunks 6.56->6.6 MB after the embed's review remediation landed CI at 6,550,489 B — 489 B over the pre-terminal-consent ceiling. The delta is small and diffuse (the embed's retry/provenance handling, the shared live-doc pool gates, and new error strings compiled into all 13 locale catalogs, which ship as JS chunks); the prior local measurement's assumed headroom did not survive the CI toolchain's chunking. 6.6 MB carries both measured additions (the embed's and the terminal-consent ratchet merged in from main) with ~49 kB of local-to-CI variance headroom rather than a ceiling calibrated to a single local run.diff --git a/packages/app/package.json b/packages/app/package.jsonindex f3a313f3f..815f222d0 100644--- a/packages/app/package.json+++ b/packages/app/package.json@@ -55,7 +55,7 @@{"name": "all JS chunks combined (gzipped)","path": "dist/assets/*.js",- "limit": "6.56 MB",+ "limit": "6.6 MB","gzip": true,"running": false},diff --git a/packages/app/src/components/EditorActivityPool.tsx b/packages/app/src/components/EditorActivityPool.tsxindex c54b738a2..04129a478 100644--- a/packages/app/src/components/EditorActivityPool.tsx+++ b/packages/app/src/components/EditorActivityPool.tsx@@ -38,6 +38,7 @@ import {isEditableTextDocFile,isExcalidrawDocFile,isManagedArtifactDocName,+ isMarkdownDocFile,isMermaidDocFile,parseTemplateContentDocName,randomUUID,@@ -243,8 +244,9 @@ export function computeEffectiveSourceMode(* Whether an Activity entry should render the create-mode "new doc" affordance* (empty draft that starts a page on first keystroke). A doc counts as new only* when it is genuinely absent from every surface a real doc registers under:- * the page index, managed artifacts, template content docs, and Mermaid /- * editable-text docs.+ * the page index, managed artifacts, and template content docs — and only+ * for the markdown doc class (`isMarkdownDocFile` rejects Mermaid /+ * Excalidraw / editable-text names).** Templates and project skills only enter the page list after the async `files`* refetch, so a purely `pages`-membership check would flash the create-mode@@ -263,9 +265,7 @@ export function computeIsNewDoc(args: {!pages.has(docName) &&!isManagedArtifactDocName(docName) &&parseTemplateContentDocName(docName) === null &&- !isMermaidDocFile(docName) &&- !isExcalidrawDocFile(docName) &&- !isEditableTextDocFile(docName)+ isMarkdownDocFile(docName));}@@ -1301,6 +1301,11 @@ function ActivityEntry({// Editable text docs (`.ts` / `.json` / `.txt` / …) — verbatim Y.Text docs// rendered by a dedicated CodeMirror editor (no markdown dual-editor).const isTextDoc = !isMermaid && !isExcalidraw && isEditableTextDocFile(entry.docName);+ // The doc-class half of this gate is the exact predicate the warm-snapshot+ // producer uses (`captureRenameSnapshots` in editor-cache.ts), so producer+ // and consumer classify docs identically. `isConflict` is this consumer's+ // own added concern — a runtime CRDT signal the producer cannot see.+ const isDualEditor = !isConflict && isMarkdownDocFile(entry.docName);// Per-Activity portal target for <EditorContent>. Stable DOM element// exclusively owned by THIS ActivityEntry — `useState` with a lazy// initializer ensures the same `HTMLDivElement` reference survives across@@ -1559,7 +1564,16 @@ function ActivityEntry({skeleton meets it trivially.*/}<Suspense- fallback={warmHtml ? <WarmContentFallback html={warmHtml} /> : <EditorSkeleton />}+ // The warm HTML snapshot is markdown-editor output; on a+ // doc-class branch it would render the pre-rename text over+ // a surface that is about to become a canvas or CodeMirror.+ fallback={+ warmHtml && isDualEditor ? (+ <WarmContentFallback html={warmHtml} />+ ) : (+ <EditorSkeleton />+ )+ }><DocumentBoundary docName={entry.docName} provider={entry.provider}>{isConflict ? (diff --git a/packages/app/src/components/EditorActivityPool.warm-skeleton.dom.test.tsx b/packages/app/src/components/EditorActivityPool.warm-skeleton.dom.test.tsxindex 50ceca095..96f7d9ee5 100644--- a/packages/app/src/components/EditorActivityPool.warm-skeleton.dom.test.tsx+++ b/packages/app/src/components/EditorActivityPool.warm-skeleton.dom.test.tsx@@ -19,6 +19,7 @@* Runs under `bun run test:dom` (jsdom substrate).*/+import { isMarkdownDocFile } from '@inkeep/open-knowledge-core';import { cleanup, render, screen } from '@testing-library/react';import { Suspense, useEffect, useLayoutEffect, useState } from 'react';import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';@@ -58,7 +59,12 @@ function WarmFallbackHost({ docName }: { docName: string }) {// Peek (no delete) — StrictMode dev double-invokes the lazy initializer; both// must return the same value to avoid flashing the warm fallback empty.const [warmSnapshot] = useState(() => peekRenameSnapshot(docName));- const warmHtml = warmSnapshot?.html ?? null;+ // Mirrors the warm-snapshot producer's `isMarkdownDocFile` gate+ // (`captureRenameSnapshots` in editor-cache.ts): warm markdown HTML only+ // renders over the markdown dual editor, never over a doc-class surface.+ // The consumer (ActivityEntry) additionally gates on conflict state, which+ // this replica does not model.+ const warmHtml = isMarkdownDocFile(docName) ? (warmSnapshot?.html ?? null) : null;// Mirrors ActivityEntry's useLayoutEffect — applies scrollTop to the active// editor scroll container. The DOM contract: gated to scrollTop > 0, finds@@ -88,6 +94,15 @@ function WarmFallbackHost({ docName }: { docName: string }) {const baseSnap = (html: string): RenameSnapshot => ({ html, scrollTop: 0, selection: null });+describe('doc-class gating (mirrors ActivityEntry isDualEditor)', () => {+ test('a snapshot stored under a non-markdown docName renders the cold skeleton', () => {+ storeRenameSnapshot('board.excalidraw', baseSnap('<p>stale markdown</p>'));+ render(<WarmFallbackHost docName="board.excalidraw" />);+ expect(screen.getByTestId('cold-skeleton')).not.toBeNull();+ expect(screen.queryByText('stale markdown')).toBeNull();+ });+});+// ---------------------------------------------------------------------------// Tests// ---------------------------------------------------------------------------diff --git a/packages/app/src/components/ExcalidrawDocEditor.tsx b/packages/app/src/components/ExcalidrawDocEditor.tsxindex 8aaf1101e..ea5411463 100644--- a/packages/app/src/components/ExcalidrawDocEditor.tsx+++ b/packages/app/src/components/ExcalidrawDocEditor.tsx@@ -22,27 +22,9 @@ import { useLingui } from '@lingui/react/macro';import { type ComponentProps, useEffect, useRef, useState } from 'react';import { replaceYText } from './MermaidDocEditor';-// Extend `Window` locally so setting `EXCALIDRAW_ASSET_PATH` doesn't require-// a global `any` cast (and doesn't leak Excalidraw's package-private symbol-// into every other consumer of `Window`).-declare global {- interface Window {- EXCALIDRAW_ASSET_PATH?: string;- }-}--// Point Excalidraw at the self-hosted asset tree vendored in via-// `scripts/copy-excalidraw-assets.mjs` (runs on `predev`/`prebuild`).-// Without this, the package falls back to its hardcoded-// `https://esm.sh/@excalidraw/excalidraw@<v>/dist/prod/` URL for every font-// file (`createUrls` in the published `chunk-K2UTITRG.js`) — a posture-// change for a local-first editor: offline users get system-font fallbacks,-// and every online render ships a request to a third-party CDN we do not-// otherwise depend on. Set at module load (before any Excalidraw component-// mounts) so the first canvas render already has the override in place.-if (typeof window !== 'undefined' && window.EXCALIDRAW_ASSET_PATH === undefined) {- window.EXCALIDRAW_ASSET_PATH = '/excalidraw-assets/';-}+// The `EXCALIDRAW_ASSET_PATH` pin lives in the shared side-effect module so+// the document embed's independent entry point carries it too.+import '@/lib/excalidraw-env';type ExcalidrawProps = ComponentProps<typeof Excalidraw>;type ExcalidrawImperativeAPI = Parameters<NonNullable<ExcalidrawProps['excalidrawAPI']>>[0];diff --git a/packages/app/src/editor/components/ExcalidrawEmbed.dom.test.tsx b/packages/app/src/editor/components/ExcalidrawEmbed.dom.test.tsxnew file mode 100644index 000000000..c983e52fc--- /dev/null+++ b/packages/app/src/editor/components/ExcalidrawEmbed.dom.test.tsx@@ -0,0 +1,520 @@+/**+ * RTL behavioral tests for the `<Excalidraw src="…" />` embed renderer.+ *+ * The Excalidraw module, the panzoom controller, and the live-doc pool are+ * all mocked at the module boundary, so the contract under test is the+ * live-text → parse → snapshot lifecycle, the error surface, the retry+ * affordance, the open-board affordance, and the expand lightbox. The+ * pool's own machinery (refcounts, admission gate, hard cap, watchdog) is+ * covered by `live-doc-pool.dom.test.tsx`; transport truth against a real+ * server is covered by `tests/integration/live-doc-pool.test.ts`.+ */++import * as actualLinguiMacro from '@lingui/react/macro';+import { act, cleanup, render, screen, waitFor, within } from '@testing-library/react';+import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';+import { renderLinguiTemplate } from '@/test-utils/lingui-mock';++const exportToSvg = vi.fn(async (_opts: Record<string, unknown>) =>+ document.createElementNS('http://www.w3.org/2000/svg', 'svg'),+);+const restore = vi.fn((data: unknown) => ({+ elements: (data as { elements?: unknown[] })?.elements ?? [],+ appState: {},+ files: {},+}));++vi.doMock('@excalidraw/excalidraw', () => ({ exportToSvg, restore }));++vi.doMock('@lingui/react/macro', () => ({+ ...actualLinguiMacro,+ Trans: ({ children }: { children: React.ReactNode }) => <>{children}</>,+ useLingui: () => ({ t: renderLinguiTemplate }),+}));++// The live subscription is the pool's contract (see the integration test+// named in the header); here it is a controllable input.+type LiveStatus =+ | { kind: 'loading' }+ | { kind: 'ready'; text: string }+ | { kind: 'empty' }+ | { kind: 'unreachable' }+ | { kind: 'at-capacity' };+let liveStatus: LiveStatus = { kind: 'loading' };+const useLiveDocText = vi.fn((_docName: string | null, _retryToken?: number) => liveStatus);+// LIVE_DOC_POOL_MAX rides along because the snapshot-url pool derives its+// cap from it at module load.+vi.doMock('./live-doc-pool.ts', () => ({ useLiveDocText, LIVE_DOC_POOL_MAX: 30 }));++const panzoomInstance = {+ zoomIn: vi.fn(),+ zoomOut: vi.fn(),+ pan: vi.fn(),+ reset: vi.fn(),+ destroy: vi.fn(),+ zoomWithWheel: vi.fn(),+ getScale: vi.fn(() => 1),+};+vi.doMock('@panzoom/panzoom', () => ({ default: vi.fn(() => panzoomInstance) }));++const { boardDocNameFromSrc, ExcalidrawEmbed } = await import('./ExcalidrawEmbed');+const { __resetSnapshotUrlPoolForTests } = await import('./snapshot-url-pool.ts');+const { TooltipProvider } = await import('@/components/ui/tooltip');++const BOARD_JSON = JSON.stringify({ elements: [{ id: 'a' }] });++let blobUrlCounter = 0;+const createObjectURL = vi.fn(() => `blob:mock-${++blobUrlCounter}`);+const revokeObjectURL = vi.fn();++function renderEmbed(props: Parameters<typeof ExcalidrawEmbed>[0]) {+ return render(+ <TooltipProvider>+ <ExcalidrawEmbed {...props} />+ </TooltipProvider>,+ );+}++function snapshotImg(): HTMLImageElement | null {+ return screen.queryByTestId('excalidraw-embed-snapshot')?.querySelector('img') ?? null;+}++describe('ExcalidrawEmbed', () => {+ beforeEach(() => {+ exportToSvg.mockClear();+ restore.mockClear();+ useLiveDocText.mockClear();+ createObjectURL.mockClear();+ revokeObjectURL.mockClear();+ // jsdom ships no object-URL implementation; the embed's blob-`<img>`+ // indirection needs one to exercise the snapshot path.+ URL.createObjectURL = createObjectURL;+ URL.revokeObjectURL = revokeObjectURL;+ // The shared URL pool is module state; orphans from earlier renders+ // must not accumulate toward its cap across tests.+ __resetSnapshotUrlPoolForTests();+ revokeObjectURL.mockClear();+ liveStatus = { kind: 'ready', text: BOARD_JSON };+ });+ afterEach(() => {+ document.documentElement.classList.remove('dark', 'light');+ cleanup();+ });++ test('subscribes to the board doc and mounts the snapshot as a blob-backed <img>', async () => {+ renderEmbed({ src: '/tests/board.excalidraw', title: 'Flow board' });++ await waitFor(() => expect(snapshotImg()).not.toBeNull());+ expect(useLiveDocText).toHaveBeenCalledWith('tests/board.excalidraw', 0);+ // The live scene reaches the exporter through `restore`'s repair pass,+ // and the export bakes in the deliberate options: transparent background+ // (card shows through, no white plate) and the light-mode default.+ expect(restore).toHaveBeenCalledWith(+ expect.objectContaining({ elements: [{ id: 'a' }] }),+ null,+ null,+ );+ expect(exportToSvg.mock.calls.at(-1)?.[0]?.appState).toMatchObject({+ exportBackground: false,+ exportWithDarkMode: false,+ });+ expect(screen.getByRole('img', { name: 'Flow board' })).not.toBeNull();+ // Containment: the exported SVG must NOT enter the live DOM — the+ // snapshot host holds only the image indirection.+ expect(snapshotImg()?.src).toMatch(/^blob:/);+ expect(screen.getByTestId('excalidraw-embed-snapshot').querySelector('svg')).toBeNull();+ });++ test('a theme toggle re-exports in place with dark mode, without re-parsing', async () => {+ renderEmbed({ src: '/tests/board.excalidraw' });+ await waitFor(() => expect(snapshotImg()).not.toBeNull());+ const exportsBefore = exportToSvg.mock.calls.length;+ const parsesBefore = restore.mock.calls.length;+ const firstUrl = snapshotImg()?.src;++ act(() => {+ document.documentElement.classList.add('dark');+ });++ await waitFor(() => expect(exportToSvg.mock.calls.length).toBe(exportsBefore + 1));+ expect(exportToSvg.mock.calls.at(-1)?.[0]?.appState).toMatchObject({+ exportWithDarkMode: true,+ });+ // The already-parsed scene is reused — a UI preference change must not+ // re-enter the parse path.+ expect(restore.mock.calls.length).toBe(parsesBefore);+ expect(snapshotImg()).not.toBeNull();+ // The replaced snapshot's blob URL is revoked once the new one commits+ // — a live collaborative session must not leak one URL per re-export.+ await waitFor(() => expect(revokeObjectURL).toHaveBeenCalledWith(firstUrl));+ });++ test('a live edit to the board re-exports the snapshot without a reload', async () => {+ const { rerender } = renderEmbed({ src: '/tests/board.excalidraw' });+ await waitFor(() => expect(snapshotImg()).not.toBeNull());+ const exportsBefore = exportToSvg.mock.calls.length;++ liveStatus = { kind: 'ready', text: JSON.stringify({ elements: [{ id: 'a' }, { id: 'b' }] }) };+ rerender(+ <TooltipProvider>+ <ExcalidrawEmbed src="/tests/board.excalidraw" />+ </TooltipProvider>,+ );++ await waitFor(() => expect(exportToSvg.mock.calls.length).toBeGreaterThan(exportsBefore));+ const scene = restore.mock.calls.at(-1)?.[0] as { elements?: unknown[] };+ expect(scene.elements?.length).toBe(2);+ });++ test('an unreachable board surfaces the banner with fixed copy and a working retry', async () => {+ liveStatus = { kind: 'unreachable' };+ renderEmbed({ src: '/tests/missing.excalidraw' });++ const alert = await screen.findByRole('alert');+ expect(alert.textContent).toContain('Excalidraw board failed to load.');+ expect(alert.textContent).toContain('could not be reached');+ expect(alert.textContent).toContain('tests/missing.excalidraw');++ // "Try again" bumps the retry token, re-entering the pool's acquire+ // cycle for a fresh subscription attempt.+ act(() => {+ screen.getByTestId('excalidraw-embed-retry').click();+ });+ await waitFor(() => {+ expect(useLiveDocText).toHaveBeenLastCalledWith('tests/missing.excalidraw', 1);+ });+ });++ test('a retry after an EXPORT-stage failure genuinely re-exports (no dead click)', async () => {+ // An export failure leaves `scene` populated, so this is the case+ // where the retry cannot rely on upstream identity changes cascading+ // down — the handler must invalidate the derived stages itself.+ exportToSvg.mockRejectedValueOnce(new Error('export blew up'));+ renderEmbed({ src: '/tests/board.excalidraw' });+ const retry = await screen.findByTestId('excalidraw-embed-retry');+ const exportsBefore = exportToSvg.mock.calls.length;++ // liveStatus is deliberately HELD CONSTANT across the click: the only+ // re-arm signal is the retry itself.+ act(() => {+ retry.click();+ });++ await waitFor(() => expect(exportToSvg.mock.calls.length).toBeGreaterThan(exportsBefore));+ await waitFor(() => expect(snapshotImg()).not.toBeNull());+ expect(screen.queryByRole('alert')).toBeNull();+ });++ test('an Activity show cycle re-runs effects without re-parsing or re-exporting', async () => {+ const { Activity } = await import('react');+ const view = (hidden: boolean) => (+ <TooltipProvider>+ <Activity mode={hidden ? 'hidden' : 'visible'}>+ <ExcalidrawEmbed src="/tests/board.excalidraw" />+ </Activity>+ </TooltipProvider>+ );+ const { rerender } = render(view(false));+ await waitFor(() => expect(snapshotImg()).not.toBeNull());+ const parses = restore.mock.calls.length;+ const exports = exportToSvg.mock.calls.length;+ const urls = createObjectURL.mock.calls.length;++ // Hide unmounts effects; show re-runs every one of them with unchanged+ // deps — the idempotency guards must absorb both cycles with zero new+ // work (the flash-free warm-switch budget depends on it).+ rerender(view(true));+ rerender(view(false));+ rerender(view(true));+ rerender(view(false));+ await act(async () => {});++ expect(restore.mock.calls.length).toBe(parses);+ expect(exportToSvg.mock.calls.length).toBe(exports);+ expect(createObjectURL.mock.calls.length).toBe(urls);+ expect(snapshotImg()).not.toBeNull();+ });++ test('a confirmed-empty board renders the passive empty card, not an error', () => {+ liveStatus = { kind: 'empty' };+ renderEmbed({ src: '/tests/blank.excalidraw' });+ expect(screen.getByText('Empty board')).not.toBeNull();+ expect(screen.queryByRole('alert')).toBeNull();+ });++ test('no src renders the not-configured card, which names the next step', () => {+ renderEmbed({});+ // Distinct from "Empty board" — no board exists yet, and claiming one+ // does would send the user looking for it. The copy names what the+ // properties panel actually offers (a path field, not a picker).+ expect(screen.getByText(/No board selected. Enter the path/)).not.toBeNull();+ expect(screen.queryByText('Empty board')).toBeNull();+ expect(screen.queryByTestId('excalidraw-embed-open')).toBeNull();+ });++ test('an at-capacity refusal shows capacity copy with no retry affordance', async () => {+ liveStatus = { kind: 'at-capacity' };+ renderEmbed({ src: '/tests/board.excalidraw' });++ const alert = await screen.findByRole('alert');+ // The doc is fine — the copy must name capacity, not claim removal,+ // and it shares Mirror's noun for the one pooled resource.+ expect(alert.textContent).toContain('Too many live references');+ expect(alert.textContent).not.toContain('could not be reached');+ // Retrying cannot succeed until other references release; no button.+ expect(screen.queryByTestId('excalidraw-embed-retry')).toBeNull();+ });++ test("a failed board's error card does not follow a src change onto the next board", async () => {+ liveStatus = { kind: 'ready', text: '{not json' };+ const { rerender } = renderEmbed({ src: '/tests/a.excalidraw' });+ await screen.findByRole('alert');++ // Board B is merely loading — board A's parse failure must not be+ // reported against B's name during B's handshake.+ liveStatus = { kind: 'loading' };+ rerender(+ <TooltipProvider>+ <ExcalidrawEmbed src="/tests/b.excalidraw" />+ </TooltipProvider>,+ );++ await waitFor(() => expect(screen.queryByRole('alert')).toBeNull());+ expect(snapshotImg()).toBeNull();+ });++ test('a retry that resolves moves focus to the card, not document.body', async () => {+ liveStatus = { kind: 'ready', text: '{not json' };+ const { rerender } = renderEmbed({ src: '/tests/board.excalidraw' });+ const retry = await screen.findByTestId('excalidraw-embed-retry');++ act(() => {+ retry.focus();+ retry.click();+ });+ liveStatus = { kind: 'ready', text: BOARD_JSON };+ rerender(+ <TooltipProvider>+ <ExcalidrawEmbed src="/tests/board.excalidraw" />+ </TooltipProvider>,+ );++ await waitFor(() => expect(snapshotImg()).not.toBeNull());+ // The banner (and its focused button) unmounted; keyboard users must+ // land on the card rather than restarting from the top of the doc.+ const card = document.querySelector('.excalidraw-embed');+ expect(document.activeElement).toBe(card);+ });++ test('updates landing mid-export coalesce into one trailing re-export with the newest scene', async () => {+ const resolvers: Array<(svg: SVGSVGElement) => void> = [];+ exportToSvg.mockImplementation(+ () => new Promise<SVGSVGElement>((resolve) => resolvers.push(resolve)),+ );+ const svgNode = () => document.createElementNS('http://www.w3.org/2000/svg', 'svg');+ try {+ const { rerender } = renderEmbed({ src: '/tests/board.excalidraw' });+ await waitFor(() => expect(resolvers.length).toBe(1));++ // Two live updates land while the first export is still in flight.+ let parses = restore.mock.calls.length;+ for (const text of [+ JSON.stringify({ elements: [{ id: 'a' }, { id: 'b' }] }),+ JSON.stringify({ elements: [{ id: 'a' }, { id: 'b' }, { id: 'c' }] }),+ ]) {+ liveStatus = { kind: 'ready', text };+ rerender(+ <TooltipProvider>+ <ExcalidrawEmbed src="/tests/board.excalidraw" />+ </TooltipProvider>,+ );+ // Let the parse effect settle so the busy export branch is the one+ // that observes the fresh scene.+ await waitFor(() => expect(restore.mock.calls.length).toBe(parses + 1));+ parses += 1;+ }+ expect(resolvers.length).toBe(1);++ // Completing the first export triggers exactly ONE trailing export,+ // and it uses the newest scene — a mid-export edit must never be+ // silently dropped (stale board forever) nor duplicated.+ act(() => {+ resolvers[0]?.(svgNode());+ });+ await waitFor(() => expect(resolvers.length).toBe(2));+ const lastExported = exportToSvg.mock.calls.at(-1)?.[0] as { elements?: unknown[] };+ expect(lastExported.elements?.length).toBe(3);+ act(() => {+ resolvers[1]?.(svgNode());+ });+ await waitFor(() => expect(snapshotImg()).not.toBeNull());+ expect(resolvers.length).toBe(2);+ } finally {+ // Later tests rely on the default always-resolving export.+ exportToSvg.mockImplementation(async (_opts: Record<string, unknown>) => svgNode());+ }+ });++ test('a malformed board errors with fixed copy, and a theme toggle cannot erase the error', async () => {+ liveStatus = { kind: 'ready', text: '{not json' };+ renderEmbed({ src: '/tests/board.excalidraw' });++ const alert = await screen.findByRole('alert');+ expect(alert.textContent).toContain('not a valid Excalidraw scene');+ // The raw parser message must not be echoed into the card.+ expect(alert.textContent).not.toMatch(/Unexpected|JSON/);++ // A stale scene must not be resurrected over the error card by an+ // unrelated UI preference change.+ act(() => {+ document.documentElement.classList.add('dark');+ });+ await waitFor(() => expect(screen.getByRole('alert')).not.toBeNull());+ expect(snapshotImg()).toBeNull();+ });++ test('valid JSON that is not a scene errors rather than rendering an empty board', async () => {+ liveStatus = { kind: 'ready', text: JSON.stringify({ foo: 1 }) };+ renderEmbed({ src: '/tests/board.excalidraw' });++ const alert = await screen.findByRole('alert');+ expect(alert.textContent).toContain('not a valid Excalidraw scene');+ expect(screen.queryByText('Empty board')).toBeNull();+ });++ test('a src change never paints the previous board', async () => {+ const { rerender } = renderEmbed({ src: '/tests/a.excalidraw' });+ await waitFor(() => expect(snapshotImg()).not.toBeNull());++ // Board B is still syncing — the embed must show its loading state,+ // not board A's snapshot labelled as B.+ liveStatus = { kind: 'loading' };+ rerender(+ <TooltipProvider>+ <ExcalidrawEmbed src="/tests/b.excalidraw" />+ </TooltipProvider>,+ );++ await waitFor(() => expect(snapshotImg()).toBeNull());+ expect(screen.queryByRole('alert')).toBeNull();+ });++ test('the open affordance is a real anchor to the board doc', async () => {+ renderEmbed({ src: '/tests/board.excalidraw' });+ const open = await screen.findByTestId('excalidraw-embed-open');+ expect(open.tagName).toBe('A');+ expect(open.getAttribute('href')).toBe('#/tests/board.excalidraw');+ });++ test('an expand requested during the load window stays pending, then opens', async () => {+ liveStatus = { kind: 'loading' };+ const onExpandOpenChange = vi.fn((_open: boolean) => {});+ const { rerender } = renderEmbed({+ src: '/tests/board.excalidraw',+ title: 'Flow board',+ expandOpen: true,+ onExpandOpenChange,+ });++ // Not force-closed while loading — the request defers.+ expect(screen.queryByRole('dialog')).toBeNull();+ expect(onExpandOpenChange).not.toHaveBeenCalled();++ liveStatus = { kind: 'ready', text: BOARD_JSON };+ rerender(+ <TooltipProvider>+ <ExcalidrawEmbed+ src="/tests/board.excalidraw"+ title="Flow board"+ expandOpen+ onExpandOpenChange={onExpandOpenChange}+ />+ </TooltipProvider>,+ );++ const dialog = await screen.findByRole('dialog', { name: 'Flow board' });+ await waitFor(() => {+ expect(+ within(dialog).getByTestId('excalidraw-lightbox-canvas').querySelector('img'),+ ).not.toBeNull();+ });+ expect(within(dialog).getByRole('toolbar', { name: 'Board controls' })).not.toBeNull();+ expect(within(dialog).getByText('View only')).not.toBeNull();+ });++ test('an expand requested while the board is unreachable reports itself back closed', async () => {+ liveStatus = { kind: 'unreachable' };+ const onExpandOpenChange = vi.fn((_open: boolean) => {});+ renderEmbed({+ src: '/tests/missing.excalidraw',+ expandOpen: true,+ onExpandOpenChange,+ });++ await waitFor(() => {+ expect(onExpandOpenChange).toHaveBeenCalledWith(false);+ });+ expect(screen.queryByRole('dialog')).toBeNull();+ });+});++describe('boardDocNameFromSrc', () => {+ test('recovers the docName from relative and same-origin srcs', () => {+ expect(boardDocNameFromSrc('/tests/board.excalidraw')).toBe('tests/board.excalidraw');+ expect(boardDocNameFromSrc('http://localhost:5173/a/b.excalidraw')).toBe('a/b.excalidraw');+ expect(boardDocNameFromSrc('/sp%20ace/x.excalidraw')).toBe('sp ace/x.excalidraw');+ expect(boardDocNameFromSrc('/')).toBeNull();+ });++ test('rejects foreign origins and traversal instead of rewriting them', () => {+ // A src that LOOKS remote must not silently become a local read.+ expect(boardDocNameFromSrc('https://cdn.example.com/x.excalidraw')).toBeNull();+ // An encoded slash smuggles a separator past URL normalization; reject.+ expect(boardDocNameFromSrc('/%2e%2e%2f%2e%2e%2fetc/x.excalidraw')).toBeNull();+ // A bare encoded dot-segment is resolved WITHIN the root by the URL+ // parser itself (it cannot climb above `/`), so it stays accepted.+ expect(boardDocNameFromSrc('/a/%2e%2e/b.excalidraw')).toBe('b.excalidraw');+ });++ test('a resolver-rejected src gets the banner but no retry button', async () => {+ // useLiveDocText(null) yields 'unreachable'; a retry cannot change the+ // rejected input, so offering the button would be a guaranteed dead+ // click on the expected first-contact failure (hand-typed src).+ liveStatus = { kind: 'unreachable' };+ renderEmbed({ src: '/notes/plain.md' });+ const alert = await screen.findByRole('alert');+ expect(alert.textContent).toContain('could not be reached');+ expect(screen.queryByTestId('excalidraw-embed-retry')).toBeNull();+ });++ test('only .excalidraw docNames are addressable', () => {+ // The embed must never become a live subscription to a markdown doc,+ // a config plane, or the system doc via a crafted src.+ expect(boardDocNameFromSrc('/notes/plain.md')).toBeNull();+ expect(boardDocNameFromSrc('/notes/plain')).toBeNull();+ expect(boardDocNameFromSrc('/__config__/project')).toBeNull();+ expect(boardDocNameFromSrc('/__user__/config.yml')).toBeNull();+ expect(boardDocNameFromSrc('/__system__')).toBeNull();+ });++ test('rejects non-http(s)/file schemes and control characters outright', () => {+ // blob:'s origin getter reproduces the page origin, so an+ // origin-equality check alone would accept it and produce a nonsense+ // docName; the scheme allowlist rejects it before origin comparison.+ expect(boardDocNameFromSrc('blob:http://localhost:5173/x.excalidraw')).toBeNull();+ expect(boardDocNameFromSrc('data:image/svg+xml,<svg/>')).toBeNull();+ // Decoded control characters have no place in a docName.+ expect(boardDocNameFromSrc('/a%00b.excalidraw')).toBeNull();+ expect(boardDocNameFromSrc('/a%0ab.excalidraw')).toBeNull();+ });++ test('handles a file: document base the way client-fetch does', () => {+ const fileBase = 'file:///Users/x/app/index.html';+ // file: origins are opaque per the URL spec, so origin equality is+ // meaningless — same-protocol is the accept rule on that platform.+ expect(boardDocNameFromSrc('/boards/b.excalidraw', fileBase)).toBe('boards/b.excalidraw');+ expect(boardDocNameFromSrc('https://cdn.example.com/x.excalidraw', fileBase)).toBeNull();+ // A file: src on an http page must not be accepted.+ expect(boardDocNameFromSrc('file:///etc/x.excalidraw', 'http://localhost:5173/')).toBeNull();+ });+});diff --git a/packages/app/src/editor/components/ExcalidrawEmbed.tsx b/packages/app/src/editor/components/ExcalidrawEmbed.tsxnew file mode 100644index 000000000..a92237f2e--- /dev/null+++ b/packages/app/src/editor/components/ExcalidrawEmbed.tsx@@ -0,0 +1,617 @@+/**+ * ExcalidrawEmbed — renderer for the canonical `<Excalidraw src="…" />`+ * block: a live snapshot of a referenced `.excalidraw` board, with+ * affordances to open the board's own collaborative canvas editor or expand+ * the snapshot to a full-screen lightbox. The by-reference rationale lives+ * on the descriptor in `built-ins.ts`; the scene reaches this component+ * through the shared read-only `live-doc-pool`, so strokes saved on the+ * board re-export the snapshot here without a reload.+ *+ * Containment: the exported SVG never enters the live DOM. It is+ * serialized to a Blob and shown through `<img src="blob:…">` in both the+ * card and the lightbox — SVG-as-image cannot run script, load external+ * resources, or navigate, which closes the whole injected-markup class+ * (remote-`url()` beacons, animation-restored `javascript:` hrefs) without+ * a hand-maintained sanitizer. Cost: snapshot text isn't selectable.+ */++import { isExcalidrawDocFile } from '@inkeep/open-knowledge-core';+import { Trans, useLingui } from '@lingui/react/macro';+import type { PanzoomObject } from '@panzoom/panzoom';+import { AlertTriangle, ExternalLink } from 'lucide-react';+import { useEffect, useRef, useState } from 'react';+import { Button } from '@/components/ui/button';+import { Dialog, DialogContent, DialogTitle } from '@/components/ui/dialog';+import { hashFromDocName } from '@/lib/doc-hash';+import '@/lib/excalidraw-env';+import { createRetryingLoader } from '@/lib/retrying-loader.ts';+import { cn } from '@/lib/utils.ts';+import { useLiveDocText } from './live-doc-pool.ts';+import { loadPanzoom, PanzoomControls } from './Mermaid.tsx';+import { releaseSnapshotUrl, retainSnapshotUrl } from './snapshot-url-pool.ts';+import { useAppColorMode } from './use-app-color-mode.ts';++type ExcalidrawModule = typeof import('@excalidraw/excalidraw');+type ExcalidrawScene = ReturnType<ExcalidrawModule['restore']>;++const loadExcalidraw = createRetryingLoader(() => import('@excalidraw/excalidraw'));++/** Schemes a board reference may use. Everything else — including `blob:`,+ * whose origin getter reproduces the page origin and would otherwise slip+ * through an origin-equality check with a nonsense pathname — is rejected+ * outright rather than validated by origin proxy. */+const BOARD_SRC_PROTOCOLS = new Set(['http:', 'https:', 'file:']);++/**+ * The board's docName, recovered from the render `src` so the live+ * subscription and the open affordance address the board's doc. Rejects+ * rather than rewrites: a foreign-origin src must not silently become a+ * local read, a decoded `..` segment must not escape the content root, and+ * only `.excalidraw` docNames are addressable at all — an embed can never+ * subscribe to a markdown doc or a config plane through a crafted src.+ * (The server would refuse the traversal anyway — this keeps the CLIENT+ * contract honest so crafted srcs land in the error branch.)+ *+ * `base` is the current document URL. In the packaged desktop that is a+ * `file:` URL, whose origin is opaque per the URL spec — origin equality+ * is meaningless there, so accept `file:` srcs only when the page itself+ * is `file:` (same posture as `client-fetch.ts`).+ */+export function boardDocNameFromSrc(+ src: string,+ base: string = typeof window !== 'undefined' && window.location?.href+ ? window.location.href+ : 'http://localhost/',+): string | null {+ try {+ const baseUrl = new URL(base);+ const url = new URL(src, baseUrl);+ if (!BOARD_SRC_PROTOCOLS.has(url.protocol)) return null;+ const sameOrigin =+ url.protocol === 'file:' ? baseUrl.protocol === 'file:' : url.origin === baseUrl.origin;+ if (!sameOrigin) return null;+ const segments = url.pathname+ .split('/')+ .filter((segment) => segment.length > 0)+ .map((segment) => decodeURIComponent(segment));+ if (segments.length === 0) return null;+ // A decoded `%2f`/`%5c` re-introduces a separator inside a segment,+ // decoded dot-segments re-introduce traversal, and decoded control+ // characters have no place in a docName — all escape the shape URL+ // normalization already settled, so reject rather than rewrite.+ const smuggled = segments.some(+ (segment) =>+ segment === '..' ||+ segment === '.' ||+ segment.includes('/') ||+ segment.includes('\\') ||+ // biome-ignore lint/suspicious/noControlCharactersInRegex: rejecting control chars is the point+ /[\u0000-\u001f]/.test(segment),+ );+ if (smuggled) return null;+ const docName = segments.join('/');+ if (!isExcalidrawDocFile(docName)) return null;+ return docName;+ } catch {+ return null;+ }+}++interface ExcalidrawEmbedProps {+ src?: string;+ title?: string;+ className?: string;+ /**+ * Host-controlled lightbox state. The expand affordance lives in the+ * block's chrome bar beside Delete and the properties gear (not on the+ * canvas card), so the host owns the boolean and this component owns the+ * dialog it drives. Absent both, the embed renders with no lightbox.+ */+ expandOpen?: boolean;+ onExpandOpenChange?: (open: boolean) => void;+}++type EmbedErrorKind = 'parse' | 'export' | 'module-load';++export function ExcalidrawEmbed({+ src,+ title,+ className,+ expandOpen = false,+ onExpandOpenChange,+}: ExcalidrawEmbedProps) {+ const { t } = useLingui();+ const colorMode = useAppColorMode();+ // Bumped by the error banner's "Try again". On its own it only+ // re-acquires the live subscription — the retry handler additionally+ // clears `scene`/`snapshot` so the idempotency guards below fall through+ // and the parse and export stages genuinely recompute (an export-stage+ // failure leaves `scene` intact, so status identity alone would re-arm+ // nothing).+ const [loadAttempt, setLoadAttempt] = useState(0);++ const boardDocName = src ? boardDocNameFromSrc(src) : null;+ const live = useLiveDocText(boardDocName, loadAttempt);++ // Parse and export are split so a theme toggle re-exports the ALREADY+ // parsed scene in place — it must not re-enter the parse path or blank a+ // painted board. ALL THREE atoms below carry the docName they came from+ // (scene and snapshot additionally carry what produced them): stale+ // values are refused by comparison instead of trusted, so a `src` change+ // can never paint the previous board, resurrect one over an error card,+ // or blame a fresh board for the previous board's failure. The+ // what-produced-it tags also make both effects idempotent across+ // `<Activity>` show cycles, which re-run every effect with unchanged+ // deps (see the WARN rule: hidden Activities unmount effects only).+ const [scene, setScene] = useState<{+ docName: string;+ text: string;+ value: ExcalidrawScene;+ } | null>(null);+ const [snapshot, setSnapshot] = useState<{+ docName: string;+ url: string;+ sceneValue: ExcalidrawScene;+ colorMode: 'light' | 'dark';+ } | null>(null);+ const [error, setError] = useState<{ docName: string; kind: EmbedErrorKind } | null>(null);+ // Armed by a retry click, consumed by the focus hand-off effect below;+ // any NEW error disarms it so a stale arm can't steal focus when the+ // board later recovers on its own.+ const containerRef = useRef<HTMLDivElement>(null);+ const retryFocusRef = useRef(false);++ // Warm the ~600 kB Excalidraw chunk (and the lightbox's panzoom chunk)+ // as soon as a board is referenced, in parallel with the WebSocket+ // handshake, instead of serially after sync + JSON.parse. The catch is+ // load-bearing: the retrying loader clears its cache on rejection, so+ // the parse effect still gets a real attempt (and a real error) later.+ useEffect(() => {+ if (!boardDocName) return;+ void loadExcalidraw().catch(() => undefined);+ void loadPanzoom().catch(() => undefined);+ }, [boardDocName]);++ useEffect(() => {+ if (live.kind !== 'ready' || !boardDocName) return;+ // Already parsed exactly this text for exactly this board — an+ // Activity show cycle re-runs effects without a data change.+ if (scene && scene.docName === boardDocName && scene.text === live.text) return;+ let cancelled = false;+ (async () => {+ // A malformed board deliberately ERRORS here (with a log trail),+ // where the board editor renders a blank canvas — an embed silently+ // showing an empty card for a corrupt file would be indistinguishable+ // from a genuinely empty board. `JSON.parse` alone is not enough:+ // valid JSON that isn't a scene (no `elements` array) must land in+ // the same branch, not render as a deceptively empty board.+ const parsed: unknown = JSON.parse(live.text);+ const looksLikeScene =+ typeof parsed === 'object' &&+ parsed !== null &&+ Array.isArray((parsed as { elements?: unknown }).elements);+ if (!looksLikeScene) throw new Error('not an Excalidraw scene (no elements array)');+ // The chunk failing to load is the client's problem, not the+ // board's — it must not be reported as corrupt content.+ let mod: ExcalidrawModule;+ try {+ mod = await loadExcalidraw();+ } catch (err) {+ if (cancelled) return;+ console.warn('[ExcalidrawEmbed] excalidraw module failed to load:', boardDocName, err);+ retryFocusRef.current = false;+ setScene(null);+ setError({ docName: boardDocName, kind: 'module-load' });+ return;+ }+ const value = mod.restore(parsed as Parameters<ExcalidrawModule['restore']>[0], null, null);+ if (cancelled) return;+ setScene({ docName: boardDocName, text: live.text, value });+ setError(null);+ })().catch((err: unknown) => {+ if (cancelled) return;+ console.warn('[ExcalidrawEmbed] failed to parse board:', boardDocName, err);+ retryFocusRef.current = false;+ setScene(null);+ setError({ docName: boardDocName, kind: 'parse' });+ });+ return () => {+ cancelled = true;+ };+ }, [live, boardDocName, scene]);++ // One export at a time: `exportToSvg` has no abort path, so while a+ // remote peer draws (pool re-fires every 150ms) an in-flight export+ // marks itself dirty instead of stacking discarded runs; the trailing+ // kick re-arms the effect once for however many updates were coalesced.+ const exportBusyRef = useRef(false);+ const exportDirtyRef = useRef(false);+ const [exportKick, setExportKick] = useState(0);+ // Previous blob URL, released when the NEXT snapshot commits — not in+ // effect cleanup, because under `<Activity mode="hidden">` effects+ // unmount while the `<img>` (DOM + refs kept) still shows the URL; a+ // cleanup-time revoke would hand a hidden-then-shown image a dead URL.+ // True-unmount leftovers are bounded by the module-level FIFO above+ // (`MAX_LIVE_SNAPSHOT_URLS` outstanding across all mount cycles), not+ // one-per-embed-forever.+ const lastUrlRef = useRef<string | null>(null);++ useEffect(() => {+ void exportKick;+ if (!scene || !boardDocName || scene.docName !== boardDocName) return;+ // This exact scene in this exact theme is already on screen — an+ // Activity show cycle re-runs effects without a data change.+ if (+ snapshot &&+ snapshot.docName === scene.docName &&+ snapshot.sceneValue === scene.value &&+ snapshot.colorMode === colorMode+ ) {+ return;+ }+ if (exportBusyRef.current) {+ exportDirtyRef.current = true;+ return;+ }+ let cancelled = false;+ exportBusyRef.current = true;+ (async () => {+ let mod: ExcalidrawModule;+ try {+ mod = await loadExcalidraw();+ } catch (err) {+ if (cancelled) return;+ console.warn('[ExcalidrawEmbed] excalidraw module failed to load:', boardDocName, err);+ retryFocusRef.current = false;+ setSnapshot(null);+ setError({ docName: boardDocName, kind: 'module-load' });+ return;+ }+ const svg = await mod.exportToSvg({+ elements: scene.value.elements,+ appState: {+ ...scene.value.appState,+ exportWithDarkMode: colorMode === 'dark',+ // Transparent, so the snapshot sits on the card background the+ // way the mermaid canvas does instead of a white plate.+ exportBackground: false,+ },+ files: scene.value.files,+ });+ if (cancelled) return;+ const markup = new XMLSerializer().serializeToString(svg);+ const url = URL.createObjectURL(new Blob([markup], { type: 'image/svg+xml' }));+ const prev = lastUrlRef.current;+ lastUrlRef.current = url;+ retainSnapshotUrl(url);+ if (prev) releaseSnapshotUrl(prev);+ setSnapshot({ docName: scene.docName, url, sceneValue: scene.value, colorMode });+ setError(null);+ })()+ .catch((err: unknown) => {+ if (cancelled) return;+ console.warn('[ExcalidrawEmbed] failed to export board snapshot:', boardDocName, err);+ retryFocusRef.current = false;+ setSnapshot(null);+ setError({ docName: boardDocName, kind: 'export' });+ })+ .finally(() => {+ exportBusyRef.current = false;+ if (exportDirtyRef.current) {+ exportDirtyRef.current = false;+ setExportKick((n) => n + 1);+ }+ });+ return () => {+ cancelled = true;+ };+ }, [scene, colorMode, boardDocName, snapshot, exportKick]);++ const currentError = error && error.docName === boardDocName ? error : null;+ const showError =+ currentError !== null || live.kind === 'unreachable' || live.kind === 'at-capacity';+ const currentSnapshot = snapshot && snapshot.docName === boardDocName ? snapshot : null;+ const expandable = currentSnapshot !== null && !showError;++ // After a user-initiated retry resolves, the banner (and the button that+ // held focus) unmounts — move focus to the card so keyboard and+ // screen-reader users don't drop to document.body. Only retry clicks arm+ // this; an automatic recovery must not steal focus from the editor.+ useEffect(() => {+ if (!showError && retryFocusRef.current) {+ retryFocusRef.current = false;+ containerRef.current?.focus();+ }+ }, [showError]);++ // Close the host's expand boolean only on TERMINAL states (error /+ // unreachable / at-capacity / empty). A request made during the load+ // window stays pending and the dialog opens the moment the snapshot+ // lands — dropping it instead would make the chrome button a dead click+ // while loading.+ const dropExpand = showError || live.kind === 'empty';+ useEffect(() => {+ if (expandOpen && dropExpand) onExpandOpenChange?.(false);+ }, [expandOpen, dropExpand, onExpandOpenChange]);++ if (!src) {+ // No board chosen yet — say so and name the next step, rather than+ // claiming an (empty) board exists. The properties gear is the only+ // real affordance until a picker ships.+ return (+ <div+ className={cn(+ 'excalidraw-embed flex min-h-16 w-full items-center justify-center rounded-md border border-dashed border-border/60 bg-muted/10 px-3 py-6 text-sm text-muted-foreground',+ className,+ )}+ data-component-type="excalidraw"+ >+ <Trans>+ No board selected. Enter the path to a .excalidraw doc in this block's properties.+ </Trans>+ </div>+ );+ }++ if (live.kind === 'empty') {+ // Passive (mirrors the mermaid empty card), because an empty board is+ // an expected state — freshly created, nothing drawn yet — not a+ // failure. Real height so the block keeps a click target + chrome.+ return (+ <div+ className={cn(+ 'excalidraw-embed flex min-h-16 w-full items-center justify-center rounded-md border border-dashed border-border/60 bg-muted/10 px-3 py-6 text-sm text-muted-foreground',+ className,+ )}+ data-component-type="excalidraw"+ >+ <Trans>Empty board</Trans>+ </div>+ );+ }++ const isLoading = !showError && !currentSnapshot;+ const errorDetail =+ live.kind === 'at-capacity'+ ? t`Too many live references on this page. This board was not loaded.`+ : live.kind === 'unreachable'+ ? t`The board could not be reached. It may not exist, or the server may be offline.`+ : currentError?.kind === 'module-load'+ ? t`The board viewer failed to load. Check your connection and try again.`+ : currentError?.kind === 'parse'+ ? t`The board's content is not a valid Excalidraw scene.`+ : t`The board snapshot could not be rendered.`;+ // No retry affordance where a retry provably cannot succeed: an+ // at-capacity refusal is a no-op until other references release, and a+ // `src` the resolver rejected stays rejected — the input doesn't change+ // on a click (it needs a property-panel edit).+ const retryable = showError && live.kind !== 'at-capacity' && boardDocName !== null;++ return (+ <div+ ref={containerRef}+ tabIndex={-1}+ className={cn(+ 'excalidraw-embed relative w-full overflow-hidden rounded-md border border-border/60 bg-muted/20 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',+ className,+ )}+ data-component-type="excalidraw"+ aria-busy={isLoading ? true : undefined}+ >+ {showError ? (+ <div+ role="alert"+ className="m-2 flex items-start gap-2 rounded border border-destructive/30 bg-destructive/5 px-3 py-2 text-[12px] text-destructive"+ >+ <AlertTriangle className="size-3.5 shrink-0 mt-0.5" aria-hidden />+ <div className="min-w-0 flex-1">+ <div className="font-medium">+ <Trans>Excalidraw board failed to load.</Trans>+ </div>+ {/* Fixed copy + the docName only — never the raw error message,+ which can echo referenced-doc content into the card. The+ full error goes to the console for diagnosis. */}+ <div className="mt-1">{errorDetail}</div>+ <div className="mt-1 break-words font-mono text-[11px] opacity-90">+ {boardDocName ?? src}+ </div>+ </div>+ {retryable ? (+ <Button+ type="button"+ size="sm"+ variant="outline"+ className="shrink-0 border-destructive/40 text-destructive hover:text-destructive"+ data-testid="excalidraw-embed-retry"+ onClick={() => {+ retryFocusRef.current = true;+ setError(null);+ // Invalidate the derived stages, not just the subscription:+ // an export-stage failure leaves `scene` intact, so the+ // idempotency guards would otherwise return early and the+ // retry would be a dead click onto a permanent skeleton.+ setScene(null);+ setSnapshot(null);+ setLoadAttempt((n) => n + 1);+ }}+ >+ <Trans>Try again</Trans>+ </Button>+ ) : null}+ </div>+ ) : null}+ {currentSnapshot && !showError ? (+ <div+ className="flex min-h-16 w-full items-center justify-center p-3"+ data-testid="excalidraw-embed-snapshot"+ >+ <img+ src={currentSnapshot.url}+ alt={title || t`Excalidraw board`}+ draggable={false}+ className="h-auto max-h-[60vh] max-w-full"+ onError={() => {+ // A snapshot URL that fails to decode (e.g. revoked out from+ // under a hidden Activity in an edge we missed) must surface+ // as the error card, not a bare broken-image glyph. A DOM+ // error event carries no error object, so log the condition+ // — it's otherwise indistinguishable from an export failure.+ console.warn(+ '[ExcalidrawEmbed] snapshot image failed to decode:',+ boardDocName,+ currentSnapshot?.url,+ );+ if (boardDocName) {+ retryFocusRef.current = false;+ setError({ docName: boardDocName, kind: 'export' });+ }+ }}+ />+ </div>+ ) : null}+ {isLoading ? (+ <div className="m-3 min-h-16 animate-pulse rounded-md bg-muted/40" aria-hidden="true" />+ ) : null}+ {boardDocName && !showError ? (+ <Button+ asChild+ size="icon-sm"+ variant="secondary"+ className="absolute top-2 right-2 border-border"+ title={t`Open board`}+ data-testid="excalidraw-embed-open"+ >+ {/* A real anchor (not an onClick hash write) so cmd/middle-click+ and "copy link" work — same affordance contract as Mirror's+ open-source link. */}+ <a href={hashFromDocName(boardDocName)} aria-label={t`Open board`}>+ <ExternalLink className="size-4" aria-hidden="true" />+ </a>+ </Button>+ ) : null}+ <ExcalidrawLightbox+ open={expandOpen && expandable}+ onOpenChange={(next) => onExpandOpenChange?.(next)}+ snapshotUrl={currentSnapshot?.url ?? null}+ title={title}+ />+ </div>+ );+}++const LIGHTBOX_ZOOM_MIN = 0.5;+const LIGHTBOX_ZOOM_MAX = 4;+const LIGHTBOX_ZOOM_STEP = 0.25;++/**+ * Full-screen viewer for a board snapshot — the mermaid lightbox shape+ * applied to Excalidraw. Kept mounted and driven by `open` so Radix runs+ * the exit animation; the body is an `<img>` on the embed's latest blob+ * snapshot, so a board edit landing while the dialog is open swaps the+ * image in place (panzoom stays bound to the same element).+ */+function ExcalidrawLightbox({+ open,+ onOpenChange,+ snapshotUrl,+ title,+}: {+ open: boolean;+ onOpenChange: (open: boolean) => void;+ snapshotUrl: string | null;+ title?: string;+}) {+ const { t } = useLingui();+ const panzoomRef = useRef<PanzoomObject | null>(null);+ const [panzoomFailed, setPanzoomFailed] = useState(false);++ // Pan/zoom arms through the image's ref callback, not an `open`-keyed+ // effect: the dialog content's DOM node isn't guaranteed to exist in the+ // commit where `open` flips, and the ref callback is the one signal that+ // fires exactly when the node is really in the DOM (and its cleanup when+ // it leaves).+ const attachImage = (img: HTMLImageElement | null) => {+ if (!img) return undefined;+ let disposed = false;+ loadPanzoom()+ .then((Panzoom) => {+ if (disposed) return;+ panzoomRef.current = Panzoom(img, {+ canvas: true,+ cursor: 'default',+ maxScale: LIGHTBOX_ZOOM_MAX,+ minScale: LIGHTBOX_ZOOM_MIN,+ step: LIGHTBOX_ZOOM_STEP,+ noBind: true,+ touchAction: 'auto',+ });+ setPanzoomFailed(false);+ })+ .catch((err) => {+ console.warn('[ExcalidrawEmbed] panzoom setup failed:', err);+ if (!disposed) setPanzoomFailed(true);+ });+ // The dialog owns its whole viewport, so a two-finger scroll pans the+ // board and a pinch/ctrl-wheel zooms — same contract as the mermaid+ // whole-viewport surfaces.+ const onWheel = (e: WheelEvent) => {+ const pz = panzoomRef.current;+ if (!pz) return;+ e.preventDefault();+ if (e.ctrlKey || e.metaKey) {+ pz.zoomWithWheel(e);+ return;+ }+ const scale = typeof pz.getScale === 'function' ? pz.getScale() : 1;+ const denom = scale > 0 ? scale : 1;+ pz.pan(-e.deltaX / denom, -e.deltaY / denom, { relative: true });+ };+ const host = img.parentElement;+ host?.addEventListener('wheel', onWheel, { passive: false });+ return () => {+ disposed = true;+ host?.removeEventListener('wheel', onWheel);+ panzoomRef.current?.destroy();+ panzoomRef.current = null;+ };+ };++ return (+ <Dialog open={open} onOpenChange={onOpenChange}>+ <DialogContent+ className="h-[calc(100dvh-5rem)] w-[calc(100dvw-5rem)] max-w-none gap-0 p-2 pt-10 duration-200 sm:max-w-none"+ // Same zoom-travel treatment as the mermaid lightbox: the vars feed+ // tw-animate-css's keyframes; inline style wins over the default+ // zoom-in-95 class without fighting tailwind-merge.+ style={{ '--tw-enter-scale': '0.92', '--tw-exit-scale': '0.92' } as React.CSSProperties}+ >+ <DialogTitle className="sr-only">{title || t`Excalidraw board`}</DialogTitle>+ <span className="absolute top-2 left-3 flex h-7 items-center text-xs text-muted-foreground">+ {t`View only`}+ </span>+ <div className="relative flex min-h-0 flex-1 overflow-hidden">+ <div+ className="flex min-h-0 flex-1 items-center justify-center"+ data-testid="excalidraw-lightbox-canvas"+ >+ {snapshotUrl ? (+ <img+ ref={attachImage}+ src={snapshotUrl}+ alt={title || t`Excalidraw board`}+ draggable={false}+ className="max-h-full max-w-full"+ />+ ) : null}+ </div>+ <PanzoomControls+ panzoomRef={panzoomRef}+ label={t`Board controls`}+ testId="excalidraw-lightbox-actions"+ unavailable={panzoomFailed}+ />+ </div>+ </DialogContent>+ </Dialog>+ );+}diff --git a/packages/app/src/editor/components/Mermaid.tsx b/packages/app/src/editor/components/Mermaid.tsxindex 4c4a4c0c9..a0028b70b 100644--- a/packages/app/src/editor/components/Mermaid.tsx+++ b/packages/app/src/editor/components/Mermaid.tsx@@ -39,7 +39,7 @@*/import { Trans, useLingui } from '@lingui/react/macro';-import type { default as PanZoomNS, PanzoomObject } from '@panzoom/panzoom';+import type { PanzoomObject } from '@panzoom/panzoom';import type { MermaidWysiwygEditor } from '@visimer/core';import type { MermaidCanvasView } from '@visimer/dom';import {@@ -53,13 +53,14 @@ import {ZoomIn,ZoomOut,} from 'lucide-react';-import type { default as MermaidNS } from 'mermaid';import { type ComponentProps, useEffect, useLayoutEffect, useRef, useState } from 'react';import { Button } from '@/components/ui/button';import { Dialog, DialogContent, DialogTitle } from '@/components/ui/dialog';import { useReducedMotion } from '@/hooks/use-reduced-motion';+import { createRetryingLoader } from '@/lib/retrying-loader.ts';import { cn } from '@/lib/utils.ts';import { useJsxComponentHost } from './jsx-host-context.tsx';+import { useAppColorMode } from './use-app-color-mode.ts';// MermaidFence descriptor declares a single `chart` prop. `id` and `theme`// are absent because neither is expressible in ` ```mermaid ` fence syntax,@@ -145,53 +146,15 @@ const buttonProps: ComponentProps<typeof Button> = {/*** One-time initialization. Called lazily on the first render attempt so- * documents without Mermaid pay nothing. Subsequent calls are no-ops via- * the module-level guard.+ * documents without Mermaid pay nothing; the retrying cache clears itself+ * on rejection, so a transient network failure during the first import+ * doesn't disable Mermaid for the entire session.*/-let mermaidPromise: Promise<typeof MermaidNS> | null = null;-function loadMermaid() {- mermaidPromise ||= import('mermaid')- .then((mod) => mod.default)- .catch((err) => {- // Clear the cached rejection so the next mount can retry. Without- // this, a transient network failure during the first import would- // disable Mermaid for the entire session — every subsequent- // `loadMermaid()` would resolve to the cached rejected promise.- mermaidPromise = null;- throw err;- });- return mermaidPromise;-}+const loadMermaid = createRetryingLoader(() => import('mermaid').then((mod) => mod.default));-let wysiwygPromise: Promise<- [typeof import('@visimer/core'), typeof import('@visimer/dom')]-> | null = null;-function loadWysiwyg() {- wysiwygPromise ||= Promise.all([import('@visimer/core'), import('@visimer/dom')]).catch((err) => {- wysiwygPromise = null;- throw err;- });- return wysiwygPromise;-}--/**- * Read the app's active color mode from the `<html>` class list — the- * theme provider sets `.dark` / `.light` on `documentElement`; that's- * also what `useApplyConfigTheme` writes and what `useThemeBridge`- * exposes. Falling back to `prefers-color-scheme` covers the pre-mount- * / SSR window, but the class is authoritative once the app is up.- */-function readDocumentColorMode(): 'light' | 'dark' {- if (typeof document !== 'undefined') {- const cls = document.documentElement.classList;- if (cls.contains('dark')) return 'dark';- if (cls.contains('light')) return 'light';- }- if (typeof window !== 'undefined' && window.matchMedia) {- return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';- }- return 'light';-}+const loadWysiwyg = createRetryingLoader(() =>+ Promise.all([import('@visimer/core'), import('@visimer/dom')]),+);/*** Mermaid's built-in `dark` theme covers node fills and text but leaves@@ -276,16 +239,9 @@ function mermaidConfigFor(colorMode: 'light' | 'dark'): Record<string, unknown>};}-let panzoomPromise: Promise<typeof PanZoomNS> | null = null;-function loadPanzoom() {- panzoomPromise ||= import('@panzoom/panzoom')- .then((mod) => mod.default)- .catch((err) => {- panzoomPromise = null;- throw err;- });- return panzoomPromise;-}+export const loadPanzoom = createRetryingLoader(() =>+ import('@panzoom/panzoom').then((mod) => mod.default),+);/*** Events that must never escape the canvas into ProseMirror while the@@ -308,28 +264,15 @@ const CANVAS_CONTAINED_EVENTS = [] as const;export function MermaidView({ chart = '', className, editBinding, onExpand }: MermaidProps) {+ const { t } = useLingui();const [state, setState] = useState<RenderState>({ status: 'rendering', error: '' });// Bumped to re-run the canvas-creation effect after a lazy-import// failure so a later chart edit retries the load (the module-level// promise caches clear themselves on rejection).const [loadAttempt, setLoadAttempt] = useState(0);- // Track the app's color mode so mermaid's palette can flip with the- // theme provider — reading it once at mount + observing the `<html>`- // class list keeps SVG contrast aligned even when the user toggles- // themes with a diagram already on screen.- const [colorMode, setColorMode] = useState<'light' | 'dark'>(() => readDocumentColorMode());- useEffect(() => {- if (typeof document === 'undefined') return;- const doc = document.documentElement;- const sync = () => {- const next = readDocumentColorMode();- setColorMode((prev) => (prev === next ? prev : next));- };- sync();- const observer = new MutationObserver(sync);- observer.observe(doc, { attributes: true, attributeFilter: ['class'] });- return () => observer.disconnect();- }, []);+ // Mermaid's palette bakes the theme into the SVG at render time, so it+ // rides the shared class-list-observing hook rather than CSS variables.+ const colorMode = useAppColorMode();const host = useJsxComponentHost();// An explicit `editBinding` (standalone `.mmd` doc) wins; otherwise editing is// gated on the JSX host being editable (codefenced fence).@@ -371,6 +314,9 @@ export function MermaidView({ chart = '', className, editBinding, onExpand }: Meconst editorRef = useRef<MermaidWysiwygEditor | null>(null);const viewRef = useRef<MermaidCanvasView | null>(null);const panzoomRef = useRef<PanzoomObject | null>(null);+ // Drives PanzoomControls' `unavailable` — the zoom/pan buttons must not+ // look live when the panzoom chunk never loaded.+ const [panzoomFailed, setPanzoomFailed] = useState(false);const maxScaleObsRef = useRef<ResizeObserver | null>(null);const loadFailedRef = useRef(false);@@ -457,41 +403,50 @@ export function MermaidView({ chart = '', className, editBinding, onExpand }: MetouchAction: 'auto',});panzoomRef.current = panzoom;- maxScaleObsRef.current?.disconnect();- maxScaleObsRef.current = null;- if (viewBox && viewBox.width > 0) {- const vbW = viewBox.width;- // `getBoundingClientRect().width` is transform-inclusive, so- // measuring it AFTER the user has zoomed would fold the zoom- // factor into `displayScale` and re-introduce the bug this- // compensation exists to solve. The initial call runs right- // after Panzoom mounts (no transform yet) so bounding-rect is- // fine; the ResizeObserver callback reads `contentRect.width`- // instead — untransformed content box.- const applyMaxScale = (width: number) => {- if (disposed || panzoomRef.current !== panzoom) return;- if (width <= 0) return;- try {- panzoom.setOptions({- maxScale: compensatedMaxScale(width, vbW),+ setPanzoomFailed(false);+ // Everything past this point is optional polish on an ALREADY+ // working panzoom — a throw here must not fall into the chain's+ // catch and flag the controls unavailable over a live instance.+ try {+ maxScaleObsRef.current?.disconnect();+ maxScaleObsRef.current = null;+ if (viewBox && viewBox.width > 0) {+ const vbW = viewBox.width;+ // `getBoundingClientRect().width` is transform-inclusive, so+ // measuring it AFTER the user has zoomed would fold the zoom+ // factor into `displayScale` and re-introduce the bug this+ // compensation exists to solve. The initial call runs right+ // after Panzoom mounts (no transform yet) so bounding-rect is+ // fine; the ResizeObserver callback reads `contentRect.width`+ // instead — untransformed content box.+ const applyMaxScale = (width: number) => {+ if (disposed || panzoomRef.current !== panzoom) return;+ if (width <= 0) return;+ try {+ panzoom.setOptions({+ maxScale: compensatedMaxScale(width, vbW),+ });+ } catch (err) {+ console.warn('[Mermaid] maxScale compensation failed:', err);+ }+ };+ applyMaxScale(svgElement.getBoundingClientRect().width);+ if (typeof ResizeObserver !== 'undefined') {+ const ro = new ResizeObserver((entries) => {+ const width = entries[0]?.contentRect.width ?? 0;+ applyMaxScale(width);});- } catch (err) {- console.warn('[Mermaid] maxScale compensation failed:', err);+ ro.observe(svgElement);+ maxScaleObsRef.current = ro;}- };- applyMaxScale(svgElement.getBoundingClientRect().width);- if (typeof ResizeObserver !== 'undefined') {- const ro = new ResizeObserver((entries) => {- const width = entries[0]?.contentRect.width ?? 0;- applyMaxScale(width);- });- ro.observe(svgElement);- maxScaleObsRef.current = ro;}+ } catch (err) {+ console.warn('[Mermaid] maxScale observer setup failed:', err);}}).catch((err) => {console.warn('[Mermaid] panzoom setup failed:', err);+ if (!disposed) setPanzoomFailed(true);});}@@ -697,7 +652,15 @@ export function MermaidView({ chart = '', className, editBinding, onExpand }: Me)}><div ref={canvasRef} className="ok-mermaid-svg flex min-h-0 flex-1" />- {showCanvas && <MermaidViewControls panzoomRef={panzoomRef} onExpand={onExpand} />}+ {showCanvas && (+ <PanzoomControls+ panzoomRef={panzoomRef}+ label={t`Mermaid diagram controls`}+ testId="mermaid-actions"+ onExpand={onExpand}+ unavailable={panzoomFailed}+ />+ )}</div></div>);@@ -745,15 +708,30 @@ export function MermaidLightbox({);}-function MermaidViewControls({+/**+ * The 3x3 pan/zoom control grid shared by every panzoom-backed snapshot+ * surface (the mermaid canvas, the Excalidraw lightbox). `label` names the+ * toolbar for AT; `onExpand` fills the otherwise-empty top-left cell.+ */+export function PanzoomControls({panzoomRef,+ label,+ testId,onExpand,+ unavailable,}: {panzoomRef: React.RefObject<PanzoomObject | null>;+ label: string;+ testId: string;onExpand?: () => void;+ /** True when the pan/zoom chunk never loaded, so the controls render disabled. */+ unavailable?: boolean;}) {const { t } = useLingui();const reducedMotion = useReducedMotion();+ // Controls must not look live when the pan/zoom chunk failed to load —+ // every click would silently no-op. Expand stays active (host-owned).+ const panButtonProps = { ...buttonProps, disabled: unavailable };const labels = {zoomIn: t`Zoom in`,zoomOut: t`Zoom out`,@@ -763,7 +741,7 @@ function MermaidViewControls({panLeft: t`Pan left`,panRight: t`Pan right`,expand: t`Expand diagram`,- toolbar: t`Mermaid diagram controls`,+ toolbar: label,} as const;// Panzoom translates the SVG element itself, so +y moves the diagram down@@ -780,7 +758,7 @@ function MermaidViewControls({return (<divclassName="absolute right-3 bottom-3 grid grid-cols-3 gap-1"- data-testid="mermaid-actions"+ data-testid={testId}role="toolbar"aria-label={labels.toolbar}>@@ -797,7 +775,7 @@ function MermaidViewControls({<span aria-hidden="true" />)}<Button- {...buttonProps}+ {...panButtonProps}title={labels.panUp}aria-label={labels.panUp}onClick={() => panBy(0, MERMAID_PAN_STEP)}@@ -805,7 +783,7 @@ function MermaidViewControls({<ArrowUp className="size-4" aria-hidden="true" /></Button><Button- {...buttonProps}+ {...panButtonProps}title={labels.zoomIn}aria-label={labels.zoomIn}onClick={() => panzoomRef.current?.zoomIn()}@@ -813,7 +791,7 @@ function MermaidViewControls({<ZoomIn className="size-4" aria-hidden="true" /></Button><Button- {...buttonProps}+ {...panButtonProps}title={labels.panLeft}aria-label={labels.panLeft}onClick={() => panBy(MERMAID_PAN_STEP, 0)}@@ -821,7 +799,7 @@ function MermaidViewControls({<ArrowLeft className="size-4" aria-hidden="true" /></Button><Button- {...buttonProps}+ {...panButtonProps}title={labels.reset}aria-label={labels.reset}onClick={() => panzoomRef.current?.reset()}@@ -829,7 +807,7 @@ function MermaidViewControls({<RefreshCcw className="size-4" aria-hidden="true" /></Button><Button- {...buttonProps}+ {...panButtonProps}title={labels.panRight}aria-label={labels.panRight}onClick={() => panBy(-MERMAID_PAN_STEP, 0)}@@ -838,7 +816,7 @@ function MermaidViewControls({</Button><span aria-hidden="true" /><Button- {...buttonProps}+ {...panButtonProps}title={labels.panDown}aria-label={labels.panDown}onClick={() => panBy(0, -MERMAID_PAN_STEP)}@@ -846,7 +824,7 @@ function MermaidViewControls({<ArrowDown className="size-4" aria-hidden="true" /></Button><Button- {...buttonProps}+ {...panButtonProps}title={labels.zoomOut}aria-label={labels.zoomOut}onClick={() => panzoomRef.current?.zoomOut()}diff --git a/packages/app/src/editor/components/Mirror.tsx b/packages/app/src/editor/components/Mirror.tsxindex b706a0027..61c77f9df 100644--- a/packages/app/src/editor/components/Mirror.tsx+++ b/packages/app/src/editor/components/Mirror.tsx@@ -92,6 +92,19 @@ export function Mirror(props: MirrorProps) {);}+ if (status.kind === 'at-capacity') {+ // A pool-capacity refusal is a client-side condition — the source doc+ // is fine, so the copy must not claim it was removed.+ return (+ <StatusFrame tone="error">+ <Trans>+ <span className="font-medium">Too many live references on this page.</span> This mirror of{' '}+ <code>{src}</code> was not loaded.+ </Trans>+ </StatusFrame>+ );+ }+if (status.kind === 'anchor-not-found') {const mirrorSourceTag = `<MirrorSource id="${anchor}">`;return (diff --git a/packages/app/src/editor/components/componentMap.tsx b/packages/app/src/editor/components/componentMap.tsxindex 727a5a39b..4f0e4a428 100644--- a/packages/app/src/editor/components/componentMap.tsx+++ b/packages/app/src/editor/components/componentMap.tsx@@ -1,7 +1,10 @@/*** Maps component name → React component for the descriptor registry.*- * Canonical pack: Callout + Image + Video + Audio + Accordion + Math + MermaidFence + Pdf + File + Tabs + Tab.+ * The registered inventory is the `componentMap` object below — the+ * canonical descriptor list lives in core's `built-ins.ts`. The notes+ * that follow call out renderer-specific quirks for a subset of entries;+ * they are not an exhaustive inventory (the map itself is).* Each canonical entry is a DIY renderer — Callout is a 7-prop GFM shape* at `./Callout`, Image wraps `react-medium-image-zoom` (8-prop at* `./Image`), Video is a pure HTML5 `<video>` wrapper (9-prop at `./Video`@@ -46,6 +49,7 @@ import { AlignBlock } from './AlignBlock.tsx';import { Audio } from './Audio.tsx';import { Callout } from './Callout.tsx';import { Embed } from './Embed.tsx';+import { ExcalidrawEmbed } from './ExcalidrawEmbed.tsx';import { File } from './File.tsx';import { Image } from './Image.tsx';import { MathView } from './Math.tsx';@@ -85,6 +89,10 @@ export const componentMap: Record<string, React.ComponentType<any>> = {// `<embed>` is for legacy plugin objects, not the iframe pattern).// Renders via a cross-origin iframe with `referrerPolicy="no-referrer"`.Embed,+ // `Excalidraw` — static SVG snapshot of a referenced `.excalidraw`+ // board (the board's own doc stays the sole edit surface). Capitalized:+ // no native HTML counterpart, same convention as `Pdf`.+ Excalidraw: ExcalidrawEmbed,Accordion,// `Toggle` is Accordion's Notion-vocabulary alias — same render, different// stored JSX name. Both descriptors dispatch through the Accordiondiff --git a/packages/app/src/editor/components/live-doc-pool.dom.test.tsx b/packages/app/src/editor/components/live-doc-pool.dom.test.tsxnew file mode 100644index 000000000..b1f773f0d--- /dev/null+++ b/packages/app/src/editor/components/live-doc-pool.dom.test.tsx@@ -0,0 +1,233 @@+/**+ * `useLiveDocText` status-mapping tests with the WebSocket transport faked+ * at the `@hocuspocus/provider` boundary — the Y.Doc, the pool map, the+ * refcounts, the debounce, the watchdog, the admission gate, and the hard+ * capacity cap are all real. The transport truth (real server, real sync)+ * lives in `tests/integration/live-doc-pool.test.ts`.+ */++import { act, cleanup, renderHook } from '@testing-library/react';+import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';+import type * as Y from 'yjs';++type SyncedListener = () => void;++class FakeProvider {+ static instances: FakeProvider[] = [];+ document: Y.Doc;+ name: string;+ destroyed = false;+ private syncedListeners: SyncedListener[] = [];++ constructor(opts: { url: string; name: string; document: Y.Doc }) {+ this.document = opts.document;+ this.name = opts.name;+ FakeProvider.instances.push(this);+ }++ on(event: string, cb: SyncedListener) {+ if (event === 'synced') this.syncedListeners.push(cb);+ }++ emitSynced() {+ for (const cb of this.syncedListeners) cb();+ }++ destroy() {+ this.destroyed = true;+ }+}++vi.doMock('@hocuspocus/provider', () => ({ HocuspocusProvider: FakeProvider }));+vi.doMock('@/lib/use-collab-url', () => ({+ useCollabUrl: () => ({ collabUrl: 'ws://test/collab' }),+}));++const {+ __liveDocPoolSize,+ acquireLiveDocProvider,+ disposeLiveDocPool,+ LIVE_DOC_OBSERVE_DEBOUNCE_MS,+ LIVE_DOC_POOL_MAX,+ LIVE_DOC_SYNC_WATCHDOG_MS,+ releaseLiveDocProvider,+ useLiveDocText,+} = await import('./live-doc-pool.ts');++function lastProvider(): FakeProvider {+ const p = FakeProvider.instances.at(-1);+ if (!p) throw new Error('no provider constructed');+ return p;+}++function setSource(p: FakeProvider, text: string) {+ const ytext = p.document.getText('source');+ p.document.transact(() => {+ ytext.delete(0, ytext.length);+ ytext.insert(0, text);+ });+}++describe('useLiveDocText', () => {+ beforeEach(() => {+ vi.useFakeTimers();+ FakeProvider.instances = [];+ });+ afterEach(() => {+ cleanup();+ disposeLiveDocPool();+ vi.useRealTimers();+ });++ test('maps sync-with-content to ready, and debounces live updates', async () => {+ const { result } = renderHook(() => useLiveDocText('tests/board.excalidraw'));+ expect(result.current).toEqual({ kind: 'loading' });++ const provider = lastProvider();+ act(() => {+ setSource(provider, '{"elements":[]}');+ provider.emitSynced();+ });+ expect(result.current).toEqual({ kind: 'ready', text: '{"elements":[]}' });++ // A post-sync edit reaches the consumer only after the trailing-edge+ // debounce, not per keystroke.+ act(() => {+ setSource(provider, '{"elements":[{"id":"a"}]}');+ });+ expect(result.current).toEqual({ kind: 'ready', text: '{"elements":[]}' });+ act(() => {+ vi.advanceTimersByTime(LIVE_DOC_OBSERVE_DEBOUNCE_MS + 1);+ });+ expect(result.current).toEqual({ kind: 'ready', text: '{"elements":[{"id":"a"}]}' });+ });++ test('a reconnect replay of identical text preserves status identity', () => {+ const { result } = renderHook(() => useLiveDocText('tests/board.excalidraw'));+ const provider = lastProvider();+ act(() => {+ setSource(provider, '{"elements":[]}');+ provider.emitSynced();+ });+ const before = result.current;++ // Every reconnect re-fires onSynced; an identical text must not mint a+ // fresh status object, or every consumer re-runs its parse/export+ // chain for a pixel-identical result.+ act(() => {+ provider.emitSynced();+ });+ expect(result.current).toBe(before);+ });++ test('maps confirmed-synced-and-empty to empty, not an error', () => {+ const { result } = renderHook(() => useLiveDocText('tests/blank.excalidraw'));+ act(() => {+ lastProvider().emitSynced();+ });+ expect(result.current).toEqual({ kind: 'empty' });+ });++ test('the watchdog maps never-synced to unreachable AND releases the provider', () => {+ const { result } = renderHook(() => useLiveDocText('tests/gone.excalidraw'));+ expect(__liveDocPoolSize()).toBe(1);++ act(() => {+ vi.advanceTimersByTime(LIVE_DOC_SYNC_WATCHDOG_MS + 1);+ });+ expect(result.current).toEqual({ kind: 'unreachable' });+ // The entry is gone — a never-syncing provider must not keep retrying+ // in the background for the rest of the session.+ expect(__liveDocPoolSize()).toBe(0);+ expect(lastProvider().destroyed).toBe(true);+ });++ test('unmount after a watchdog release does not double-decrement a fresh entry', () => {+ const first = renderHook(() => useLiveDocText('tests/gone.excalidraw'));+ act(() => {+ vi.advanceTimersByTime(LIVE_DOC_SYNC_WATCHDOG_MS + 1);+ });+ // A second consumer re-acquires the same key AFTER the watchdog fired.+ renderHook(() => useLiveDocText('tests/gone.excalidraw'));+ expect(__liveDocPoolSize()).toBe(1);++ // The first hook's cleanup must be a no-op (its release already ran).+ first.unmount();+ expect(__liveDocPoolSize()).toBe(1);+ });++ test('a bumped retryToken re-enters the acquire cycle', () => {+ const { result, rerender } = renderHook(+ ({ token }: { token: number }) => useLiveDocText('tests/gone.excalidraw', token),+ { initialProps: { token: 0 } },+ );+ act(() => {+ vi.advanceTimersByTime(LIVE_DOC_SYNC_WATCHDOG_MS + 1);+ });+ expect(result.current).toEqual({ kind: 'unreachable' });+ const providersBefore = FakeProvider.instances.length;++ rerender({ token: 1 });+ expect(result.current).toEqual({ kind: 'loading' });+ expect(FakeProvider.instances.length).toBe(providersBefore + 1);+ act(() => {+ const provider = lastProvider();+ setSource(provider, '{"elements":[]}');+ provider.emitSynced();+ });+ expect(result.current).toEqual({ kind: 'ready', text: '{"elements":[]}' });+ });++ test('an inadmissible docName maps to unreachable without a provider', () => {+ const { result } = renderHook(() => useLiveDocText('__config__/project'));+ expect(result.current).toEqual({ kind: 'unreachable' });+ expect(FakeProvider.instances.length).toBe(0);+ expect(__liveDocPoolSize()).toBe(0);+ });++ test('a null docName maps to unreachable', () => {+ const { result } = renderHook(() => useLiveDocText(null));+ expect(result.current).toEqual({ kind: 'unreachable' });+ expect(FakeProvider.instances.length).toBe(0);+ });++ test('two consumers of one doc share a provider and release refcounted', () => {+ const a = renderHook(() => useLiveDocText('tests/shared.excalidraw'));+ const b = renderHook(() => useLiveDocText('tests/shared.excalidraw'));+ expect(FakeProvider.instances.length).toBe(1);+ expect(__liveDocPoolSize()).toBe(1);+ a.unmount();+ expect(__liveDocPoolSize()).toBe(1);+ b.unmount();+ expect(__liveDocPoolSize()).toBe(0);+ });++ test('the hard cap refuses the overflow acquire as at-capacity, not unreachable', () => {+ const warn = vi.spyOn(console, 'warn').mockImplementation(() => {});+ try {+ // Fill the pool to its cap with distinct keys. Existing keys must+ // still share (no refusal), and the overflow must be discriminated+ // so consumers can render truthful capacity copy.+ for (let i = 0; i < LIVE_DOC_POOL_MAX; i++) {+ const acquired = acquireLiveDocProvider('ws://test/collab', `tests/fill-${i}.excalidraw`);+ expect(acquired.ok).toBe(true);+ }+ expect(__liveDocPoolSize()).toBe(LIVE_DOC_POOL_MAX);++ const overflow = acquireLiveDocProvider('ws://test/collab', 'tests/one-more.excalidraw');+ expect(overflow).toEqual({ ok: false, reason: 'at-capacity' });+ expect(__liveDocPoolSize()).toBe(LIVE_DOC_POOL_MAX);++ // A doc already in the pool still shares its entry past the cap.+ const shared = acquireLiveDocProvider('ws://test/collab', 'tests/fill-0.excalidraw');+ expect(shared.ok).toBe(true);+ releaseLiveDocProvider('ws://test/collab', 'tests/fill-0.excalidraw');++ // The hook maps the refusal to its own terminal state.+ const { result } = renderHook(() => useLiveDocText('tests/overflow.excalidraw'));+ expect(result.current).toEqual({ kind: 'at-capacity' });+ } finally {+ warn.mockRestore();+ }+ });+});diff --git a/packages/app/src/editor/components/live-doc-pool.ts b/packages/app/src/editor/components/live-doc-pool.tsnew file mode 100644index 000000000..11843f089--- /dev/null+++ b/packages/app/src/editor/components/live-doc-pool.ts@@ -0,0 +1,317 @@+/**+ * Refcounted read-only provider pool for rendering ANOTHER doc's live+ * content inside the current one — the substrate `<Mirror>` established,+ * extracted so `<Excalidraw>` embeds (and future by-reference renderers)+ * share one connection per referenced doc instead of growing a second,+ * divergent pool.+ *+ * The pool lives OUTSIDE the editor's `ProviderPool`: these are read-only+ * consumers, and folding them into the editor pool would compete for its+ * LRU cap and evict docs the user has open for editing. Entries key on+ * (collabUrl, docName), refcount mounts, and destroy the provider on the+ * last unmount. Rename/delete recovery (ProviderPool's+ * `authenticationFailed` → rename-redirect / doc-deleted channel) is+ * deliberately out of scope for this pool's v1 — a re-pointed reference+ * arrives as a document edit, which re-runs the consumer with the new+ * docName.+ *+ * Admission is gated: `isSystemDoc`/`isConfigDoc` names are refused (STOP+ * rule — the docName arrives from document content, so this pool is a+ * documentName-keyed entry point), and the pool refuses NEW entries past a+ * hard cap. Refusal is a discriminated result so consumers can render+ * truthful copy per cause — an at-capacity refusal is NOT "this doc is+ * gone". The cap is a hard refusal rather than an LRU eviction on+ * purpose: eviction would silently blank an already-painted on-screen+ * embed, while refusal keeps painted content painted and lets the refused+ * card name the real condition. The cap counts every held entry,+ * including entries a consumer retains through a sync-watchdog timeout+ * (`useMirrorSource` retains; `useLiveDocText` releases — see each+ * watchdog's comment for the policy rationale).+ *+ * Known: subscribers attach a Y.js observer inside a TipTap NodeView, which+ * lives inside the editor's `<Activity>` subtree. AGENTS.md's STOP rule+ * warns against unbounded Y.js observers there. The cross-document bound is+ * real but indirect: `computeActivityMountList` caps the RENDER list at+ * `ACTIVITY_MOUNT_LIMIT` (docs beyond it fully unmount) and `<Activity+ * mode="hidden">` unmounts effects within it, so a hidden or evicted doc's+ * consumers run their effect cleanup and release their providers here.+ * WITHIN a visible doc nothing structural bounds the number of distinct+ * referenced docs — that is authored content — which is what the hard cap+ * exists for.+ */++import { HocuspocusProvider } from '@hocuspocus/provider';+import { useEffect, useState } from 'react';+import * as Y from 'yjs';+import { useCollabUrl } from '@/lib/use-collab-url';+import { isConfigDoc, isSystemDoc } from '../is-system-doc';++interface LiveDocSubscriber {+ /** Every `Y.Text` mutation — keystroke-frequency; debounce before work. */+ onUpdate: () => void;+ /** Every confirmed state-sync — initial handshake AND each reconnect. */+ onSynced: () => void;+}++export interface LiveDocPoolEntry {+ provider: HocuspocusProvider;+ ySource: Y.Text;+ readonly refcount: number;+ synced: boolean;+ /**+ * The only sanctioned way to observe an entry — returns the unsubscribe+ * closure. The subscriber set itself stays module-private so one+ * consumer cannot clear or replace another's fan-out.+ */+ subscribe: (subscriber: LiveDocSubscriber) => () => void;+}++interface InternalPoolEntry extends LiveDocPoolEntry {+ refcount: number;+}++const liveDocPool = new Map<string, InternalPoolEntry>();++/**+ * Hard cap on distinct pooled providers. One page can reference+ * arbitrarily many distinct sources across its visible documents, and each+ * entry is a live WebSocket plus a server-side Hocuspocus `Document`; past+ * the browser's per-host connection ceiling the excess would sit in+ * reconnect backoff forever. Acquire refuses (`at-capacity`) rather than+ * queueing or evicting — consumers render the refusal with copy that names+ * capacity, never "doc removed".+ */+export const LIVE_DOC_POOL_MAX = 30;+/** Trailing-edge debounce for `onUpdate` consumers (keystroke storms). */+export const LIVE_DOC_OBSERVE_DEBOUNCE_MS = 150;+/** Watchdog for never-synced providers (server unreachable, bad docName). */+export const LIVE_DOC_SYNC_WATCHDOG_MS = 10_000;++export type AcquireLiveDocResult =+ | { ok: true; entry: LiveDocPoolEntry }+ | { ok: false; reason: 'inadmissible' | 'at-capacity' };++/**+ * Acquire the shared read-only provider for `docName`. Refusals are+ * discriminated: `inadmissible` (system/config plane — a terminal,+ * content-shaped condition) vs `at-capacity` (this client declined to open+ * another connection; the doc itself is fine). A refusal MUST NOT be+ * released.+ */+export function acquireLiveDocProvider(collabUrl: string, docName: string): AcquireLiveDocResult {+ if (isSystemDoc(docName) || isConfigDoc(docName)) return { ok: false, reason: 'inadmissible' };+ const key = `${collabUrl}|${docName}`;+ const existing = liveDocPool.get(key);+ if (existing) {+ existing.refcount += 1;+ return { ok: true, entry: existing };+ }+ if (liveDocPool.size >= LIVE_DOC_POOL_MAX) {+ console.warn(+ `[LiveDoc] provider pool at capacity (${LIVE_DOC_POOL_MAX}); refusing "${docName}". Live by-reference embeds and mirrors across all visible documents share this pool.`,+ );+ return { ok: false, reason: 'at-capacity' };+ }+ const yDoc = new Y.Doc();+ // Default reconnect behavior is fine for read-only consumers; the sync+ // watchdog is what surfaces an unreachable doc as an actionable state.+ const provider = new HocuspocusProvider({+ url: collabUrl,+ name: docName,+ document: yDoc,+ });+ const subscribers = new Set<LiveDocSubscriber>();+ const entry: InternalPoolEntry = {+ provider,+ ySource: yDoc.getText('source'),+ refcount: 1,+ synced: false,+ subscribe: (subscriber) => {+ subscribers.add(subscriber);+ return () => {+ subscribers.delete(subscriber);+ };+ },+ };+ provider.on('synced', () => {+ entry.synced = true;+ // Fan out through onSynced (not onUpdate) so the first paint after the+ // WS handshake doesn't eat the consumer's debounce delay.+ for (const sub of subscribers) sub.onSynced();+ });+ // Single shared Y.Text observer per provider — subscriber count tracks+ // referenced docs, not mount count.+ entry.ySource.observe(() => {+ for (const sub of subscribers) sub.onUpdate();+ });+ liveDocPool.set(key, entry);+ return { ok: true, entry };+}++export function releaseLiveDocProvider(collabUrl: string, docName: string): void {+ const key = `${collabUrl}|${docName}`;+ const entry = liveDocPool.get(key);+ if (!entry) return;+ entry.refcount -= 1;+ if (entry.refcount <= 0) {+ try {+ entry.provider.destroy();+ } catch (err) {+ // Best-effort teardown — don't let a destroy failure leak the entry+ // and turn a future acquire into a zombie hand-off.+ console.warn('[LiveDoc] provider.destroy() failed during release', { docName, err });+ }+ liveDocPool.delete(key);+ }+}++/** Test-only visibility into pool occupancy (never mutate through this). */+export function __liveDocPoolSize(): number {+ return liveDocPool.size;+}++/**+ * Tear down every pooled provider. Called from this module's own HMR+ * dispose hook so editing pool consumers in dev doesn't strand the old+ * module instance's WebSockets/observers — the same contract+ * `ProviderPool.dispose()` keeps for the editor pool.+ */+export function disposeLiveDocPool(): void {+ for (const [key, entry] of liveDocPool) {+ try {+ entry.provider.destroy();+ } catch (err) {+ console.warn('[LiveDoc] provider.destroy() failed during dispose', { key, err });+ }+ }+ liveDocPool.clear();+}++if (import.meta.hot) {+ import.meta.hot.dispose(() => {+ disposeLiveDocPool();+ });+}++export type LiveDocTextStatus =+ | { kind: 'loading' }+ /** Confirmed-synced with content. */+ | { kind: 'ready'; text: string }+ /** Confirmed-synced and empty — a real, expected state (a board with+ * nothing drawn yet), NOT an error. Empty-before-sync stays `loading`. */+ | { kind: 'empty' }+ /** The doc could not be subscribed for a doc-shaped reason: the name is+ * unresolvable or inadmissible, or sync never arrived within the+ * watchdog (nonexistent doc / unreachable server — that path releases+ * the provider so a never-syncing entry stops retrying; recovery is an+ * explicit re-acquire via `retryToken`). */+ | { kind: 'unreachable' }+ /** The client's shared pool declined another connection. The doc itself+ * is fine; retrying cannot succeed until other references release. */+ | { kind: 'at-capacity' };++/** Preserve state identity across recomputes that produce an equal status,+ * so a reconnect's `onSynced` replay doesn't re-render every consumer and+ * re-run their parse/export chains for a pixel-identical result. */+function reuseIfSame(prev: LiveDocTextStatus, next: LiveDocTextStatus): LiveDocTextStatus {+ if (prev.kind !== next.kind) return next;+ if (prev.kind === 'ready' && next.kind === 'ready' && prev.text !== next.text) return next;+ return prev;+}++/**+ * Live `Y.Text('source')` of another doc, debounced against keystroke+ * storms. The straight-line consumer of the pool for renderers that want+ * the raw source rather than Mirror's parsed-subtree resolution.+ *+ * `retryToken` re-runs the acquire cycle when bumped — the caller's "try+ * again" affordance after an `unreachable` verdict.+ */+export function useLiveDocText(docName: string | null, retryToken = 0): LiveDocTextStatus {+ const { collabUrl } = useCollabUrl();+ const [status, setStatus] = useState<LiveDocTextStatus>({ kind: 'loading' });++ useEffect(() => {+ // A bumped retryToken must re-enter the acquire path below; it carries+ // no other meaning.+ void retryToken;+ if (!docName) {+ setStatus({ kind: 'unreachable' });+ return;+ }+ if (!collabUrl) {+ setStatus({ kind: 'loading' });+ return;+ }+ setStatus((prev) => reuseIfSame(prev, { kind: 'loading' }));++ const acquired = acquireLiveDocProvider(collabUrl, docName);+ if (!acquired.ok) {+ setStatus({ kind: acquired.reason === 'at-capacity' ? 'at-capacity' : 'unreachable' });+ return;+ }+ const { entry } = acquired;++ const recomputeNow = () => {+ const text = entry.ySource.toString();+ const next: LiveDocTextStatus = !text+ ? entry.synced+ ? { kind: 'empty' }+ : { kind: 'loading' }+ : { kind: 'ready', text };+ setStatus((prev) => reuseIfSame(prev, next));+ };++ let debounceTimer: ReturnType<typeof setTimeout> | null = null;+ const unsubscribe = entry.subscribe({+ onUpdate: () => {+ if (debounceTimer) clearTimeout(debounceTimer);+ debounceTimer = setTimeout(() => {+ debounceTimer = null;+ recomputeNow();+ }, LIVE_DOC_OBSERVE_DEBOUNCE_MS);+ },+ onSynced: () => {+ if (debounceTimer) {+ clearTimeout(debounceTimer);+ debounceTimer = null;+ }+ recomputeNow();+ },+ });++ // Idempotent so the watchdog and the effect cleanup can both call it —+ // the watchdog releases early to stop a never-syncing provider's+ // reconnect loop (this hook's deliberate policy; `useMirrorSource`+ // retains its entry instead, keeping a late sync able to recover a+ // Mirror that has no retry affordance), after which the cleanup must+ // not double-decrement.+ let released = false;+ const releaseOnce = () => {+ if (released) return;+ released = true;+ if (debounceTimer) {+ clearTimeout(debounceTimer);+ debounceTimer = null;+ }+ unsubscribe();+ releaseLiveDocProvider(collabUrl, docName);+ };++ const watchdog = setTimeout(() => {+ if (!entry.synced) {+ setStatus({ kind: 'unreachable' });+ releaseOnce();+ }+ }, LIVE_DOC_SYNC_WATCHDOG_MS);++ recomputeNow();++ return () => {+ clearTimeout(watchdog);+ releaseOnce();+ };+ }, [collabUrl, docName, retryToken]);++ return status;+}diff --git a/packages/app/src/editor/components/snapshot-url-pool.dom.test.ts b/packages/app/src/editor/components/snapshot-url-pool.dom.test.tsnew file mode 100644index 000000000..a35984679--- /dev/null+++ b/packages/app/src/editor/components/snapshot-url-pool.dom.test.ts@@ -0,0 +1,74 @@+/**+ * Eviction-policy tests for the shared snapshot blob-URL pool: past the+ * cap the oldest ORPHAN is revoked, but a URL still bound to any `<img>`+ * in the document (including `display:none` under a hidden Activity) is+ * requeued, never revoked out from under a displayed image.+ */++import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';+import {+ __liveSnapshotUrlCount,+ __resetSnapshotUrlPoolForTests,+ MAX_LIVE_SNAPSHOT_URLS,+ releaseSnapshotUrl,+ retainSnapshotUrl,+} from './snapshot-url-pool.ts';++const revokeObjectURL = vi.fn();++describe('snapshot-url-pool', () => {+ beforeEach(() => {+ revokeObjectURL.mockClear();+ URL.revokeObjectURL = revokeObjectURL;+ __resetSnapshotUrlPoolForTests();+ revokeObjectURL.mockClear();+ document.body.innerHTML = '';+ });+ afterEach(() => {+ __resetSnapshotUrlPoolForTests();+ document.body.innerHTML = '';+ });++ test('past the cap, the oldest orphan is revoked', () => {+ for (let i = 0; i <= MAX_LIVE_SNAPSHOT_URLS; i++) {+ retainSnapshotUrl(`blob:orphan-${i}`);+ }+ expect(revokeObjectURL).toHaveBeenCalledWith('blob:orphan-0');+ expect(__liveSnapshotUrlCount()).toBe(MAX_LIVE_SNAPSHOT_URLS);+ });++ test('a DOM-bound URL at the head is requeued, not revoked', () => {+ // The oldest entry is still shown by an <img> (a hidden Activity keeps+ // exactly this shape alive: DOM present, effects unmounted).+ const img = document.createElement('img');+ img.src = 'blob:still-shown';+ document.body.append(img);++ retainSnapshotUrl('blob:still-shown');+ for (let i = 0; i < MAX_LIVE_SNAPSHOT_URLS; i++) {+ retainSnapshotUrl(`blob:orphan-${i}`);+ }++ expect(revokeObjectURL).not.toHaveBeenCalledWith('blob:still-shown');+ // The orphan behind it was reclaimed instead.+ expect(revokeObjectURL).toHaveBeenCalledWith('blob:orphan-0');+ });++ test('a fully DOM-bound pool grows instead of revoking anything', () => {+ for (let i = 0; i <= MAX_LIVE_SNAPSHOT_URLS; i++) {+ const img = document.createElement('img');+ img.src = `blob:bound-${i}`;+ document.body.append(img);+ retainSnapshotUrl(`blob:bound-${i}`);+ }+ expect(revokeObjectURL).not.toHaveBeenCalled();+ expect(__liveSnapshotUrlCount()).toBe(MAX_LIVE_SNAPSHOT_URLS + 1);+ });++ test('release removes the entry and revokes immediately', () => {+ retainSnapshotUrl('blob:replaced');+ releaseSnapshotUrl('blob:replaced');+ expect(revokeObjectURL).toHaveBeenCalledWith('blob:replaced');+ expect(__liveSnapshotUrlCount()).toBe(0);+ });+});diff --git a/packages/app/src/editor/components/snapshot-url-pool.ts b/packages/app/src/editor/components/snapshot-url-pool.tsnew file mode 100644index 000000000..78b73896d--- /dev/null+++ b/packages/app/src/editor/components/snapshot-url-pool.ts@@ -0,0 +1,85 @@+/**+ * Bounded registry of live snapshot blob URLs, shared by by-reference+ * renderers that paint exported images (today: the Excalidraw embed).+ *+ * Why not revoke in effect cleanup: under `<Activity mode="hidden">`+ * effects unmount while the `<img>` (DOM + refs kept) still shows the+ * URL, and React gives an effect no way to distinguish hide from true+ * unmount — so per-embed cleanup cannot revoke safely, and true-unmount+ * orphans need reclaiming somewhere else. This pool is that somewhere.+ *+ * Eviction is liveness-aware, not purely positional: past the cap, the+ * oldest entry is revoked ONLY if no `<img>` in the document (visible or+ * `display:none` under a hidden Activity) is still bound to it — a+ * still-bound entry is requeued behind the newcomers instead. The+ * invariant the pool actually provides: a DOM-bound URL is never revoked;+ * the outstanding set is bounded by max(cap, currently-DOM-bound URLs).+ * The cap follows `LIVE_DOC_POOL_MAX` — the same constant that bounds how+ * many live references can be painting concurrently.+ */++import { LIVE_DOC_POOL_MAX } from './live-doc-pool.ts';++export const MAX_LIVE_SNAPSHOT_URLS = LIVE_DOC_POOL_MAX;++const liveSnapshotUrls: string[] = [];++function isDomBound(url: string): boolean {+ if (typeof document === 'undefined') return false;+ // Blob URLs are globally unique strings, so attribute equality is an+ // exact liveness probe — and it sees `display:none` subtrees, which is+ // precisely the hidden-Activity case cleanup can't. A plain scan over+ // `document.images` avoids selector-escaping concerns entirely.+ for (const img of document.images) {+ if (img.getAttribute('src') === url) return true;+ }+ return false;+}++/** Register a freshly minted snapshot URL, reclaiming old orphans. */+export function retainSnapshotUrl(url: string): void {+ liveSnapshotUrls.push(url);+ let scans = 0;+ while (liveSnapshotUrls.length > MAX_LIVE_SNAPSHOT_URLS && scans < liveSnapshotUrls.length) {+ const oldest = liveSnapshotUrls.shift();+ if (!oldest) break;+ scans += 1;+ if (isDomBound(oldest)) {+ // Still on screen (or kept alive under a hidden Activity) — requeue+ // behind the newcomers rather than break a displayed image. A fully+ // claimed pool grows instead of spinning; the scan bound guarantees+ // termination.+ liveSnapshotUrls.push(oldest);+ continue;+ }+ URL.revokeObjectURL(oldest);+ }+}++/** Release a URL its owner replaced — it is no longer shown anywhere. */+export function releaseSnapshotUrl(url: string): void {+ const idx = liveSnapshotUrls.indexOf(url);+ if (idx >= 0) liveSnapshotUrls.splice(idx, 1);+ URL.revokeObjectURL(url);+}++/** Test-only visibility into pool occupancy (never mutate through this). */+export function __liveSnapshotUrlCount(): number {+ return liveSnapshotUrls.length;+}++/** Test-only: revoke and forget everything (module state has no other+ * reset, and rendering suites would otherwise accumulate orphans across+ * files until eviction fires mid-test). */+export function __resetSnapshotUrlPoolForTests(): void {+ for (const url of liveSnapshotUrls) URL.revokeObjectURL(url);+ liveSnapshotUrls.length = 0;+}++if (import.meta.hot) {+ // Same contract as the sibling pools: editing a consumer in dev must not+ // strand the old module instance's blob URLs.+ import.meta.hot.dispose(() => {+ __resetSnapshotUrlPoolForTests();+ });+}diff --git a/packages/app/src/editor/components/use-app-color-mode.ts b/packages/app/src/editor/components/use-app-color-mode.tsnew file mode 100644index 000000000..8f8a3b6f2--- /dev/null+++ b/packages/app/src/editor/components/use-app-color-mode.ts@@ -0,0 +1,43 @@+/**+ * The app's active color mode, for renderers whose output bakes the theme+ * in at draw time (mermaid's themeVariables, Excalidraw's SVG export) and+ * so cannot ride CSS variables the way styled DOM does.+ *+ * Reads the `<html>` class list — the theme provider sets `.dark`/`.light`+ * on `documentElement` (the same contract `useApplyConfigTheme` writes and+ * `useThemeBridge` consumes), so the class is authoritative once the app is+ * up; `prefers-color-scheme` covers only the pre-mount window. The sync+ * runs once BEFORE the observer attaches, closing the window where the+ * provider sets the class between first render and effect commit — the+ * observer only sees post-`observe()` mutations.+ */++import { useEffect, useState } from 'react';++function readDocumentColorMode(): 'light' | 'dark' {+ if (typeof document !== 'undefined') {+ const cls = document.documentElement.classList;+ if (cls.contains('dark')) return 'dark';+ if (cls.contains('light')) return 'light';+ }+ if (typeof window !== 'undefined' && window.matchMedia) {+ return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';+ }+ return 'light';+}++export function useAppColorMode(): 'light' | 'dark' {+ const [colorMode, setColorMode] = useState<'light' | 'dark'>(() => readDocumentColorMode());+ useEffect(() => {+ if (typeof document === 'undefined') return;+ const sync = () => {+ const next = readDocumentColorMode();+ setColorMode((prev) => (prev === next ? prev : next));+ };+ sync();+ const observer = new MutationObserver(sync);+ observer.observe(document.documentElement, { attributes: true, attributeFilter: ['class'] });+ return () => observer.disconnect();+ }, []);+ return colorMode;+}diff --git a/packages/app/src/editor/components/use-mirror-source.dom.test.tsx b/packages/app/src/editor/components/use-mirror-source.dom.test.tsxnew file mode 100644index 000000000..1e9166e80--- /dev/null+++ b/packages/app/src/editor/components/use-mirror-source.dom.test.tsx@@ -0,0 +1,126 @@+/**+ * `useMirrorSource` status-mapping tests with the WebSocket transport+ * faked at the `@hocuspocus/provider` boundary — the same harness shape as+ * `live-doc-pool.dom.test.tsx`. Pins the refusal discrimination (a pool+ * capacity refusal must NOT render as "source removed") and the+ * ready-state identity dedup across reconnect replays. The pure+ * tree-walking helpers are covered in `use-mirror-source.test.ts`.+ */++import { act, cleanup, renderHook } from '@testing-library/react';+import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';+import type * as Y from 'yjs';++type SyncedListener = () => void;++class FakeProvider {+ static instances: FakeProvider[] = [];+ document: Y.Doc;+ name: string;+ private syncedListeners: SyncedListener[] = [];++ constructor(opts: { url: string; name: string; document: Y.Doc }) {+ this.document = opts.document;+ this.name = opts.name;+ FakeProvider.instances.push(this);+ }++ on(event: string, cb: SyncedListener) {+ if (event === 'synced') this.syncedListeners.push(cb);+ }++ emitSynced() {+ for (const cb of this.syncedListeners) cb();+ }++ destroy() {}+}++vi.doMock('@hocuspocus/provider', () => ({ HocuspocusProvider: FakeProvider }));+vi.doMock('@/lib/use-collab-url', () => ({+ useCollabUrl: () => ({ collabUrl: 'ws://test/collab' }),+}));++const { acquireLiveDocProvider, disposeLiveDocPool, LIVE_DOC_POOL_MAX } = await import(+ './live-doc-pool.ts'+);+const { useMirrorSource } = await import('./use-mirror-source.ts');++const SOURCE_MD = [+ '<MirrorSource id="intro">',+ '',+ 'Hello from the source.',+ '',+ '</MirrorSource>',+].join('\n');++function lastProvider(): FakeProvider {+ const p = FakeProvider.instances.at(-1);+ if (!p) throw new Error('no provider constructed');+ return p;+}++function setSource(p: FakeProvider, text: string) {+ const ytext = p.document.getText('source');+ p.document.transact(() => {+ ytext.delete(0, ytext.length);+ ytext.insert(0, text);+ });+}++describe('useMirrorSource', () => {+ beforeEach(() => {+ FakeProvider.instances = [];+ });+ afterEach(() => {+ cleanup();+ disposeLiveDocPool();+ });++ test('a pool capacity refusal maps to at-capacity, never source-removed', () => {+ const warn = vi.spyOn(console, 'warn').mockImplementation(() => {});+ try {+ for (let i = 0; i < LIVE_DOC_POOL_MAX; i++) {+ const acquired = acquireLiveDocProvider('ws://test/collab', `fill-${i}`);+ expect(acquired.ok).toBe(true);+ }++ const { result } = renderHook(() => useMirrorSource('one-more-doc', 'intro'));+ // The source doc is fine — claiming it was removed would send the+ // user to fix content that isn't broken.+ expect(result.current).toEqual({ kind: 'at-capacity' });+ } finally {+ warn.mockRestore();+ }+ });++ test('an inadmissible docName maps to source-removed', () => {+ const warn = vi.spyOn(console, 'warn').mockImplementation(() => {});+ try {+ const { result } = renderHook(() => useMirrorSource('__config__/project', 'intro'));+ expect(result.current).toEqual({ kind: 'source-removed' });+ expect(FakeProvider.instances.length).toBe(0);+ } finally {+ warn.mockRestore();+ }+ });++ test('a reconnect replay of identical source preserves ready-status identity', () => {+ const { result } = renderHook(() => useMirrorSource('source-doc', 'intro'));+ const provider = lastProvider();+ act(() => {+ setSource(provider, SOURCE_MD);+ provider.emitSynced();+ });+ expect(result.current.kind).toBe('ready');+ const before = result.current;++ // Every reconnect re-fires onSynced; identical HTML must not mint a+ // fresh status object and re-render every Mirror for a pixel-identical+ // result.+ act(() => {+ provider.emitSynced();+ });+ expect(result.current).toBe(before);+ });+});diff --git a/packages/app/src/editor/components/use-mirror-source.test.ts b/packages/app/src/editor/components/use-mirror-source.test.tsindex 9de8c4f48..300035dd1 100644--- a/packages/app/src/editor/components/use-mirror-source.test.ts+++ b/packages/app/src/editor/components/use-mirror-source.test.ts@@ -1,9 +1,10 @@/*** Unit tests for the pure functions that drive Mirror resolution. The* `useMirrorSource` hook itself is React + Y.js + Hocuspocus and not- * exercised here — the hook's behavior is covered by the integration tests- * in `tests/integration` and by the live showcase doc. These tests pin- * the tree-walking + subtree-render shape so anchor-matching and HTML+ * exercised here — the pool machinery it subscribes through is covered by+ * `tests/integration/live-doc-pool.test.ts` (real server) and+ * `live-doc-pool.dom.test.tsx` (hook-level, faked transport). These tests+ * pin the tree-walking + subtree-render shape so anchor-matching and HTML* synthesis can't silently regress.*/diff --git a/packages/app/src/editor/components/use-mirror-source.ts b/packages/app/src/editor/components/use-mirror-source.tsindex 142e32e17..059a88a2d 100644--- a/packages/app/src/editor/components/use-mirror-source.ts+++ b/packages/app/src/editor/components/use-mirror-source.ts@@ -2,8 +2,8 @@* `useMirrorSource(src, anchor)` — resolves a `<Mirror>` reference to the* HTML of the matching `<MirrorSource id="…">` subtree in the source doc.*- * Strategy: acquires a (collabUrl, src)-keyed `HocuspocusProvider` from a- * module-local cache, observes the source's `Y.Text('source')` for live+ * Strategy: acquires a (collabUrl, src)-keyed `HocuspocusProvider` from the+ * shared `live-doc-pool`, observes the source's `Y.Text('source')` for live* re-renders, and renders the matching MirrorSource subtree through the* shared `mdastToHtml` pipeline so a Mirror appears bit-equivalent to what* the docs site / preview produces for the same content.@@ -29,7 +29,7 @@* anchor without touching the WebSocket. Changing only the anchor (a very* common property-panel edit) no longer tears down + reopens the connection.*- * Y.Text observer is debounced (`OBSERVE_DEBOUNCE_MS`, 150ms trailing-edge)+ * Y.Text observer is debounced (`LIVE_DOC_OBSERVE_DEBOUNCE_MS`, 150ms trailing-edge)* because every keystroke in the source doc fires the observer; a full* parse + mdast walk + hast render per keystroke is wasted work across N* Mirrors. CC1 broadcasts use the same 100ms-class debounce for the same@@ -43,12 +43,16 @@* observer on `Activity` flipping to hidden is deferred.*/-import { HocuspocusProvider } from '@hocuspocus/provider';import { mdastToHtml } from '@inkeep/open-knowledge-core';import { useEffect, useRef, useState } from 'react';-import * as Y from 'yjs';import { useCollabUrl } from '@/lib/use-collab-url';import { getSharedMarkdownManager } from '../utils/md-singleton.ts';+import {+ acquireLiveDocProvider,+ LIVE_DOC_OBSERVE_DEBOUNCE_MS,+ LIVE_DOC_SYNC_WATCHDOG_MS,+ releaseLiveDocProvider,+} from './live-doc-pool.ts';// Note: this hook intentionally does NOT import `useDocumentContext` from// `../DocumentContext.tsx`. DocumentContext transitively pulls in@@ -87,7 +91,10 @@ type MirrorSourceStatus =| { kind: 'ready'; html: string }| { kind: 'source-removed' }| { kind: 'anchor-not-found' }- | { kind: 'empty-props' };+ | { kind: 'empty-props' }+ /** The shared live-doc pool declined another connection — the source doc+ * itself is fine. Rendered with capacity copy, never "removed". */+ | { kind: 'at-capacity' };/*** Find the first `<MirrorSource>` node in the mdast tree whose `id`@@ -146,110 +153,6 @@ export function renderMirrorSubtree(node: MdxJsxFlowElementLike): string {return mdastToHtml(synthRoot as any);}-/**- * Refcounted entry per (collabUrl, src). The provider opens once on first- * acquire and is destroyed when the last Mirror referencing it unmounts.- *- * Each subscriber registers two callbacks: `onUpdate` (fired on every- * `Y.Text` mutation — high-frequency keystrokes; the hook wraps it with a- * trailing-edge debounce) and `onSynced` (fired every time the provider- * confirms state-sync — initial handshake AND every subsequent reconnect;- * the hook calls `recomputeNow` directly so post-handshake paints don't- * eat the 150ms debounce delay).- */-interface MirrorSubscriber {- onUpdate: () => void;- onSynced: () => void;-}-interface MirrorPoolEntry {- provider: HocuspocusProvider;- ySource: Y.Text;- refcount: number;- synced: boolean;- subscribers: Set<MirrorSubscriber>;-}-const mirrorPool = new Map<string, MirrorPoolEntry>();--// Soft warning threshold for pool growth. Refcounted cleanup keeps the-// upper bound proportional to live Mirror references, but a doc with many-// distinct sources could surface a perf bug here — warn so it surfaces-// during dev rather than browsers silently throttling the WS pool.-const MIRROR_POOL_WARN_AT = 30;-// Trailing-edge debounce on Y.Text observer. Source-doc keystrokes shouldn't-// trigger a full mdast parse + hast render per character.-const OBSERVE_DEBOUNCE_MS = 150;-// Watchdog timeout for never-synced providers (server down, bad src).-// Without this, a Mirror pointing at an unreachable doc stays in `loading`-// indefinitely while HocuspocusProvider retries with exponential backoff.-const SYNC_WATCHDOG_MS = 10_000;--function acquireMirrorProvider(collabUrl: string, src: string): MirrorPoolEntry {- const key = `${collabUrl}|${src}`;- const existing = mirrorPool.get(key);- if (existing) {- existing.refcount += 1;- return existing;- }- const yDoc = new Y.Doc();- // Reconnect cap lives on the underlying `HocuspocusProviderWebsocket`- // config rather than the provider top-level config; we accept default- // reconnect behavior here and rely on `SYNC_WATCHDOG_MS` to surface a- // bad src (unreachable doc) by transitioning out of `loading` after- // 10s. Read-only consumers don't have ergonomic value in fewer retries.- const provider = new HocuspocusProvider({- url: collabUrl,- name: src,- document: yDoc,- });- const subscribers = new Set<MirrorSubscriber>();- const entry: MirrorPoolEntry = {- provider,- ySource: yDoc.getText('source'),- refcount: 1,- synced: false,- subscribers,- };- provider.on('synced', () => {- entry.synced = true;- // Fan out to every subscriber's onSynced callback so pre-sync mounts- // parked on `loading` move to `ready` / `source-removed` immediately.- // Routing through onSynced (not onUpdate) bypasses the debounce — the- // first content paint after WS handshake shouldn't eat 150ms of delay- // just because synced and a Y.Text update happened to coincide.- for (const sub of subscribers) sub.onSynced();- });- // Single shared Y.Text observer per provider. Mirrors join via the- // `subscribers` set rather than each calling `ySource.observe` themselves —- // keeps observer count tied to the source doc, not to mount count.- entry.ySource.observe(() => {- for (const sub of subscribers) sub.onUpdate();- });- mirrorPool.set(key, entry);- if (mirrorPool.size > MIRROR_POOL_WARN_AT) {- console.warn(- `[Mirror] provider pool exceeded ${MIRROR_POOL_WARN_AT} entries (current=${mirrorPool.size}). Many Mirrors pointing at distinct source docs — investigate if this is a runaway pattern.`,- );- }- return entry;-}--function releaseMirrorProvider(collabUrl: string, src: string): void {- const key = `${collabUrl}|${src}`;- const entry = mirrorPool.get(key);- if (!entry) return;- entry.refcount -= 1;- if (entry.refcount <= 0) {- try {- entry.provider.destroy();- } catch (err) {- // Best-effort teardown — don't let a destroy failure leak the entry- // and turn a future acquire into a zombie hand-off.- console.warn('[Mirror] provider.destroy() failed during release', { src, err });- }- mirrorPool.delete(key);- }-}-export function useMirrorSource(src: string, anchor: string): MirrorSourceStatus {const { collabUrl } = useCollabUrl();const [status, setStatus] = useState<MirrorSourceStatus>({ kind: 'loading' });@@ -274,7 +177,22 @@ export function useMirrorSource(src: string, anchor: string): MirrorSourceStatusreturn;}- const entry = acquireMirrorProvider(collabUrl, src);+ const acquired = acquireLiveDocProvider(collabUrl, src);+ if (!acquired.ok) {+ // Honest terminal per cause: an inadmissible name (system/config+ // plane) is content-shaped and renders as "source removed"; a+ // capacity refusal is a client-side condition and must NOT claim the+ // doc is gone. Warn either way so the refusal is grep-able.+ console.warn('[Mirror] live-doc pool refused subscription', {+ src,+ reason: acquired.reason,+ });+ setStatus(+ acquired.reason === 'at-capacity' ? { kind: 'at-capacity' } : { kind: 'source-removed' },+ );+ return;+ }+ const { entry } = acquired;const recomputeNow = () => {const currentAnchor = anchorRef.current;@@ -320,7 +238,12 @@ export function useMirrorSource(src: string, anchor: string): MirrorSourceStatussetStatus({ kind: 'anchor-not-found' });return;}- setStatus({ kind: 'ready', html });+ // Keep state identity when the rendered HTML is unchanged, so a+ // reconnect's onSynced replay doesn't re-render every Mirror for a+ // pixel-identical result.+ setStatus((prev) =>+ prev.kind === 'ready' && prev.html === html ? prev : { kind: 'ready', html },+ );};// Trailing-edge debounce. Y.Text observers fire on every keystroke in@@ -331,7 +254,7 @@ export function useMirrorSource(src: string, anchor: string): MirrorSourceStatusdebounceTimer = setTimeout(() => {debounceTimer = null;recomputeNow();- }, OBSERVE_DEBOUNCE_MS);+ }, LIVE_DOC_OBSERVE_DEBOUNCE_MS);};// Subscribe to the pool's shared observer + synced fan-out. `onUpdate`@@ -339,7 +262,7 @@ export function useMirrorSource(src: string, anchor: string): MirrorSourceStatus// `recomputeNow` directly so the first paint after WS handshake is// immediate. Anchor changes use `recomputeNow` via the ref (low-// frequency, want immediate feedback).- const subscriber: MirrorSubscriber = {+ const unsubscribe = entry.subscribe({onUpdate: recomputeDebounced,onSynced: () => {// Cancel any in-flight debounce; we're about to render synchronously.@@ -349,26 +272,29 @@ export function useMirrorSource(src: string, anchor: string): MirrorSourceStatus}recomputeNow();},- };- entry.subscribers.add(subscriber);+ });recomputeRef.current = recomputeNow;// Watchdog: if sync never completes (server unreachable / auth fail),// transition out of `loading` so the user sees an actionable state.+ // Deliberately RETAINS the entry (unlike `useLiveDocText`, which+ // releases): a Mirror has no retry affordance, so keeping the provider+ // lets a late sync recover it — at the cost of the retained entry+ // counting against the pool cap for the session.const watchdog = setTimeout(() => {if (!entry.synced) {setStatus({ kind: 'source-removed' });}- }, SYNC_WATCHDOG_MS);+ }, LIVE_DOC_SYNC_WATCHDOG_MS);recomputeNow();return () => {clearTimeout(watchdog);if (debounceTimer) clearTimeout(debounceTimer);- entry.subscribers.delete(subscriber);+ unsubscribe();recomputeRef.current = null;- releaseMirrorProvider(collabUrl, src);+ releaseLiveDocProvider(collabUrl, src);};}, [collabUrl, src]);diff --git a/packages/app/src/editor/editor-cache.test.ts b/packages/app/src/editor/editor-cache.test.tsindex 0e366bd70..6f6878357 100644--- a/packages/app/src/editor/editor-cache.test.ts+++ b/packages/app/src/editor/editor-cache.test.ts@@ -2747,6 +2747,47 @@ describe('captureRenameSnapshots', () => {expect(__consumeRenameSnapshot(h.docName)).toBeNull();});+ test('skips a doc-class-changing rename — the markdown HTML has no consumer there', () => {+ // `.md` -> `.excalidraw` / `.mmd` / text mounts a different editor whose+ // fallback must be the skeleton: a warm markdown snapshot would paint the+ // pre-rename text over the incoming canvas, and nothing on those branches+ // ever clears the store entry.+ for (const toDocName of ['board.excalidraw', 'diagram.mmd', 'notes.txt']) {+ const h = makeTiptapHarness(`from-${toDocName}`);+ mountTiptapEditor({+ docName: h.docName,+ container: h.container as unknown as HTMLElement,+ factory: h.factory as unknown as (el: HTMLElement) => ReturnType<typeof h.factory>,+ });+ seedSource(h);+ (h.editor as unknown as { getHTML(): string }).getHTML = () => '<p>warm content</p>';++ captureRenameSnapshots([{ fromDocName: h.docName, toDocName }]);++ expect(__consumeRenameSnapshot(toDocName)).toBeNull();+ }+ });++ test('captures for an extension without a doc-class discriminator — the dispatch mounts the dual editor there', () => {+ // `isMarkdownDocFile` is the negation of the per-class discriminators,+ // matching the editor's children dispatch: a name like `future.canvas`+ // has no discriminator, so the dual editor mounts and consumes the+ // snapshot. A class gets excluded here only by adding its discriminator+ // — the same edit point the dispatch itself requires.+ const h = makeTiptapHarness('from-future.canvas');+ mountTiptapEditor({+ docName: h.docName,+ container: h.container as unknown as HTMLElement,+ factory: h.factory as unknown as (el: HTMLElement) => ReturnType<typeof h.factory>,+ });+ seedSource(h);+ (h.editor as unknown as { getHTML(): string }).getHTML = () => '<p>warm content</p>';++ captureRenameSnapshots([{ fromDocName: h.docName, toDocName: 'future.canvas' }]);++ expect(__consumeRenameSnapshot('future.canvas')?.html).toBe('<p>warm content</p>');+ });+test('skips and does not store when editor.isDestroyed is true', () => {const h = makeTiptapHarness('from-doc');mountTiptapEditor({diff --git a/packages/app/src/editor/editor-cache.ts b/packages/app/src/editor/editor-cache.tsindex 3dddc22c0..76efeebd5 100644--- a/packages/app/src/editor/editor-cache.ts+++ b/packages/app/src/editor/editor-cache.ts@@ -48,6 +48,7 @@ import type { Compartment } from '@codemirror/state';import type { EditorView } from '@codemirror/view';import type { HocuspocusProvider } from '@hocuspocus/provider';import type { RenamedDocMapping } from '@inkeep/open-knowledge-core';+import { isMarkdownDocFile } from '@inkeep/open-knowledge-core';import type { Editor } from '@tiptap/core';import { NodeSelection, TextSelection } from '@tiptap/pm/state';import { yUndoPluginKey } from '@tiptap/y-tiptap';@@ -556,6 +557,24 @@ export function captureRenameSnapshots(renamed: readonly RenamedDocMapping[]): v});continue;}+ // A rename that changes the doc class (`.md` → `.excalidraw` /+ // `.mmd` / text) mounts a different editor entirely. The captured+ // markdown HTML can only ever be re-rendered by the dual-editor+ // branch, so storing it here would paint the OLD text over the new+ // surface until its lazy bundle lands, and the entry would also+ // squat a MAX_CACHE FIFO slot no consumer will ever clear (TipTap's+ // 'create' is the consumer). `isMarkdownDocFile` is the negation of+ // the per-class discriminators, so this gate tracks the editor's+ // children dispatch by construction: a FUTURE doc class starts+ // excluded here the moment its discriminator lands — the same edit+ // point the dispatch needs — with no denylist entry to forget.+ if (!isMarkdownDocFile(renamedDoc.toDocName)) {+ mark('ok/cache/snapshot-skipped-class-change', {+ fromDocName: renamedDoc.fromDocName,+ toDocName: renamedDoc.toDocName,+ });+ continue;+ }storeRenameSnapshot(renamedDoc.toDocName, {html: cachedEntry.editor.getHTML(),scrollTop: readActiveScrollTop(),diff --git a/packages/app/src/editor/extensions/JsxComponentView.mermaid-expand.dom.test.tsx b/packages/app/src/editor/extensions/JsxComponentView.mermaid-expand.dom.test.tsxindex 267f8eb40..0264be13e 100644--- a/packages/app/src/editor/extensions/JsxComponentView.mermaid-expand.dom.test.tsx+++ b/packages/app/src/editor/extensions/JsxComponentView.mermaid-expand.dom.test.tsx@@ -1,12 +1,37 @@/**- * The Expand button on a Mermaid fence's chrome bar, and the lightbox it- * opens. Sister harness to `JsxComponentView.ask-ai.dom.test.tsx`: mocked- * NodeViewProps around the real view, asked through the DOM.+ * The Expand buttons on the chrome bar — a Mermaid fence's (which mounts+ * the host-owned lightbox) and an Excalidraw block's (which drives the+ * embed's own dialog through controlled props). Sister harness to+ * `JsxComponentView.ask-ai.dom.test.tsx`: mocked NodeViewProps around the+ * real view, asked through the DOM.*/import { cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react';import type { NodeViewProps } from '@tiptap/react';-import { afterEach, describe, expect, test } from 'vitest';+import { afterEach, describe, expect, test, vi } from 'vitest';++// The Excalidraw embed's live subscription and exporter are jsdom-hostile+// (real WebSocket provider, real SVG export); both are inputs here, not the+// contract under test.+vi.doMock('../components/live-doc-pool.ts', () => ({+ useLiveDocText: () => ({ kind: 'ready', text: '{"elements":[]}' }),+ // The snapshot-url pool derives its cap from this at module load.+ LIVE_DOC_POOL_MAX: 30,+}));+vi.doMock('@excalidraw/excalidraw', () => ({+ exportToSvg: async () => document.createElementNS('http://www.w3.org/2000/svg', 'svg'),+ restore: (data: unknown) => ({+ elements: (data as { elements?: unknown[] })?.elements ?? [],+ appState: {},+ files: {},+ }),+}));++// jsdom ships no object-URL implementation; the embed's blob-`<img>`+// snapshot indirection needs one.+let blobUrlCounter = 0;+URL.createObjectURL = () => `blob:mock-${++blobUrlCounter}`;+URL.revokeObjectURL = () => {};afterEach(() => {cleanup();@@ -18,7 +43,8 @@ interface Overrides {}function makeProps({ componentName = 'MermaidFence', chart = 'graph TD;' }: Overrides = {}) {- const propName = componentName === 'MermaidFence' ? 'chart' : 'formula';+ const propName =+ componentName === 'MermaidFence' ? 'chart' : componentName === 'Excalidraw' ? 'src' : 'formula';return {editor: {isEditable: true,@@ -96,3 +122,42 @@ describe('the chrome bar Expand button', () => {expect(screen.queryByRole('dialog')).toBeNull();});});++const boardExpandBtn = () =>+ document.querySelector<HTMLButtonElement>('[data-testid="jsx-component-expand-board-btn"]');++describe('the chrome bar Expand button for Excalidraw blocks', () => {+ test('opens the embed lightbox for a referenced board', async () => {+ await mount(makeProps({ componentName: 'Excalidraw', chart: 'demo/board.excalidraw' }));+ const btn = boardExpandBtn();+ expect(btn).toBeTruthy();+ // The affordance is chrome-only — the chrome button sits outside the+ // embed card, and the card subtree offers no expand button of its own+ // (its only button is the Open-board link-out).+ const card = document.querySelector('.excalidraw-embed');+ expect(card).not.toBeNull();+ expect(card?.contains(btn)).toBe(false);+ const cardExpandButtons = Array.from(card?.querySelectorAll('button') ?? []).filter((b) =>+ /expand/i.test(`${b.getAttribute('aria-label') ?? ''} ${b.textContent ?? ''}`),+ );+ expect(cardExpandButtons).toEqual([]);+ // The snapshot lands as a blob-backed <img> (the exported SVG never+ // enters the live DOM).+ await waitFor(() => {+ expect(+ document.querySelector('[data-testid="excalidraw-embed-snapshot"] img'),+ ).not.toBeNull();+ });++ fireEvent.click(btn as HTMLButtonElement);++ await waitFor(() => {+ expect(document.querySelector('[role="dialog"]')).not.toBeNull();+ });+ });++ test('is absent while the board reference is empty', async () => {+ await mount(makeProps({ componentName: 'Excalidraw', chart: ' ' }));+ expect(boardExpandBtn()).toBeNull();+ });+});diff --git a/packages/app/src/editor/extensions/JsxComponentView.tsx b/packages/app/src/editor/extensions/JsxComponentView.tsxindex 130b9ec50..725d36d19 100644--- a/packages/app/src/editor/extensions/JsxComponentView.tsx+++ b/packages/app/src/editor/extensions/JsxComponentView.tsx@@ -75,6 +75,7 @@ import {import { OPT_OUT_ATTR } from '../clipboard/index.ts';import { CodePreviewEditModal } from '../components/CodePreviewEditModal';import { DescriptorPlaceholder } from '../components/DescriptorPlaceholder.tsx';+import { boardDocNameFromSrc } from '../components/ExcalidrawEmbed.tsx';import { JsxComponentHostProvider } from '../components/jsx-host-context.tsx';import { MermaidLightbox } from '../components/Mermaid';import { PropPanel } from '../components/PropPanel.tsx';@@ -445,6 +446,7 @@ export function JsxComponentView({ node, editor, extension, getPos, selected }:: null;const [editModalOpen, setEditModalOpen] = useState(false);const [diagramLightboxOpen, setDiagramLightboxOpen] = useState(false);+ const [boardLightboxOpen, setBoardLightboxOpen] = useState(false);// Source-bearing self-closing leaves (today only MermaidFence) hide their// single required prop from the PropPanel and author it in the fullscreen@@ -520,6 +522,19 @@ export function JsxComponentView({ node, editor, extension, getPos, selected }:useEffect(() => {if (!diagramExpandable) setDiagramLightboxOpen(false);}, [diagramExpandable]);+ // Excalidraw twin of the mermaid predicate: the chrome expand drives the+ // embed's own lightbox through controlled props. Gate on the SAME src+ // resolver the embed uses, not just "non-blank string" — a src the+ // resolver rejects (foreign origin, traversal, non-.excalidraw name) can+ // never become expandable, so rendering the button for it would be a+ // guaranteed dead click.+ const boardExpandable =+ descriptor.name === 'Excalidraw' &&+ typeof renderProps.src === 'string' &&+ boardDocNameFromSrc(renderProps.src) !== null;+ useEffect(() => {+ if (!boardExpandable) setBoardLightboxOpen(false);+ }, [boardExpandable]);// Stable reset key for the ErrorBoundary. `JSON.stringify` on an arbitrary// props object produced a string whose content was key-order-sensitive// across engines — combined with the post-edit re-serialization that@@ -1289,6 +1304,21 @@ export function JsxComponentView({ node, editor, extension, getPos, selected }:</button>) : null}+ {/* Expand — Excalidraw. Same view affordance as the mermaid one;+ the dialog itself lives inside the embed (it owns the exported+ snapshot), driven by the controlled props below. */}+ {boardExpandable ? (+ <button+ type="button"+ className="jsx-chrome-btn"+ aria-label={t`Expand board`}+ data-testid="jsx-component-expand-board-btn"+ onClick={() => setBoardLightboxOpen(true)}+ >+ <Maximize2 size={12} aria-hidden="true" />+ </button>+ ) : null}+{/* Ask AI — the same composer the text bubble menu's Ask AI opens,reached the way a code block reaches it: from the block's ownchrome. A component that keeps its content in attributes rather@@ -1540,6 +1570,9 @@ export function JsxComponentView({ node, editor, extension, getPos, selected }:{...(expandableChart !== null? { onExpand: () => setDiagramLightboxOpen(true) }: {})}+ {...(boardExpandable+ ? { expandOpen: boardLightboxOpen, onExpandOpenChange: setBoardLightboxOpen }+ : {})}><NodeViewContentclassName={`component-children ${diff --git a/packages/app/src/editor/extensions/media-render-props.test.ts b/packages/app/src/editor/extensions/media-render-props.test.tsindex d1ad96c11..ab6f5f8b3 100644--- a/packages/app/src/editor/extensions/media-render-props.test.ts+++ b/packages/app/src/editor/extensions/media-render-props.test.ts@@ -93,3 +93,25 @@ describe('normalizeDocRelativeMediaRenderProps', () => {).toEqual({ src: '/notes/archive.zip' });});});++/**+ * Cross-package parity pin: the JSX src-reference registry's `resolution`+ * field must agree with the render normalization's doc-relative allowlist+ * — it is the field that decides whether the backlink graph and the+ * rename rewriter resolve a `src` the same way the renderer loads it.+ */+describe('JSX src-ref registry ↔ render-prop normalization parity', () => {+ test("every registry row's resolution matches the renderer's doc-relative set", async () => {+ const { JSX_SRC_REF_TAGS } = await import('@inkeep/open-knowledge-core');+ const { DOC_RELATIVE_SRC_COMPONENTS } = await import('./media-render-props.ts');+ for (const spec of JSX_SRC_REF_TAGS) {+ const rendererResolvesDocRelative = DOC_RELATIVE_SRC_COMPONENTS.has(spec.tagName);+ expect+ .soft(+ spec.resolution === 'doc-relative',+ `${spec.tagName}: registry says '${spec.resolution}' but DOC_RELATIVE_SRC_COMPONENTS.has(...) is ${rendererResolvesDocRelative} — the graph/rewriter would resolve srcs differently than the renderer loads them`,+ )+ .toBe(rendererResolvesDocRelative);+ }+ });+});diff --git a/packages/app/src/editor/extensions/media-render-props.ts b/packages/app/src/editor/extensions/media-render-props.tsindex c0bbb6ada..d2039f620 100644--- a/packages/app/src/editor/extensions/media-render-props.ts+++ b/packages/app/src/editor/extensions/media-render-props.ts@@ -1,12 +1,13 @@import { normalizeDocRelativeAssetUrl } from '@inkeep/open-knowledge-core';-const DOC_RELATIVE_SRC_COMPONENTS = new Set([+export const DOC_RELATIVE_SRC_COMPONENTS = new Set(['img','CommonMarkImage','video','audio','Pdf','File',+ 'Excalidraw',]);export function normalizeDocRelativeMediaRenderProps(diff --git a/packages/app/src/editor/is-system-doc.ts b/packages/app/src/editor/is-system-doc.tsindex 2ca91f3b8..a06689640 100644--- a/packages/app/src/editor/is-system-doc.ts+++ b/packages/app/src/editor/is-system-doc.ts@@ -1,13 +1,22 @@/**- * Client-side mirror of the server's `cc1-broadcast.ts:isSystemDoc` check.- * The `__system__` pseudo-doc carries CC1 push signals (derived-view- * invalidation) on a dedicated Y.Doc — it is not user-editable content and- * must never be admitted to the editor ProviderPool.- *+ * Client-side mirror of the server's `cc1-broadcast.ts:isSystemDoc` /+ * `isConfigDoc` checks. The `__system__` pseudo-doc carries CC1 push signals+ * (derived-view invalidation) on a dedicated Y.Doc; config docs+ * (`__config__/project`, `__local__/project`, `__user__/config.yml`,+ * `__config__/okignore`) are Y.Text-only settings planes. Neither is+ * user-editable content, and neither may be admitted to a documentName-keyed+ * pool (STOP rule: every documentName-keyed entry point short-circuits on+ * `isSystemDoc(name) || isConfigDoc(name)`).*/-import { SYSTEM_DOC_NAME } from '@inkeep/open-knowledge-core';+import { CONFIG_DOC_NAMES, SYSTEM_DOC_NAME } from '@inkeep/open-knowledge-core';export function isSystemDoc(docName: string): boolean {return docName === SYSTEM_DOC_NAME;}++const CONFIG_DOC_NAME_SET: ReadonlySet<string> = new Set(CONFIG_DOC_NAMES);++export function isConfigDoc(docName: string): boolean {+ return CONFIG_DOC_NAME_SET.has(docName);+}diff --git a/packages/app/src/editor/registry/descriptor-icons.test.ts b/packages/app/src/editor/registry/descriptor-icons.test.tsnew file mode 100644index 000000000..a69a3624d--- /dev/null+++ b/packages/app/src/editor/registry/descriptor-icons.test.ts@@ -0,0 +1,24 @@+/**+ * Every icon name a registered descriptor declares must have an explicit+ * entry in `ICON_COMPONENTS` — `resolveIcon` falls back to a generic icon+ * for unmapped names, silently, in both surfaces that share the map (slash+ * menu + placeholder pill). This trips when a descriptor lands with an+ * icon that was never added to the map. Checked via `hasIconMapping`+ * rather than comparing `resolveIcon`'s result against the fallback+ * component, which would misfire if a descriptor legitimately used the+ * fallback icon by name.+ */++import { builtInComponents } from '@inkeep/open-knowledge-core';+import { describe, expect, test } from 'vitest';+import { hasIconMapping } from './icons.ts';++describe('descriptor icon coverage', () => {+ test('every declared descriptor icon has an explicit ICON_COMPONENTS mapping', () => {+ const unmapped = builtInComponents+ .filter((meta) => meta.icon !== undefined)+ .filter((meta) => !hasIconMapping(meta.icon as string))+ .map((meta) => `${meta.name} -> ${meta.icon}`);+ expect(unmapped).toEqual([]);+ });+});diff --git a/packages/app/src/editor/registry/icons.ts b/packages/app/src/editor/registry/icons.tsindex ff831f71d..c1b0c0918 100644--- a/packages/app/src/editor/registry/icons.ts+++ b/packages/app/src/editor/registry/icons.ts@@ -12,6 +12,7 @@* call site automatically lights up the other.*/import {+ AlignCenter,AppWindow,Box,ChevronRight,@@ -25,6 +26,7 @@ import {MessageSquareWarning,PanelTop,Paperclip,+ PenTool,Sigma,SquarePlay,Volume2,@@ -33,6 +35,7 @@ import {} from 'lucide-react';const ICON_COMPONENTS: Record<string, LucideIcon> = {+ AlignCenter,AppWindow,ChevronRight,CopyPlus,@@ -44,6 +47,7 @@ const ICON_COMPONENTS: Record<string, LucideIcon> = {MessageSquareWarning,PanelTop,Paperclip,+ PenTool,Sigma,SquarePlay,Volume2,@@ -51,6 +55,16 @@ const ICON_COMPONENTS: Record<string, LucideIcon> = {ZoomIn,};+/**+ * Whether a descriptor icon name has an explicit `ICON_COMPONENTS` entry.+ * Distinct from `resolveIcon` returning the fallback — the fallback+ * component could legitimately be mapped by name, so identity comparison+ * against it can't detect a missing mapping.+ */+export function hasIconMapping(iconName: string): boolean {+ return Object.hasOwn(ICON_COMPONENTS, iconName);+}+/*** Resolve a descriptor icon name (e.g., `'MessageSquareWarning'`) to its* lucide-react component. Falls back to `Box` for unknown names ordiff --git a/packages/app/src/editor/slash-command/component-items.test.ts b/packages/app/src/editor/slash-command/component-items.test.tsindex a38d503a4..20be62920 100644--- a/packages/app/src/editor/slash-command/component-items.test.ts+++ b/packages/app/src/editor/slash-command/component-items.test.ts@@ -53,6 +53,7 @@ describe('getComponentItems (slash menu)', () => {'Audio','Callout','Embed',+ 'Excalidraw','File','Image','Math',@@ -285,11 +286,11 @@ describe('agent-surface ↔ slash-menu filter parity', () => {expect(divergence).toEqual(new Set(SLASH_HIDDEN_CANONICALS));});- test('intersection covers every canonical NOT in either curation set (12 names today)', () => {+ test('intersection covers every canonical NOT in either curation set (13 names today)', () => {const agent = agentCanonicalSet();const slash = slashMenuCanonicalSet();const intersection = new Set([...agent].filter((name) => slash.has(name)));- expect(intersection.size).toBe(12);+ expect(intersection.size).toBe(13);});test('agent surface excludes wildcard descriptor', () => {diff --git a/packages/app/src/editor/slash-command/component-items.tsx b/packages/app/src/editor/slash-command/component-items.tsxindex fc2663750..6f1b16fd2 100644--- a/packages/app/src/editor/slash-command/component-items.tsx+++ b/packages/app/src/editor/slash-command/component-items.tsx@@ -103,6 +103,45 @@ const PREVIEW_CONFIG: Record<string, PreviewConfig> = {description: msg`Block math equation rendered with KaTeX from a LaTeX source string.`,props: () => ({ formula: 'c = \\pm\\sqrt{a^2 + b^2}' }),},+ Excalidraw: {+ description: msg`Embed a live snapshot of an .excalidraw board from this workspace.`,+ // Hand-mocked board sketch: the live embed would lazy-load the ~1.6 MB+ // Excalidraw chunk and open a board subscription on every menu open.+ render: () => (+ <div className="flex h-full w-full items-center justify-center rounded-md border border-border bg-background p-3">+ <svg viewBox="0 0 120 60" className="h-full w-auto" aria-hidden="true">+ <rect+ x="6"+ y="10"+ width="46"+ height="26"+ rx="6"+ fill="none"+ stroke="currentColor"+ strokeWidth="2"+ className="text-muted-foreground"+ />+ <ellipse+ cx="92"+ cy="38"+ rx="20"+ ry="12"+ fill="none"+ stroke="currentColor"+ strokeWidth="2"+ className="text-muted-foreground/70"+ />+ <path+ d="M52 23 C 66 23, 70 34, 72 36"+ fill="none"+ stroke="currentColor"+ strokeWidth="2"+ className="text-muted-foreground/50"+ />+ </svg>+ </div>+ ),+ },Embed: {description: msg`Embed an external page in an inline iframe (docs, demos, Figma, CodeSandbox).`,// Hand-built browser-pane mockup: chrome bar with traffic-light dots +diff --git a/packages/app/src/lib/excalidraw-env.dom.test.ts b/packages/app/src/lib/excalidraw-env.dom.test.tsnew file mode 100644index 000000000..3d4530348--- /dev/null+++ b/packages/app/src/lib/excalidraw-env.dom.test.ts@@ -0,0 +1,50 @@+/**+ * The Excalidraw asset-path pin must resolve relative to the document+ * under `file:` (the packaged desktop renderer loads via `loadFile`, where+ * a path-absolute `/excalidraw-assets/` resolves to the filesystem root,+ * 404s, and silently falls back to the esm.sh CDN — defeating the vendored+ * fonts). Regressing this is invisible in dev/CI, which are both `http:`.+ */++import { afterEach, describe, expect, test, vi } from 'vitest';++const realLocation = window.location;++function stubLocation(href: string) {+ Object.defineProperty(window, 'location', {+ value: new URL(href),+ writable: true,+ configurable: true,+ });+}++afterEach(() => {+ Object.defineProperty(window, 'location', {+ value: realLocation,+ writable: true,+ configurable: true,+ });+ vi.resetModules();+});++describe('excalidraw-env', () => {+ test('http pages keep the path-absolute asset root', async () => {+ // The module only pins when unset — clear any earlier pin so this+ // import exercises the assignment.+ window.EXCALIDRAW_ASSET_PATH = undefined;+ stubLocation('http://localhost:5173/');+ vi.resetModules();+ await import('./excalidraw-env.ts');+ expect(window.EXCALIDRAW_ASSET_PATH).toBe('/excalidraw-assets/');+ });++ test('file: pages resolve the asset root beside the document', async () => {+ window.EXCALIDRAW_ASSET_PATH = undefined;+ stubLocation('file:///Applications/OK.app/Contents/Resources/app/index.html');+ vi.resetModules();+ await import('./excalidraw-env.ts');+ expect(window.EXCALIDRAW_ASSET_PATH).toBe(+ 'file:///Applications/OK.app/Contents/Resources/app/excalidraw-assets/',+ );+ });+});diff --git a/packages/app/src/lib/excalidraw-env.ts b/packages/app/src/lib/excalidraw-env.tsnew file mode 100644index 000000000..12bfed79b--- /dev/null+++ b/packages/app/src/lib/excalidraw-env.ts@@ -0,0 +1,35 @@+/**+ * Point Excalidraw at the self-hosted asset tree vendored in via+ * `scripts/copy-excalidraw-assets.mjs` (runs on `predev`/`prebuild`).+ * Without this, the package falls back to its hardcoded+ * `https://esm.sh/@excalidraw/excalidraw@<v>/dist/prod/` URL for every font+ * file — a posture change for a local-first editor: offline users get+ * system-font fallbacks, and every online render ships a request to a+ * third-party CDN we do not otherwise depend on.+ *+ * Side-effect module: import it from EVERY entry point that loads+ * `@excalidraw/excalidraw` (the board doc editor AND the document embed),+ * so the pin is in place regardless of which surface a session touches+ * first — a single module-scope assignment in one lazy editor made the+ * behavior session-order-dependent.+ */++export {};++declare global {+ interface Window {+ EXCALIDRAW_ASSET_PATH?: string;+ }+}++if (typeof window !== 'undefined' && window.EXCALIDRAW_ASSET_PATH === undefined) {+ // Path-absolute URLs break under the packaged desktop renderer's `file://`+ // load — `/excalidraw-assets/` resolves against the filesystem root, so+ // Excalidraw falls back to its esm.sh CDN, the exact posture the vendored+ // asset tree exists to prevent. Same rationale as `base: './'` in+ // vite.config.ts: resolve relative to the loaded document there.+ window.EXCALIDRAW_ASSET_PATH =+ window.location.protocol === 'file:'+ ? new URL('excalidraw-assets/', window.location.href).href+ : '/excalidraw-assets/';+}diff --git a/packages/app/src/lib/retrying-loader.test.ts b/packages/app/src/lib/retrying-loader.test.tsnew file mode 100644index 000000000..4be73a181--- /dev/null+++ b/packages/app/src/lib/retrying-loader.test.ts@@ -0,0 +1,36 @@+import { describe, expect, test, vi } from 'vitest';+import { createRetryingLoader } from './retrying-loader.ts';++describe('createRetryingLoader', () => {+ test('caches a resolved module across calls', async () => {+ const load = vi.fn(async () => ({ id: 'mod' }));+ const loader = createRetryingLoader(load);+ const first = await loader();+ const second = await loader();+ expect(first).toBe(second);+ expect(load).toHaveBeenCalledTimes(1);+ });++ test('concurrent callers share one in-flight promise', async () => {+ const load = vi.fn(async () => ({ id: 'mod' }));+ const loader = createRetryingLoader(load);+ const [a, b] = await Promise.all([loader(), loader()]);+ expect(a).toBe(b);+ expect(load).toHaveBeenCalledTimes(1);+ });++ test('a rejection clears the cache so the next call retries', async () => {+ const load = vi+ .fn<() => Promise<{ id: string }>>()+ .mockRejectedValueOnce(new Error('chunk load failed'))+ .mockResolvedValue({ id: 'mod' });+ const loader = createRetryingLoader(load);+ await expect(loader()).rejects.toThrow('chunk load failed');+ // The failed promise must not be handed out again.+ await expect(loader()).resolves.toEqual({ id: 'mod' });+ expect(load).toHaveBeenCalledTimes(2);+ // And the successful retry is cached like any first success.+ await loader();+ expect(load).toHaveBeenCalledTimes(2);+ });+});diff --git a/packages/app/src/lib/retrying-loader.ts b/packages/app/src/lib/retrying-loader.tsnew file mode 100644index 000000000..f3e82e509--- /dev/null+++ b/packages/app/src/lib/retrying-loader.ts@@ -0,0 +1,16 @@+/**+ * Wrap a dynamic-import thunk in a module-level promise cache that clears+ * itself on rejection, so a transient chunk-load failure (one wifi blip on+ * first paint) retries on the next call instead of caching the rejection+ * for the whole session. Concurrent callers share the in-flight promise.+ */+export function createRetryingLoader<T>(load: () => Promise<T>): () => Promise<T> {+ let cached: Promise<T> | null = null;+ return () => {+ cached ||= load().catch((err: unknown) => {+ cached = null;+ throw err;+ });+ return cached;+ };+}diff --git a/packages/app/src/locales/ar/messages.json b/packages/app/src/locales/ar/messages.jsonindex 17173628d..6699adb58 100644--- a/packages/app/src/locales/ar/messages.json+++ b/packages/app/src/locales/ar/messages.json@@ -411,6 +411,7 @@"4PYsOz": ["إخفاء الملفات (", ["sidebarShortcutLabel"], ")"],"4Sxexw": ["تراجع أو إعادة في المصدر"],"4TzU0n": ["تهيئة"],+ "4Vgtaz": ["تعذّر الوصول إلى اللوحة. قد تكون غير موجودة، أو قد يكون الخادم غير متصل."],"4buZWd": ["موروث من ", ["path"]],"4c_a6S": ["لم يُضبط شيء بعد."],"4d0VYJ": ["سننشئ معرّف سمة آمنًا من هذا الاسم."],@@ -570,6 +571,7 @@"6KXnz5": ["يمكنك استعادة هذا الملف من المهملات."],"6LJJ1v": ["الملف ", ["identity"], ". انتقل إلى المرجع."],"6LbUG7": ["المستودع خاص وحساب GitHub الخاص بك لا يملك صلاحية الوصول إليه."],+ "6M2L3X": ["فتح اللوحة"],"6MnZEC": ["فشل تحميل الطرفية"],"6Nea1q": ["استخدام ", ["0"], " للوضع الداكن النشط"],"6O626z": ["لا توجد عناوين تطابق «", ["trimmedAnchorQuery"], "»"],@@ -965,6 +967,7 @@"AVW-K9": ["فشل تحميل الصفحات اليتيمة"],"AWOSPo": ["تكبير"],"AYoYhU": ["فشل التحديث: ", ["0"]],+ "AaC-CE": ["لوحة فارغة"],"AcK_r0": ["واجهة Claude السطرية"],"AczYxH": ["مدخل open-knowledge مخصص — غير مُدار من OpenKnowledge"],"AdcGcG": ["يجري تطبيق تغييرك"],@@ -1896,6 +1899,7 @@],"LKOLNn": ["لا توجد وكلاء ذكاء اصطناعي مثبَّتون"],"LPAv9E": ["قبل ", ["days"], " يوم"],+ "LPLWpO": ["محتوى اللوحة ليس مشهد Excalidraw صالحًا."],"LQdLio": ["مخطط جديد"],"LQsCPn": ["تمنع الإيداعات المحلية هذه النسخة من التحديث"],"LRLKnQ": ["إخفاء المحلولة"],@@ -2517,6 +2521,11 @@"STTOnz": ["نوع ", ["keyName"], ": قيمة مركّبة (متداخلة؛ للقراءة فقط)"],"SUOoXn": ["فشل فتح المشروع."],"SVLPt5": [["formatted"], " نجمة على GitHub"],+ "SWTmnY": [+ "<0>مراجع مباشرة كثيرة جدًا في هذه الصفحة.</0> لم يتم تحميل مرآة <1>",+ ["src"],+ "</1> هذه."+ ],"SWX1O7": [["total",@@ -2647,6 +2656,7 @@"U2pMtf": ["tag-name"],"U3IvM5": ["الدليل الكامل"],"U3RIJu": ["الملفات المحلية"],+ "U4ZE26": ["تعذّر عرض لقطة اللوحة."],"U5Spo9": ["يجب أن يكون مجلد المحتوى داخل المشروع"],"U6Mdhd": ["لنبدأ الإعداد."],"U6wmNc": ["المزامنة موقوفة مؤقتًا"],@@ -2892,6 +2902,7 @@"WFEbV1": ["أشِر إلى مشكلات Markdown الشائعة في المحرر. مدعوم بـ <0>markdownlint<1/></0>."],"WG3MZ4": ["تم تحديد ", ["0"], " مهارات"],"WGMoTY": ["علل أو أعطال أو شعور بعدم الموثوقية"],+ "WH3roC": ["لم يتم اختيار لوحة. أدخل مسار مستند .excalidraw في خصائص هذه الكتلة."],"WHPvOb": ["كل الملفات مخفية بمرشحات العرض."],"WJjviG": ["ما الذي يُدرَج"],"WL6puM": ["يُحلّ المسار إلى خارج المشروع"],@@ -3548,6 +3559,7 @@"cyoNqf": ["غير مدموج"],"czQDKY": ["كل عملية دفع هي تثبيت واحد في مستودعك البعيد."],"d-GtJt": ["عرض في مصدر Markdown"],+ "d-RYHO": ["لوحة Excalidraw"],"d1JjXo": ["نسختك المحلية من الفرع <0>",["branch"],@@ -3589,6 +3601,7 @@"dOxPd4": ["حاشية"],"dQHSCs": ["تحويل (حذف الأصل)"],"dSORvE": ["يوقف التشغيل الحالي ويرسل هذا بدلاً منه"],+ "dT-HIQ": ["مراجع مباشرة كثيرة جدًا في هذه الصفحة. لم يتم تحميل هذه اللوحة."],"dTaauv": ["السبب: ", ["reason"]],"dURmlQ": ["«frontmatter» اسم خاصية محجوز"],"dVaXnv": ["لم تُحمَّل قواعد المحتوى بعد — أعد المحاولة بعد قليل"],@@ -3704,6 +3717,7 @@"ee15Vl": ["تعلّم المهارات أدوات الذكاء الاصطناعي لديك مهامّ متكررة. اكتب مهاراتك في الشريط الجانبي «المهارات» في المحرّر؛ وهذه الصفحة هي مكان تفعيلها ومشاركتها."],+ "eh3QBq": ["تعذر تحميل لوحة Excalidraw."],"eiUA4k": [["count",@@ -3998,6 +4012,7 @@"i9TPUi": ["هذا ", ["targetNoun"], " ليس على الفرع <0>", ["branch"], "</0>. ربما لم يُدفع بعد."],"i9toLO": ["ملف إعداد الوكيل"],"iBVgIQ": ["أعاد الخادم استجابة مشوّهة."],+ "iBei3o": ["عناصر تحكم اللوحة"],"iDZtvM": ["فشل تحميل القوالب: ", ["message"]],"iE-yoU": ["هذه معاينة لـ ",@@ -4330,6 +4345,7 @@"lPzyrU": ["تم حل كل المقاطع"],"lS83Sg": ["تعذّر الوصول إلى الحافظة."],"lScd1O": ["تُفتح شرائح Slidev في تطبيق OpenKnowledge لسطح المكتب فقط."],+ "lT6wjt": ["توسيع اللوحة"],"lUtr1r": ["تم تحديد ", ["0"], " من ", ["1"]],"lVWEIL": ["تمت فهرسة ", ["embedded"], " من ", ["total"], " صفحة."],"lWNpNB": ["أضف مؤشرات أو حدد التكرارات المطابقة عبر CodeMirror."],@@ -4681,6 +4697,7 @@"pFPzHA": ["منتقي الرموز التعبيرية"],"pFRz_E": ["استبعد هذه التعليقات من هذه الرسالة"],"pFagOn": ["تحرير المصدر"],+ "pGYklE": ["تعذّر تحميل عارض اللوحة. تحقق من اتصالك وحاول مرة أخرى."],"pHYP6v": ["افتح <0>تخصيص</0> في الشريط الجانبي <1/> <2>المهارات</2>."],"pI_bKs": ["<0>مسافة</0> للقفز · <1>↓</1> للانحناء"],"pJ7XCo": ["لا تشير هذه الصفحة إلى أي ملفات أو صور محلية."],@@ -4851,6 +4868,7 @@"qbfj1f": ["يجري استقبال الكائنات"],"qd7L1J": [["source"], ": تم تحديث ", ["updated"], "، و", ["upToDate"], " محدّث بالفعل"],"qdBUHP": ["تعذّر تحميل ", ["fileName"]],+ "qi17kj": ["تضمين لقطة مباشرة للوحة .excalidraw من مساحة العمل هذه."],"qi1F96": ["الكشف في مستعرض الملفات"],"qiRoLb": ["لخّص كل ما غيّرته هذا الأسبوع"],"qioCwA": ["الانتقال إلى الصفحة ", ["pageNumber"]],diff --git a/packages/app/src/locales/ar/messages.po b/packages/app/src/locales/ar/messages.poindex 92ae1a21d..c7369c9b0 100644--- a/packages/app/src/locales/ar/messages.po+++ b/packages/app/src/locales/ar/messages.po@@ -1098,6 +1098,10 @@ msgstr "<0>ok</0> لن يعمل في الوحدات الطرفية الخارجmsgid "<0>Space</0> to jump · <1>↓</1> to duck"msgstr "<0>مسافة</0> للقفز · <1>↓</1> للانحناء"+#: src/editor/components/Mirror.tsx+msgid "<0>Too many live references on this page.</0> This mirror of <1>{src}</1> was not loaded."+msgstr "<0>مراجع مباشرة كثيرة جدًا في هذه الصفحة.</0> لم يتم تحميل مرآة <1>{src}</1> هذه."+#: src/components/settings/SkillTargetsPicker.tsxmsgid "~/.myteam/skills"msgstr "~/.myteam/skills"@@ -2200,6 +2204,10 @@ msgstr "تدوينة"msgid "blog-post"msgstr "blog-post"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Board controls"+msgstr "عناصر تحكم اللوحة"+#: src/lib/keyboard-shortcuts.tsmsgid "Bold"msgstr "عريض"@@ -5146,6 +5154,10 @@ msgstr "مراسلة الدعم بشأن هذا التقرير"msgid "Emailed"msgstr "أُرسل بالبريد"+#: src/editor/slash-command/component-items.tsx+msgid "Embed a live snapshot of an .excalidraw board from this workspace."+msgstr "تضمين لقطة مباشرة للوحة .excalidraw من مساحة العمل هذه."+#: src/editor/slash-command/component-items.tsxmsgid "Embed a video with native player controls."msgstr "ضمّن مقطع فيديو بعناصر تحكم مشغّل أصلية."@@ -5189,6 +5201,10 @@ msgstr "فارغ"msgid "Empty"msgstr "فارغ"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Empty board"+msgstr "لوحة فارغة"+#: src/editor/components/Mermaid.tsxmsgid "Empty diagram"msgstr "مخطط فارغ"@@ -5405,6 +5421,14 @@ msgstr "كل ما تحت مجلدات {0}/ داخل {1}/"msgid "everything under any {0}/ folder"msgstr "كل ما تحت أي مجلد {0}/"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Excalidraw board"+msgstr "لوحة Excalidraw"++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Excalidraw board failed to load."+msgstr "تعذر تحميل لوحة Excalidraw."+#: src/components/ExcalidrawDocEditor.tsxmsgid "Excalidraw canvas"msgstr "لوحة Excalidraw"@@ -5447,6 +5471,10 @@ msgstr "توسيع كل مجموعات الملفات"msgid "Expand all files"msgstr "توسيع كل الملفات"+#: src/editor/extensions/JsxComponentView.tsx+msgid "Expand board"+msgstr "توسيع اللوحة"+#: src/editor/components/Mermaid.tsx#: src/editor/extensions/JsxComponentView.tsxmsgid "Expand diagram"@@ -8499,6 +8527,10 @@ msgstr "لم يتم العثور على أدوات الذكاء الاصطناعmsgid "No API key is set for this endpoint. Add one above."msgstr "لم يُضبط مفتاح API لنقطة النهاية هذه. أضف واحدًا أعلاه."+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "No board selected. Enter the path to a .excalidraw doc in this block's properties."+msgstr "لم يتم اختيار لوحة. أدخل مسار مستند .excalidraw في خصائص هذه الكتلة."+#: src/components/AgentDiffPane.tsxmsgid "No body changes at this version."msgstr "لا تغييرات في المتن في هذه النسخة."@@ -9115,6 +9147,10 @@ msgstr "افتح مجلد مشروع موجودًا من القرص."msgid "Open and focus the bottom Ask AI prompt composer."msgstr "افتح مؤلف موجّه «اسأل الذكاء الاصطناعي» السفلي وركّز عليه."+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Open board"+msgstr "فتح اللوحة"+#: src/lib/keyboard-shortcuts.tsmsgid "Open CodeMirror search in source editor mode."msgstr "افتح بحث CodeMirror في وضع محرر المصدر."@@ -13135,6 +13171,22 @@ msgstr "عقد الحساب المصدق. ينطبق فقط على المستنmsgid "The audit could not be completed. Try again."msgstr "تعذّر إتمام المراجعة. أعد المحاولة."+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board could not be reached. It may not exist, or the server may be offline."+msgstr "تعذّر الوصول إلى اللوحة. قد تكون غير موجودة، أو قد يكون الخادم غير متصل."++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board snapshot could not be rendered."+msgstr "تعذّر عرض لقطة اللوحة."++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board viewer failed to load. Check your connection and try again."+msgstr "تعذّر تحميل عارض اللوحة. تحقق من اتصالك وحاول مرة أخرى."++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board's content is not a valid Excalidraw scene."+msgstr "محتوى اللوحة ليس مشهد Excalidraw صالحًا."+#: src/components/InstallInClaudeDesktopDialog.tsxmsgid "The Claude Desktop App didn't open the file. Is it installed? ({msg})"msgstr "لم يفتح تطبيق Claude Desktop الملف. هل هو مثبَّت؟ ({msg})"@@ -13979,6 +14031,10 @@ msgstr "يبدّل النمط {0}/**"msgid "tokens"msgstr "توكنات"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Too many live references on this page. This board was not loaded."+msgstr "مراجع مباشرة كثيرة جدًا في هذه الصفحة. لم يتم تحميل هذه اللوحة."+#: src/components/FeedbackForm.tsxmsgid "Too slow"msgstr "بطيء جدًا"@@ -14027,6 +14083,7 @@ msgstr "جرّب موجّهًا"#: src/components/settings/AccountSection.tsx#: src/components/settings/SavedThemesTiles.tsx#: src/components/ShareReceiveDialog.tsx+#: src/editor/components/ExcalidrawEmbed.tsxmsgid "Try again"msgstr "أعد المحاولة"@@ -14603,6 +14660,7 @@ msgstr "العرض في مصدر Markdown"msgid "View in Source Markdown"msgstr "عرض في مصدر Markdown"+#: src/editor/components/ExcalidrawEmbed.tsx#: src/editor/components/Mermaid.tsxmsgid "View only"msgstr "للعرض فقط"diff --git a/packages/app/src/locales/bn/messages.json b/packages/app/src/locales/bn/messages.jsonindex 56a231c03..bfe2ef3dc 100644--- a/packages/app/src/locales/bn/messages.json+++ b/packages/app/src/locales/bn/messages.json@@ -359,6 +359,7 @@"4PYsOz": ["Files লুকান (", ["sidebarShortcutLabel"], ")"],"4Sxexw": ["সোর্সে পূর্বাবস্থা বা পুনরায়"],"4TzU0n": ["চালু করুন"],+ "4Vgtaz": ["বোর্ডে পৌঁছানো যায়নি। এটি হয়তো নেই, অথবা সার্ভার অফলাইন হতে পারে।"],"4buZWd": [["path"], " থেকে উত্তরাধিকারসূত্রে পাওয়া"],"4c_a6S": ["এখনও কিছুই নির্ধারিত হয়নি।"],"4d0VYJ": ["এই নাম থেকে আমরা একটি নিরাপদ থিম আইডি তৈরি করব।"],@@ -498,6 +499,7 @@"6KXnz5": ["আপনি এই ফাইলটি ট্র্যাশ থেকে পুনরুদ্ধার করতে পারেন।"],"6LJJ1v": ["ফাইল ", ["identity"], "। রেফারেন্সে যান।"],"6LbUG7": ["রিপোজিটরিটি ব্যক্তিগত এবং আপনার GitHub অ্যাকাউন্টের সেখানে প্রবেশাধিকার নেই।"],+ "6M2L3X": ["বোর্ড খুলুন"],"6MnZEC": ["টার্মিনাল লোড করা যায়নি"],"6Nea1q": ["সক্রিয় গাঢ় মোডের জন্য ", ["0"], " ব্যবহার করুন"],"6O626z": ["\"", ["trimmedAnchorQuery"], "\"-এর সঙ্গে কোনো শিরোনাম মেলে না"],@@ -818,6 +820,7 @@"AVW-K9": ["অনাথ পাতা লোড করতে ব্যর্থ"],"AWOSPo": ["বড় করুন"],"AYoYhU": ["হালনাগাদ ব্যর্থ: ", ["0"]],+ "AaC-CE": ["খালি বোর্ড"],"AcK_r0": ["Claude CLI"],"AczYxH": ["কাস্টম open-knowledge এন্ট্রি — OpenKnowledge দ্বারা পরিচালিত নয়"],"AdcGcG": ["আপনার পরিবর্তন প্রয়োগ করা হচ্ছে"],@@ -1623,6 +1626,7 @@],"LKOLNn": ["কোনো AI এজেন্ট ইনস্টল করা নেই"],"LPAv9E": [["days"], " দিন আগে"],+ "LPLWpO": ["বোর্ডের বিষয়বস্তু কোনো বৈধ Excalidraw দৃশ্য নয়।"],"LQdLio": ["নতুন স্কিমা"],"LQsCPn": ["স্থানীয় কমিটগুলো এই অনুলিপিকে হালনাগাদ হতে দিচ্ছে না"],"LRLKnQ": ["মীমাংসিত লুকান"],@@ -2181,6 +2185,11 @@"STTOnz": [["keyName"], " ধরন: জটিল মান (নেস্টেড; শুধু পড়ার জন্য)"],"SUOoXn": ["প্রকল্প খুলতে ব্যর্থ।"],"SVLPt5": [["formatted"], "টি GitHub স্টার"],+ "SWTmnY": [+ "<0>এই পাতায় অনেক বেশি লাইভ রেফারেন্স।</0> <1>",+ ["src"],+ "</1>-এর এই মিররটি লোড করা হয়নি।"+ ],"SWX1O7": [["total",@@ -2274,6 +2283,7 @@"U2pMtf": ["tag-name"],"U3IvM5": ["পূর্ণ নির্দেশিকা"],"U3RIJu": ["স্থানীয় ফাইল"],+ "U4ZE26": ["বোর্ডের স্ন্যাপশট রেন্ডার করা যায়নি।"],"U5Spo9": ["বিষয়বস্তুর ডিরেক্টরি প্রকল্পের ভেতরে হতে হবে"],"U6Mdhd": ["চলুন সেটআপ করি।"],"U6wmNc": ["সিঙ্ক থেমে আছে"],@@ -2447,6 +2457,7 @@"WFEbV1": ["সম্পাদকে সাধারণ markdown সমস্যা চিহ্নিত করুন। <0>markdownlint<1/></0> দ্বারা চালিত।"],"WG3MZ4": [["0"], "টি স্কিল নির্বাচিত"],"WGMoTY": ["বাগ, ক্র্যাশ, বা এটি নির্ভরযোগ্য মনে হয়নি"],+ "WH3roC": ["কোনো বোর্ড নির্বাচন করা হয়নি। এই ব্লকের প্রপার্টিতে একটি .excalidraw ডকুমেন্টের পাথ লিখুন।"],"WHPvOb": ["ভিউ ফিল্টার সব ফাইল লুকিয়ে রেখেছে।"],"WJjviG": ["কী কী অন্তর্ভুক্ত করবেন"],"WL6puM": ["পথটি প্রকল্পের বাইরে গিয়ে পড়ে"],@@ -3038,6 +3049,7 @@"cyoNqf": ["মার্জ হয়নি"],"czQDKY": ["প্রতিটি পুশ আপনার রিমোটে একটি কমিট।"],"d-GtJt": ["উৎস Markdown-এ দেখুন"],+ "d-RYHO": ["Excalidraw বোর্ড"],"d1JjXo": ["ব্রাঞ্চ <0>",["branch"],@@ -3066,6 +3078,7 @@"dOxPd4": ["পাদটীকা"],"dQHSCs": ["রূপান্তর করুন (মূলটি মুছে দিন)"],"dSORvE": ["বর্তমান কাজ থামিয়ে এর বদলে এটি পাঠায়"],+ "dT-HIQ": ["এই পাতায় অনেক বেশি লাইভ রেফারেন্স। এই বোর্ডটি লোড করা হয়নি।"],"dTaauv": ["কারণ: ", ["reason"]],"dURmlQ": ["\"frontmatter\" একটি সংরক্ষিত প্রপার্টি নাম"],"dVaXnv": ["বিষয়বস্তুর নিয়ম এখনও লোড হয়নি — একটু পরে আবার চেষ্টা করুন"],@@ -3146,6 +3159,7 @@"ee15Vl": ["স্কিল আপনার AI টুলকে পুনরাবৃত্ত কাজ শেখায়। নিজের স্কিল এডিটরের স্কিল সাইডবারে লিখুন; এই পাতায় সেগুলি চালু ও ভাগ করা হয়।"],+ "eh3QBq": ["Excalidraw বোর্ড লোড করা যায়নি।"],"eiUA4k": [["count", "plural", { "one": ["#", " মন্তব্য"], "other": ["#", " মন্তব্য"] }]],"ekSPiP": [["0"], " ইতিমধ্যেই মুছে ফেলা হয়েছে।"],"el2KyL": ["এই প্রকল্পে Slidev পাওয়া গেছে। ডেকগুলি প্রকল্পের সংস্করণ ব্যবহার করবে।"],@@ -3407,6 +3421,7 @@],"i9toLO": ["এজেন্ট কনফিগারেশন ফাইল"],"iBVgIQ": ["সার্ভার একটি ত্রুটিপূর্ণ গঠনের প্রতিক্রিয়া ফেরত দিয়েছে।"],+ "iBei3o": ["বোর্ড নিয়ন্ত্রণ"],"iDZtvM": ["টেমপ্লেট লোড করতে ব্যর্থ: ", ["message"]],"iE-yoU": ["এটি ",@@ -3725,6 +3740,7 @@"lPzyrU": ["সব হাংক মীমাংসিত"],"lS83Sg": ["ক্লিপবোর্ডে পৌঁছানো যায়নি।"],"lScd1O": ["Slidev ডেক শুধু OpenKnowledge ডেস্কটপ অ্যাপে খোলে।"],+ "lT6wjt": ["বোর্ড মেলে ধরুন"],"lUtr1r": [["1"], "টির মধ্যে ", ["0"], "টি নির্বাচিত"],"lVWEIL": [["total"], "টির মধ্যে ", ["embedded"], "টি পাতা সূচিভুক্ত।"],"lWNpNB": ["CodeMirror-এর মাধ্যমে কার্সর যোগ করুন বা মিলে যাওয়া উপস্থিতিগুলো নির্বাচন করুন।"],@@ -4023,6 +4039,7 @@"pFPzHA": ["ইমোজি নির্বাচক"],"pFRz_E": ["এই মন্তব্যগুলো এই বার্তার বাইরে রাখুন"],"pFagOn": ["সোর্স সম্পাদনা"],+ "pGYklE": ["বোর্ড ভিউয়ার লোড করা যায়নি। আপনার সংযোগ পরীক্ষা করে আবার চেষ্টা করুন।"],"pHYP6v": ["সাইডবারে <0>Customize</0> <1/> <2>Skills</2> খুলুন।"],"pI_bKs": ["লাফাতে <0>স্পেস</0> · নিচু হতে <1>↓</1>"],"pJ7XCo": ["এই পাতাটি কোনো স্থানীয় ফাইল বা ছবি উল্লেখ করে না।"],@@ -4145,6 +4162,7 @@"টি ইতিমধ্যে আপ টু ডেট"],"qdBUHP": [["fileName"], " লোড করা যায়নি"],+ "qi17kj": ["এই ওয়ার্কস্পেসের একটি .excalidraw বোর্ডের লাইভ স্ন্যাপশট এম্বেড করুন।"],"qi1F96": ["File Explorer-এ দেখান"],"qiRoLb": ["এই সপ্তাহে আমি যা যা বদলেছি তার সারসংক্ষেপ দিন"],"qioCwA": ["পাতা ", ["pageNumber"], "-এ যান"],diff --git a/packages/app/src/locales/bn/messages.po b/packages/app/src/locales/bn/messages.poindex c709df541..8fcd07db4 100644--- a/packages/app/src/locales/bn/messages.po+++ b/packages/app/src/locales/bn/messages.po@@ -1094,6 +1094,10 @@ msgstr "পরে File মেনু থেকে যোগ না করা পmsgid "<0>Space</0> to jump · <1>↓</1> to duck"msgstr "লাফাতে <0>স্পেস</0> · নিচু হতে <1>↓</1>"+#: src/editor/components/Mirror.tsx+msgid "<0>Too many live references on this page.</0> This mirror of <1>{src}</1> was not loaded."+msgstr "<0>এই পাতায় অনেক বেশি লাইভ রেফারেন্স।</0> <1>{src}</1>-এর এই মিররটি লোড করা হয়নি।"+#: src/components/settings/SkillTargetsPicker.tsxmsgid "~/.myteam/skills"msgstr "~/.myteam/skills"@@ -2196,6 +2200,10 @@ msgstr "ব্লগ পোস্ট"msgid "blog-post"msgstr "blog-post"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Board controls"+msgstr "বোর্ড নিয়ন্ত্রণ"+#: src/lib/keyboard-shortcuts.tsmsgid "Bold"msgstr "গাঢ়"@@ -5142,6 +5150,10 @@ msgstr "এই রিপোর্ট সম্পর্কে সাপোর্msgid "Emailed"msgstr "ইমেইল করা হয়েছে"+#: src/editor/slash-command/component-items.tsx+msgid "Embed a live snapshot of an .excalidraw board from this workspace."+msgstr "এই ওয়ার্কস্পেসের একটি .excalidraw বোর্ডের লাইভ স্ন্যাপশট এম্বেড করুন।"+#: src/editor/slash-command/component-items.tsxmsgid "Embed a video with native player controls."msgstr "নিজস্ব প্লেয়ার নিয়ন্ত্রণসহ একটি ভিডিও এমবেড করুন।"@@ -5185,6 +5197,10 @@ msgstr "খালি"msgid "Empty"msgstr "খালি"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Empty board"+msgstr "খালি বোর্ড"+#: src/editor/components/Mermaid.tsxmsgid "Empty diagram"msgstr "খালি চিত্র"@@ -5401,6 +5417,14 @@ msgstr "{1}/-এর ভেতরের {0}/ ফোল্ডারগুলোরmsgid "everything under any {0}/ folder"msgstr "যেকোনো {0}/ ফোল্ডারের নিচের সবকিছু"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Excalidraw board"+msgstr "Excalidraw বোর্ড"++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Excalidraw board failed to load."+msgstr "Excalidraw বোর্ড লোড করা যায়নি।"+#: src/components/ExcalidrawDocEditor.tsxmsgid "Excalidraw canvas"msgstr "Excalidraw ক্যানভাস"@@ -5443,6 +5467,10 @@ msgstr "সব ফাইল গোষ্ঠী মেলে ধরুন"msgid "Expand all files"msgstr "সব ফাইল মেলে ধরুন"+#: src/editor/extensions/JsxComponentView.tsx+msgid "Expand board"+msgstr "বোর্ড মেলে ধরুন"+#: src/editor/components/Mermaid.tsx#: src/editor/extensions/JsxComponentView.tsxmsgid "Expand diagram"@@ -8495,6 +8523,10 @@ msgstr "কোনো AI টুল পাওয়া যায়নি। এmsgid "No API key is set for this endpoint. Add one above."msgstr "এই এন্ডপয়েন্টের জন্য কোনো API কী নির্ধারিত নেই। উপরে একটি যোগ করুন।"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "No board selected. Enter the path to a .excalidraw doc in this block's properties."+msgstr "কোনো বোর্ড নির্বাচন করা হয়নি। এই ব্লকের প্রপার্টিতে একটি .excalidraw ডকুমেন্টের পাথ লিখুন।"+#: src/components/AgentDiffPane.tsxmsgid "No body changes at this version."msgstr "এই সংস্করণে মূল অংশের কোনো পরিবর্তন নেই।"@@ -9111,6 +9143,10 @@ msgstr "ডিস্ক থেকে একটি বিদ্যমান পmsgid "Open and focus the bottom Ask AI prompt composer."msgstr "নিচের Ask AI প্রম্পট রচনাপট খুলুন ও তাতে ফোকাস করুন।"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Open board"+msgstr "বোর্ড খুলুন"+#: src/lib/keyboard-shortcuts.tsmsgid "Open CodeMirror search in source editor mode."msgstr "সোর্স সম্পাদক মোডে CodeMirror অনুসন্ধান খুলুন।"@@ -13131,6 +13167,22 @@ msgstr "প্রত্যয়িত-গণনা চুক্তি। শুmsgid "The audit could not be completed. Try again."msgstr "নিরীক্ষা সম্পূর্ণ করা যায়নি। আবার চেষ্টা করুন।"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board could not be reached. It may not exist, or the server may be offline."+msgstr "বোর্ডে পৌঁছানো যায়নি। এটি হয়তো নেই, অথবা সার্ভার অফলাইন হতে পারে।"++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board snapshot could not be rendered."+msgstr "বোর্ডের স্ন্যাপশট রেন্ডার করা যায়নি।"++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board viewer failed to load. Check your connection and try again."+msgstr "বোর্ড ভিউয়ার লোড করা যায়নি। আপনার সংযোগ পরীক্ষা করে আবার চেষ্টা করুন।"++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board's content is not a valid Excalidraw scene."+msgstr "বোর্ডের বিষয়বস্তু কোনো বৈধ Excalidraw দৃশ্য নয়।"+#: src/components/InstallInClaudeDesktopDialog.tsxmsgid "The Claude Desktop App didn't open the file. Is it installed? ({msg})"msgstr "Claude Desktop App ফাইলটি খোলেনি। সেটি কি ইনস্টল করা আছে? ({msg})"@@ -13975,6 +14027,10 @@ msgstr "প্যাটার্ন {0}/** টগল করুন"msgid "tokens"msgstr "টোকেন"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Too many live references on this page. This board was not loaded."+msgstr "এই পাতায় অনেক বেশি লাইভ রেফারেন্স। এই বোর্ডটি লোড করা হয়নি।"+#: src/components/FeedbackForm.tsxmsgid "Too slow"msgstr "খুব ধীর"@@ -14023,6 +14079,7 @@ msgstr "একটি প্রম্পট চেষ্টা করে দে#: src/components/settings/AccountSection.tsx#: src/components/settings/SavedThemesTiles.tsx#: src/components/ShareReceiveDialog.tsx+#: src/editor/components/ExcalidrawEmbed.tsxmsgid "Try again"msgstr "আবার চেষ্টা করুন"@@ -14599,6 +14656,7 @@ msgstr "সোর্স markdown-এ দেখুন"msgid "View in Source Markdown"msgstr "উৎস Markdown-এ দেখুন"+#: src/editor/components/ExcalidrawEmbed.tsx#: src/editor/components/Mermaid.tsxmsgid "View only"msgstr "শুধু দেখার জন্য"diff --git a/packages/app/src/locales/en/messages.json b/packages/app/src/locales/en/messages.jsonindex 326833445..36c216186 100644--- a/packages/app/src/locales/en/messages.json+++ b/packages/app/src/locales/en/messages.json@@ -364,6 +364,7 @@"4PYsOz": ["Hide Files (", ["sidebarShortcutLabel"], ")"],"4Sxexw": ["Source undo or redo"],"4TzU0n": ["Initialize"],+ "4Vgtaz": ["The board could not be reached. It may not exist, or the server may be offline."],"4buZWd": ["Inherited from ", ["path"]],"4c_a6S": ["Nothing set yet."],"4d0VYJ": ["We’ll create a safe theme ID from this name."],@@ -501,6 +502,7 @@"6KXnz5": ["You can restore this file from the Trash."],"6LJJ1v": ["File ", ["identity"], ". Go to reference."],"6LbUG7": ["The repository is private and your GitHub account doesn't have access to it."],+ "6M2L3X": ["Open board"],"6MnZEC": ["Terminal failed to load"],"6Nea1q": ["Use ", ["0"], " for the active dark mode"],"6O626z": ["No headings match \"", ["trimmedAnchorQuery"], "\""],@@ -836,6 +838,7 @@"AVW-K9": ["Failed to load orphan pages"],"AWOSPo": ["Zoom in"],"AYoYhU": ["Update failed: ", ["0"]],+ "AaC-CE": ["Empty board"],"AcK_r0": ["Claude CLI"],"AczYxH": ["Custom open-knowledge entry — not managed by OpenKnowledge"],"AdcGcG": ["Applying your change"],@@ -1665,6 +1668,7 @@],"LKOLNn": ["No AI agents installed"],"LPAv9E": [["days"], "d ago"],+ "LPLWpO": ["The board's content is not a valid Excalidraw scene."],"LQdLio": ["New schema"],"LQsCPn": ["Local commits are keeping this copy from updating"],"LRLKnQ": ["Hide resolved"],@@ -2233,6 +2237,11 @@"STTOnz": [["keyName"], " type: complex value (nested; read-only)"],"SUOoXn": ["Failed to open project."],"SVLPt5": [["formatted"], " GitHub stars"],+ "SWTmnY": [+ "<0>Too many live references on this page.</0> This mirror of <1>",+ ["src"],+ "</1> was not loaded."+ ],"SWX1O7": ["Fixed ",["total", "plural", { "one": ["#", " file"], "other": ["#", " files"] }],@@ -2325,6 +2334,7 @@"U2pMtf": ["tag-name"],"U3IvM5": ["Full guide"],"U3RIJu": ["Local files"],+ "U4ZE26": ["The board snapshot could not be rendered."],"U5Spo9": ["Content directory must be inside the project"],"U6Mdhd": ["Let's get set up."],"U6wmNc": ["Sync paused"],@@ -2502,6 +2512,9 @@"WFEbV1": ["Flag common markdown issues in the editor. Powered by <0>markdownlint<1/></0>."],"WG3MZ4": [["0"], " skills selected"],"WGMoTY": ["Bugs, crashes, or it felt unreliable"],+ "WH3roC": [+ "No board selected. Enter the path to a .excalidraw doc in this block's properties."+ ],"WHPvOb": ["All files are hidden by view filters."],"WJjviG": ["What to include"],"WL6puM": ["Path resolves outside project"],@@ -3109,6 +3122,7 @@"cyoNqf": ["Unmerged"],"czQDKY": ["Each push is one commit to your remote."],"d-GtJt": ["View in Source Markdown"],+ "d-RYHO": ["Excalidraw board"],"d1JjXo": ["Your local copy of branch <0>",["branch"],@@ -3137,6 +3151,7 @@"dOxPd4": ["Footnote"],"dQHSCs": ["Convert (delete original)"],"dSORvE": ["Stops the current run and sends this instead"],+ "dT-HIQ": ["Too many live references on this page. This board was not loaded."],"dTaauv": ["Reason: ", ["reason"]],"dURmlQ": ["\"frontmatter\" is a reserved property name"],"dVaXnv": ["Content rules not yet loaded — try again in a moment"],@@ -3229,6 +3244,7 @@"ee15Vl": ["Skills teach your AI tools repeatable tasks. Write your own in the editor's Skills sidebar; this page is where they get switched on and shared."],+ "eh3QBq": ["Excalidraw board failed to load."],"eiUA4k": [["count", "plural", { "one": ["#", " comment"], "other": ["#", " comments"] }]],"ekSPiP": [["0"], " was already deleted."],"el2KyL": ["Slidev found in this project. Decks will use the project's version."],@@ -3506,6 +3522,7 @@],"i9toLO": ["Agent configuration file"],"iBVgIQ": ["Server returned a malformed response."],+ "iBei3o": ["Board controls"],"iDZtvM": ["Failed to load templates: ", ["message"]],"iE-yoU": ["This is a preview of ",@@ -3832,6 +3849,7 @@"lPzyrU": ["All hunks resolved"],"lS83Sg": ["Couldn’t reach the clipboard."],"lScd1O": ["Slidev decks open in the OpenKnowledge desktop app only."],+ "lT6wjt": ["Expand board"],"lUtr1r": [["0"], " of ", ["1"], " selected"],"lVWEIL": ["Indexed ", ["embedded"], " of ", ["total"], " pages."],"lWNpNB": ["Add cursors or select matching occurrences through CodeMirror."],@@ -4144,6 +4162,7 @@"pFPzHA": ["Emoji picker"],"pFRz_E": ["Leave these comments out of this message"],"pFagOn": ["Source editing"],+ "pGYklE": ["The board viewer failed to load. Check your connection and try again."],"pHYP6v": ["Open <0>Customize</0> in the sidebar <1/> <2>Skills</2>."],"pI_bKs": ["<0>Space</0> to jump · <1>↓</1> to duck"],"pJ7XCo": ["This page references no local files or images."],@@ -4268,6 +4287,7 @@"qbfj1f": ["Receiving objects"],"qd7L1J": [["source"], ": ", ["updated"], " updated, ", ["upToDate"], " already up to date"],"qdBUHP": ["Couldn't load ", ["fileName"]],+ "qi17kj": ["Embed a live snapshot of an .excalidraw board from this workspace."],"qi1F96": ["Reveal in File Explorer"],"qiRoLb": ["Summarize everything I changed this week"],"qioCwA": ["Jump to page ", ["pageNumber"]],diff --git a/packages/app/src/locales/en/messages.po b/packages/app/src/locales/en/messages.poindex 56133e97d..23713b131 100644--- a/packages/app/src/locales/en/messages.po+++ b/packages/app/src/locales/en/messages.po@@ -1098,6 +1098,10 @@ msgstr "<0>ok</0> won't run in external terminals until you add it later from thmsgid "<0>Space</0> to jump · <1>↓</1> to duck"msgstr "<0>Space</0> to jump · <1>↓</1> to duck"+#: src/editor/components/Mirror.tsx+msgid "<0>Too many live references on this page.</0> This mirror of <1>{src}</1> was not loaded."+msgstr "<0>Too many live references on this page.</0> This mirror of <1>{src}</1> was not loaded."+#: src/components/settings/SkillTargetsPicker.tsxmsgid "~/.myteam/skills"msgstr "~/.myteam/skills"@@ -2200,6 +2204,10 @@ msgstr "Blog post"msgid "blog-post"msgstr "blog-post"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Board controls"+msgstr "Board controls"+#: src/lib/keyboard-shortcuts.tsmsgid "Bold"msgstr "Bold"@@ -5146,6 +5154,10 @@ msgstr "Email support about this report"msgid "Emailed"msgstr "Emailed"+#: src/editor/slash-command/component-items.tsx+msgid "Embed a live snapshot of an .excalidraw board from this workspace."+msgstr "Embed a live snapshot of an .excalidraw board from this workspace."+#: src/editor/slash-command/component-items.tsxmsgid "Embed a video with native player controls."msgstr "Embed a video with native player controls."@@ -5189,6 +5201,10 @@ msgstr "empty"msgid "Empty"msgstr "Empty"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Empty board"+msgstr "Empty board"+#: src/editor/components/Mermaid.tsxmsgid "Empty diagram"msgstr "Empty diagram"@@ -5405,6 +5421,14 @@ msgstr "everything under {0}/ folders inside {1}/"msgid "everything under any {0}/ folder"msgstr "everything under any {0}/ folder"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Excalidraw board"+msgstr "Excalidraw board"++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Excalidraw board failed to load."+msgstr "Excalidraw board failed to load."+#: src/components/ExcalidrawDocEditor.tsxmsgid "Excalidraw canvas"msgstr "Excalidraw canvas"@@ -5447,6 +5471,10 @@ msgstr "Expand all file groups"msgid "Expand all files"msgstr "Expand all files"+#: src/editor/extensions/JsxComponentView.tsx+msgid "Expand board"+msgstr "Expand board"+#: src/editor/components/Mermaid.tsx#: src/editor/extensions/JsxComponentView.tsxmsgid "Expand diagram"@@ -8499,6 +8527,10 @@ msgstr "No AI tools detected. Install one to use this skill."msgid "No API key is set for this endpoint. Add one above."msgstr "No API key is set for this endpoint. Add one above."+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "No board selected. Enter the path to a .excalidraw doc in this block's properties."+msgstr "No board selected. Enter the path to a .excalidraw doc in this block's properties."+#: src/components/AgentDiffPane.tsxmsgid "No body changes at this version."msgstr "No body changes at this version."@@ -9115,6 +9147,10 @@ msgstr "Open an existing project folder from disk."msgid "Open and focus the bottom Ask AI prompt composer."msgstr "Open and focus the bottom Ask AI prompt composer."+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Open board"+msgstr "Open board"+#: src/lib/keyboard-shortcuts.tsmsgid "Open CodeMirror search in source editor mode."msgstr "Open CodeMirror search in source editor mode."@@ -13135,6 +13171,22 @@ msgstr "The attested-computation contract. Only applies to documents typed Attesmsgid "The audit could not be completed. Try again."msgstr "The audit could not be completed. Try again."+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board could not be reached. It may not exist, or the server may be offline."+msgstr "The board could not be reached. It may not exist, or the server may be offline."++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board snapshot could not be rendered."+msgstr "The board snapshot could not be rendered."++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board viewer failed to load. Check your connection and try again."+msgstr "The board viewer failed to load. Check your connection and try again."++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board's content is not a valid Excalidraw scene."+msgstr "The board's content is not a valid Excalidraw scene."+#: src/components/InstallInClaudeDesktopDialog.tsxmsgid "The Claude Desktop App didn't open the file. Is it installed? ({msg})"msgstr "The Claude Desktop App didn't open the file. Is it installed? ({msg})"@@ -13979,6 +14031,10 @@ msgstr "Toggles the pattern {0}/**"msgid "tokens"msgstr "tokens"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Too many live references on this page. This board was not loaded."+msgstr "Too many live references on this page. This board was not loaded."+#: src/components/FeedbackForm.tsxmsgid "Too slow"msgstr "Too slow"@@ -14027,6 +14083,7 @@ msgstr "Try a prompt"#: src/components/settings/AccountSection.tsx#: src/components/settings/SavedThemesTiles.tsx#: src/components/ShareReceiveDialog.tsx+#: src/editor/components/ExcalidrawEmbed.tsxmsgid "Try again"msgstr "Try again"@@ -14603,6 +14660,7 @@ msgstr "View in source markdown"msgid "View in Source Markdown"msgstr "View in Source Markdown"+#: src/editor/components/ExcalidrawEmbed.tsx#: src/editor/components/Mermaid.tsxmsgid "View only"msgstr "View only"diff --git a/packages/app/src/locales/es/messages.json b/packages/app/src/locales/es/messages.jsonindex 253c441fe..346ed20a8 100644--- a/packages/app/src/locales/es/messages.json+++ b/packages/app/src/locales/es/messages.json@@ -417,6 +417,9 @@"4PYsOz": ["Ocultar Archivos (", ["sidebarShortcutLabel"], ")"],"4Sxexw": ["Deshacer o rehacer en el código"],"4TzU0n": ["Inicializar"],+ "4Vgtaz": [+ "No se pudo acceder a la pizarra. Puede que no exista o que el servidor esté sin conexión."+ ],"4buZWd": ["Heredado de ", ["path"]],"4c_a6S": ["Todavía no hay nada definido."],"4d0VYJ": ["Crearemos un ID de tema seguro a partir de este nombre."],@@ -590,6 +593,7 @@"6KXnz5": ["Puedes restaurar este archivo desde la Papelera."],"6LJJ1v": ["Archivo ", ["identity"], ". Ir a la referencia."],"6LbUG7": ["El repositorio es privado y tu cuenta de GitHub no tiene acceso."],+ "6M2L3X": ["Abrir la pizarra"],"6MnZEC": ["No se pudo cargar la terminal"],"6Nea1q": ["Usar ", ["0"], " para el modo oscuro activo"],"6O626z": ["Ningún encabezado coincide con \"", ["trimmedAnchorQuery"], "\""],@@ -981,6 +985,7 @@"AVW-K9": ["No se pudieron cargar las páginas huérfanas"],"AWOSPo": ["Acercar"],"AYoYhU": ["Falló la actualización: ", ["0"]],+ "AaC-CE": ["Pizarra vacía"],"AcK_r0": ["Claude CLI"],"AczYxH": ["Entrada open-knowledge personalizada, no gestionada por OpenKnowledge"],"AdcGcG": ["Aplicando tu cambio"],@@ -1939,6 +1944,7 @@],"LKOLNn": ["No hay agentes de IA instalados"],"LPAv9E": ["hace ", ["days"], " d"],+ "LPLWpO": ["El contenido de la pizarra no es una escena de Excalidraw válida."],"LQdLio": ["Esquema nuevo"],"LQsCPn": ["Hay commits locales que impiden actualizar esta copia"],"LRLKnQ": ["Ocultar los resueltos"],@@ -2557,6 +2563,11 @@"STTOnz": ["Tipo de ", ["keyName"], ": valor complejo (anidado; solo lectura)"],"SUOoXn": ["No se pudo abrir el proyecto."],"SVLPt5": [["formatted"], " estrellas en GitHub"],+ "SWTmnY": [+ "<0>Demasiadas referencias en vivo en esta página.</0> Este espejo de <1>",+ ["src"],+ "</1> no se cargó."+ ],"SWX1O7": [["total",@@ -2688,6 +2699,7 @@"U2pMtf": ["nombre-de-etiqueta"],"U3IvM5": ["Guía completa"],"U3RIJu": ["Archivos locales"],+ "U4ZE26": ["No se pudo renderizar la instantánea de la pizarra."],"U5Spo9": ["El directorio de contenido debe estar dentro del proyecto"],"U6Mdhd": ["Vamos a configurarlo."],"U6wmNc": ["Sincronización en pausa"],@@ -2927,6 +2939,9 @@],"WG3MZ4": [["0"], " habilidades seleccionadas"],"WGMoTY": ["Errores, fallos o sensación de poca fiabilidad"],+ "WH3roC": [+ "No hay ninguna pizarra seleccionada. Introduce la ruta de un documento .excalidraw en las propiedades de este bloque."+ ],"WHPvOb": ["Los filtros de vista ocultan todos los archivos."],"WJjviG": ["Qué incluir"],"WL6puM": ["La ruta apunta fuera del proyecto"],@@ -3618,6 +3633,7 @@"cyoNqf": ["Sin fusionar"],"czQDKY": ["Cada push es un commit en tu remoto."],"d-GtJt": ["Ver en el Markdown de origen"],+ "d-RYHO": ["Pizarra de Excalidraw"],"d1JjXo": ["Tu copia local de la rama <0>",["branch"],@@ -3650,6 +3666,7 @@"dOxPd4": ["Nota al pie"],"dQHSCs": ["Convertir (eliminar el original)"],"dSORvE": ["Detiene la ejecución actual y envía esto en su lugar"],+ "dT-HIQ": ["Demasiadas referencias en vivo en esta página. Esta pizarra no se cargó."],"dTaauv": ["Motivo: ", ["reason"]],"dURmlQ": ["\"frontmatter\" es un nombre de propiedad reservado"],"dVaXnv": ["Las reglas de contenido aún no se han cargado; inténtalo de nuevo en un momento"],@@ -3763,6 +3780,7 @@"ee15Vl": ["Las habilidades enseñan tareas repetibles a tus herramientas de IA. Escribe las tuyas en la barra lateral Habilidades del editor; esta página es donde se activan y se comparten."],+ "eh3QBq": ["No se pudo cargar la pizarra de Excalidraw."],"eiUA4k": [["count",@@ -4087,6 +4105,7 @@],"i9toLO": ["Archivo de configuración del agente"],"iBVgIQ": ["El servidor devolvió una respuesta con formato incorrecto."],+ "iBei3o": ["Controles de la pizarra"],"iDZtvM": ["No se pudieron cargar las plantillas: ", ["message"]],"iE-yoU": ["Esto es una vista previa de ",@@ -4434,6 +4453,7 @@"lScd1O": ["Las presentaciones de Slidev solo se abren en la aplicación de escritorio de OpenKnowledge."],+ "lT6wjt": ["Expandir la pizarra"],"lUtr1r": [["0"], " de ", ["1"], " seleccionados"],"lVWEIL": ["Se indexaron ", ["embedded"], " de ", ["total"], " páginas."],"lWNpNB": ["Añade cursores o selecciona coincidencias con CodeMirror."],@@ -4783,6 +4803,9 @@"pFPzHA": ["Selector de emojis"],"pFRz_E": ["Dejar estos comentarios fuera de este mensaje"],"pFagOn": ["Edición de código"],+ "pGYklE": [+ "No se pudo cargar el visor de la pizarra. Comprueba tu conexión e inténtalo de nuevo."+ ],"pHYP6v": ["Abre <0>Personalizar</0> en la barra lateral <1/> <2>Habilidades</2>."],"pI_bKs": ["<0>Espacio</0> para saltar · <1>↓</1> para agacharse"],"pJ7XCo": ["Esta página no hace referencia a ningún archivo o imagen local."],@@ -4930,6 +4953,9 @@"qbfj1f": ["Recibiendo objetos"],"qd7L1J": [["source"], ": ", ["updated"], " actualizados, ", ["upToDate"], " ya actualizados"],"qdBUHP": ["No se pudo cargar ", ["fileName"]],+ "qi17kj": [+ "Inserta una instantánea en vivo de una pizarra .excalidraw de este espacio de trabajo."+ ],"qi1F96": ["Mostrar en el Explorador de archivos"],"qiRoLb": ["Resume todo lo que cambié esta semana"],"qioCwA": ["Ir a la página ", ["pageNumber"]],diff --git a/packages/app/src/locales/es/messages.po b/packages/app/src/locales/es/messages.poindex a2d27c6c1..846a02d29 100644--- a/packages/app/src/locales/es/messages.po+++ b/packages/app/src/locales/es/messages.po@@ -1098,6 +1098,10 @@ msgstr "<0>ok</0> no funcionará en terminales externas hasta que lo añadas mámsgid "<0>Space</0> to jump · <1>↓</1> to duck"msgstr "<0>Espacio</0> para saltar · <1>↓</1> para agacharse"+#: src/editor/components/Mirror.tsx+msgid "<0>Too many live references on this page.</0> This mirror of <1>{src}</1> was not loaded."+msgstr "<0>Demasiadas referencias en vivo en esta página.</0> Este espejo de <1>{src}</1> no se cargó."+#: src/components/settings/SkillTargetsPicker.tsxmsgid "~/.myteam/skills"msgstr "~/.myteam/skills"@@ -2200,6 +2204,10 @@ msgstr "Entrada de blog"msgid "blog-post"msgstr "blog-post"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Board controls"+msgstr "Controles de la pizarra"+#: src/lib/keyboard-shortcuts.tsmsgid "Bold"msgstr "Negrita"@@ -5146,6 +5154,10 @@ msgstr "Escribir a soporte sobre este informe"msgid "Emailed"msgstr "Enviado por correo"+#: src/editor/slash-command/component-items.tsx+msgid "Embed a live snapshot of an .excalidraw board from this workspace."+msgstr "Inserta una instantánea en vivo de una pizarra .excalidraw de este espacio de trabajo."+#: src/editor/slash-command/component-items.tsxmsgid "Embed a video with native player controls."msgstr "Incrusta un vídeo con los controles nativos del reproductor."@@ -5189,6 +5201,10 @@ msgstr "vacío"msgid "Empty"msgstr "Vacío"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Empty board"+msgstr "Pizarra vacía"+#: src/editor/components/Mermaid.tsxmsgid "Empty diagram"msgstr "Diagrama vacío"@@ -5405,6 +5421,14 @@ msgstr "todo lo que hay en las carpetas {0}/ dentro de {1}/"msgid "everything under any {0}/ folder"msgstr "todo lo que hay en cualquier carpeta {0}/"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Excalidraw board"+msgstr "Pizarra de Excalidraw"++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Excalidraw board failed to load."+msgstr "No se pudo cargar la pizarra de Excalidraw."+#: src/components/ExcalidrawDocEditor.tsxmsgid "Excalidraw canvas"msgstr "Lienzo de Excalidraw"@@ -5447,6 +5471,10 @@ msgstr "Expandir todos los grupos de archivos"msgid "Expand all files"msgstr "Expandir todos los archivos"+#: src/editor/extensions/JsxComponentView.tsx+msgid "Expand board"+msgstr "Expandir la pizarra"+#: src/editor/components/Mermaid.tsx#: src/editor/extensions/JsxComponentView.tsxmsgid "Expand diagram"@@ -8499,6 +8527,10 @@ msgstr "No se detectaron herramientas de IA. Instala una para usar esta habilidamsgid "No API key is set for this endpoint. Add one above."msgstr "No hay ninguna clave de API definida para este endpoint. Añade una arriba."+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "No board selected. Enter the path to a .excalidraw doc in this block's properties."+msgstr "No hay ninguna pizarra seleccionada. Introduce la ruta de un documento .excalidraw en las propiedades de este bloque."+#: src/components/AgentDiffPane.tsxmsgid "No body changes at this version."msgstr "No hay cambios en el cuerpo en esta versión."@@ -9115,6 +9147,10 @@ msgstr "Abre desde el disco una carpeta de proyecto existente."msgid "Open and focus the bottom Ask AI prompt composer."msgstr "Abre y enfoca el compositor de prompts de Preguntar a la IA de abajo."+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Open board"+msgstr "Abrir la pizarra"+#: src/lib/keyboard-shortcuts.tsmsgid "Open CodeMirror search in source editor mode."msgstr "Abre la búsqueda de CodeMirror en el modo editor de código."@@ -13135,6 +13171,22 @@ msgstr "El contrato de cálculo certificado. Solo se aplica a documentos de tipomsgid "The audit could not be completed. Try again."msgstr "No se pudo completar la auditoría. Inténtalo de nuevo."+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board could not be reached. It may not exist, or the server may be offline."+msgstr "No se pudo acceder a la pizarra. Puede que no exista o que el servidor esté sin conexión."++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board snapshot could not be rendered."+msgstr "No se pudo renderizar la instantánea de la pizarra."++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board viewer failed to load. Check your connection and try again."+msgstr "No se pudo cargar el visor de la pizarra. Comprueba tu conexión e inténtalo de nuevo."++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board's content is not a valid Excalidraw scene."+msgstr "El contenido de la pizarra no es una escena de Excalidraw válida."+#: src/components/InstallInClaudeDesktopDialog.tsxmsgid "The Claude Desktop App didn't open the file. Is it installed? ({msg})"msgstr "La aplicación Claude Desktop no abrió el archivo. ¿Está instalada? ({msg})"@@ -13979,6 +14031,10 @@ msgstr "Alterna el patrón {0}/**"msgid "tokens"msgstr "tokens"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Too many live references on this page. This board was not loaded."+msgstr "Demasiadas referencias en vivo en esta página. Esta pizarra no se cargó."+#: src/components/FeedbackForm.tsxmsgid "Too slow"msgstr "Demasiado lento"@@ -14027,6 +14083,7 @@ msgstr "Prueba un prompt"#: src/components/settings/AccountSection.tsx#: src/components/settings/SavedThemesTiles.tsx#: src/components/ShareReceiveDialog.tsx+#: src/editor/components/ExcalidrawEmbed.tsxmsgid "Try again"msgstr "Inténtalo de nuevo"@@ -14603,6 +14660,7 @@ msgstr "Ver en el markdown de origen"msgid "View in Source Markdown"msgstr "Ver en el Markdown de origen"+#: src/editor/components/ExcalidrawEmbed.tsx#: src/editor/components/Mermaid.tsxmsgid "View only"msgstr "Solo lectura"diff --git a/packages/app/src/locales/fr/messages.json b/packages/app/src/locales/fr/messages.jsonindex e4c9c310b..65f0de495 100644--- a/packages/app/src/locales/fr/messages.json+++ b/packages/app/src/locales/fr/messages.json@@ -431,6 +431,9 @@"4PYsOz": ["Masquer les fichiers (", ["sidebarShortcutLabel"], ")"],"4Sxexw": ["Annuler ou rétablir dans la source"],"4TzU0n": ["Initialiser"],+ "4Vgtaz": [+ "Le tableau est injoignable. Il n'existe peut-être pas, ou le serveur est peut-être hors ligne."+ ],"4buZWd": ["Hérité de ", ["path"]],"4c_a6S": ["Rien de défini pour l'instant."],"4d0VYJ": ["Nous créerons un ID de thème sûr à partir de ce nom."],@@ -608,6 +611,7 @@"6KXnz5": ["Vous pouvez restaurer ce fichier depuis la corbeille."],"6LJJ1v": ["Fichier ", ["identity"], ". Accéder à la référence."],"6LbUG7": ["Le dépôt est privé et votre compte GitHub n'y a pas accès."],+ "6M2L3X": ["Ouvrir le tableau"],"6MnZEC": ["Échec du chargement du terminal"],"6Nea1q": ["Utiliser ", ["0"], " pour le mode sombre actif"],"6O626z": ["Aucun titre ne correspond à « ", ["trimmedAnchorQuery"], " »"],@@ -1003,6 +1007,7 @@"AVW-K9": ["Échec du chargement des pages orphelines"],"AWOSPo": ["Zoom avant"],"AYoYhU": ["Échec de la mise à jour : ", ["0"]],+ "AaC-CE": ["Tableau vide"],"AcK_r0": ["CLI Claude"],"AczYxH": ["Entrée open-knowledge personnalisée — non gérée par OpenKnowledge"],"AdcGcG": ["Application de votre modification"],@@ -1968,6 +1973,7 @@],"LKOLNn": ["Aucun agent IA installé"],"LPAv9E": ["il y a ", ["days"], " j"],+ "LPLWpO": ["Le contenu du tableau n'est pas une scène Excalidraw valide."],"LQdLio": ["Nouveau schéma"],"LQsCPn": ["Des commits locaux empêchent cette copie de se mettre à jour"],"LRLKnQ": ["Masquer les éléments résolus"],@@ -2584,6 +2590,11 @@"STTOnz": ["Type de ", ["keyName"], " : valeur complexe (imbriquée ; lecture seule)"],"SUOoXn": ["Échec de l'ouverture du projet."],"SVLPt5": [["formatted"], " étoiles GitHub"],+ "SWTmnY": [+ "<0>Trop de références en direct sur cette page.</0> Ce miroir de <1>",+ ["src"],+ "</1> n'a pas été chargé."+ ],"SWX1O7": [["total",@@ -2718,6 +2729,7 @@"U2pMtf": ["tag-name"],"U3IvM5": ["Guide complet"],"U3RIJu": ["Fichiers locaux"],+ "U4ZE26": ["L'instantané du tableau n'a pas pu être rendu."],"U5Spo9": ["Le répertoire de contenu doit se trouver dans le projet"],"U6Mdhd": ["Commençons la configuration."],"U6wmNc": ["Synchronisation en pause"],@@ -2959,6 +2971,9 @@],"WG3MZ4": [["0"], " compétences sélectionnées"],"WGMoTY": ["Bugs, plantages, ou manque de fiabilité"],+ "WH3roC": [+ "Aucun tableau sélectionné. Saisissez le chemin d'un document .excalidraw dans les propriétés de ce bloc."+ ],"WHPvOb": ["Tous les fichiers sont masqués par les filtres d'affichage."],"WJjviG": ["Ce qu'il faut inclure"],"WL6puM": ["Le chemin pointe en dehors du projet"],@@ -3652,6 +3667,7 @@"cyoNqf": ["Non fusionné"],"czQDKY": ["Chaque push est un commit sur votre dépôt distant."],"d-GtJt": ["Afficher dans la source Markdown"],+ "d-RYHO": ["Tableau Excalidraw"],"d1JjXo": ["Votre copie locale de la branche <0>",["branch"],@@ -3682,6 +3698,7 @@"dOxPd4": ["Note de bas de page"],"dQHSCs": ["Convertir (supprimer l'original)"],"dSORvE": ["Arrête l’exécution en cours et envoie ceci à la place"],+ "dT-HIQ": ["Trop de références en direct sur cette page. Ce tableau n'a pas été chargé."],"dTaauv": ["Raison : ", ["reason"]],"dURmlQ": ["« frontmatter » est un nom de propriété réservé"],"dVaXnv": ["Les règles de contenu ne sont pas encore chargées — réessayez dans un instant"],@@ -3795,6 +3812,7 @@"ee15Vl": ["Les compétences apprennent des tâches répétables à vos outils IA. Écrivez les vôtres dans la barre latérale Compétences de l'éditeur ; cette page sert à les activer et à les partager."],+ "eh3QBq": ["Le chargement du tableau Excalidraw a échoué."],"eiUA4k": [["count",@@ -4115,6 +4133,7 @@],"i9toLO": ["Fichier de configuration de l'agent"],"iBVgIQ": ["Le serveur a renvoyé une réponse mal formée."],+ "iBei3o": ["Contrôles du tableau"],"iDZtvM": ["Échec du chargement des modèles : ", ["message"]],"iE-yoU": ["Ceci est un aperçu de ",@@ -4466,6 +4485,7 @@"lScd1O": ["Les diaporamas Slidev s'ouvrent uniquement dans l'application de bureau OpenKnowledge."],+ "lT6wjt": ["Développer le tableau"],"lUtr1r": [["0"], " sélectionné(s) sur ", ["1"]],"lVWEIL": [["embedded"], " pages indexées sur ", ["total"], "."],"lWNpNB": [@@ -4817,6 +4837,9 @@"pFPzHA": ["Sélecteur d'émojis"],"pFRz_E": ["Ne pas inclure ces commentaires dans ce message"],"pFagOn": ["Édition de la source"],+ "pGYklE": [+ "Le lecteur de tableau n'a pas pu se charger. Vérifiez votre connexion et réessayez."+ ],"pHYP6v": ["Ouvrez <0>Personnaliser</0> dans la barre latérale <1/> <2>Compétences</2>."],"pI_bKs": ["<0>Espace</0> pour sauter · <1>↓</1> pour s’accroupir"],"pJ7XCo": ["Cette page ne référence aucun fichier ou image local."],@@ -4978,6 +5001,9 @@"qbfj1f": ["Réception des objets"],"qd7L1J": [["source"], " : ", ["updated"], " mis à jour, ", ["upToDate"], " déjà à jour"],"qdBUHP": ["Impossible de charger ", ["fileName"]],+ "qi17kj": [+ "Intégrer un instantané en direct d’un tableau .excalidraw de cet espace de travail."+ ],"qi1F96": ["Afficher dans l'Explorateur de fichiers"],"qiRoLb": ["Résume tout ce que j'ai changé cette semaine"],"qioCwA": ["Aller à la page ", ["pageNumber"]],diff --git a/packages/app/src/locales/fr/messages.po b/packages/app/src/locales/fr/messages.poindex 1f82f0366..8a1377424 100644--- a/packages/app/src/locales/fr/messages.po+++ b/packages/app/src/locales/fr/messages.po@@ -1098,6 +1098,10 @@ msgstr "<0>ok</0> ne fonctionnera pas dans les terminaux externes tant que vousmsgid "<0>Space</0> to jump · <1>↓</1> to duck"msgstr "<0>Espace</0> pour sauter · <1>↓</1> pour s’accroupir"+#: src/editor/components/Mirror.tsx+msgid "<0>Too many live references on this page.</0> This mirror of <1>{src}</1> was not loaded."+msgstr "<0>Trop de références en direct sur cette page.</0> Ce miroir de <1>{src}</1> n'a pas été chargé."+#: src/components/settings/SkillTargetsPicker.tsxmsgid "~/.myteam/skills"msgstr "~/.myteam/skills"@@ -2200,6 +2204,10 @@ msgstr "Article de blog"msgid "blog-post"msgstr "blog-post"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Board controls"+msgstr "Contrôles du tableau"+#: src/lib/keyboard-shortcuts.tsmsgid "Bold"msgstr "Gras"@@ -5146,6 +5154,10 @@ msgstr "Écrire au support à propos de ce rapport"msgid "Emailed"msgstr "Envoyé par e-mail"+#: src/editor/slash-command/component-items.tsx+msgid "Embed a live snapshot of an .excalidraw board from this workspace."+msgstr "Intégrer un instantané en direct d’un tableau .excalidraw de cet espace de travail."+#: src/editor/slash-command/component-items.tsxmsgid "Embed a video with native player controls."msgstr "Intègre une vidéo avec les contrôles natifs du lecteur."@@ -5189,6 +5201,10 @@ msgstr "vide"msgid "Empty"msgstr "Vide"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Empty board"+msgstr "Tableau vide"+#: src/editor/components/Mermaid.tsxmsgid "Empty diagram"msgstr "Diagramme vide"@@ -5405,6 +5421,14 @@ msgstr "tout ce qui se trouve sous les dossiers {0}/ à l'intérieur de {1}/"msgid "everything under any {0}/ folder"msgstr "tout ce qui se trouve sous n'importe quel dossier {0}/"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Excalidraw board"+msgstr "Tableau Excalidraw"++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Excalidraw board failed to load."+msgstr "Le chargement du tableau Excalidraw a échoué."+#: src/components/ExcalidrawDocEditor.tsxmsgid "Excalidraw canvas"msgstr "Canevas Excalidraw"@@ -5447,6 +5471,10 @@ msgstr "Développer tous les groupes de fichiers"msgid "Expand all files"msgstr "Développer tous les fichiers"+#: src/editor/extensions/JsxComponentView.tsx+msgid "Expand board"+msgstr "Développer le tableau"+#: src/editor/components/Mermaid.tsx#: src/editor/extensions/JsxComponentView.tsxmsgid "Expand diagram"@@ -8499,6 +8527,10 @@ msgstr "Aucun outil IA détecté. Installez-en un pour utiliser cette compétencmsgid "No API key is set for this endpoint. Add one above."msgstr "Aucune clé API n'est définie pour ce point de terminaison. Ajoutez-en une ci-dessus."+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "No board selected. Enter the path to a .excalidraw doc in this block's properties."+msgstr "Aucun tableau sélectionné. Saisissez le chemin d'un document .excalidraw dans les propriétés de ce bloc."+#: src/components/AgentDiffPane.tsxmsgid "No body changes at this version."msgstr "Aucune modification du corps dans cette version."@@ -9115,6 +9147,10 @@ msgstr "Ouvrez un dossier de projet existant depuis le disque."msgid "Open and focus the bottom Ask AI prompt composer."msgstr "Ouvre et met le focus sur la zone d'invite Demander à l'IA en bas."+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Open board"+msgstr "Ouvrir le tableau"+#: src/lib/keyboard-shortcuts.tsmsgid "Open CodeMirror search in source editor mode."msgstr "Ouvre la recherche CodeMirror en mode éditeur de source."@@ -13135,6 +13171,22 @@ msgstr "Le contrat de calcul attesté. S'applique uniquement aux documents tapémsgid "The audit could not be completed. Try again."msgstr "L'audit n'a pas pu être terminé. Réessayez."+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board could not be reached. It may not exist, or the server may be offline."+msgstr "Le tableau est injoignable. Il n'existe peut-être pas, ou le serveur est peut-être hors ligne."++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board snapshot could not be rendered."+msgstr "L'instantané du tableau n'a pas pu être rendu."++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board viewer failed to load. Check your connection and try again."+msgstr "Le lecteur de tableau n'a pas pu se charger. Vérifiez votre connexion et réessayez."++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board's content is not a valid Excalidraw scene."+msgstr "Le contenu du tableau n'est pas une scène Excalidraw valide."+#: src/components/InstallInClaudeDesktopDialog.tsxmsgid "The Claude Desktop App didn't open the file. Is it installed? ({msg})"msgstr "L'application Claude Desktop n'a pas ouvert le fichier. Est-elle installée ? ({msg})"@@ -13979,6 +14031,10 @@ msgstr "Active ou désactive le motif {0}/**"msgid "tokens"msgstr "tokens"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Too many live references on this page. This board was not loaded."+msgstr "Trop de références en direct sur cette page. Ce tableau n'a pas été chargé."+#: src/components/FeedbackForm.tsxmsgid "Too slow"msgstr "Trop lent"@@ -14027,6 +14083,7 @@ msgstr "Essayer une invite"#: src/components/settings/AccountSection.tsx#: src/components/settings/SavedThemesTiles.tsx#: src/components/ShareReceiveDialog.tsx+#: src/editor/components/ExcalidrawEmbed.tsxmsgid "Try again"msgstr "Réessayer"@@ -14603,6 +14660,7 @@ msgstr "Voir dans la source markdown"msgid "View in Source Markdown"msgstr "Afficher dans la source Markdown"+#: src/editor/components/ExcalidrawEmbed.tsx#: src/editor/components/Mermaid.tsxmsgid "View only"msgstr "Affichage seul"diff --git a/packages/app/src/locales/hi/messages.json b/packages/app/src/locales/hi/messages.jsonindex 57dc3b167..e7194e9d0 100644--- a/packages/app/src/locales/hi/messages.json+++ b/packages/app/src/locales/hi/messages.json@@ -359,6 +359,7 @@"4PYsOz": ["Files छिपाएँ (", ["sidebarShortcutLabel"], ")"],"4Sxexw": ["स्रोत में पूर्ववत या फिर से करें"],"4TzU0n": ["आरंभ करें"],+ "4Vgtaz": ["बोर्ड तक नहीं पहुँचा जा सका। हो सकता है वह मौजूद न हो, या सर्वर ऑफ़लाइन हो।"],"4buZWd": [["path"], " से विरासत में मिला"],"4c_a6S": ["अभी कुछ भी सेट नहीं।"],"4d0VYJ": ["हम इस नाम से एक सुरक्षित थीम ID बनाएँगे।"],@@ -499,6 +500,7 @@"6KXnz5": ["आप इस फ़ाइल को ट्रैश से पुनर्स्थापित कर सकते हैं।"],"6LJJ1v": ["फ़ाइल ", ["identity"], "। संदर्भ पर जाएँ।"],"6LbUG7": ["रिपॉज़िटरी निजी है और आपके GitHub खाते की उस तक पहुँच नहीं है।"],+ "6M2L3X": ["बोर्ड खोलें"],"6MnZEC": ["टर्मिनल लोड नहीं हो सका"],"6Nea1q": ["सक्रिय गहरे मोड के लिए ", ["0"], " का उपयोग करें"],"6O626z": ["\"", ["trimmedAnchorQuery"], "\" से कोई शीर्षक मेल नहीं खाता"],@@ -814,6 +816,7 @@"AVW-K9": ["अनाथ पेज लोड करने में विफल"],"AWOSPo": ["बड़ा करें"],"AYoYhU": ["अपडेट विफल: ", ["0"]],+ "AaC-CE": ["खाली बोर्ड"],"AcK_r0": ["Claude CLI"],"AczYxH": ["कस्टम open-knowledge प्रविष्टि — OpenKnowledge द्वारा प्रबंधित नहीं"],"AdcGcG": ["आपका बदलाव लागू किया जा रहा है"],@@ -1621,6 +1624,7 @@],"LKOLNn": ["कोई AI एजेंट इंस्टॉल नहीं है"],"LPAv9E": [["days"], " दिन पहले"],+ "LPLWpO": ["बोर्ड की सामग्री एक मान्य Excalidraw दृश्य नहीं है।"],"LQdLio": ["नई स्कीमा"],"LQsCPn": ["स्थानीय कमिट इस प्रति को अद्यतित होने से रोक रहे हैं"],"LRLKnQ": ["सुलझे हुए छिपाएँ"],@@ -2171,6 +2175,11 @@"STTOnz": [["keyName"], " प्रकार: जटिल मान (नेस्टेड; केवल पढ़ने के लिए)"],"SUOoXn": ["प्रोजेक्ट खोलने में विफल।"],"SVLPt5": [["formatted"], " GitHub स्टार"],+ "SWTmnY": [+ "<0>इस पेज पर बहुत अधिक लाइव संदर्भ हैं।</0> <1>",+ ["src"],+ "</1> का यह मिरर लोड नहीं किया गया।"+ ],"SWX1O7": [["total", "plural", { "one": ["#", " फ़ाइल ठीक की गई"], "other": ["#", " फ़ाइलें ठीक की गईं"] }],"।"@@ -2258,6 +2267,7 @@"U2pMtf": ["tag-name"],"U3IvM5": ["पूरी मार्गदर्शिका"],"U3RIJu": ["स्थानीय फ़ाइलें"],+ "U4ZE26": ["बोर्ड का स्नैपशॉट रेंडर नहीं हो सका।"],"U5Spo9": ["सामग्री निर्देशिका प्रोजेक्ट के भीतर होनी चाहिए"],"U6Mdhd": ["चलिए सेटअप करते हैं।"],"U6wmNc": ["सिंक रुका हुआ"],@@ -2429,6 +2439,9 @@"WFEbV1": ["संपादक में सामान्य markdown समस्याएँ चिह्नित करें। <0>markdownlint<1/></0> द्वारा संचालित।"],"WG3MZ4": [["0"], " स्किलें चुनी गईं"],"WGMoTY": ["बग, क्रैश, या यह भरोसेमंद नहीं लगा"],+ "WH3roC": [+ "कोई बोर्ड चुना नहीं गया है। इस ब्लॉक की प्रॉपर्टी में किसी .excalidraw दस्तावेज़ का पथ दर्ज करें।"+ ],"WHPvOb": ["सभी फ़ाइलें दृश्य फ़िल्टर द्वारा छिपी हैं।"],"WJjviG": ["क्या शामिल करना है"],"WL6puM": ["पथ प्रोजेक्ट के बाहर पहुँचता है"],@@ -3024,6 +3037,7 @@"cyoNqf": ["मर्ज नहीं हुआ"],"czQDKY": ["हर पुश आपके रिमोट पर एक कमिट है।"],"d-GtJt": ["स्रोत Markdown में देखें"],+ "d-RYHO": ["Excalidraw बोर्ड"],"d1JjXo": ["ब्रांच <0>",["branch"],@@ -3052,6 +3066,7 @@"dOxPd4": ["फ़ुटनोट"],"dQHSCs": ["बदलें (मूल हटाएँ)"],"dSORvE": ["मौजूदा प्रक्रिया रोककर इसके बजाय यह भेजता है"],+ "dT-HIQ": ["इस पेज पर बहुत अधिक लाइव संदर्भ हैं। यह बोर्ड लोड नहीं किया गया।"],"dTaauv": ["कारण: ", ["reason"]],"dURmlQ": ["\"frontmatter\" एक आरक्षित प्रॉपर्टी नाम है"],"dVaXnv": ["सामग्री नियम अभी लोड नहीं हुए — कुछ देर बाद फिर कोशिश करें"],@@ -3134,6 +3149,7 @@"ee15Vl": ["स्किल आपके AI टूल को दोहराए जाने वाले काम सिखाती हैं। अपनी स्किल एडिटर के स्किल साइडबार में लिखें; इस पेज पर उन्हें चालू और साझा किया जाता है।"],+ "eh3QBq": ["Excalidraw बोर्ड लोड नहीं हो सका।"],"eiUA4k": [["count", "plural", { "one": ["#", " टिप्पणी"], "other": ["#", " टिप्पणियाँ"] }]],"ekSPiP": [["0"], " पहले ही हटा दिया गया था।"],"el2KyL": ["इस प्रोजेक्ट में Slidev मिला। डेक प्रोजेक्ट के संस्करण का उपयोग करेंगे।"],@@ -3396,6 +3412,7 @@],"i9toLO": ["एजेंट कॉन्फ़िगरेशन फ़ाइल"],"iBVgIQ": ["सर्वर ने गलत प्रारूप वाली प्रतिक्रिया लौटाई।"],+ "iBei3o": ["बोर्ड नियंत्रण"],"iDZtvM": ["टेम्पलेट लोड करने में विफल: ", ["message"]],"iE-yoU": ["यह ",@@ -3716,6 +3733,7 @@"lPzyrU": ["सभी हंक सुलझा दिए गए"],"lS83Sg": ["क्लिपबोर्ड तक नहीं पहुँचा जा सका।"],"lScd1O": ["Slidev डेक केवल OpenKnowledge डेस्कटॉप ऐप में खुलते हैं।"],+ "lT6wjt": ["बोर्ड फैलाएँ"],"lUtr1r": [["1"], " में से ", ["0"], " चुने गए"],"lVWEIL": [["total"], " में से ", ["embedded"], " पेज अनुक्रमित।"],"lWNpNB": ["CodeMirror के ज़रिए कर्सर जोड़ें या मेल खाती घटनाएँ चुनें।"],@@ -4014,6 +4032,7 @@"pFPzHA": ["इमोजी चयनकर्ता"],"pFRz_E": ["इन टिप्पणियों को इस संदेश से बाहर रखें"],"pFagOn": ["स्रोत संपादन"],+ "pGYklE": ["बोर्ड व्यूअर लोड नहीं हो सका। अपना कनेक्शन जाँचें और फिर से प्रयास करें।"],"pHYP6v": ["साइडबार में <0>Customize</0> <1/> <2>Skills</2> खोलें।"],"pI_bKs": ["कूदने के लिए <0>स्पेस</0> · झुकने के लिए <1>↓</1>"],"pJ7XCo": ["यह पेज किसी स्थानीय फ़ाइल या छवि को संदर्भित नहीं करता।"],@@ -4129,6 +4148,7 @@"qbfj1f": ["ऑब्जेक्ट प्राप्त किए जा रहे हैं"],"qd7L1J": [["source"], ": ", ["updated"], " अपडेट किए गए, ", ["upToDate"], " पहले से अपडेट"],"qdBUHP": [["fileName"], " लोड नहीं हो सकी"],+ "qi17kj": ["इस वर्कस्पेस के किसी .excalidraw बोर्ड का लाइव स्नैपशॉट एम्बेड करें।"],"qi1F96": ["File Explorer में दिखाएँ"],"qiRoLb": ["इस सप्ताह मैंने जो कुछ बदला उसका सारांश दें"],"qioCwA": ["पेज ", ["pageNumber"], " पर जाएँ"],diff --git a/packages/app/src/locales/hi/messages.po b/packages/app/src/locales/hi/messages.poindex d8be162e4..45f9f51d6 100644--- a/packages/app/src/locales/hi/messages.po+++ b/packages/app/src/locales/hi/messages.po@@ -1094,6 +1094,10 @@ msgstr "<0>ok</0> तब तक बाहरी टर्मिनल मेंmsgid "<0>Space</0> to jump · <1>↓</1> to duck"msgstr "कूदने के लिए <0>स्पेस</0> · झुकने के लिए <1>↓</1>"+#: src/editor/components/Mirror.tsx+msgid "<0>Too many live references on this page.</0> This mirror of <1>{src}</1> was not loaded."+msgstr "<0>इस पेज पर बहुत अधिक लाइव संदर्भ हैं।</0> <1>{src}</1> का यह मिरर लोड नहीं किया गया।"+#: src/components/settings/SkillTargetsPicker.tsxmsgid "~/.myteam/skills"msgstr "~/.myteam/skills"@@ -2196,6 +2200,10 @@ msgstr "ब्लॉग पोस्ट"msgid "blog-post"msgstr "blog-post"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Board controls"+msgstr "बोर्ड नियंत्रण"+#: src/lib/keyboard-shortcuts.tsmsgid "Bold"msgstr "गाढ़ा"@@ -5142,6 +5150,10 @@ msgstr "इस रिपोर्ट के बारे में सहायmsgid "Emailed"msgstr "ईमेल भेजा गया"+#: src/editor/slash-command/component-items.tsx+msgid "Embed a live snapshot of an .excalidraw board from this workspace."+msgstr "इस वर्कस्पेस के किसी .excalidraw बोर्ड का लाइव स्नैपशॉट एम्बेड करें।"+#: src/editor/slash-command/component-items.tsxmsgid "Embed a video with native player controls."msgstr "मूल प्लेयर नियंत्रणों के साथ एक वीडियो एम्बेड करें।"@@ -5185,6 +5197,10 @@ msgstr "खाली"msgid "Empty"msgstr "खाली"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Empty board"+msgstr "खाली बोर्ड"+#: src/editor/components/Mermaid.tsxmsgid "Empty diagram"msgstr "खाली आरेख"@@ -5401,6 +5417,14 @@ msgstr "{1}/ के भीतर मौजूद {0}/ फ़ोल्डरोmsgid "everything under any {0}/ folder"msgstr "किसी भी {0}/ फ़ोल्डर के अंतर्गत सब कुछ"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Excalidraw board"+msgstr "Excalidraw बोर्ड"++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Excalidraw board failed to load."+msgstr "Excalidraw बोर्ड लोड नहीं हो सका।"+#: src/components/ExcalidrawDocEditor.tsxmsgid "Excalidraw canvas"msgstr "Excalidraw कैनवास"@@ -5443,6 +5467,10 @@ msgstr "सभी फ़ाइल समूह फैलाएँ"msgid "Expand all files"msgstr "सभी फ़ाइलें फैलाएँ"+#: src/editor/extensions/JsxComponentView.tsx+msgid "Expand board"+msgstr "बोर्ड फैलाएँ"+#: src/editor/components/Mermaid.tsx#: src/editor/extensions/JsxComponentView.tsxmsgid "Expand diagram"@@ -8495,6 +8523,10 @@ msgstr "कोई AI टूल नहीं मिला। इस स्किmsgid "No API key is set for this endpoint. Add one above."msgstr "इस एंडपॉइंट के लिए कोई API कुंजी सेट नहीं है। ऊपर एक जोड़ें।"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "No board selected. Enter the path to a .excalidraw doc in this block's properties."+msgstr "कोई बोर्ड चुना नहीं गया है। इस ब्लॉक की प्रॉपर्टी में किसी .excalidraw दस्तावेज़ का पथ दर्ज करें।"+#: src/components/AgentDiffPane.tsxmsgid "No body changes at this version."msgstr "इस संस्करण में मुख्य भाग का कोई बदलाव नहीं।"@@ -9111,6 +9143,10 @@ msgstr "डिस्क से कोई मौजूदा प्रोजेmsgid "Open and focus the bottom Ask AI prompt composer."msgstr "नीचे वाली Ask AI प्रॉम्प्ट लेखन-पट्टी खोलें और उस पर फ़ोकस करें।"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Open board"+msgstr "बोर्ड खोलें"+#: src/lib/keyboard-shortcuts.tsmsgid "Open CodeMirror search in source editor mode."msgstr "स्रोत संपादक मोड में CodeMirror खोज खोलें।"@@ -13131,6 +13167,22 @@ msgstr "प्रमाणित-गणना अनुबंध। केवलmsgid "The audit could not be completed. Try again."msgstr "ऑडिट पूरा नहीं हो सका। फिर कोशिश करें।"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board could not be reached. It may not exist, or the server may be offline."+msgstr "बोर्ड तक नहीं पहुँचा जा सका। हो सकता है वह मौजूद न हो, या सर्वर ऑफ़लाइन हो।"++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board snapshot could not be rendered."+msgstr "बोर्ड का स्नैपशॉट रेंडर नहीं हो सका।"++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board viewer failed to load. Check your connection and try again."+msgstr "बोर्ड व्यूअर लोड नहीं हो सका। अपना कनेक्शन जाँचें और फिर से प्रयास करें।"++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board's content is not a valid Excalidraw scene."+msgstr "बोर्ड की सामग्री एक मान्य Excalidraw दृश्य नहीं है।"+#: src/components/InstallInClaudeDesktopDialog.tsxmsgid "The Claude Desktop App didn't open the file. Is it installed? ({msg})"msgstr "Claude Desktop App ने फ़ाइल नहीं खोली। क्या वह इंस्टॉल है? ({msg})"@@ -13975,6 +14027,10 @@ msgstr "पैटर्न {0}/** टॉगल करें"msgid "tokens"msgstr "टोकन"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Too many live references on this page. This board was not loaded."+msgstr "इस पेज पर बहुत अधिक लाइव संदर्भ हैं। यह बोर्ड लोड नहीं किया गया।"+#: src/components/FeedbackForm.tsxmsgid "Too slow"msgstr "बहुत धीमा"@@ -14023,6 +14079,7 @@ msgstr "कोई प्रॉम्प्ट आज़माएँ"#: src/components/settings/AccountSection.tsx#: src/components/settings/SavedThemesTiles.tsx#: src/components/ShareReceiveDialog.tsx+#: src/editor/components/ExcalidrawEmbed.tsxmsgid "Try again"msgstr "फिर कोशिश करें"@@ -14599,6 +14656,7 @@ msgstr "स्रोत markdown में देखें"msgid "View in Source Markdown"msgstr "स्रोत Markdown में देखें"+#: src/editor/components/ExcalidrawEmbed.tsx#: src/editor/components/Mermaid.tsxmsgid "View only"msgstr "केवल देखने के लिए"diff --git a/packages/app/src/locales/id/messages.json b/packages/app/src/locales/id/messages.jsonindex 15b714e60..76f03053d 100644--- a/packages/app/src/locales/id/messages.json+++ b/packages/app/src/locales/id/messages.json@@ -365,6 +365,7 @@"4PYsOz": ["Sembunyikan Berkas (", ["sidebarShortcutLabel"], ")"],"4Sxexw": ["Batalkan atau ulangi di sumber"],"4TzU0n": ["Inisialisasi"],+ "4Vgtaz": ["Papan tidak dapat dijangkau. Papan mungkin tidak ada, atau server sedang offline."],"4buZWd": ["Diwarisi dari ", ["path"]],"4c_a6S": ["Belum ada yang disetel."],"4d0VYJ": ["Kami akan membuat ID tema yang aman dari nama ini."],@@ -520,6 +521,7 @@"6KXnz5": ["Anda dapat memulihkan berkas ini dari Tempat Sampah."],"6LJJ1v": ["File ", ["identity"], ". Buka referensi."],"6LbUG7": ["Repositorinya bersifat pribadi dan akun GitHub Anda tidak punya akses ke sana."],+ "6M2L3X": ["Buka papan"],"6MnZEC": ["Gagal memuat terminal"],"6Nea1q": ["Pakai ", ["0"], " untuk mode gelap yang aktif"],"6O626z": ["Tidak ada judul yang cocok dengan \"", ["trimmedAnchorQuery"], "\""],@@ -837,6 +839,7 @@"AVW-K9": ["Gagal memuat halaman yatim"],"AWOSPo": ["Perbesar"],"AYoYhU": ["Pembaruan gagal: ", ["0"]],+ "AaC-CE": ["Papan kosong"],"AcK_r0": ["Claude CLI"],"AczYxH": ["Entri open-knowledge khusus — tidak dikelola OpenKnowledge"],"AdcGcG": ["Menerapkan perubahan Anda"],@@ -1685,6 +1688,7 @@],"LKOLNn": ["Tidak ada agen AI yang terpasang"],"LPAv9E": [["days"], " hr lalu"],+ "LPLWpO": ["Konten papan bukan scene Excalidraw yang valid."],"LQdLio": ["Skema baru"],"LQsCPn": ["Commit lokal menghalangi salinan ini diperbarui"],"LRLKnQ": ["Sembunyikan yang sudah selesai"],@@ -2236,6 +2240,11 @@"STTOnz": ["Tipe ", ["keyName"], ": nilai kompleks (bersarang; hanya-baca)"],"SUOoXn": ["Gagal membuka proyek."],"SVLPt5": [["formatted"], " bintang GitHub"],+ "SWTmnY": [+ "<0>Terlalu banyak referensi langsung di halaman ini.</0> Cermin <1>",+ ["src"],+ "</1> ini tidak dimuat."+ ],"SWX1O7": [["total", "plural", { "other": ["#", " berkas diperbaiki"] }], "."],"SXCSQd": ["Jalur disalin"],"SXEdCq": ["Pindahkan ke ", ["0"], "?"],@@ -2333,6 +2342,7 @@"U2pMtf": ["nama-tag"],"U3IvM5": ["Panduan lengkap"],"U3RIJu": ["Berkas lokal"],+ "U4ZE26": ["Cuplikan papan tidak dapat dirender."],"U5Spo9": ["Direktori konten harus berada di dalam proyek"],"U6Mdhd": ["Mari kita siapkan."],"U6wmNc": ["Sinkronisasi dijeda"],@@ -2520,6 +2530,9 @@],"WG3MZ4": [["0"], " keterampilan dipilih"],"WGMoTY": ["Bug, kegagalan, atau terasa tidak andal"],+ "WH3roC": [+ "Belum ada papan yang dipilih. Masukkan path dokumen .excalidraw di properti blok ini."+ ],"WHPvOb": ["Semua berkas disembunyikan oleh filter tampilan."],"WJjviG": ["Apa yang disertakan"],"WL6puM": ["Jalur mengarah ke luar proyek"],@@ -3132,6 +3145,7 @@"cyoNqf": ["Belum digabungkan"],"czQDKY": ["Setiap push adalah satu commit ke remote Anda."],"d-GtJt": ["Lihat di sumber Markdown"],+ "d-RYHO": ["Papan Excalidraw"],"d1JjXo": ["Salinan lokal cabang <0>",["branch"],@@ -3162,6 +3176,7 @@"dOxPd4": ["Catatan kaki"],"dQHSCs": ["Ubah (hapus aslinya)"],"dSORvE": ["Menghentikan proses saat ini dan mengirim ini sebagai gantinya"],+ "dT-HIQ": ["Terlalu banyak referensi langsung di halaman ini. Papan ini tidak dimuat."],"dTaauv": ["Alasan: ", ["reason"]],"dURmlQ": ["\"frontmatter\" adalah nama properti yang dicadangkan"],"dVaXnv": ["Aturan konten belum dimuat — coba lagi sebentar"],@@ -3249,6 +3264,7 @@"ee15Vl": ["Keterampilan mengajarkan tugas berulang kepada alat AI Anda. Tulis milik Anda di bilah sisi Keterampilan pada editor; halaman ini tempat keterampilan diaktifkan dan dibagikan."],+ "eh3QBq": ["Papan Excalidraw gagal dimuat."],"eiUA4k": [["count", "plural", { "other": ["#", " komentar"] }]],"ekSPiP": [["0"], " sudah dihapus."],"el2KyL": ["Slidev ditemukan di proyek ini. Dek akan memakai versi proyek."],@@ -3532,6 +3548,7 @@],"i9toLO": ["Berkas konfigurasi agen"],"iBVgIQ": ["Server mengembalikan respons yang salah bentuk."],+ "iBei3o": ["Kendali papan"],"iDZtvM": ["Gagal memuat templat: ", ["message"]],"iE-yoU": ["Ini pratinjau ",@@ -3862,6 +3879,7 @@"lPzyrU": ["Semua bagian sudah diselesaikan"],"lS83Sg": ["Papan klip tidak dapat diakses."],"lScd1O": ["Dek Slidev hanya terbuka di aplikasi desktop OpenKnowledge."],+ "lT6wjt": ["Bentangkan papan"],"lUtr1r": [["0"], " dari ", ["1"], " dipilih"],"lVWEIL": [["embedded"], " dari ", ["total"], " halaman terindeks."],"lWNpNB": ["Menambahkan kursor atau memilih kemunculan yang cocok lewat CodeMirror."],@@ -4167,6 +4185,7 @@"pFPzHA": ["Pemilih emoji"],"pFRz_E": ["Jangan sertakan komentar ini dalam pesan ini"],"pFagOn": ["Penyuntingan sumber"],+ "pGYklE": ["Penampil papan gagal dimuat. Periksa koneksi Anda dan coba lagi."],"pHYP6v": ["Buka <0>Sesuaikan</0> di bilah sisi <1/> <2>Keterampilan</2>."],"pI_bKs": ["<0>Spasi</0> untuk melompat · <1>↓</1> untuk menunduk"],"pJ7XCo": ["Halaman ini tidak merujuk ke berkas atau gambar lokal apa pun."],@@ -4278,6 +4297,7 @@"qbfj1f": ["Menerima objek"],"qd7L1J": [["source"], ": ", ["updated"], " diperbarui, ", ["upToDate"], " sudah terbaru"],"qdBUHP": [["fileName"], " tidak bisa dimuat"],+ "qi17kj": ["Sematkan cuplikan langsung papan .excalidraw dari ruang kerja ini."],"qi1F96": ["Tampilkan di Penjelajah Berkas"],"qiRoLb": ["Ringkas semua yang saya ubah minggu ini"],"qioCwA": ["Lompat ke halaman ", ["pageNumber"]],diff --git a/packages/app/src/locales/id/messages.po b/packages/app/src/locales/id/messages.poindex d764c5a6a..6e9e3e63e 100644--- a/packages/app/src/locales/id/messages.po+++ b/packages/app/src/locales/id/messages.po@@ -1094,6 +1094,10 @@ msgstr "<0>ok</0> tidak akan berjalan di terminal eksternal sampai Anda menambahmsgid "<0>Space</0> to jump · <1>↓</1> to duck"msgstr "<0>Spasi</0> untuk melompat · <1>↓</1> untuk menunduk"+#: src/editor/components/Mirror.tsx+msgid "<0>Too many live references on this page.</0> This mirror of <1>{src}</1> was not loaded."+msgstr "<0>Terlalu banyak referensi langsung di halaman ini.</0> Cermin <1>{src}</1> ini tidak dimuat."+#: src/components/settings/SkillTargetsPicker.tsxmsgid "~/.myteam/skills"msgstr "~/.myteam/skills"@@ -2196,6 +2200,10 @@ msgstr "Pos blog"msgid "blog-post"msgstr "blog-post"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Board controls"+msgstr "Kendali papan"+#: src/lib/keyboard-shortcuts.tsmsgid "Bold"msgstr "Tebal"@@ -5142,6 +5150,10 @@ msgstr "Kirim surel ke dukungan tentang laporan ini"msgid "Emailed"msgstr "Dikirim lewat surel"+#: src/editor/slash-command/component-items.tsx+msgid "Embed a live snapshot of an .excalidraw board from this workspace."+msgstr "Sematkan cuplikan langsung papan .excalidraw dari ruang kerja ini."+#: src/editor/slash-command/component-items.tsxmsgid "Embed a video with native player controls."msgstr "Menyematkan video dengan kendali pemutar bawaan."@@ -5185,6 +5197,10 @@ msgstr "kosong"msgid "Empty"msgstr "Kosong"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Empty board"+msgstr "Papan kosong"+#: src/editor/components/Mermaid.tsxmsgid "Empty diagram"msgstr "Diagram kosong"@@ -5401,6 +5417,14 @@ msgstr "semua yang ada di folder {0}/ di dalam {1}/"msgid "everything under any {0}/ folder"msgstr "semua yang ada di folder {0}/ mana pun"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Excalidraw board"+msgstr "Papan Excalidraw"++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Excalidraw board failed to load."+msgstr "Papan Excalidraw gagal dimuat."+#: src/components/ExcalidrawDocEditor.tsxmsgid "Excalidraw canvas"msgstr "Kanvas Excalidraw"@@ -5443,6 +5467,10 @@ msgstr "Bentangkan semua grup berkas"msgid "Expand all files"msgstr "Bentangkan semua berkas"+#: src/editor/extensions/JsxComponentView.tsx+msgid "Expand board"+msgstr "Bentangkan papan"+#: src/editor/components/Mermaid.tsx#: src/editor/extensions/JsxComponentView.tsxmsgid "Expand diagram"@@ -8495,6 +8523,10 @@ msgstr "Tidak ada alat AI yang terdeteksi. Pasang satu untuk memakai keterampilamsgid "No API key is set for this endpoint. Add one above."msgstr "Tidak ada kunci API yang disetel untuk endpoint ini. Tambahkan satu di atas."+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "No board selected. Enter the path to a .excalidraw doc in this block's properties."+msgstr "Belum ada papan yang dipilih. Masukkan path dokumen .excalidraw di properti blok ini."+#: src/components/AgentDiffPane.tsxmsgid "No body changes at this version."msgstr "Tidak ada perubahan isi utama pada versi ini."@@ -9111,6 +9143,10 @@ msgstr "Membuka folder proyek yang sudah ada dari disk."msgid "Open and focus the bottom Ask AI prompt composer."msgstr "Membuka dan memfokuskan penyusun prompt Tanya AI di bawah."+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Open board"+msgstr "Buka papan"+#: src/lib/keyboard-shortcuts.tsmsgid "Open CodeMirror search in source editor mode."msgstr "Membuka pencarian CodeMirror di mode penyunting sumber."@@ -13131,6 +13167,22 @@ msgstr "Kontrak perhitungan yang dibuktikan. Hanya berlaku untuk dokumen yang dimsgid "The audit could not be completed. Try again."msgstr "Audit tidak dapat diselesaikan. Coba lagi."+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board could not be reached. It may not exist, or the server may be offline."+msgstr "Papan tidak dapat dijangkau. Papan mungkin tidak ada, atau server sedang offline."++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board snapshot could not be rendered."+msgstr "Cuplikan papan tidak dapat dirender."++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board viewer failed to load. Check your connection and try again."+msgstr "Penampil papan gagal dimuat. Periksa koneksi Anda dan coba lagi."++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board's content is not a valid Excalidraw scene."+msgstr "Konten papan bukan scene Excalidraw yang valid."+#: src/components/InstallInClaudeDesktopDialog.tsxmsgid "The Claude Desktop App didn't open the file. Is it installed? ({msg})"msgstr "Aplikasi Claude Desktop tidak membuka berkasnya. Apakah ia terpasang? ({msg})"@@ -13975,6 +14027,10 @@ msgstr "Mengaktifkan atau menonaktifkan pola {0}/**"msgid "tokens"msgstr "token"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Too many live references on this page. This board was not loaded."+msgstr "Terlalu banyak referensi langsung di halaman ini. Papan ini tidak dimuat."+#: src/components/FeedbackForm.tsxmsgid "Too slow"msgstr "Terlalu lambat"@@ -14023,6 +14079,7 @@ msgstr "Coba sebuah prompt"#: src/components/settings/AccountSection.tsx#: src/components/settings/SavedThemesTiles.tsx#: src/components/ShareReceiveDialog.tsx+#: src/editor/components/ExcalidrawEmbed.tsxmsgid "Try again"msgstr "Coba lagi"@@ -14599,6 +14656,7 @@ msgstr "Lihat di markdown sumber"msgid "View in Source Markdown"msgstr "Lihat di sumber Markdown"+#: src/editor/components/ExcalidrawEmbed.tsx#: src/editor/components/Mermaid.tsxmsgid "View only"msgstr "Hanya lihat"diff --git a/packages/app/src/locales/ko/messages.json b/packages/app/src/locales/ko/messages.jsonindex 21603eaf0..cd956c370 100644--- a/packages/app/src/locales/ko/messages.json+++ b/packages/app/src/locales/ko/messages.json@@ -352,6 +352,7 @@"4PYsOz": ["파일 숨기기 (", ["sidebarShortcutLabel"], ")"],"4Sxexw": ["소스 실행 취소 또는 다시 실행"],"4TzU0n": ["초기화"],+ "4Vgtaz": ["보드에 연결할 수 없습니다. 보드가 없거나 서버가 오프라인일 수 있습니다."],"4buZWd": [["path"], "에서 상속됨"],"4c_a6S": ["아직 설정된 항목 없음."],"4d0VYJ": ["이 이름으로 안전한 테마 ID를 만듭니다."],@@ -502,6 +503,7 @@"6LbUG7": ["비공개 저장소에 접근 권한이 없습니다. 접근 권한이 있는 GitHub 계정으로 로그인하세요."],+ "6M2L3X": ["보드 열기"],"6MnZEC": ["터미널 로드 실패"],"6Nea1q": ["현재 어두운 모드로 ", ["0"], " 사용"],"6O626z": ["\"", ["trimmedAnchorQuery"], "\"과 일치하는 제목이 없습니다"],@@ -810,6 +812,7 @@"AVW-K9": ["고아 페이지 불러오기 실패"],"AWOSPo": ["확대"],"AYoYhU": ["업데이트 실패: ", ["0"]],+ "AaC-CE": ["빈 보드"],"AcK_r0": ["Claude CLI"],"AczYxH": ["사용자 지정 OpenKnowledge 항목, OpenKnowledge에서 관리하지 않음"],"AdcGcG": ["변경사항 적용 중"],@@ -1617,6 +1620,7 @@],"LKOLNn": ["설치된 AI 에이전트 없음"],"LPAv9E": [["days"], "일 전"],+ "LPLWpO": ["보드의 내용이 유효한 Excalidraw 장면이 아닙니다."],"LQdLio": ["새 스키마"],"LQsCPn": ["로컬 커밋 때문에 이 사본을 업데이트할 수 없습니다."],"LRLKnQ": ["해결됨 숨기기"],@@ -2150,6 +2154,11 @@"STTOnz": [["keyName"], " 유형: 복합 값 (중첩됨, 읽기 전용)"],"SUOoXn": ["프로젝트를 열지 못했습니다"],"SVLPt5": [["formatted"], " GitHub 스타"],+ "SWTmnY": [+ "<0>이 페이지에 라이브 참조가 너무 많습니다.</0> <1>",+ ["src"],+ "</1>의 이 미러는 불러오지 않았습니다."+ ],"SWX1O7": [["total", "plural", { "other": ["파일 ", "#", "개"] }], "를 수정했습니다."],"SXCSQd": ["복사된 경로"],"SXEdCq": [["0"], "으로 이동할까요?"],@@ -2244,6 +2253,7 @@"U2pMtf": ["tag-name"],"U3IvM5": ["전체 안내서"],"U3RIJu": ["로컬 파일"],+ "U4ZE26": ["보드 스냅숏을 렌더링하지 못했습니다."],"U5Spo9": ["콘텐츠 디렉터리는 프로젝트 내부에 있어야 합니다"],"U6Mdhd": ["설정을 시작해 볼까요."],"U6wmNc": ["동기화 일시 중지됨"],@@ -2422,6 +2432,7 @@],"WG3MZ4": ["스킬 ", ["0"], "개 선택됨"],"WGMoTY": ["버그, 충돌 또는 불안정한 동작"],+ "WH3roC": ["선택된 보드가 없습니다. 이 블록의 속성에 .excalidraw 문서 경로를 입력하세요."],"WHPvOb": ["보기 필터로 모든 파일이 숨겨져 있습니다."],"WJjviG": ["포함할 내용"],"WL6puM": ["경로가 프로젝트 외부를 가리킴"],@@ -3006,6 +3017,7 @@"cyoNqf": ["병합 안 됨"],"czQDKY": ["푸시 한 번이 원격에 커밋 하나입니다."],"d-GtJt": ["소스 Markdown에서 보기"],+ "d-RYHO": ["Excalidraw 보드"],"d1JjXo": ["브랜치 <0>",["branch"],@@ -3036,6 +3048,7 @@"dOxPd4": ["각주"],"dQHSCs": ["변환 (원본 삭제)"],"dSORvE": ["현재 실행 중지 후 대신 전송"],+ "dT-HIQ": ["이 페이지에 라이브 참조가 너무 많습니다. 이 보드는 불러오지 않았습니다."],"dTaauv": ["이유: ", ["reason"]],"dURmlQ": ["\"frontmatter\"는 예약된 속성 이름입니다"],"dVaXnv": ["콘텐츠 규칙을 아직 불러오지 못했습니다. 잠시 후 다시 시도합니다."],@@ -3126,6 +3139,7 @@"ee15Vl": ["스킬은 AI 도구에 반복 작업을 가르칩니다. 직접 만든 스킬은 편집기의 스킬 사이드바에서 작성하세요. 이 페이지에서 스킬을 켜고 공유합니다."],+ "eh3QBq": ["Excalidraw 보드를 불러오지 못했습니다."],"eiUA4k": [["count", "plural", { "other": ["댓글 ", "#", "개"] }]],"ekSPiP": [["0"], "은 이미 삭제되었습니다."],"el2KyL": ["Slidev가 이 프로젝트에 있습니다. 덱은 프로젝트 버전을 사용합니다."],@@ -3391,6 +3405,7 @@],"i9toLO": ["에이전트 설정 파일"],"iBVgIQ": ["서버에서 잘못된 응답을 반환했습니다."],+ "iBei3o": ["보드 컨트롤"],"iDZtvM": ["템플릿을 불러오지 못했습니다: ", ["message"]],"iE-yoU": ["이것은 ",@@ -3709,6 +3724,7 @@"lPzyrU": ["모든 변경 블록 해결됨"],"lS83Sg": ["클립보드에 접근하지 못했습니다."],"lScd1O": ["Slidev 덱은 OpenKnowledge 데스크톱 앱에서만 열립니다."],+ "lT6wjt": ["보드 펼치기"],"lUtr1r": [["0"], "/", ["1"], " 선택됨"],"lVWEIL": ["인덱싱됨: ", ["embedded"], "/", ["total"], "페이지"],"lWNpNB": ["CodeMirror에서 커서를 추가하거나 일치하는 항목을 선택합니다."],@@ -3997,6 +4013,7 @@"pFPzHA": ["이모지 선택기"],"pFRz_E": ["이 메시지에서 댓글 제외"],"pFagOn": ["소스 편집"],+ "pGYklE": ["보드 뷰어를 불러오지 못했습니다. 연결을 확인하고 다시 시도하세요."],"pHYP6v": ["사이드바에서 <0>사용자 지정</0> 열기 <1/> <2>스킬</2>."],"pI_bKs": ["<0>스페이스</0>로 점프 · <1>↓</1>로 숙이기"],"pJ7XCo": ["이 페이지는 로컬 파일이나 이미지를 참조하지 않습니다."],@@ -4102,6 +4119,7 @@"qbfj1f": ["객체 수신 중"],"qd7L1J": [["source"], ": ", ["updated"], "개 업데이트, ", ["upToDate"], "개는 이미 최신"],"qdBUHP": [["fileName"], "을 불러오지 못했습니다"],+ "qi17kj": ["이 워크스페이스의 .excalidraw 보드 라이브 스냅샷을 삽입합니다."],"qi1F96": ["파일 탐색기에서 보기"],"qiRoLb": ["이번 주 변경한 내용 모두 요약"],"qioCwA": [["pageNumber"], "페이지로 이동"],diff --git a/packages/app/src/locales/ko/messages.po b/packages/app/src/locales/ko/messages.poindex a491e3221..0a98ed445 100644--- a/packages/app/src/locales/ko/messages.po+++ b/packages/app/src/locales/ko/messages.po@@ -1098,6 +1098,10 @@ msgstr "<0>ok</0>는 나중에 파일 메뉴에서 추가할 때까지 외부msgid "<0>Space</0> to jump · <1>↓</1> to duck"msgstr "<0>스페이스</0>로 점프 · <1>↓</1>로 숙이기"+#: src/editor/components/Mirror.tsx+msgid "<0>Too many live references on this page.</0> This mirror of <1>{src}</1> was not loaded."+msgstr "<0>이 페이지에 라이브 참조가 너무 많습니다.</0> <1>{src}</1>의 이 미러는 불러오지 않았습니다."+#: src/components/settings/SkillTargetsPicker.tsxmsgid "~/.myteam/skills"msgstr "~/.myteam/skills"@@ -2200,6 +2204,10 @@ msgstr "블로그 게시물"msgid "blog-post"msgstr "blog-post"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Board controls"+msgstr "보드 컨트롤"+#: src/lib/keyboard-shortcuts.tsmsgid "Bold"msgstr "굵게"@@ -5146,6 +5154,10 @@ msgstr "이 보고서에 대해 지원팀에 이메일 보내기"msgid "Emailed"msgstr "이메일로 보냄"+#: src/editor/slash-command/component-items.tsx+msgid "Embed a live snapshot of an .excalidraw board from this workspace."+msgstr "이 워크스페이스의 .excalidraw 보드 라이브 스냅샷을 삽입합니다."+#: src/editor/slash-command/component-items.tsxmsgid "Embed a video with native player controls."msgstr "기본 플레이어 컨트롤이 있는 동영상을 삽입합니다."@@ -5189,6 +5201,10 @@ msgstr "비어 있음"msgid "Empty"msgstr "비어 있음"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Empty board"+msgstr "빈 보드"+#: src/editor/components/Mermaid.tsxmsgid "Empty diagram"msgstr "빈 다이어그램"@@ -5405,6 +5421,14 @@ msgstr "{0}/ 폴더가 {1}/ 안에 있는 모든 항목"msgid "everything under any {0}/ folder"msgstr "모든 {0}/ 폴더 아래의 항목"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Excalidraw board"+msgstr "Excalidraw 보드"++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Excalidraw board failed to load."+msgstr "Excalidraw 보드를 불러오지 못했습니다."+#: src/components/ExcalidrawDocEditor.tsxmsgid "Excalidraw canvas"msgstr "Excalidraw 캔버스"@@ -5447,6 +5471,10 @@ msgstr "모든 파일 그룹 펼치기"msgid "Expand all files"msgstr "모든 파일 펼치기"+#: src/editor/extensions/JsxComponentView.tsx+msgid "Expand board"+msgstr "보드 펼치기"+#: src/editor/components/Mermaid.tsx#: src/editor/extensions/JsxComponentView.tsxmsgid "Expand diagram"@@ -8499,6 +8527,10 @@ msgstr "AI 도구가 감지되지 않았습니다. 이 스킬을 사용하려면msgid "No API key is set for this endpoint. Add one above."msgstr "이 엔드포인트에 API 키가 설정되지 않았습니다. 위에서 추가합니다."+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "No board selected. Enter the path to a .excalidraw doc in this block's properties."+msgstr "선택된 보드가 없습니다. 이 블록의 속성에 .excalidraw 문서 경로를 입력하세요."+#: src/components/AgentDiffPane.tsxmsgid "No body changes at this version."msgstr "이 버전에서 본문 변경 없음."@@ -9115,6 +9147,10 @@ msgstr "디스크에서 기존 프로젝트 폴더를 엽니다."msgid "Open and focus the bottom Ask AI prompt composer."msgstr "하단의 AI에게 묻기 프롬프트 작성기를 열고 포커스를 둡니다."+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Open board"+msgstr "보드 열기"+#: src/lib/keyboard-shortcuts.tsmsgid "Open CodeMirror search in source editor mode."msgstr "소스 편집기 모드에서 CodeMirror 검색을 엽니다."@@ -13135,6 +13171,22 @@ msgstr "attested-computation 계약입니다. Attested Computation 유형 문서msgid "The audit could not be completed. Try again."msgstr "감사를 완료하지 못했습니다. 다시 시도하세요."+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board could not be reached. It may not exist, or the server may be offline."+msgstr "보드에 연결할 수 없습니다. 보드가 없거나 서버가 오프라인일 수 있습니다."++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board snapshot could not be rendered."+msgstr "보드 스냅숏을 렌더링하지 못했습니다."++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board viewer failed to load. Check your connection and try again."+msgstr "보드 뷰어를 불러오지 못했습니다. 연결을 확인하고 다시 시도하세요."++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board's content is not a valid Excalidraw scene."+msgstr "보드의 내용이 유효한 Excalidraw 장면이 아닙니다."+#: src/components/InstallInClaudeDesktopDialog.tsxmsgid "The Claude Desktop App didn't open the file. Is it installed? ({msg})"msgstr "Claude Desktop App 파일 열기 실패. 설치 상태 확인: ({msg})"@@ -13979,6 +14031,10 @@ msgstr "패턴 {0}/** 사용 설정 전환"msgid "tokens"msgstr "토큰"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Too many live references on this page. This board was not loaded."+msgstr "이 페이지에 라이브 참조가 너무 많습니다. 이 보드는 불러오지 않았습니다."+#: src/components/FeedbackForm.tsxmsgid "Too slow"msgstr "너무 느림"@@ -14027,6 +14083,7 @@ msgstr "프롬프트 사용"#: src/components/settings/AccountSection.tsx#: src/components/settings/SavedThemesTiles.tsx#: src/components/ShareReceiveDialog.tsx+#: src/editor/components/ExcalidrawEmbed.tsxmsgid "Try again"msgstr "다시 시도"@@ -14603,6 +14660,7 @@ msgstr "소스 Markdown에서 보기"msgid "View in Source Markdown"msgstr "소스 Markdown에서 보기"+#: src/editor/components/ExcalidrawEmbed.tsx#: src/editor/components/Mermaid.tsxmsgid "View only"msgstr "보기 전용"diff --git a/packages/app/src/locales/pseudo/messages.json b/packages/app/src/locales/pseudo/messages.jsonindex 78793bdc1..8ce8357c8 100644--- a/packages/app/src/locales/pseudo/messages.json+++ b/packages/app/src/locales/pseudo/messages.json@@ -364,6 +364,7 @@"4PYsOz": ["Ĥĩďē Ƒĩĺēś (", ["sidebarShortcutLabel"], ")"],"4Sxexw": ["Śōũŕćē ũńďō ōŕ ŕēďō"],"4TzU0n": ["Ĩńĩţĩàĺĩźē"],+ "4Vgtaz": ["Ţĥē ƀōàŕď ćōũĺď ńōţ ƀē ŕēàćĥēď. Ĩţ ḿàŷ ńōţ ēxĩśţ, ōŕ ţĥē śēŕvēŕ ḿàŷ ƀē ōƒƒĺĩńē."],"4buZWd": ["Ĩńĥēŕĩţēď ƒŕōḿ ", ["path"]],"4c_a6S": ["Ńōţĥĩńĝ śēţ ŷēţ."],"4d0VYJ": ["Ŵē’ĺĺ ćŕēàţē à śàƒē ţĥēḿē ĨĎ ƒŕōḿ ţĥĩś ńàḿē."],@@ -501,6 +502,7 @@"6KXnz5": ["Ŷōũ ćàń ŕēśţōŕē ţĥĩś ƒĩĺē ƒŕōḿ ţĥē Ţŕàśĥ."],"6LJJ1v": ["Ƒĩĺē ", ["identity"], ". Ĝō ţō ŕēƒēŕēńćē."],"6LbUG7": ["Ţĥē ŕēƥōśĩţōŕŷ ĩś ƥŕĩvàţē àńď ŷōũŕ ĜĩţĤũƀ àććōũńţ ďōēśń'ţ ĥàvē àććēśś ţō ĩţ."],+ "6M2L3X": ["Ōƥēń ƀōàŕď"],"6MnZEC": ["Ţēŕḿĩńàĺ ƒàĩĺēď ţō ĺōàď"],"6Nea1q": ["Ũśē ", ["0"], " ƒōŕ ţĥē àćţĩvē ďàŕķ ḿōďē"],"6O626z": ["Ńō ĥēàďĩńĝś ḿàţćĥ \"", ["trimmedAnchorQuery"], "\""],@@ -836,6 +838,7 @@"AVW-K9": ["Ƒàĩĺēď ţō ĺōàď ōŕƥĥàń ƥàĝēś"],"AWOSPo": ["Źōōḿ ĩń"],"AYoYhU": ["Ũƥďàţē ƒàĩĺēď: ", ["0"]],+ "AaC-CE": ["Ēḿƥţŷ ƀōàŕď"],"AcK_r0": ["Ćĺàũďē ĆĹĨ"],"AczYxH": ["Ćũśţōḿ ōƥēń-ķńōŵĺēďĝē ēńţŕŷ — ńōţ ḿàńàĝēď ƀŷ ŌƥēńĶńōŵĺēďĝē"],"AdcGcG": ["Àƥƥĺŷĩńĝ ŷōũŕ ćĥàńĝē"],@@ -1665,6 +1668,7 @@],"LKOLNn": ["Ńō ÀĨ àĝēńţś ĩńśţàĺĺēď"],"LPAv9E": [["days"], "ď àĝō"],+ "LPLWpO": ["Ţĥē ƀōàŕď'ś ćōńţēńţ ĩś ńōţ à vàĺĩď Ēxćàĺĩďŕàŵ śćēńē."],"LQdLio": ["Ńēŵ śćĥēḿà"],"LQsCPn": ["Ĺōćàĺ ćōḿḿĩţś àŕē ķēēƥĩńĝ ţĥĩś ćōƥŷ ƒŕōḿ ũƥďàţĩńĝ"],"LRLKnQ": ["Ĥĩďē ŕēśōĺvēď"],@@ -2233,6 +2237,11 @@"STTOnz": [["keyName"], " ţŷƥē: ćōḿƥĺēx vàĺũē (ńēśţēď; ŕēàď-ōńĺŷ)"],"SUOoXn": ["Ƒàĩĺēď ţō ōƥēń ƥŕōĴēćţ."],"SVLPt5": [["formatted"], " ĜĩţĤũƀ śţàŕś"],+ "SWTmnY": [+ "<0>Ţōō ḿàńŷ ĺĩvē ŕēƒēŕēńćēś ōń ţĥĩś ƥàĝē.</0> Ţĥĩś ḿĩŕŕōŕ ōƒ <1>",+ ["src"],+ "</1> ŵàś ńōţ ĺōàďēď."+ ],"SWX1O7": ["Ƒĩxēď ",["total", "plural", { "one": ["#", " ƒĩĺē"], "other": ["#", " ƒĩĺēś"] }],@@ -2325,6 +2334,7 @@"U2pMtf": ["ţàĝ-ńàḿē"],"U3IvM5": ["Ƒũĺĺ ĝũĩďē"],"U3RIJu": ["Ĺōćàĺ ƒĩĺēś"],+ "U4ZE26": ["Ţĥē ƀōàŕď śńàƥśĥōţ ćōũĺď ńōţ ƀē ŕēńďēŕēď."],"U5Spo9": ["Ćōńţēńţ ďĩŕēćţōŕŷ ḿũśţ ƀē ĩńśĩďē ţĥē ƥŕōĴēćţ"],"U6Mdhd": ["Ĺēţ'ś ĝēţ śēţ ũƥ."],"U6wmNc": ["Śŷńć ƥàũśēď"],@@ -2502,6 +2512,9 @@"WFEbV1": ["Ƒĺàĝ ćōḿḿōń ḿàŕķďōŵń ĩśśũēś ĩń ţĥē ēďĩţōŕ. Ƥōŵēŕēď ƀŷ <0>ḿàŕķďōŵńĺĩńţ<1/></0>."],"WG3MZ4": [["0"], " śķĩĺĺś śēĺēćţēď"],"WGMoTY": ["ßũĝś, ćŕàśĥēś, ōŕ ĩţ ƒēĺţ ũńŕēĺĩàƀĺē"],+ "WH3roC": [+ "Ńō ƀōàŕď śēĺēćţēď. Ēńţēŕ ţĥē ƥàţĥ ţō à .ēxćàĺĩďŕàŵ ďōć ĩń ţĥĩś ƀĺōćķ'ś ƥŕōƥēŕţĩēś."+ ],"WHPvOb": ["Àĺĺ ƒĩĺēś àŕē ĥĩďďēń ƀŷ vĩēŵ ƒĩĺţēŕś."],"WJjviG": ["Ŵĥàţ ţō ĩńćĺũďē"],"WL6puM": ["Ƥàţĥ ŕēśōĺvēś ōũţśĩďē ƥŕōĴēćţ"],@@ -3109,6 +3122,7 @@"cyoNqf": ["Ũńḿēŕĝēď"],"czQDKY": ["Ēàćĥ ƥũśĥ ĩś ōńē ćōḿḿĩţ ţō ŷōũŕ ŕēḿōţē."],"d-GtJt": ["Vĩēŵ ĩń Śōũŕćē Ḿàŕķďōŵń"],+ "d-RYHO": ["Ēxćàĺĩďŕàŵ ƀōàŕď"],"d1JjXo": ["Ŷōũŕ ĺōćàĺ ćōƥŷ ōƒ ƀŕàńćĥ <0>",["branch"],@@ -3137,6 +3151,7 @@"dOxPd4": ["Ƒōōţńōţē"],"dQHSCs": ["Ćōńvēŕţ (ďēĺēţē ōŕĩĝĩńàĺ)"],"dSORvE": ["Śţōƥś ţĥē ćũŕŕēńţ ŕũń àńď śēńďś ţĥĩś ĩńśţēàď"],+ "dT-HIQ": ["Ţōō ḿàńŷ ĺĩvē ŕēƒēŕēńćēś ōń ţĥĩś ƥàĝē. Ţĥĩś ƀōàŕď ŵàś ńōţ ĺōàďēď."],"dTaauv": ["Ŕēàśōń: ", ["reason"]],"dURmlQ": ["\"ƒŕōńţḿàţţēŕ\" ĩś à ŕēśēŕvēď ƥŕōƥēŕţŷ ńàḿē"],"dVaXnv": ["Ćōńţēńţ ŕũĺēś ńōţ ŷēţ ĺōàďēď — ţŕŷ àĝàĩń ĩń à ḿōḿēńţ"],@@ -3229,6 +3244,7 @@"ee15Vl": ["Śķĩĺĺś ţēàćĥ ŷōũŕ ÀĨ ţōōĺś ŕēƥēàţàƀĺē ţàśķś. Ŵŕĩţē ŷōũŕ ōŵń ĩń ţĥē ēďĩţōŕ'ś Śķĩĺĺś śĩďēƀàŕ; ţĥĩś ƥàĝē ĩś ŵĥēŕē ţĥēŷ ĝēţ śŵĩţćĥēď ōń àńď śĥàŕēď."],+ "eh3QBq": ["Ēxćàĺĩďŕàŵ ƀōàŕď ƒàĩĺēď ţō ĺōàď."],"eiUA4k": [["count", "plural", { "one": ["#", " ćōḿḿēńţ"], "other": ["#", " ćōḿḿēńţś"] }]],"ekSPiP": [["0"], " ŵàś àĺŕēàďŷ ďēĺēţēď."],"el2KyL": ["Śĺĩďēv ƒōũńď ĩń ţĥĩś ƥŕōĴēćţ. Ďēćķś ŵĩĺĺ ũśē ţĥē ƥŕōĴēćţ'ś vēŕśĩōń."],@@ -3506,6 +3522,7 @@],"i9toLO": ["Àĝēńţ ćōńƒĩĝũŕàţĩōń ƒĩĺē"],"iBVgIQ": ["Śēŕvēŕ ŕēţũŕńēď à ḿàĺƒōŕḿēď ŕēśƥōńśē."],+ "iBei3o": ["ßōàŕď ćōńţŕōĺś"],"iDZtvM": ["Ƒàĩĺēď ţō ĺōàď ţēḿƥĺàţēś: ", ["message"]],"iE-yoU": ["Ţĥĩś ĩś à ƥŕēvĩēŵ ōƒ ",@@ -3832,6 +3849,7 @@"lPzyrU": ["Àĺĺ ĥũńķś ŕēśōĺvēď"],"lS83Sg": ["Ćōũĺďń’ţ ŕēàćĥ ţĥē ćĺĩƥƀōàŕď."],"lScd1O": ["Śĺĩďēv ďēćķś ōƥēń ĩń ţĥē ŌƥēńĶńōŵĺēďĝē ďēśķţōƥ àƥƥ ōńĺŷ."],+ "lT6wjt": ["Ēxƥàńď ƀōàŕď"],"lUtr1r": [["0"], " ōƒ ", ["1"], " śēĺēćţēď"],"lVWEIL": ["Ĩńďēxēď ", ["embedded"], " ōƒ ", ["total"], " ƥàĝēś."],"lWNpNB": ["Àďď ćũŕśōŕś ōŕ śēĺēćţ ḿàţćĥĩńĝ ōććũŕŕēńćēś ţĥŕōũĝĥ ĆōďēḾĩŕŕōŕ."],@@ -4144,6 +4162,7 @@"pFPzHA": ["ĒḿōĴĩ ƥĩćķēŕ"],"pFRz_E": ["Ĺēàvē ţĥēśē ćōḿḿēńţś ōũţ ōƒ ţĥĩś ḿēśśàĝē"],"pFagOn": ["Śōũŕćē ēďĩţĩńĝ"],+ "pGYklE": ["Ţĥē ƀōàŕď vĩēŵēŕ ƒàĩĺēď ţō ĺōàď. Ćĥēćķ ŷōũŕ ćōńńēćţĩōń àńď ţŕŷ àĝàĩń."],"pHYP6v": ["Ōƥēń <0>Ćũśţōḿĩźē</0> ĩń ţĥē śĩďēƀàŕ <1/> <2>Śķĩĺĺś</2>."],"pI_bKs": ["<0>Śƥàćē</0> ţō Ĵũḿƥ · <1>↓</1> ţō ďũćķ"],"pJ7XCo": ["Ţĥĩś ƥàĝē ŕēƒēŕēńćēś ńō ĺōćàĺ ƒĩĺēś ōŕ ĩḿàĝēś."],@@ -4268,6 +4287,7 @@"qbfj1f": ["Ŕēćēĩvĩńĝ ōƀĴēćţś"],"qd7L1J": [["source"], ": ", ["updated"], " ũƥďàţēď, ", ["upToDate"], " àĺŕēàďŷ ũƥ ţō ďàţē"],"qdBUHP": ["Ćōũĺďń'ţ ĺōàď ", ["fileName"]],+ "qi17kj": ["Ēḿƀēď à ĺĩvē śńàƥśĥōţ ōƒ àń .ēxćàĺĩďŕàŵ ƀōàŕď ƒŕōḿ ţĥĩś ŵōŕķśƥàćē."],"qi1F96": ["Ŕēvēàĺ ĩń Ƒĩĺē Ēxƥĺōŕēŕ"],"qiRoLb": ["Śũḿḿàŕĩźē ēvēŕŷţĥĩńĝ Ĩ ćĥàńĝēď ţĥĩś ŵēēķ"],"qioCwA": ["ĵũḿƥ ţō ƥàĝē ", ["pageNumber"]],diff --git a/packages/app/src/locales/pseudo/messages.po b/packages/app/src/locales/pseudo/messages.poindex cd6139b53..13a5a7155 100644--- a/packages/app/src/locales/pseudo/messages.po+++ b/packages/app/src/locales/pseudo/messages.po@@ -1094,6 +1094,10 @@ msgstr ""msgid "<0>Space</0> to jump · <1>↓</1> to duck"msgstr ""+#: src/editor/components/Mirror.tsx+msgid "<0>Too many live references on this page.</0> This mirror of <1>{src}</1> was not loaded."+msgstr ""+#: src/components/settings/SkillTargetsPicker.tsxmsgid "~/.myteam/skills"msgstr ""@@ -2196,6 +2200,10 @@ msgstr ""msgid "blog-post"msgstr ""+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Board controls"+msgstr ""+#: src/lib/keyboard-shortcuts.tsmsgid "Bold"msgstr ""@@ -5142,6 +5150,10 @@ msgstr ""msgid "Emailed"msgstr ""+#: src/editor/slash-command/component-items.tsx+msgid "Embed a live snapshot of an .excalidraw board from this workspace."+msgstr ""+#: src/editor/slash-command/component-items.tsxmsgid "Embed a video with native player controls."msgstr ""@@ -5185,6 +5197,10 @@ msgstr ""msgid "Empty"msgstr ""+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Empty board"+msgstr ""+#: src/editor/components/Mermaid.tsxmsgid "Empty diagram"msgstr ""@@ -5401,6 +5417,14 @@ msgstr ""msgid "everything under any {0}/ folder"msgstr ""+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Excalidraw board"+msgstr ""++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Excalidraw board failed to load."+msgstr ""+#: src/components/ExcalidrawDocEditor.tsxmsgid "Excalidraw canvas"msgstr ""@@ -5443,6 +5467,10 @@ msgstr ""msgid "Expand all files"msgstr ""+#: src/editor/extensions/JsxComponentView.tsx+msgid "Expand board"+msgstr ""+#: src/editor/components/Mermaid.tsx#: src/editor/extensions/JsxComponentView.tsxmsgid "Expand diagram"@@ -8495,6 +8523,10 @@ msgstr ""msgid "No API key is set for this endpoint. Add one above."msgstr ""+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "No board selected. Enter the path to a .excalidraw doc in this block's properties."+msgstr ""+#: src/components/AgentDiffPane.tsxmsgid "No body changes at this version."msgstr ""@@ -9111,6 +9143,10 @@ msgstr ""msgid "Open and focus the bottom Ask AI prompt composer."msgstr ""+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Open board"+msgstr ""+#: src/lib/keyboard-shortcuts.tsmsgid "Open CodeMirror search in source editor mode."msgstr ""@@ -13131,6 +13167,22 @@ msgstr ""msgid "The audit could not be completed. Try again."msgstr ""+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board could not be reached. It may not exist, or the server may be offline."+msgstr ""++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board snapshot could not be rendered."+msgstr ""++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board viewer failed to load. Check your connection and try again."+msgstr ""++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board's content is not a valid Excalidraw scene."+msgstr ""+#: src/components/InstallInClaudeDesktopDialog.tsxmsgid "The Claude Desktop App didn't open the file. Is it installed? ({msg})"msgstr ""@@ -13975,6 +14027,10 @@ msgstr ""msgid "tokens"msgstr ""+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Too many live references on this page. This board was not loaded."+msgstr ""+#: src/components/FeedbackForm.tsxmsgid "Too slow"msgstr ""@@ -14023,6 +14079,7 @@ msgstr ""#: src/components/settings/AccountSection.tsx#: src/components/settings/SavedThemesTiles.tsx#: src/components/ShareReceiveDialog.tsx+#: src/editor/components/ExcalidrawEmbed.tsxmsgid "Try again"msgstr ""@@ -14599,6 +14656,7 @@ msgstr ""msgid "View in Source Markdown"msgstr ""+#: src/editor/components/ExcalidrawEmbed.tsx#: src/editor/components/Mermaid.tsxmsgid "View only"msgstr ""diff --git a/packages/app/src/locales/pt-BR/messages.json b/packages/app/src/locales/pt-BR/messages.jsonindex 38ebb77d3..e6596a45a 100644--- a/packages/app/src/locales/pt-BR/messages.json+++ b/packages/app/src/locales/pt-BR/messages.json@@ -413,6 +413,9 @@"4PYsOz": ["Ocultar Arquivos (", ["sidebarShortcutLabel"], ")"],"4Sxexw": ["Desfazer ou refazer no código"],"4TzU0n": ["Inicializar"],+ "4Vgtaz": [+ "Não foi possível acessar o quadro. Ele pode não existir, ou o servidor pode estar offline."+ ],"4buZWd": ["Herdado de ", ["path"]],"4c_a6S": ["Ainda não há nada definido."],"4d0VYJ": ["Criaremos um ID de tema seguro a partir deste nome."],@@ -584,6 +587,7 @@"6KXnz5": ["Você pode restaurar este arquivo do Lixo."],"6LJJ1v": ["Arquivo ", ["identity"], ". Ir para a referência."],"6LbUG7": ["O repositório é privado e sua conta do GitHub não tem acesso a ele."],+ "6M2L3X": ["Abrir o quadro"],"6MnZEC": ["Falha ao carregar o terminal"],"6Nea1q": ["Usar ", ["0"], " no modo escuro ativo"],"6O626z": ["Nenhum título corresponde a \"", ["trimmedAnchorQuery"], "\""],@@ -965,6 +969,7 @@"AVW-K9": ["Falha ao carregar as páginas órfãs"],"AWOSPo": ["Aproximar"],"AYoYhU": ["Falha na atualização: ", ["0"]],+ "AaC-CE": ["Quadro vazio"],"AcK_r0": ["Claude CLI"],"AczYxH": ["Entrada open-knowledge personalizada — não gerenciada pelo OpenKnowledge"],"AdcGcG": ["Aplicando sua alteração"],@@ -1907,6 +1912,7 @@],"LKOLNn": ["Nenhum agente de IA instalado"],"LPAv9E": ["há ", ["days"], " d"],+ "LPLWpO": ["O conteúdo do quadro não é uma cena válida do Excalidraw."],"LQdLio": ["Novo esquema"],"LQsCPn": ["Commits locais estão impedindo esta cópia de atualizar"],"LRLKnQ": ["Ocultar os resolvidos"],@@ -2519,6 +2525,11 @@"STTOnz": ["Tipo de ", ["keyName"], ": valor complexo (aninhado; somente leitura)"],"SUOoXn": ["Falha ao abrir o projeto."],"SVLPt5": [["formatted"], " estrelas no GitHub"],+ "SWTmnY": [+ "<0>Referências ao vivo demais nesta página.</0> Este espelho de <1>",+ ["src"],+ "</1> não foi carregado."+ ],"SWX1O7": [["total",@@ -2644,6 +2655,7 @@"U2pMtf": ["nome-da-tag"],"U3IvM5": ["Guia completo"],"U3RIJu": ["Arquivos locais"],+ "U4ZE26": ["Não foi possível renderizar o instantâneo do quadro."],"U5Spo9": ["O diretório de conteúdo precisa ficar dentro do projeto"],"U6Mdhd": ["Vamos configurar."],"U6wmNc": ["Sincronização pausada"],@@ -2875,6 +2887,9 @@],"WG3MZ4": [["0"], " habilidades selecionadas"],"WGMoTY": ["Bugs, travamentos ou sensação de pouca confiabilidade"],+ "WH3roC": [+ "Nenhum quadro selecionado. Insira o caminho de um documento .excalidraw nas propriedades deste bloco."+ ],"WHPvOb": ["Os filtros de visualização ocultam todos os arquivos."],"WJjviG": ["O que incluir"],"WL6puM": ["O caminho aponta para fora do projeto"],@@ -3536,6 +3551,7 @@"cyoNqf": ["Sem merge"],"czQDKY": ["Cada push é um commit no seu remoto."],"d-GtJt": ["Ver no Markdown de origem"],+ "d-RYHO": ["Quadro do Excalidraw"],"d1JjXo": ["Sua cópia local do ramo <0>",["branch"],@@ -3568,6 +3584,7 @@"dOxPd4": ["Nota de rodapé"],"dQHSCs": ["Converter (excluir o original)"],"dSORvE": ["Interrompe a execução atual e envia isto no lugar"],+ "dT-HIQ": ["Referências ao vivo demais nesta página. Este quadro não foi carregado."],"dTaauv": ["Motivo: ", ["reason"]],"dURmlQ": ["\"frontmatter\" é um nome de propriedade reservado"],"dVaXnv": ["As regras de conteúdo ainda não carregaram — tente de novo em instantes"],@@ -3679,6 +3696,7 @@"ee15Vl": ["As habilidades ensinam tarefas repetíveis às suas ferramentas de IA. Escreva as suas na barra lateral Habilidades do editor; esta página é onde elas são ativadas e compartilhadas."],+ "eh3QBq": ["Falha ao carregar o quadro do Excalidraw."],"eiUA4k": [["count",@@ -3997,6 +4015,7 @@],"i9toLO": ["Arquivo de configuração do agente"],"iBVgIQ": ["O servidor retornou uma resposta malformada."],+ "iBei3o": ["Controles do quadro"],"iDZtvM": ["Falha ao carregar os modelos: ", ["message"]],"iE-yoU": ["Isto é uma pré-visualização de ",@@ -4342,6 +4361,7 @@"lPzyrU": ["Todos os trechos resolvidos"],"lS83Sg": ["Não foi possível acessar a área de transferência."],"lScd1O": ["Os slides do Slidev abrem apenas no aplicativo de desktop do OpenKnowledge."],+ "lT6wjt": ["Expandir o quadro"],"lUtr1r": [["0"], " de ", ["1"], " selecionados"],"lVWEIL": [["embedded"], " de ", ["total"], " páginas indexadas."],"lWNpNB": ["Adicione cursores ou selecione ocorrências correspondentes pelo CodeMirror."],@@ -4681,6 +4701,9 @@"pFPzHA": ["Seletor de emojis"],"pFRz_E": ["Deixar estes comentários fora desta mensagem"],"pFagOn": ["Edição de código"],+ "pGYklE": [+ "O visualizador do quadro não pôde ser carregado. Verifique sua conexão e tente novamente."+ ],"pHYP6v": ["Abra <0>Personalizar</0> na barra lateral <1/> <2>Habilidades</2>."],"pI_bKs": ["<0>Espaço</0> para pular · <1>↓</1> para agachar"],"pJ7XCo": ["Esta página não faz referência a nenhum arquivo ou imagem local."],@@ -4824,6 +4847,9 @@"qbfj1f": ["Recebendo objetos"],"qd7L1J": [["source"], ": ", ["updated"], " atualizados, ", ["upToDate"], " já atualizados"],"qdBUHP": ["Não deu para carregar ", ["fileName"]],+ "qi17kj": [+ "Incorpore um instantâneo ao vivo de um quadro .excalidraw deste espaço de trabalho."+ ],"qi1F96": ["Mostrar no Explorador de Arquivos"],"qiRoLb": ["Resuma tudo o que mudei esta semana"],"qioCwA": ["Ir para a página ", ["pageNumber"]],diff --git a/packages/app/src/locales/pt-BR/messages.po b/packages/app/src/locales/pt-BR/messages.poindex 447caba42..5b078cf24 100644--- a/packages/app/src/locales/pt-BR/messages.po+++ b/packages/app/src/locales/pt-BR/messages.po@@ -1094,6 +1094,10 @@ msgstr "<0>ok</0> não funcionará em terminais externos até que você o adiciomsgid "<0>Space</0> to jump · <1>↓</1> to duck"msgstr "<0>Espaço</0> para pular · <1>↓</1> para agachar"+#: src/editor/components/Mirror.tsx+msgid "<0>Too many live references on this page.</0> This mirror of <1>{src}</1> was not loaded."+msgstr "<0>Referências ao vivo demais nesta página.</0> Este espelho de <1>{src}</1> não foi carregado."+#: src/components/settings/SkillTargetsPicker.tsxmsgid "~/.myteam/skills"msgstr "~/.myteam/skills"@@ -2196,6 +2200,10 @@ msgstr "Post de blog"msgid "blog-post"msgstr "blog-post"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Board controls"+msgstr "Controles do quadro"+#: src/lib/keyboard-shortcuts.tsmsgid "Bold"msgstr "Negrito"@@ -5142,6 +5150,10 @@ msgstr "Escrever para o suporte sobre este relatório"msgid "Emailed"msgstr "Enviado por e-mail"+#: src/editor/slash-command/component-items.tsx+msgid "Embed a live snapshot of an .excalidraw board from this workspace."+msgstr "Incorpore um instantâneo ao vivo de um quadro .excalidraw deste espaço de trabalho."+#: src/editor/slash-command/component-items.tsxmsgid "Embed a video with native player controls."msgstr "Incorpora um vídeo com os controles nativos do player."@@ -5185,6 +5197,10 @@ msgstr "vazio"msgid "Empty"msgstr "Vazio"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Empty board"+msgstr "Quadro vazio"+#: src/editor/components/Mermaid.tsxmsgid "Empty diagram"msgstr "Diagrama vazio"@@ -5401,6 +5417,14 @@ msgstr "tudo dentro das pastas {0}/ que estão em {1}/"msgid "everything under any {0}/ folder"msgstr "tudo dentro de qualquer pasta {0}/"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Excalidraw board"+msgstr "Quadro do Excalidraw"++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Excalidraw board failed to load."+msgstr "Falha ao carregar o quadro do Excalidraw."+#: src/components/ExcalidrawDocEditor.tsxmsgid "Excalidraw canvas"msgstr "Tela do Excalidraw"@@ -5443,6 +5467,10 @@ msgstr "Expandir todos os grupos de arquivos"msgid "Expand all files"msgstr "Expandir todos os arquivos"+#: src/editor/extensions/JsxComponentView.tsx+msgid "Expand board"+msgstr "Expandir o quadro"+#: src/editor/components/Mermaid.tsx#: src/editor/extensions/JsxComponentView.tsxmsgid "Expand diagram"@@ -8495,6 +8523,10 @@ msgstr "Nenhuma ferramenta de IA detectada. Instale uma para usar esta habilidadmsgid "No API key is set for this endpoint. Add one above."msgstr "Nenhuma chave de API definida para este endpoint. Adicione uma acima."+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "No board selected. Enter the path to a .excalidraw doc in this block's properties."+msgstr "Nenhum quadro selecionado. Insira o caminho de um documento .excalidraw nas propriedades deste bloco."+#: src/components/AgentDiffPane.tsxmsgid "No body changes at this version."msgstr "Nenhuma alteração no corpo nesta versão."@@ -9111,6 +9143,10 @@ msgstr "Abre do disco uma pasta de projeto existente."msgid "Open and focus the bottom Ask AI prompt composer."msgstr "Abre e foca o compositor de prompts de Perguntar à IA na parte de baixo."+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Open board"+msgstr "Abrir o quadro"+#: src/lib/keyboard-shortcuts.tsmsgid "Open CodeMirror search in source editor mode."msgstr "Abre a busca do CodeMirror no modo editor de código."@@ -13131,6 +13167,22 @@ msgstr "O contrato de computação atestada. Aplica-se apenas a documentos digitmsgid "The audit could not be completed. Try again."msgstr "Não foi possível concluir a auditoria. Tente de novo."+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board could not be reached. It may not exist, or the server may be offline."+msgstr "Não foi possível acessar o quadro. Ele pode não existir, ou o servidor pode estar offline."++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board snapshot could not be rendered."+msgstr "Não foi possível renderizar o instantâneo do quadro."++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board viewer failed to load. Check your connection and try again."+msgstr "O visualizador do quadro não pôde ser carregado. Verifique sua conexão e tente novamente."++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board's content is not a valid Excalidraw scene."+msgstr "O conteúdo do quadro não é uma cena válida do Excalidraw."+#: src/components/InstallInClaudeDesktopDialog.tsxmsgid "The Claude Desktop App didn't open the file. Is it installed? ({msg})"msgstr "O app Claude Desktop não abriu o arquivo. Ele está instalado? ({msg})"@@ -13975,6 +14027,10 @@ msgstr "Alterna o padrão {0}/**"msgid "tokens"msgstr "tokens"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Too many live references on this page. This board was not loaded."+msgstr "Referências ao vivo demais nesta página. Este quadro não foi carregado."+#: src/components/FeedbackForm.tsxmsgid "Too slow"msgstr "Lento demais"@@ -14023,6 +14079,7 @@ msgstr "Experimente um prompt"#: src/components/settings/AccountSection.tsx#: src/components/settings/SavedThemesTiles.tsx#: src/components/ShareReceiveDialog.tsx+#: src/editor/components/ExcalidrawEmbed.tsxmsgid "Try again"msgstr "Tente de novo"@@ -14599,6 +14656,7 @@ msgstr "Ver no markdown de origem"msgid "View in Source Markdown"msgstr "Ver no Markdown de origem"+#: src/editor/components/ExcalidrawEmbed.tsx#: src/editor/components/Mermaid.tsxmsgid "View only"msgstr "Somente visualização"diff --git a/packages/app/src/locales/ur/messages.json b/packages/app/src/locales/ur/messages.jsonindex 17f92a7ae..fa322197a 100644--- a/packages/app/src/locales/ur/messages.json+++ b/packages/app/src/locales/ur/messages.json@@ -365,6 +365,7 @@"4PYsOz": ["فائلیں چھپائیں (", ["sidebarShortcutLabel"], ")"],"4Sxexw": ["سورس میں واپسی یا دوبارہ"],"4TzU0n": ["ابتدائیہ کریں"],+ "4Vgtaz": ["بورڈ تک رسائی نہیں ہو سکی۔ ہو سکتا ہے وہ موجود نہ ہو، یا سرور آف لائن ہو۔"],"4buZWd": [["path"], " سے وراثت میں ملا"],"4c_a6S": ["ابھی کچھ مقرر نہیں۔"],"4d0VYJ": ["ہم اس نام سے ایک محفوظ تھیم ID بنائیں گے۔"],@@ -521,6 +522,7 @@"6KXnz5": ["آپ اس فائل کو ردی سے بحال کر سکتے ہیں۔"],"6LJJ1v": ["فائل ", ["identity"], "۔ حوالہ پر جائیں۔"],"6LbUG7": ["ریپازٹری نجی ہے اور آپ کے GitHub اکاؤنٹ کو اس تک رسائی نہیں۔"],+ "6M2L3X": ["بورڈ کھولیں"],"6MnZEC": ["ٹرمینل لوڈ نہیں ہو سکا"],"6Nea1q": ["فعال گہرے موڈ کے لیے ", ["0"], " استعمال کریں"],"6O626z": ["«", ["trimmedAnchorQuery"], "» سے کوئی عنوان مماثل نہیں"],@@ -852,6 +854,7 @@"AVW-K9": ["یتیم صفحات لوڈ نہیں ہو سکے"],"AWOSPo": ["بڑا کریں"],"AYoYhU": ["اپ ڈیٹ ناکام: ", ["0"]],+ "AaC-CE": ["خالی بورڈ"],"AcK_r0": ["Claude CLI"],"AczYxH": ["حسبِ ضرورت open-knowledge اندراج — OpenKnowledge کے زیرِ انتظام نہیں"],"AdcGcG": ["آپ کی تبدیلی لاگو کی جا رہی ہے"],@@ -1710,6 +1713,7 @@],"LKOLNn": ["کوئی AI ایجنٹ نصب نہیں"],"LPAv9E": [["days"], " دن پہلے"],+ "LPLWpO": ["بورڈ کا مواد کوئی درست Excalidraw منظر نہیں ہے۔"],"LQdLio": ["نیا اسکیما"],"LQsCPn": ["مقامی کمٹس اس نقل کو تازہ ہونے سے روک رہے ہیں"],"LRLKnQ": ["حل شدہ چھپائیں"],@@ -2281,6 +2285,11 @@"STTOnz": [["keyName"], " کی قسم: پیچیدہ قدر (نیسٹڈ؛ صرف پڑھنے کے لیے)"],"SUOoXn": ["پروجیکٹ نہیں کھل سکا۔"],"SVLPt5": [["formatted"], " GitHub ستارے"],+ "SWTmnY": [+ "<0>اس صفحے پر بہت زیادہ لائیو حوالے ہیں۔</0> <1>",+ ["src"],+ "</1> کا یہ مرر لوڈ نہیں کیا گیا۔"+ ],"SWX1O7": [["total",@@ -2383,6 +2392,7 @@"U2pMtf": ["tag-name"],"U3IvM5": ["مکمل رہنما"],"U3RIJu": ["مقامی فائلیں"],+ "U4ZE26": ["بورڈ کا اسنیپ شاٹ رینڈر نہیں ہو سکا۔"],"U5Spo9": ["مواد کی ڈائریکٹری پروجیکٹ کے اندر ہونی چاہیے"],"U6Mdhd": ["آئیے سیٹ اپ کرتے ہیں۔"],"U6wmNc": ["مطابقت پذیری روکی ہوئی"],@@ -2568,6 +2578,9 @@],"WG3MZ4": [["0"], " مہارتیں منتخب"],"WGMoTY": ["بگز، کریشز، یا یہ ناقابلِ اعتماد لگا"],+ "WH3roC": [+ "کوئی بورڈ منتخب نہیں کیا گیا۔ اس بلاک کی خصوصیات میں کسی .excalidraw دستاویز کا راستہ درج کریں۔"+ ],"WHPvOb": ["تمام فائلیں ویو فلٹرز سے چھپی ہوئی ہیں۔"],"WJjviG": ["کیا شامل کرنا ہے"],"WL6puM": ["راستہ پروجیکٹ سے باہر جاتا ہے"],@@ -3192,6 +3205,7 @@"cyoNqf": ["ضم نہیں ہوا"],"czQDKY": ["ہر پُش آپ کے ریموٹ پر ایک کمٹ ہے۔"],"d-GtJt": ["ماخذ Markdown میں دیکھیں"],+ "d-RYHO": ["Excalidraw بورڈ"],"d1JjXo": ["برانچ <0>",["branch"],@@ -3220,6 +3234,7 @@"dOxPd4": ["فٹ نوٹ"],"dQHSCs": ["تبدیل کریں (اصل حذف کریں)"],"dSORvE": ["موجودہ عمل روک کر اس کے بجائے یہ بھیجتا ہے"],+ "dT-HIQ": ["اس صفحے پر بہت زیادہ لائیو حوالے ہیں۔ یہ بورڈ لوڈ نہیں کیا گیا۔"],"dTaauv": ["وجہ: ", ["reason"]],"dURmlQ": ["«frontmatter» ایک محفوظ خصوصیت کا نام ہے"],"dVaXnv": ["مواد کے قواعد ابھی لوڈ نہیں ہوئے — تھوڑی دیر بعد دوبارہ کوشش کریں"],@@ -3312,6 +3327,7 @@"ee15Vl": ["مہارتیں آپ کے AI ٹولز کو دہرائے جانے والے کام سکھاتی ہیں۔ اپنی مہارتیں ایڈیٹر کے مہارتیں سائیڈبار میں لکھیں؛ اس صفحے پر انہیں فعال اور شیئر کیا جاتا ہے۔"],+ "eh3QBq": ["Excalidraw بورڈ لوڈ نہیں ہو سکا۔"],"eiUA4k": [["count", "plural", { "one": ["#", " تبصرہ"], "other": ["#", " تبصرے"] }]],"ekSPiP": [["0"], " پہلے ہی حذف ہو چکا تھا۔"],"el2KyL": ["اس پروجیکٹ میں Slidev مل گیا۔ ڈیک پروجیکٹ کا ورژن استعمال کریں گے۔"],@@ -3588,6 +3604,7 @@],"i9toLO": ["ایجنٹ کی کنفیگریشن فائل"],"iBVgIQ": ["سرور نے بگڑا ہوا جواب لوٹایا۔"],+ "iBei3o": ["بورڈ کے کنٹرولز"],"iDZtvM": ["ٹیمپلیٹس لوڈ نہیں ہو سکے: ", ["message"]],"iE-yoU": ["یہ ",@@ -3922,6 +3939,7 @@"lPzyrU": ["تمام حصے حل ہو گئے"],"lS83Sg": ["کلپ بورڈ تک رسائی نہیں ہو سکی۔"],"lScd1O": ["Slidev ڈیک صرف OpenKnowledge ڈیسک ٹاپ ایپ میں کھلتے ہیں۔"],+ "lT6wjt": ["بورڈ پھیلائیں"],"lUtr1r": [["1"], " میں سے ", ["0"], " منتخب"],"lVWEIL": [["total"], " میں سے ", ["embedded"], " صفحات اشاریہ بند ہو گئے۔"],"lWNpNB": ["CodeMirror کے ذریعے کرسر شامل کریں یا مماثل مواقع منتخب کریں۔"],@@ -4239,6 +4257,7 @@"pFPzHA": ["ایموجی منتخب کنندہ"],"pFRz_E": ["ان تبصروں کو اس پیغام سے باہر رکھیں"],"pFagOn": ["سورس کی ترمیم"],+ "pGYklE": ["بورڈ ویور لوڈ نہیں ہو سکا۔ اپنا کنکشن چیک کریں اور دوبارہ کوشش کریں۔"],"pHYP6v": ["سائیڈ بار میں <0>حسبِ ضرورت بنائیں</0> <1/> <2>مہارتیں</2> کھولیں۔"],"pI_bKs": ["چھلانگ کے لیے <0>اسپیس</0> · جھکنے کے لیے <1>↓</1>"],"pJ7XCo": ["یہ صفحہ کسی مقامی فائل یا تصویر کا حوالہ نہیں دیتا۔"],@@ -4354,6 +4373,7 @@"qbfj1f": ["اشیاء وصول کی جا رہی ہیں"],"qd7L1J": [["source"], ": ", ["updated"], " اپ ڈیٹ ہوئے، ", ["upToDate"], " پہلے ہی اپ ڈیٹ"],"qdBUHP": [["fileName"], " لوڈ نہیں ہو سکی"],+ "qi17kj": ["اس ورک اسپیس کے کسی .excalidraw بورڈ کا لائیو اسنیپ شاٹ ایمبیڈ کریں۔"],"qi1F96": ["فائل ایکسپلورر میں دکھائیں"],"qiRoLb": ["اس ہفتے میں نے جو کچھ بدلا اس کا خلاصہ کریں"],"qioCwA": ["صفحہ ", ["pageNumber"], " پر جائیں"],diff --git a/packages/app/src/locales/ur/messages.po b/packages/app/src/locales/ur/messages.poindex da8c88e13..ffb39ea6d 100644--- a/packages/app/src/locales/ur/messages.po+++ b/packages/app/src/locales/ur/messages.po@@ -1098,6 +1098,10 @@ msgstr "<0>ok</0> بیرونی ٹرمینلز میں اس وقت تک نہیںmsgid "<0>Space</0> to jump · <1>↓</1> to duck"msgstr "چھلانگ کے لیے <0>اسپیس</0> · جھکنے کے لیے <1>↓</1>"+#: src/editor/components/Mirror.tsx+msgid "<0>Too many live references on this page.</0> This mirror of <1>{src}</1> was not loaded."+msgstr "<0>اس صفحے پر بہت زیادہ لائیو حوالے ہیں۔</0> <1>{src}</1> کا یہ مرر لوڈ نہیں کیا گیا۔"+#: src/components/settings/SkillTargetsPicker.tsxmsgid "~/.myteam/skills"msgstr "~/.myteam/skills"@@ -2200,6 +2204,10 @@ msgstr "بلاگ پوسٹ"msgid "blog-post"msgstr "blog-post"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Board controls"+msgstr "بورڈ کے کنٹرولز"+#: src/lib/keyboard-shortcuts.tsmsgid "Bold"msgstr "جلی"@@ -5146,6 +5154,10 @@ msgstr "اس رپورٹ کے بارے میں سپورٹ کو ای میل کریmsgid "Emailed"msgstr "ای میل کیا گیا"+#: src/editor/slash-command/component-items.tsx+msgid "Embed a live snapshot of an .excalidraw board from this workspace."+msgstr "اس ورک اسپیس کے کسی .excalidraw بورڈ کا لائیو اسنیپ شاٹ ایمبیڈ کریں۔"+#: src/editor/slash-command/component-items.tsxmsgid "Embed a video with native player controls."msgstr "مقامی پلیئر کنٹرولز کے ساتھ ویڈیو شامل کریں۔"@@ -5189,6 +5201,10 @@ msgstr "خالی"msgid "Empty"msgstr "خالی"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Empty board"+msgstr "خالی بورڈ"+#: src/editor/components/Mermaid.tsxmsgid "Empty diagram"msgstr "خالی خاکہ"@@ -5405,6 +5421,14 @@ msgstr "{1}/ کے اندر {0}/ فولڈرز کے تحت سب کچھ"msgid "everything under any {0}/ folder"msgstr "کسی بھی {0}/ فولڈر کے تحت سب کچھ"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Excalidraw board"+msgstr "Excalidraw بورڈ"++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Excalidraw board failed to load."+msgstr "Excalidraw بورڈ لوڈ نہیں ہو سکا۔"+#: src/components/ExcalidrawDocEditor.tsxmsgid "Excalidraw canvas"msgstr "Excalidraw کینوس"@@ -5447,6 +5471,10 @@ msgstr "فائلوں کے تمام گروپ پھیلائیں"msgid "Expand all files"msgstr "سب فائلیں پھیلائیں"+#: src/editor/extensions/JsxComponentView.tsx+msgid "Expand board"+msgstr "بورڈ پھیلائیں"+#: src/editor/components/Mermaid.tsx#: src/editor/extensions/JsxComponentView.tsxmsgid "Expand diagram"@@ -8499,6 +8527,10 @@ msgstr "کوئی AI ٹول نہیں ملا۔ اس مہارت کو استعمالmsgid "No API key is set for this endpoint. Add one above."msgstr "اس اینڈ پوائنٹ کے لیے کوئی API کلید مقرر نہیں۔ اوپر ایک شامل کریں۔"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "No board selected. Enter the path to a .excalidraw doc in this block's properties."+msgstr "کوئی بورڈ منتخب نہیں کیا گیا۔ اس بلاک کی خصوصیات میں کسی .excalidraw دستاویز کا راستہ درج کریں۔"+#: src/components/AgentDiffPane.tsxmsgid "No body changes at this version."msgstr "اس ورژن میں متن کی کوئی تبدیلی نہیں۔"@@ -9115,6 +9147,10 @@ msgstr "ڈسک سے موجودہ پروجیکٹ کا فولڈر کھولیں۔"msgid "Open and focus the bottom Ask AI prompt composer."msgstr "نیچے کا «AI سے پوچھیں» پرامپٹ کمپوزر کھولیں اور اس پر فوکس کریں۔"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Open board"+msgstr "بورڈ کھولیں"+#: src/lib/keyboard-shortcuts.tsmsgid "Open CodeMirror search in source editor mode."msgstr "سورس ایڈیٹر موڈ میں CodeMirror کی تلاش کھولیں۔"@@ -13135,6 +13171,22 @@ msgstr "تصدیق شدہ حساب کا معاہدہ۔ صرف Attested Computatimsgid "The audit could not be completed. Try again."msgstr "آڈٹ مکمل نہیں ہو سکا۔ دوبارہ کوشش کریں۔"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board could not be reached. It may not exist, or the server may be offline."+msgstr "بورڈ تک رسائی نہیں ہو سکی۔ ہو سکتا ہے وہ موجود نہ ہو، یا سرور آف لائن ہو۔"++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board snapshot could not be rendered."+msgstr "بورڈ کا اسنیپ شاٹ رینڈر نہیں ہو سکا۔"++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board viewer failed to load. Check your connection and try again."+msgstr "بورڈ ویور لوڈ نہیں ہو سکا۔ اپنا کنکشن چیک کریں اور دوبارہ کوشش کریں۔"++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board's content is not a valid Excalidraw scene."+msgstr "بورڈ کا مواد کوئی درست Excalidraw منظر نہیں ہے۔"+#: src/components/InstallInClaudeDesktopDialog.tsxmsgid "The Claude Desktop App didn't open the file. Is it installed? ({msg})"msgstr "Claude Desktop App نے فائل نہیں کھولی۔ کیا یہ نصب ہے؟ ({msg})"@@ -13979,6 +14031,10 @@ msgstr "پیٹرن {0}/** ٹوگل کریں"msgid "tokens"msgstr "ٹوکنز"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Too many live references on this page. This board was not loaded."+msgstr "اس صفحے پر بہت زیادہ لائیو حوالے ہیں۔ یہ بورڈ لوڈ نہیں کیا گیا۔"+#: src/components/FeedbackForm.tsxmsgid "Too slow"msgstr "بہت سست"@@ -14027,6 +14083,7 @@ msgstr "کوئی پرامپٹ آزمائیں"#: src/components/settings/AccountSection.tsx#: src/components/settings/SavedThemesTiles.tsx#: src/components/ShareReceiveDialog.tsx+#: src/editor/components/ExcalidrawEmbed.tsxmsgid "Try again"msgstr "دوبارہ کوشش کریں"@@ -14603,6 +14660,7 @@ msgstr "سورس Markdown میں دیکھیں"msgid "View in Source Markdown"msgstr "ماخذ Markdown میں دیکھیں"+#: src/editor/components/ExcalidrawEmbed.tsx#: src/editor/components/Mermaid.tsxmsgid "View only"msgstr "صرف دیکھنے کے لیے"diff --git a/packages/app/src/locales/zh-Hans/messages.json b/packages/app/src/locales/zh-Hans/messages.jsonindex 70bdd6190..72bbd3c08 100644--- a/packages/app/src/locales/zh-Hans/messages.json+++ b/packages/app/src/locales/zh-Hans/messages.json@@ -332,6 +332,7 @@"4PYsOz": ["隐藏「文件」(", ["sidebarShortcutLabel"], ")"],"4Sxexw": ["源码撤销或重做"],"4TzU0n": ["初始化"],+ "4Vgtaz": ["无法访问画板。它可能不存在,或服务器已离线。"],"4buZWd": ["继承自 ", ["path"]],"4c_a6S": ["还没有设置任何内容。"],"4d0VYJ": ["我们将根据此名称创建安全的主题 ID。"],@@ -463,6 +464,7 @@"6KXnz5": ["你可以从废纸篓中恢复此文件。"],"6LJJ1v": ["文件 ", ["identity"], "。转到引用位置。"],"6LbUG7": ["这个仓库是私有的,你的 GitHub 账户没有访问权限。"],+ "6M2L3X": ["打开画板"],"6MnZEC": ["终端加载失败"],"6Nea1q": ["将 ", ["0"], " 用于当前的深色模式"],"6O626z": ["没有标题匹配 \"", ["trimmedAnchorQuery"], "\""],@@ -749,6 +751,7 @@"AVW-K9": ["加载孤立页面失败"],"AWOSPo": ["放大"],"AYoYhU": ["更新失败:", ["0"]],+ "AaC-CE": ["空白板"],"AcK_r0": ["Claude CLI"],"AczYxH": ["自定义 open-knowledge 条目——不由 OpenKnowledge 管理"],"AdcGcG": ["正在应用你的更改"],@@ -1465,6 +1468,7 @@],"LKOLNn": ["未安装任何 AI 智能体"],"LPAv9E": [["days"], " 天前"],+ "LPLWpO": ["画板内容不是有效的 Excalidraw 场景。"],"LQdLio": ["新建架构"],"LQsCPn": ["本地提交使这份副本无法更新"],"LRLKnQ": ["隐藏已解决的"],@@ -1964,6 +1968,7 @@"STTOnz": [["keyName"], " 类型:复合值(嵌套;只读)"],"SUOoXn": ["打开项目失败。"],"SVLPt5": [["formatted"], " 个 GitHub star"],+ "SWTmnY": ["<0>此页面的实时引用过多。</0><1>", ["src"], "</1> 的此镜像未加载。"],"SWX1O7": [["total", "plural", { "other": ["已修复 ", "#", " 个文件"] }], "。"],"SXCSQd": ["已复制路径"],"SXEdCq": ["要移动到 ", ["0"], " 吗?"],@@ -2041,6 +2046,7 @@"U2pMtf": ["tag-name"],"U3IvM5": ["完整指南"],"U3RIJu": ["本地文件"],+ "U4ZE26": ["无法渲染画板快照。"],"U5Spo9": ["内容目录必须位于项目内部"],"U6Mdhd": ["开始设置吧。"],"U6wmNc": ["同步已暂停"],@@ -2206,6 +2212,7 @@"WFEbV1": ["在编辑器中标出常见的 markdown 问题。由 <0>markdownlint<1/></0> 提供支持。"],"WG3MZ4": ["已选择 ", ["0"], " 个技能"],"WGMoTY": ["有缺陷、崩溃,或者感觉不太稳定"],+ "WH3roC": ["尚未选择画板。在此块的属性中输入 .excalidraw 文档的路径。"],"WHPvOb": ["所有文件都被视图筛选条件隐藏了。"],"WJjviG": ["包含哪些内容"],"WL6puM": ["路径解析结果在项目之外"],@@ -2746,6 +2753,7 @@"cyoNqf": ["未合并"],"czQDKY": ["每次推送就是向你的远程仓库提交一次。"],"d-GtJt": ["在 Markdown 源码中查看"],+ "d-RYHO": ["Excalidraw 画板"],"d1JjXo": ["你本地的 <0>",["branch"],@@ -2774,6 +2782,7 @@"dOxPd4": ["脚注"],"dQHSCs": ["转换(删除原文件)"],"dSORvE": ["停止当前运行并改为发送此内容"],+ "dT-HIQ": ["此页面的实时引用过多。此画板未加载。"],"dTaauv": ["原因:", ["reason"]],"dURmlQ": ["“frontmatter”是保留的属性名"],"dVaXnv": ["内容规则尚未加载——请稍后再试"],@@ -2851,6 +2860,7 @@"ee15Vl": ["技能让你的 AI 工具学会可重复的任务。在编辑器的“技能”侧边栏中编写你自己的技能;本页用于启用和共用它们。"],+ "eh3QBq": ["Excalidraw 画板加载失败。"],"eiUA4k": [["count", "plural", { "other": ["#", " 条评论"] }]],"ekSPiP": [["0"], " 已经被删除了。"],"el2KyL": ["在此项目中找到 Slidev。幻灯片将使用项目的版本。"],@@ -3089,6 +3099,7 @@"i9TPUi": ["这个", ["targetNoun"], "不在 <0>", ["branch"], "</0> 分支上。它可能还没有被推送。"],"i9toLO": ["智能体配置文件"],"iBVgIQ": ["服务器返回的响应格式错误。"],+ "iBei3o": ["画板控件"],"iDZtvM": ["加载模板失败:", ["message"]],"iE-yoU": ["这是 ",@@ -3386,6 +3397,7 @@"lPzyrU": ["所有差异块均已解决"],"lS83Sg": ["无法访问剪贴板。"],"lScd1O": ["Slidev 幻灯片仅在 OpenKnowledge 桌面应用中打开。"],+ "lT6wjt": ["展开画板"],"lUtr1r": ["已选择 ", ["1"], " 项中的 ", ["0"], " 项"],"lVWEIL": ["已索引 ", ["total"], " 个页面中的 ", ["embedded"], " 个。"],"lWNpNB": ["通过 CodeMirror 添加光标或选中匹配项。"],@@ -3640,6 +3652,7 @@"pFPzHA": ["表情符号选择器"],"pFRz_E": ["不要把这些评论放进这条消息"],"pFagOn": ["源码编辑"],+ "pGYklE": ["画板查看器加载失败。请检查网络连接后重试。"],"pHYP6v": ["在侧边栏中打开<0>自定义</0> <1/> <2>技能</2>。"],"pI_bKs": ["<0>空格</0>跳跃 · <1>↓</1>下蹲"],"pJ7XCo": ["此页面未引用任何本地文件或图片。"],@@ -3743,6 +3756,7 @@"qbfj1f": ["正在接收对象"],"qd7L1J": [["source"], ":已更新 ", ["updated"], " 个,", ["upToDate"], " 个已是最新"],"qdBUHP": ["无法加载 ", ["fileName"]],+ "qi17kj": ["嵌入此工作区中 .excalidraw 画板的实时快照。"],"qi1F96": ["在文件资源管理器中显示"],"qiRoLb": ["总结我这周改了些什么"],"qioCwA": ["跳到第 ", ["pageNumber"], " 页"],diff --git a/packages/app/src/locales/zh-Hans/messages.po b/packages/app/src/locales/zh-Hans/messages.poindex 0fcbab198..8c5a8f68d 100644--- a/packages/app/src/locales/zh-Hans/messages.po+++ b/packages/app/src/locales/zh-Hans/messages.po@@ -1098,6 +1098,10 @@ msgstr "<0>ok</0> 在你稍后从“文件”菜单添加之前,无法在外msgid "<0>Space</0> to jump · <1>↓</1> to duck"msgstr "<0>空格</0>跳跃 · <1>↓</1>下蹲"+#: src/editor/components/Mirror.tsx+msgid "<0>Too many live references on this page.</0> This mirror of <1>{src}</1> was not loaded."+msgstr "<0>此页面的实时引用过多。</0><1>{src}</1> 的此镜像未加载。"+#: src/components/settings/SkillTargetsPicker.tsxmsgid "~/.myteam/skills"msgstr "~/.myteam/skills"@@ -2200,6 +2204,10 @@ msgstr "博客文章"msgid "blog-post"msgstr "blog-post"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Board controls"+msgstr "画板控件"+#: src/lib/keyboard-shortcuts.tsmsgid "Bold"msgstr "粗体"@@ -5146,6 +5154,10 @@ msgstr "就此报告发送邮件给支持团队"msgid "Emailed"msgstr "已通过邮件发送"+#: src/editor/slash-command/component-items.tsx+msgid "Embed a live snapshot of an .excalidraw board from this workspace."+msgstr "嵌入此工作区中 .excalidraw 画板的实时快照。"+#: src/editor/slash-command/component-items.tsxmsgid "Embed a video with native player controls."msgstr "嵌入一段视频,带原生播放器控件。"@@ -5189,6 +5201,10 @@ msgstr "空"msgid "Empty"msgstr "空"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Empty board"+msgstr "空白板"+#: src/editor/components/Mermaid.tsxmsgid "Empty diagram"msgstr "空图示"@@ -5405,6 +5421,14 @@ msgstr "{1}/ 中各个 {0}/ 文件夹下的所有内容"msgid "everything under any {0}/ folder"msgstr "任意 {0}/ 文件夹下的所有内容"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Excalidraw board"+msgstr "Excalidraw 画板"++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Excalidraw board failed to load."+msgstr "Excalidraw 画板加载失败。"+#: src/components/ExcalidrawDocEditor.tsxmsgid "Excalidraw canvas"msgstr "Excalidraw 画布"@@ -5447,6 +5471,10 @@ msgstr "展开所有文件分组"msgid "Expand all files"msgstr "展开全部文件"+#: src/editor/extensions/JsxComponentView.tsx+msgid "Expand board"+msgstr "展开画板"+#: src/editor/components/Mermaid.tsx#: src/editor/extensions/JsxComponentView.tsxmsgid "Expand diagram"@@ -8499,6 +8527,10 @@ msgstr "未检测到 AI 工具。请先安装一个再使用此技能。"msgid "No API key is set for this endpoint. Add one above."msgstr "这个端点还没有设置 API 密钥。请在上方添加一个。"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "No board selected. Enter the path to a .excalidraw doc in this block's properties."+msgstr "尚未选择画板。在此块的属性中输入 .excalidraw 文档的路径。"+#: src/components/AgentDiffPane.tsxmsgid "No body changes at this version."msgstr "这个版本没有正文改动。"@@ -9115,6 +9147,10 @@ msgstr "从磁盘打开一个已有的项目文件夹。"msgid "Open and focus the bottom Ask AI prompt composer."msgstr "打开并聚焦底部的「问 AI」提示词输入框。"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Open board"+msgstr "打开画板"+#: src/lib/keyboard-shortcuts.tsmsgid "Open CodeMirror search in source editor mode."msgstr "在源码编辑器模式下打开 CodeMirror 搜索。"@@ -13135,6 +13171,22 @@ msgstr "经证明的计算合约。仅适用于类型为 Attested Computationmsgid "The audit could not be completed. Try again."msgstr "审查未能完成。请重试。"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board could not be reached. It may not exist, or the server may be offline."+msgstr "无法访问画板。它可能不存在,或服务器已离线。"++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board snapshot could not be rendered."+msgstr "无法渲染画板快照。"++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board viewer failed to load. Check your connection and try again."+msgstr "画板查看器加载失败。请检查网络连接后重试。"++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board's content is not a valid Excalidraw scene."+msgstr "画板内容不是有效的 Excalidraw 场景。"+#: src/components/InstallInClaudeDesktopDialog.tsxmsgid "The Claude Desktop App didn't open the file. Is it installed? ({msg})"msgstr "Claude 桌面应用没有打开这个文件。它安装了吗?({msg})"@@ -13979,6 +14031,10 @@ msgstr "切换模式 {0}/**"msgid "tokens"msgstr "token"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Too many live references on this page. This board was not loaded."+msgstr "此页面的实时引用过多。此画板未加载。"+#: src/components/FeedbackForm.tsxmsgid "Too slow"msgstr "太慢了"@@ -14027,6 +14083,7 @@ msgstr "试试一段提示词"#: src/components/settings/AccountSection.tsx#: src/components/settings/SavedThemesTiles.tsx#: src/components/ShareReceiveDialog.tsx+#: src/editor/components/ExcalidrawEmbed.tsxmsgid "Try again"msgstr "重试"@@ -14603,6 +14660,7 @@ msgstr "在 markdown 源码中查看"msgid "View in Source Markdown"msgstr "在 Markdown 源码中查看"+#: src/editor/components/ExcalidrawEmbed.tsx#: src/editor/components/Mermaid.tsxmsgid "View only"msgstr "仅供查看"diff --git a/packages/app/src/locales/zh-Hant/messages.json b/packages/app/src/locales/zh-Hant/messages.jsonindex 17368eeda..30ffcb9a0 100644--- a/packages/app/src/locales/zh-Hant/messages.json+++ b/packages/app/src/locales/zh-Hant/messages.json@@ -336,6 +336,7 @@"4PYsOz": ["隱藏「檔案」(", ["sidebarShortcutLabel"], ")"],"4Sxexw": ["原始碼復原或重做"],"4TzU0n": ["初始化"],+ "4Vgtaz": ["無法連線至畫板。它可能不存在,或伺服器已離線。"],"4buZWd": ["繼承自 ", ["path"]],"4c_a6S": ["還沒有設定任何東西。"],"4d0VYJ": ["我們會根據這個名稱建立安全的主題 ID。"],@@ -465,6 +466,7 @@"6KXnz5": ["你可以從垃圾桶還原此檔案。"],"6LJJ1v": ["檔案 ", ["identity"], "。前往引用位置。"],"6LbUG7": ["這個儲存庫是私人的,你的 GitHub 帳戶沒有存取權。"],+ "6M2L3X": ["開啟畫板"],"6MnZEC": ["終端機載入失敗"],"6Nea1q": ["將 ", ["0"], " 用於目前的深色模式"],"6O626z": ["沒有標題符合「", ["trimmedAnchorQuery"], "」"],@@ -751,6 +753,7 @@"AVW-K9": ["載入孤立頁面失敗"],"AWOSPo": ["放大"],"AYoYhU": ["更新失敗:", ["0"]],+ "AaC-CE": ["空白板"],"AcK_r0": ["Claude CLI"],"AczYxH": ["自訂的 open-knowledge 項目——不由 OpenKnowledge 管理"],"AdcGcG": ["正在套用你的變更"],@@ -1481,6 +1484,7 @@],"LKOLNn": ["沒有安裝任何 AI 代理"],"LPAv9E": [["days"], " 天前"],+ "LPLWpO": ["畫板內容不是有效的 Excalidraw 場景。"],"LQdLio": ["新增結構描述"],"LQsCPn": ["本機的提交讓這份副本無法更新"],"LRLKnQ": ["隱藏已解決的"],@@ -1988,6 +1992,7 @@"STTOnz": [["keyName"], " 類型:複合值(巢狀;唯讀)"],"SUOoXn": ["開啟專案失敗。"],"SVLPt5": [["formatted"], " 個 GitHub star"],+ "SWTmnY": ["<0>此頁面的即時引用過多。</0><1>", ["src"], "</1> 的此鏡像未載入。"],"SWX1O7": [["total", "plural", { "other": ["已修復 ", "#", " 個檔案"] }], "。"],"SXCSQd": ["已複製路徑"],"SXEdCq": ["要移動到 ", ["0"], " 嗎?"],@@ -2065,6 +2070,7 @@"U2pMtf": ["tag-name"],"U3IvM5": ["完整指南"],"U3RIJu": ["本機檔案"],+ "U4ZE26": ["無法渲染畫板快照。"],"U5Spo9": ["內容目錄必須在專案裡面"],"U6Mdhd": ["開始設定吧。"],"U6wmNc": ["同步已暫停"],@@ -2232,6 +2238,7 @@"WFEbV1": ["在編輯器中標出常見的 markdown 問題。由 <0>markdownlint<1/></0> 提供。"],"WG3MZ4": ["已選擇 ", ["0"], " 個技能"],"WGMoTY": ["有錯誤、當機,或者覺得不太可靠"],+ "WH3roC": ["尚未選擇畫板。在此區塊的屬性中輸入 .excalidraw 文件的路徑。"],"WHPvOb": ["所有檔案都被檢視篩選條件隱藏了。"],"WJjviG": ["要包含哪些內容"],"WL6puM": ["路徑解析結果在專案之外"],@@ -2770,6 +2777,7 @@"cyoNqf": ["未合併"],"czQDKY": ["每次推送就是向你的遠端儲存庫提交一次。"],"d-GtJt": ["在 Markdown 原始碼中檢視"],+ "d-RYHO": ["Excalidraw 畫板"],"d1JjXo": ["你本機的 <0>",["branch"],@@ -2798,6 +2806,7 @@"dOxPd4": ["註腳"],"dQHSCs": ["轉換(刪除原始檔案)"],"dSORvE": ["停止目前執行並改為傳送此內容"],+ "dT-HIQ": ["此頁面的即時引用過多。此畫板未載入。"],"dTaauv": ["原因:", ["reason"]],"dURmlQ": ["「frontmatter」是保留的屬性名稱"],"dVaXnv": ["內容規則尚未載入——請稍候再試"],@@ -2875,6 +2884,7 @@"ee15Vl": ["技能讓你的 AI 工具學會可重複的工作。在編輯器的「技能」側邊欄中撰寫你自己的技能;本頁用於啟用與共用它們。"],+ "eh3QBq": ["Excalidraw 畫板載入失敗。"],"eiUA4k": [["count", "plural", { "other": ["#", " 則註解"] }]],"ekSPiP": [["0"], " 已經被刪除了。"],"el2KyL": ["在此專案中找到 Slidev。簡報將使用專案的版本。"],@@ -3113,6 +3123,7 @@"i9TPUi": ["這個", ["targetNoun"], "不在 <0>", ["branch"], "</0> 分支上。它可能還沒有被推送。"],"i9toLO": ["代理設定檔"],"iBVgIQ": ["伺服器回傳的回應格式錯誤。"],+ "iBei3o": ["畫板控制項"],"iDZtvM": ["載入範本失敗:", ["message"]],"iE-yoU": ["這是 ",@@ -3410,6 +3421,7 @@"lPzyrU": ["所有差異區塊都已解決"],"lS83Sg": ["無法存取剪貼簿。"],"lScd1O": ["Slidev 簡報僅能在 OpenKnowledge 桌面應用程式中開啟。"],+ "lT6wjt": ["展開畫板"],"lUtr1r": ["已選取 ", ["1"], " 項中的 ", ["0"], " 項"],"lVWEIL": ["已索引 ", ["total"], " 個頁面中的 ", ["embedded"], " 個。"],"lWNpNB": ["透過 CodeMirror 新增游標或選取相符的項目。"],@@ -3666,6 +3678,7 @@"pFPzHA": ["表情符號選擇器"],"pFRz_E": ["不要把這些註解放進這則訊息"],"pFagOn": ["原始碼編輯"],+ "pGYklE": ["畫板檢視器載入失敗。請檢查網路連線後再試一次。"],"pHYP6v": ["在側邊欄中開啟<0>自訂</0> <1/> <2>技能</2>。"],"pI_bKs": ["<0>空白鍵</0>跳躍 · <1>↓</1>蹲下"],"pJ7XCo": ["此頁面未引用任何本機檔案或圖片。"],@@ -3769,6 +3782,7 @@"qbfj1f": ["正在接收物件"],"qd7L1J": [["source"], ":已更新 ", ["updated"], " 個,", ["upToDate"], " 個已是最新"],"qdBUHP": ["無法載入 ", ["fileName"]],+ "qi17kj": ["嵌入此工作區中 .excalidraw 畫板的即時快照。"],"qi1F96": ["在檔案總管中顯示"],"qiRoLb": ["總結我這週改了哪些東西"],"qioCwA": ["跳到第 ", ["pageNumber"], " 頁"],diff --git a/packages/app/src/locales/zh-Hant/messages.po b/packages/app/src/locales/zh-Hant/messages.poindex 2460c37bc..3d578f5ed 100644--- a/packages/app/src/locales/zh-Hant/messages.po+++ b/packages/app/src/locales/zh-Hant/messages.po@@ -1098,6 +1098,10 @@ msgstr "<0>ok</0> 在你稍後從「檔案」選單新增之前,無法在外msgid "<0>Space</0> to jump · <1>↓</1> to duck"msgstr "<0>空白鍵</0>跳躍 · <1>↓</1>蹲下"+#: src/editor/components/Mirror.tsx+msgid "<0>Too many live references on this page.</0> This mirror of <1>{src}</1> was not loaded."+msgstr "<0>此頁面的即時引用過多。</0><1>{src}</1> 的此鏡像未載入。"+#: src/components/settings/SkillTargetsPicker.tsxmsgid "~/.myteam/skills"msgstr "~/.myteam/skills"@@ -2200,6 +2204,10 @@ msgstr "部落格文章"msgid "blog-post"msgstr "blog-post"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Board controls"+msgstr "畫板控制項"+#: src/lib/keyboard-shortcuts.tsmsgid "Bold"msgstr "粗體"@@ -5146,6 +5154,10 @@ msgstr "就此回報寄郵件給支援團隊"msgid "Emailed"msgstr "已用電子郵件寄出"+#: src/editor/slash-command/component-items.tsx+msgid "Embed a live snapshot of an .excalidraw board from this workspace."+msgstr "嵌入此工作區中 .excalidraw 畫板的即時快照。"+#: src/editor/slash-command/component-items.tsxmsgid "Embed a video with native player controls."msgstr "嵌入一段影片,附原生播放器控制項。"@@ -5189,6 +5201,10 @@ msgstr "空的"msgid "Empty"msgstr "空的"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Empty board"+msgstr "空白板"+#: src/editor/components/Mermaid.tsxmsgid "Empty diagram"msgstr "空白圖表"@@ -5405,6 +5421,14 @@ msgstr "{1}/ 裡各個 {0}/ 資料夾底下的所有內容"msgid "everything under any {0}/ folder"msgstr "任何 {0}/ 資料夾底下的所有內容"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Excalidraw board"+msgstr "Excalidraw 畫板"++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Excalidraw board failed to load."+msgstr "Excalidraw 畫板載入失敗。"+#: src/components/ExcalidrawDocEditor.tsxmsgid "Excalidraw canvas"msgstr "Excalidraw 畫布"@@ -5447,6 +5471,10 @@ msgstr "展開所有檔案群組"msgid "Expand all files"msgstr "展開全部檔案"+#: src/editor/extensions/JsxComponentView.tsx+msgid "Expand board"+msgstr "展開畫板"+#: src/editor/components/Mermaid.tsx#: src/editor/extensions/JsxComponentView.tsxmsgid "Expand diagram"@@ -8499,6 +8527,10 @@ msgstr "未偵測到 AI 工具。請先安裝一個再使用此技能。"msgid "No API key is set for this endpoint. Add one above."msgstr "這個端點還沒有設定 API 金鑰。請在上面加一個。"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "No board selected. Enter the path to a .excalidraw doc in this block's properties."+msgstr "尚未選擇畫板。在此區塊的屬性中輸入 .excalidraw 文件的路徑。"+#: src/components/AgentDiffPane.tsxmsgid "No body changes at this version."msgstr "這個版本沒有內文變更。"@@ -9115,6 +9147,10 @@ msgstr "從磁碟開啟一個既有的專案資料夾。"msgid "Open and focus the bottom Ask AI prompt composer."msgstr "開啟並聚焦底部的「問 AI」提示輸入框。"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Open board"+msgstr "開啟畫板"+#: src/lib/keyboard-shortcuts.tsmsgid "Open CodeMirror search in source editor mode."msgstr "在原始碼編輯器模式下開啟 CodeMirror 搜尋。"@@ -13135,6 +13171,22 @@ msgstr "經證明的計算合約。僅適用於類型為 Attested Computationmsgid "The audit could not be completed. Try again."msgstr "稽核未能完成。請再試一次。"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board could not be reached. It may not exist, or the server may be offline."+msgstr "無法連線至畫板。它可能不存在,或伺服器已離線。"++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board snapshot could not be rendered."+msgstr "無法渲染畫板快照。"++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board viewer failed to load. Check your connection and try again."+msgstr "畫板檢視器載入失敗。請檢查網路連線後再試一次。"++#: src/editor/components/ExcalidrawEmbed.tsx+msgid "The board's content is not a valid Excalidraw scene."+msgstr "畫板內容不是有效的 Excalidraw 場景。"+#: src/components/InstallInClaudeDesktopDialog.tsxmsgid "The Claude Desktop App didn't open the file. Is it installed? ({msg})"msgstr "Claude Desktop App 沒有開啟這個檔案。它有安裝嗎?({msg})"@@ -13979,6 +14031,10 @@ msgstr "切換模式 {0}/**"msgid "tokens"msgstr "token"+#: src/editor/components/ExcalidrawEmbed.tsx+msgid "Too many live references on this page. This board was not loaded."+msgstr "此頁面的即時引用過多。此畫板未載入。"+#: src/components/FeedbackForm.tsxmsgid "Too slow"msgstr "太慢了"@@ -14027,6 +14083,7 @@ msgstr "試試一段提示"#: src/components/settings/AccountSection.tsx#: src/components/settings/SavedThemesTiles.tsx#: src/components/ShareReceiveDialog.tsx+#: src/editor/components/ExcalidrawEmbed.tsxmsgid "Try again"msgstr "再試一次"@@ -14603,6 +14660,7 @@ msgstr "在 markdown 原始碼中檢視"msgid "View in Source Markdown"msgstr "在 Markdown 原始碼中檢視"+#: src/editor/components/ExcalidrawEmbed.tsx#: src/editor/components/Mermaid.tsxmsgid "View only"msgstr "僅供檢視"diff --git a/packages/app/tests/integration/fullscreen-overlay-safe-area-coverage.test.ts b/packages/app/tests/integration/fullscreen-overlay-safe-area-coverage.test.tsindex 670a2ed6e..16812a90e 100644--- a/packages/app/tests/integration/fullscreen-overlay-safe-area-coverage.test.ts+++ b/packages/app/tests/integration/fullscreen-overlay-safe-area-coverage.test.ts@@ -167,6 +167,12 @@ const ALLOWLIST: readonly AllowlistEntry[] = [pattern: 'P1-fixed-inset-0',rationale: 'Radix Sheet.Overlay backdrop — no interactive content',},+ {+ file: 'editor/components/ExcalidrawEmbed.tsx',+ pattern: 'P2-near-fullscreen-vw',+ rationale:+ 'ExcalidrawLightbox mirrors MermaidLightbox: w-[calc(100dvw-5rem)] with a centered fixed margin puts the top edge at a constant 40px, below the traffic-light y-band (18-30px) at every viewport size. Its top row is the dialog close button at top-right and a view-only label inset to top-left, neither in the traffic-light region.',+ },{file: 'editor/components/Mermaid.tsx',pattern: 'P2-near-fullscreen-vw',diff --git a/packages/app/tests/integration/live-doc-pool.test.ts b/packages/app/tests/integration/live-doc-pool.test.tsnew file mode 100644index 000000000..3af6299d0--- /dev/null+++ b/packages/app/tests/integration/live-doc-pool.test.ts@@ -0,0 +1,127 @@+/**+ * Transport-truth tests for the shared read-only live-doc provider pool —+ * the substrate `<Mirror>` and `<Excalidraw>` embeds subscribe through.+ * Runs against a real CRDT server: refcounted sharing, last-release+ * teardown, live-update fan-out to subscribers, and the admission gate+ * (system/config names refused before any provider is constructed). The+ * React-hook mapping, the watchdog-release policy, and the hard capacity+ * cap are covered in `src/editor/components/live-doc-pool.dom.test.tsx`+ * with a faked transport (fake timers and cheap providers make those+ * deterministic there).+ */++import { afterAll, afterEach, beforeAll, describe, expect, test } from 'vitest';+import {+ __liveDocPoolSize,+ type AcquireLiveDocResult,+ acquireLiveDocProvider,+ disposeLiveDocPool,+ type LiveDocPoolEntry,+ releaseLiveDocProvider,+} from '../../src/editor/components/live-doc-pool.ts';+import {+ createTestClient,+ createTestServer,+ HARNESS_BOOT_TIMEOUT_MS,+ type TestServer,+} from './test-harness.ts';++let server: TestServer;+let collabUrl: string;++beforeAll(async () => {+ server = await createTestServer();+ collabUrl = `${server.wsUrl}/collab`;+}, HARNESS_BOOT_TIMEOUT_MS);++afterAll(async () => {+ await server.cleanup();+});++afterEach(() => {+ // The pool is module-level state; a leaked entry in one test must not+ // masquerade as a shared entry in the next.+ disposeLiveDocPool();+});++function waitFor(cond: () => boolean, timeoutMs = 10_000): Promise<void> {+ return new Promise((resolve, reject) => {+ const started = Date.now();+ const tick = () => {+ if (cond()) return resolve();+ if (Date.now() - started > timeoutMs) return reject(new Error('waitFor timed out'));+ setTimeout(tick, 25);+ };+ tick();+ });+}++function expectEntry(result: AcquireLiveDocResult): LiveDocPoolEntry {+ if (!result.ok) throw new Error(`acquire refused: ${result.reason}`);+ return result.entry;+}++describe('live-doc pool machinery', () => {+ test('two acquires on one key share a single entry; last release destroys it', async () => {+ const docName = `test-${crypto.randomUUID()}`;+ const first = expectEntry(acquireLiveDocProvider(collabUrl, docName));+ const second = expectEntry(acquireLiveDocProvider(collabUrl, docName));+ expect(second).toBe(first);+ expect(first.refcount).toBe(2);+ expect(__liveDocPoolSize()).toBe(1);++ releaseLiveDocProvider(collabUrl, docName);+ expect(__liveDocPoolSize()).toBe(1);+ expect(first.refcount).toBe(1);++ releaseLiveDocProvider(collabUrl, docName);+ expect(__liveDocPoolSize()).toBe(0);+ // A post-teardown acquire builds a FRESH entry, not a zombie hand-off.+ const third = expectEntry(acquireLiveDocProvider(collabUrl, docName));+ expect(third).not.toBe(first);+ releaseLiveDocProvider(collabUrl, docName);+ });++ test('syncs a real doc and fans live edits out to every subscriber', async () => {+ const client = await createTestClient(server.port);+ client.ytext.insert(0, 'first line');++ const entry = expectEntry(acquireLiveDocProvider(collabUrl, client.docName));++ let syncs = 0;+ let updates = 0;+ const unsubscribeA = entry.subscribe({ onSynced: () => syncs++, onUpdate: () => updates++ });+ let updatesB = 0;+ const unsubscribeB = entry.subscribe({ onSynced: () => {}, onUpdate: () => updatesB++ });++ await waitFor(() => entry.synced && entry.ySource.toString().includes('first line'));+ expect(syncs).toBeGreaterThanOrEqual(1);++ client.ytext.insert(client.ytext.length, '\nsecond line');+ await waitFor(() => entry.ySource.toString().includes('second line'));+ // One shared Y.Text observer fans out to BOTH subscribers.+ expect(updates).toBeGreaterThanOrEqual(1);+ expect(updatesB).toBeGreaterThanOrEqual(1);++ unsubscribeA();+ unsubscribeB();+ releaseLiveDocProvider(collabUrl, client.docName);+ await client.cleanup();+ });++ test('refuses system and config docNames before constructing any provider', () => {+ for (const name of [+ '__system__',+ '__config__/project',+ '__local__/project',+ '__user__/config.yml',+ '__config__/okignore',+ ]) {+ expect(acquireLiveDocProvider(collabUrl, name)).toEqual({+ ok: false,+ reason: 'inadmissible',+ });+ }+ expect(__liveDocPoolSize()).toBe(0);+ });+});diff --git a/packages/core/src/constants/upload.test.ts b/packages/core/src/constants/upload.test.tsindex 7befb2eb1..76c7d2127 100644--- a/packages/core/src/constants/upload.test.ts+++ b/packages/core/src/constants/upload.test.ts@@ -7,6 +7,7 @@ import {IMAGE_EXTENSIONS,INLINE_RENDERABLE_EXTENSIONS,isExcalidrawDocFile,+ isMarkdownDocFile,isMermaidDocFile,LINKABLE_ASSET_EXTENSIONS,MERMAID_FILE_EXTENSIONS,@@ -335,3 +336,32 @@ describe('isMermaidDocFile', () => {expect(isMermaidDocFile('flow.mmd.md')).toBe(false);});});++describe('isMarkdownDocFile', () => {+ test('true for extension-less docNames and markdown extensions (any casing)', () => {+ expect(isMarkdownDocFile('notes/today')).toBe(true);+ expect(isMarkdownDocFile('a.md')).toBe(true);+ expect(isMarkdownDocFile('a.mdx')).toBe(true);+ expect(isMarkdownDocFile('A.MD')).toBe(true);+ });++ test('false for the sibling doc classes (boards, diagrams, text docs)', () => {+ expect(isMarkdownDocFile('board.excalidraw')).toBe(false);+ expect(isMarkdownDocFile('flow.mmd')).toBe(false);+ expect(isMarkdownDocFile('notes.txt')).toBe(false);+ });++ test('dotfile basename classifies as markdown (dual-editor dispatch parity)', () => {+ expect(isMarkdownDocFile('.gitignore')).toBe(true);+ });++ test('dotted stems without a recognized doc-class extension are markdown', () => {+ expect(isMarkdownDocFile('release-v1.2')).toBe(true);+ expect(isMarkdownDocFile('spec.draft')).toBe(true);+ });++ test('classifies by basename, not by dots in directory segments', () => {+ expect(isMarkdownDocFile('a.md/util.ts')).toBe(false);+ expect(isMarkdownDocFile('flow.mmd.md')).toBe(true);+ });+});diff --git a/packages/core/src/constants/upload.ts b/packages/core/src/constants/upload.tsindex 213082957..5a95dbb2f 100644--- a/packages/core/src/constants/upload.ts+++ b/packages/core/src/constants/upload.ts@@ -416,6 +416,12 @@ export const INLINE_RENDERABLE_EXTENSIONS: ReadonlySet<string> = new Set([// (c) `handleAsset` adds a CSP sandbox header on direct fetches// (`Content-Security-Policy: sandbox; default-src 'none'; ...`)// to neutralize embedded `<script>` if SVG IS served inline.+ // (d) blob-backed SVG shown via `<img src="blob:…">` (the Excalidraw+ // embed snapshot path) is contained for RENDERING — image mode+ // blocks script and external subresources — but a user-initiated+ // top-level navigation to the blob URL ("Open image in new tab")+ // executes embedded SVG script, and (b)/(c) cannot reach a+ // blob: URL (no HTTP response, no serve middleware).// Aligns with Docmost's posture; cf. GHSA-rcg8-g69v-x23j (Plane SVG// XSS) for the upstream class. nosniff stays on the response for// additional defense against MIME confusion attacks even though it@@ -726,12 +732,32 @@ export function isExcalidrawDocFile(path: string): boolean {return EXCALIDRAW_FILE_EXTENSIONS.has(path.slice(lastDot + 1).toLowerCase());}+/**+ * True when a docName belongs to the markdown dual-editor class — the+ * literal negation of the per-class discriminators, so it agrees with the+ * editor's doc-class dispatch by construction instead of via a parallel+ * extension heuristic. A new doc class leaves "markdown" only when its+ * discriminator is added to this negation chain — a separate edit from+ * shipping the discriminator function itself — and the fail-safe is that+ * an unrecognized name classifies as markdown here exactly when the+ * dispatch would open it in the dual editor. Notably that+ * admits extension-less names (`notes/today`),+ * dotted stems (`release-v1.2`), and dotfile basenames (`.gitignore` —+ * the dual-editor dispatch treats those as markdown too; parity with the+ * dispatch is the contract, not an extension judgment).+ */+export function isMarkdownDocFile(path: string): boolean {+ return !isMermaidDocFile(path) && !isExcalidrawDocFile(path) && !isEditableTextDocFile(path);+}+// Code-file extensions live in a sibling module so the// language→extension table can be shared with the app-side TextViewer// (which maps the same canonical IDs to CodeMirror language packs).// Re-exporting here keeps the existing dispatch import surface (one// `mediaKindForSidebarAssetExtension` call site) unchanged.-import { CODE_FILE_EXTENSIONS } from './code-languages.ts';+// (`code-languages.ts` is pure data + string predicates with no imports,+// so pulling `isEditableTextDocFile` from it cannot form a cycle.)+import { CODE_FILE_EXTENSIONS, isEditableTextDocFile } from './code-languages.ts';export { CODE_FILE_EXTENSIONS };diff --git a/packages/core/src/index.ts b/packages/core/src/index.tsindex ea3db02fa..7b72c5c1f 100644--- a/packages/core/src/index.ts+++ b/packages/core/src/index.ts@@ -477,6 +477,7 @@ export {INLINE_RENDERABLE_EXTENSIONS,type InlineAssetMediaKind,isExcalidrawDocFile,+ isMarkdownDocFile,isMermaidDocFile,LINKABLE_ASSET_EXTENSIONS,MERMAID_FILE_EXTENSIONS,@@ -860,6 +861,7 @@ export {createRegistry,wildcardMeta,} from './registry/index.ts';+export { JSX_SRC_REF_TAGS, type JsxSrcRefTagSpec } from './registry/jsx-src-ref-tags.ts';export {type ComponentEntryFull,type ComponentEntryLite,diff --git a/packages/core/src/registry/built-ins.ts b/packages/core/src/registry/built-ins.tsindex bf96e81b4..8f549c520 100644--- a/packages/core/src/registry/built-ins.ts+++ b/packages/core/src/registry/built-ins.ts@@ -1038,6 +1038,26 @@ const pdfProps: PropDef[] = [},];+const excalidrawProps: PropDef[] = [+ {+ // No `defaultValue`: the board reference arrives through the gear+ // nudge / prop panel, not an upload modal, so key-absence must stay+ // the "not yet configured" predicate.+ name: 'src',+ type: 'string',+ required: true,+ description: 'Path to the `.excalidraw` board this embed renders',+ autoFocus: true,+ },+ {+ name: 'title',+ type: 'string',+ required: false,+ advanced: true,+ description: 'Accessible label for the embedded board',+ },+];+// ── Mirror + MirrorSource ────────────────────────────────────────────────────//// Master/copy transclusion. A `<MirrorSource id="…">…</MirrorSource>` block@@ -1245,6 +1265,25 @@ export const builtInComponents: JsxComponentMeta[] = [placeholder: { label: 'Add a PDF' },serialize: (node, ctx) => emitMdxJsx('Pdf', node, ctx, pdfProps),},+ {+ // Excalidraw canonical — embeds a `.excalidraw` board BY REFERENCE.+ // The scene stays in its own doc: board JSON is bulk machine-generated+ // bytes (easily hundreds of KB with embedded images), so a fence that+ // inlined it — the mermaid shape — would bloat the source pane and+ // churn the bridge on every stroke. The embed renders a static+ // snapshot; the board's own doc remains the sole edit surface.+ name: 'Excalidraw',+ surface: 'canonical',+ hasChildren: false,+ isSelfClosing: true,+ props: excalidrawProps,+ icon: 'PenTool',+ category: 'embed',+ displayName: 'Excalidraw',+ description: 'Embedded snapshot of an `.excalidraw` board, linking to its canvas editor',+ searchTerms: ['excalidraw', 'board', 'whiteboard', 'sketch', 'drawing', 'canvas'],+ serialize: (node, ctx) => emitMdxJsx('Excalidraw', node, ctx, excalidrawProps),+ },{// File canonical — generic file attachment for arbitrary types// (.zip, .docx, .pptx, .xlsx, .pdf, …). Renders as a Notion-style@@ -1280,7 +1319,9 @@ export const builtInComponents: JsxComponentMeta[] = [isSelfClosing: true,props: embedProps,icon: 'AppWindow',- category: 'media',+ // 'embed' = external-or-by-reference surfaces (Embed, Excalidraw);+ // 'media' = uploaded/asset-backed content (img, video, audio, Pdf, File).+ category: 'embed',displayName: 'Embed',description:'Inline web embed (iframe) — drop a URL, get a resizable preview pane. For YouTube / Vimeo / Loom prefer `<video src="…">` (player props, click-facade); `<Embed>` auto-rewrites watch URLs as a fallback.',diff --git a/packages/core/src/registry/canonical-compat.test.ts b/packages/core/src/registry/canonical-compat.test.tsindex 4cccee1ef..0604451c0 100644--- a/packages/core/src/registry/canonical-compat.test.ts+++ b/packages/core/src/registry/canonical-compat.test.ts@@ -28,8 +28,8 @@ describe('canonical/compat split — registry shape', () => {}});- test('exactly 16 canonical descriptors (5-pack + Math + MermaidFence + Pdf + File + Tabs + Tab + Embed + Mirror + MirrorSource + HtmlAlignBlock + Toggle)', () => {- expect(canonicalDescriptors.length).toBe(16);+ test('exactly 17 canonical descriptors (5-pack + Math + MermaidFence + Pdf + File + Excalidraw + Tabs + Tab + Embed + Mirror + MirrorSource + HtmlAlignBlock + Toggle)', () => {+ expect(canonicalDescriptors.length).toBe(17);// Media canonicals with a matching HTML primitive are lowercase// (img/video/audio). Non-native canonicals stay capitalized// (Callout, Accordion, Math, MermaidFence, Pdf, File, Tabs, Tab,@@ -45,6 +45,7 @@ describe('canonical/compat split — registry shape', () => {'Accordion','Callout','Embed',+ 'Excalidraw','File','HtmlAlignBlock','Math',diff --git a/packages/core/src/registry/jsx-src-ref-tags.test.ts b/packages/core/src/registry/jsx-src-ref-tags.test.tsnew file mode 100644index 000000000..d7c18789d--- /dev/null+++ b/packages/core/src/registry/jsx-src-ref-tags.test.ts@@ -0,0 +1,45 @@+import { describe, expect, test, vi } from 'vitest';+import { builtInComponents } from './built-ins.ts';+import { JSX_SRC_REF_TAGS } from './jsx-src-ref-tags.ts';++describe('JSX_SRC_REF_TAGS registry', () => {+ test('module load fails when a registry tagName has no descriptor', async () => {+ // A real negative for the module-load guard: drop Mirror from the+ // descriptor set and re-import. The guard must throw — proving it can+ // reject a mismatched tagName, not merely ratify the happy path the+ // static import already exercised.+ vi.resetModules();+ vi.doMock('./built-ins.ts', async (importOriginal) => {+ const actual = await importOriginal<typeof import('./built-ins.ts')>();+ return {+ builtInComponents: actual.builtInComponents.filter(+ (component) => component.name !== 'Mirror',+ ),+ };+ });+ try {+ await expect(import('./jsx-src-ref-tags.ts')).rejects.toThrow(+ /no built-in component descriptor named 'Mirror'/,+ );+ } finally {+ vi.doUnmock('./built-ins.ts');+ vi.resetModules();+ }+ });++ test('module load succeeds against the real descriptors', async () => {+ vi.resetModules();+ await expect(import('./jsx-src-ref-tags.ts')).resolves.toBeDefined();+ });++ test('every entry names a built-in component descriptor and one of its props', () => {+ for (const spec of JSX_SRC_REF_TAGS) {+ const descriptor = builtInComponents.find((component) => component.name === spec.tagName);+ expect(descriptor, spec.tagName).toBeDefined();+ expect(+ descriptor?.props.some((prop) => prop.name === spec.attrName),+ `${spec.tagName}.${spec.attrName}`,+ ).toBe(true);+ }+ });+});diff --git a/packages/core/src/registry/jsx-src-ref-tags.ts b/packages/core/src/registry/jsx-src-ref-tags.tsnew file mode 100644index 000000000..b7431750e--- /dev/null+++ b/packages/core/src/registry/jsx-src-ref-tags.ts@@ -0,0 +1,63 @@+/**+ * Registry of by-reference JSX components whose attribute names another+ * document (`<Mirror src="api-spec" />`, `<Excalidraw src="board.excalidraw" />`).+ *+ * Component-registry domain knowledge, kept beside `builtInComponents`: the+ * server's rename rewriter (`managed-rename-rewrite.ts`), its backlink+ * extractor (`backlink-index.ts`), and the app's render-prop normalization+ * must all agree on which tags carry document references and how a `src`+ * value resolves to a docName, or a reference the graph discovers is one the+ * rewriter cannot rewrite (and vice versa). Adding a third by-reference+ * component means adding a registry row, not a hand-copied rewriter or+ * extractor.+ */++import { builtInComponents } from './built-ins.ts';++export interface JsxSrcRefTagSpec {+ readonly tagName: string;+ readonly attrName: string;+ /**+ * How the attribute value addresses its target document:+ *+ * - `'bare-doc-name'` — the value IS the docName, verbatim+ * (`<Mirror src="api-spec" />`). The renderer performs no path+ * resolution, so matching is exact string equality.+ * - `'doc-relative'` — the renderer resolves the value with+ * `normalizeDocRelativeAssetUrl(value, sourceDocName)` before use (the+ * component is in the app's `DOC_RELATIVE_SRC_COMPONENTS` set), so+ * `board.excalidraw` inside `notes/index` addresses docName+ * `notes/board.excalidraw` while `/notes/board.excalidraw` addresses it+ * from anywhere. Matching must compare the NORMALIZED value.+ */+ readonly resolution: 'bare-doc-name' | 'doc-relative';+}++export const JSX_SRC_REF_TAGS: readonly JsxSrcRefTagSpec[] = [+ { tagName: 'Mirror', attrName: 'src', resolution: 'bare-doc-name' },+ { tagName: 'Excalidraw', attrName: 'src', resolution: 'doc-relative' },+];++// Registry↔descriptor guard. `tagName`/`attrName` are free strings compiled+// into the matcher regexes — a typo ('Mirrror') compiles fine and the pass+// just stops matching: a silent no-op with no error and no failing test.+// Cross-check every entry against the canonical component descriptors at+// module load so a mismatch throws at boot instead (same convention as the+// `assertSubset` guards in the upload constants).+for (const spec of JSX_SRC_REF_TAGS) {+ const descriptor = builtInComponents.find((component) => component.name === spec.tagName);+ if (!descriptor) {+ throw new Error(+ `JSX_SRC_REF_TAGS: no built-in component descriptor named '${spec.tagName}' — ` ++ `the rename-rewrite and backlink passes for this entry would silently never match. ` ++ `Fix the tagName to match a descriptor in builtInComponents.`,+ );+ }+ if (!descriptor.props.some((prop) => prop.name === spec.attrName)) {+ throw new Error(+ `JSX_SRC_REF_TAGS: component '${spec.tagName}' declares no prop named '${spec.attrName}' — ` ++ `the rename-rewrite and backlink passes for this entry would silently never match. ` ++ `Fix the attrName to match one of the descriptor's props.`,+ );+ }+}diff --git a/packages/core/src/registry/projection.test.ts b/packages/core/src/registry/projection.test.tsindex 9165d1eea..b8864deb3 100644--- a/packages/core/src/registry/projection.test.ts+++ b/packages/core/src/registry/projection.test.ts@@ -24,9 +24,9 @@ const PARSE_EXTENSIONS = [mdx()];const PARSE_MDAST_EXTENSIONS = [mdxFromMarkdown()];describe('getCanonicalDescriptors (broad filter)', () => {- test('returns 16 canonicals (matches built-ins snapshot)', () => {+ test('returns 17 canonicals (matches built-ins snapshot)', () => {const canonicals = getCanonicalDescriptors();- expect(canonicals.length).toBe(16);+ expect(canonicals.length).toBe(17);});test('excludes compat surfaces', () => {@@ -48,8 +48,8 @@ describe('getCanonicalDescriptors (broad filter)', () => {});describe('getAgentCanonicalDescriptors (JSX-only agent surface)', () => {- test('returns 14 canonicals — broad set minus fence- and html-kind', () => {- expect(getAgentCanonicalDescriptors().length).toBe(14);+ test('returns 15 canonicals — broad set minus fence- and html-kind', () => {+ expect(getAgentCanonicalDescriptors().length).toBe(15);});test('excludes MermaidFence (no JSX form exists; agents author the fence directly)', () => {diff --git a/packages/core/src/registry/registry.test.ts b/packages/core/src/registry/registry.test.tsindex 91c7af0a1..668d2c52f 100644--- a/packages/core/src/registry/registry.test.ts+++ b/packages/core/src/registry/registry.test.ts@@ -4,9 +4,9 @@ import { builtInComponents, createRegistry, wildcardMeta } from './index.ts';import type { JsxComponentMeta } from './types.ts';describe('createRegistry', () => {- test('returns the 16 canonical + 9 compat descriptors + wildcard', () => {- // 16 canonicals (Callout, Image, Video, Audio, Accordion, Toggle, Math,- // MermaidFence, Pdf, File, Tabs, Tab, Embed, Mirror, MirrorSource,+ test('returns the 17 canonical + 9 compat descriptors + wildcard', () => {+ // 17 canonicals (Callout, Image, Video, Audio, Accordion, Toggle, Math,+ // MermaidFence, Pdf, File, Excalidraw, Tabs, Tab, Embed, Mirror, MirrorSource,// HtmlAlignBlock — the `<div align>` HTML form is canonical, per the// MermaidFence fence-only precedent)// + 9 compats (GFMCallout, CommonMarkImage, HtmlDetailsAccordion,@@ -24,7 +24,7 @@ describe('createRegistry', () => {// through to the wildcard.const registry = createRegistry();const entries = [...registry.entries()];- expect(entries.length).toBe(26);+ expect(entries.length).toBe(27);});test('get returns registered component by name', () => {@@ -119,11 +119,11 @@ describe('createRegistry', () => {});describe('builtInComponents manifest', () => {- test('contains 16 canonical + 9 compat entries (5-pack + Math + MermaidFence + Pdf + File + Tabs + Tab + Embed + Mirror + MirrorSource + HtmlAlignBlock + Toggle canonicals; source-form preservation + math syntax + wiki-embed compats; Mermaid is fence-only)', () => {- expect(builtInComponents.length).toBe(25);+ test('contains 17 canonical + 9 compat entries (5-pack + Math + MermaidFence + Pdf + File + Excalidraw + Tabs + Tab + Embed + Mirror + MirrorSource + HtmlAlignBlock + Toggle canonicals; source-form preservation + math syntax + wiki-embed compats; Mermaid is fence-only)', () => {+ expect(builtInComponents.length).toBe(26);const canonical = builtInComponents.filter((m) => m.surface === 'canonical');const compat = builtInComponents.filter((m) => m.surface === 'compat');- expect(canonical.length).toBe(16);+ expect(canonical.length).toBe(17);expect(compat.length).toBe(9);});@@ -810,7 +810,7 @@ describe('builtInComponents manifest', () => {});test('category is always a valid value', () => {- const validCategories = new Set(['content', 'layout', 'media', 'data']);+ const validCategories = new Set(['content', 'layout', 'media', 'data', 'embed']);for (const meta of builtInComponents) {if (meta.category) {expect(validCategories.has(meta.category)).toBe(true);diff --git a/packages/core/src/registry/types.ts b/packages/core/src/registry/types.tsindex 66843c886..3bf333a54 100644--- a/packages/core/src/registry/types.ts+++ b/packages/core/src/registry/types.ts@@ -247,7 +247,7 @@ interface JsxComponentMetaBase {icon?: string;/** Slash menu grouping category. Precedent #9 keeps this add-only —* extending with new members is free; narrowing is permanent lock-in. */- category?: 'content' | 'media';+ category?: 'content' | 'media' | 'embed';/** Slash menu label. */displayName?: string;/** One-line summary for slash menu + MCP agent discovery. */diff --git a/packages/server/assets/skills/project/references/components-and-visuals.md b/packages/server/assets/skills/project/references/components-and-visuals.mdindex 6bb4be1e5..07948ce1d 100644--- a/packages/server/assets/skills/project/references/components-and-visuals.md+++ b/packages/server/assets/skills/project/references/components-and-visuals.md@@ -16,7 +16,11 @@ OK auto-promotes markdown-native syntax into themed canonical components at pars**These delimiters are live in ordinary prose.** `==`, `$`, `$$`, `%%`, `<!--` … `-->` and `~~` format — or hide — whatever sits between them, wherever they appear, not only where you meant them as syntax. To show a literal pair, wrap it in an inline code span (`` `==x==` ``, `` `$5` ``), which always works and reads as code; or backslash-escape a delimiter to keep it as running prose. Escaping either side is enough for `==`, `$`, `%%` and `<!--`: `\==x\==`, `\$5`, `\%\%note\%\%`, `\<!-- note -->`. For `~~`, escape both tildes (`\~\~x\~\~`) — a one-sided `\~~x~~` renders right but gets rewritten to the two-sided form on save. Watch `%%` and `<!-- -->` in particular: an accidental pair doesn't restyle the text, it hides it.-`Tabs` is the lone canonical with **no** markdown-native form — write the JSX directly (`<Tabs><Tab label="…">…</Tab></Tabs>`). For any canonical's full JSX prop schema, call `palette({ components: [ids] })`. If no canonical fits, any `<TagName>…</TagName>` falls through as raw MDX — but prefer a canonical when one matches.+`Tabs` and `Excalidraw` are the only canonicals with **no** markdown-native form — write the JSX directly (`<Tabs><Tab label="…">…</Tab></Tabs>`; `Excalidraw` below).++`<Excalidraw src="path/board.excalidraw" />` embeds a live snapshot of an Excalidraw board — the `src` is doc-relative or root-relative and MUST keep the `.excalidraw` extension, and the referenced board must already exist: MCP `write` cannot create `.excalidraw` docs (it authors `.md`/`.mdx` only), so only reference boards a human has created. The embed re-renders as the board changes and links to the board's own canvas editor.++For any canonical's full JSX prop schema, call `palette({ components: [ids] })`. If no canonical fits, any `<TagName>…</TagName>` falls through as raw MDX — but prefer a canonical when one matches.**Discover the palette in one call.** `palette` returns every markdown-native form (copy-ready `example` + `guidance`), the themed `html preview` embed starters, and the injected theme-token list — the source of truth for component-forward, themed authoring. Canonical names/counts beyond the markdown-native set are project-specific; the inventory in the `write` / `edit` descriptions and `palette({ components })` are authoritative for those.diff --git a/packages/server/src/api-file-ops.test.ts b/packages/server/src/api-file-ops.test.tsindex f05850a82..432ce24b7 100644--- a/packages/server/src/api-file-ops.test.ts+++ b/packages/server/src/api-file-ops.test.ts@@ -3070,3 +3070,118 @@ describe('file operation API routes', () => {},);});++// The decisive discovery case for JSX by-reference embeds: a document whose+// ONLY reference to the target is a `<Excalidraw src>` / `<Mirror src>`+// attribute — no wiki-link, no markdown link — driven through the real+// `/api/rename-path` handler with a real BacklinkIndex. Discovery depends+// entirely on the graph extracting JSX src refs as backlinks; before it did,+// these documents were never entered into the rewrite scan set and every+// embed silently broke on rename.+describe('managed rename discovers JSX-src-only referencing documents', () => {+ const BOARD_JSON = '{"type":"excalidraw","version":2,"elements":[]}\n';++ test('root-relative Excalidraw src in a JSX-only doc is rewritten on board rename', async () => {+ const dir = setupTmpDir();+ mkdirSync(join(dir, 'diagrams'), { recursive: true });+ writeFileSync(join(dir, 'diagrams/board.excalidraw'), BOARD_JSON, 'utf-8');+ writeFileSync(+ join(dir, 'embeds-only.md'),+ '# Embeds\n\n<Excalidraw src="/diagrams/board.excalidraw" />\n',+ 'utf-8',+ );++ const result = await callApi(+ dir,+ '/api/rename-path',+ 'POST',+ {+ kind: 'file',+ fromPath: 'diagrams/board.excalidraw',+ toPath: 'diagrams/renamed-board.excalidraw',+ },+ { backlinkIndex: buildBacklinkIndex(dir) },+ );++ expect(result.status).toBe(200);+ expect(existsSync(join(dir, 'diagrams/board.excalidraw'))).toBe(false);+ expect(readFileSync(join(dir, 'diagrams/renamed-board.excalidraw'), 'utf-8')).toBe(BOARD_JSON);+ expect(readFileSync(join(dir, 'embeds-only.md'), 'utf-8')).toBe(+ '# Embeds\n\n<Excalidraw src="/diagrams/renamed-board.excalidraw" />\n',+ );+ const body = JSON.parse(result.body) as {+ renamed: Array<{ fromDocName: string; toDocName: string }>;+ rewrittenDocs: Array<{ docName: string; rewrites: number }>;+ };+ expect(body.renamed).toEqual([+ {+ fromDocName: 'diagrams/board.excalidraw',+ toDocName: 'diagrams/renamed-board.excalidraw',+ },+ ]);+ expect(body.rewrittenDocs).toEqual([{ docName: 'embeds-only', rewrites: 1 }]);+ });++ test('doc-relative Excalidraw src in a JSX-only doc is rewritten on board rename', async () => {+ const dir = setupTmpDir();+ mkdirSync(join(dir, 'diagrams'), { recursive: true });+ writeFileSync(join(dir, 'diagrams/board.excalidraw'), BOARD_JSON, 'utf-8');+ writeFileSync(+ join(dir, 'diagrams/notes.md'),+ '# Notes\n\n<Excalidraw src="board.excalidraw" />\n',+ 'utf-8',+ );++ const result = await callApi(+ dir,+ '/api/rename-path',+ 'POST',+ {+ kind: 'file',+ fromPath: 'diagrams/board.excalidraw',+ toPath: 'diagrams/renamed-board.excalidraw',+ },+ { backlinkIndex: buildBacklinkIndex(dir) },+ );++ expect(result.status).toBe(200);+ expect(readFileSync(join(dir, 'diagrams/notes.md'), 'utf-8')).toBe(+ '# Notes\n\n<Excalidraw src="renamed-board.excalidraw" />\n',+ );+ const body = JSON.parse(result.body) as {+ rewrittenDocs: Array<{ docName: string; rewrites: number }>;+ };+ expect(body.rewrittenDocs).toEqual([{ docName: 'diagrams/notes', rewrites: 1 }]);+ });++ test('a Mirror-only doc is rewritten when the mirrored source doc is renamed', async () => {+ const dir = setupTmpDir();+ writeFileSync(join(dir, 'api-spec.md'), '# API Spec\n', 'utf-8');+ writeFileSync(+ join(dir, 'mirror-only.md'),+ '# Mirrors\n\n<Mirror src="api-spec" anchor="deprecation" />\n',+ 'utf-8',+ );++ const result = await callApi(+ dir,+ '/api/rename-path',+ 'POST',+ {+ kind: 'file',+ fromPath: 'api-spec',+ toPath: 'api-reference',+ },+ { backlinkIndex: buildBacklinkIndex(dir) },+ );++ expect(result.status).toBe(200);+ expect(readFileSync(join(dir, 'mirror-only.md'), 'utf-8')).toBe(+ '# Mirrors\n\n<Mirror src="api-reference" anchor="deprecation" />\n',+ );+ const body = JSON.parse(result.body) as {+ rewrittenDocs: Array<{ docName: string; rewrites: number }>;+ };+ expect(body.rewrittenDocs).toEqual([{ docName: 'mirror-only', rewrites: 1 }]);+ });+});diff --git a/packages/server/src/apply-managed-rename.test.ts b/packages/server/src/apply-managed-rename.test.tsindex 2d4b1b87c..a66117f37 100644--- a/packages/server/src/apply-managed-rename.test.ts+++ b/packages/server/src/apply-managed-rename.test.ts@@ -221,6 +221,44 @@ describe('applyRenameMap — multi-entry rewrites', () => {expect(result.markdown).toBe(`---\ntitle: Doc\n---\n\n<Mirror src="B" anchor="x" />\n`);expect(result.rewrites).toBe(1);});++ test('rewrites a doc-relative Excalidraw src for a renamed board', () => {+ const result = applyRenameMap(+ '<Excalidraw src="board.excalidraw" />\n',+ 'notes/index',+ new Map([['notes/board.excalidraw', 'notes/sketch.excalidraw']]),+ );+ expect(result.markdown).toBe('<Excalidraw src="sketch.excalidraw" />\n');+ expect(result.rewrites).toBe(1);+ });++ test('self-rename recomputes a doc-relative Excalidraw src for the new location', () => {+ // The containing doc moves; the board stays put. Pass 1 (the self-rename+ // pass) must recompute the doc-relative src or the embed silently+ // addresses a different board from the new folder.+ const result = applyRenameMap(+ '<Excalidraw src="board.excalidraw" />\n',+ 'notes/index',+ new Map([['notes/index', 'archive/index']]),+ );+ expect(result.markdown).toBe('<Excalidraw src="../notes/board.excalidraw" />\n');+ expect(result.rewrites).toBe(1);+ });++ test('folder move carrying both doc and board keeps the doc-relative src stable', () => {+ // `notes/` → `archive/`: the containing doc AND the board both move. The+ // self pass re-anchors, the placeholder cycle then applies the board's own+ // rename — net result, the same-folder relative spelling is preserved.+ const result = applyRenameMap(+ '<Excalidraw src="board.excalidraw" />\n',+ 'notes/index',+ new Map([+ ['notes/index', 'archive/index'],+ ['notes/board.excalidraw', 'archive/board.excalidraw'],+ ]),+ );+ expect(result.markdown).toBe('<Excalidraw src="board.excalidraw" />\n');+ });});describe('applyRenameMap — outbound link recomputation when source doc moves', () => {diff --git a/packages/server/src/apply-managed-rename.ts b/packages/server/src/apply-managed-rename.tsindex 467f81c45..d72cf420f 100644--- a/packages/server/src/apply-managed-rename.ts+++ b/packages/server/src/apply-managed-rename.ts@@ -1,8 +1,8 @@import { randomUUID } from 'node:crypto';import { prependFrontmatter, stripFrontmatter } from '@inkeep/open-knowledge-core';import {+ rewriteJsxSrcRefsForDocumentRename,rewriteMarkdownLinksForDocumentRename,- rewriteMirrorSrcForDocumentRename,rewriteOutboundMarkdownLinksForSourceMove,rewriteWikiLinksForDocumentRename,} from './managed-rename-rewrite.ts';@@ -197,20 +197,25 @@ function rewriteSupportedLinksForRename(oldDocName,newDocName,);- // Mirror src prop rewrite — keeps `<Mirror src="…" />` referencing the- // post-rename doc path so transclusions don't break on doc moves. Runs- // AFTER wikilink / markdown-link passes so any earlier rewrites don't- // re-introduce an old name into the Mirror's `src` (the link rewriters- // don't touch JSX attribute values, but ordering keeps the contract- // robust if future passes do).- const mirrorRewrite = rewriteMirrorSrcForDocumentRename(+ // JSX src-reference rewrite — keeps by-reference components+ // (`<Mirror src="…" />`, `<Excalidraw src="…" />`) pointing at the+ // post-rename doc path so embeds don't break on doc moves. Runs AFTER+ // wikilink / markdown-link passes so any earlier rewrites don't+ // re-introduce an old name into a JSX `src` (the link rewriters don't+ // touch JSX attribute values, but ordering keeps the contract robust+ // if future passes do). `sourceDocName` threads through so doc-relative+ // `src` spellings resolve the way the renderer resolves them, and so the+ // self-rename pass (sourceDocName === oldDocName) recomputes doc-relative+ // values for the containing doc's new location.+ const jsxRewrite = rewriteJsxSrcRefsForDocumentRename(markdownRewrite.markdown,+ sourceDocName,oldDocName,newDocName,);return {- markdown: prependFrontmatter(frontmatter, mirrorRewrite.markdown),- rewrites: wikiRewrite.rewrites + markdownRewrite.rewrites + mirrorRewrite.rewrites,+ markdown: prependFrontmatter(frontmatter, jsxRewrite.markdown),+ rewrites: wikiRewrite.rewrites + markdownRewrite.rewrites + jsxRewrite.rewrites,};}diff --git a/packages/server/src/backlink-index.test.ts b/packages/server/src/backlink-index.test.tsindex 158e8f557..dbea7786c 100644--- a/packages/server/src/backlink-index.test.ts+++ b/packages/server/src/backlink-index.test.ts@@ -16,6 +16,7 @@ import {type BrokenOutboundLink,computeBrokenOutboundLinks,type ExtractedWikiLink,+ extractJsxSrcRefsFromMarkdown,extractMarkdownLinksFromMarkdown,extractWikiLinksFromMarkdown,resolveMarkdownHref,@@ -877,7 +878,7 @@ describe('BacklinkIndex', () => {writeFileSync(join(cacheDir, 'backlinks.json'),JSON.stringify({- version: 2,+ version: 3,backward: {ghost: [{ source: 'alpha', anchor: null, snippet: 'See ghost.' }],// Invalid positions (hand-edited or corrupt cache) must degrade to@@ -2292,6 +2293,19 @@ describe('computeBrokenOutboundLinks', () => {]);});+ test('the markdown and JSX planes of one href each keep their own resolution', () => {+ // Identical bytes, different resolvers: the markdown link resolves+ // doc-relative to `notes/api-spec`, the bare-doc-name Mirror src IS+ // `api-spec` verbatim. Dedupe keyed on href alone would keep one plane's+ // resolvedTo for the other's occurrence and point the author at the+ // wrong file to repair.+ const md = ['See [x](api-spec).', '<Mirror src="api-spec" anchor="dep" />', ''].join('\n');+ expect(computeBrokenOutboundLinks(md, 'notes/a', new Set())).toEqual<BrokenOutboundLink[]>([+ { href: 'api-spec', resolvedTo: 'notes/api-spec', reason: 'no-such-doc' },+ { href: 'api-spec', resolvedTo: 'api-spec', reason: 'no-such-doc', sourceForm: 'jsx' },+ ]);+ });+test('treats a self-link to the admitted source doc as valid', () => {const md = 'See [self](./a.md).';// The write handler adds the just-written doc to the admitted set so a@@ -2370,3 +2384,254 @@ describe('computeBrokenOutboundLinks', () => {expect(computeBrokenOutboundLinks(md, 'notes/a', new Set(), fileOracle([]))).toEqual([]);});});++describe('extractJsxSrcRefsFromMarkdown', () => {+ test('extracts Mirror and Excalidraw src refs as document targets', () => {+ const md = [+ '# Doc',+ '',+ '<Mirror src="api-spec" anchor="dep" />',+ '<Excalidraw src="/diagrams/board.excalidraw" />',+ '',+ ].join('\n');+ const refs = extractJsxSrcRefsFromMarkdown(md, 'notes/index');+ expect(refs.map((r) => r.target)).toEqual(['api-spec', 'diagrams/board.excalidraw']);+ expect(refs[0]).toEqual(+ expect.objectContaining({+ anchor: null,+ line: 2,+ snippet: '<Mirror src="api-spec" anchor="dep" />',+ }),+ );+ });++ test('resolves a doc-relative Excalidraw src against the source doc dir', () => {+ const refs = extractJsxSrcRefsFromMarkdown(+ '<Excalidraw src="board.excalidraw" />\n',+ 'notes/index',+ );+ expect(refs.map((r) => r.target)).toEqual(['notes/board.excalidraw']);+ });++ test('skips refs inside fenced code and inline code', () => {+ const md = [+ '```mdx',+ '<Excalidraw src="/fenced/board.excalidraw" />',+ '```',+ 'Write `<Mirror src="api-spec" anchor="x" />` to mirror.',+ '<Mirror src="live-doc" anchor="x" />',+ '',+ ].join('\n');+ expect(extractJsxSrcRefsFromMarkdown(md, 'index').map((r) => r.target)).toEqual(['live-doc']);+ });++ test('skips empty, external-scheme, and contentDir-escaping values', () => {+ const md = [+ '<Excalidraw src="" />',+ '<Excalidraw src="https://example.com/board.excalidraw" />',+ '<Mirror src="https://example.com/x" anchor="a" />',+ '<Mirror src="mailto:[email protected]" anchor="b" />',+ '<Excalidraw src="../../outside.excalidraw" />',+ '',+ ].join('\n');+ expect(extractJsxSrcRefsFromMarkdown(md, 'notes/index')).toEqual([]);+ });++ test('does not read data-src as src', () => {+ expect(+ extractJsxSrcRefsFromMarkdown('<Mirror data-src="decoy" anchor="x" src="real" />\n', 'index'),+ ).toEqual([expect.objectContaining({ target: 'real' })]);+ });++ test('applies the frontmatter line offset', () => {+ const refs = extractJsxSrcRefsFromMarkdown(+ '<Mirror src="api-spec" anchor="x" />\n',+ 'index',+ 4,+ );+ expect(refs[0]).toEqual(expect.objectContaining({ line: 4 }));+ });++ test('a >-free line of repeated tag prefixes completes within the complexity budget', () => {+ // '<Mirror ' repeated with no closing '>' drove the earlier unanchored+ // per-'<' scan super-linear: a fresh RegExp compile plus an O(n) slice per+ // candidate, with '[^>]*' backtracking across the whole remainder. The+ // shared readJsxSrcRefTagAt reader bounds the attribute window first, so+ // this completes far inside the (deliberately generous) wall-clock+ // budget; a failure means the scanner regressed to super-linear, not+ // that the runner was slow.+ const line = '<Mirror '.repeat(6400); // ~50 KB, no '>' anywhere+ const startedAt = performance.now();+ expect(extractJsxSrcRefsFromMarkdown(line, 'notes/index')).toEqual([]);+ expect(computeBrokenOutboundLinks(line, 'notes/index', new Set())).toEqual([]);+ expect(performance.now() - startedAt).toBeLessThan(2000);+ });++ test('a line whose only > is distant and unmatched completes within the complexity budget', () => {+ // The single trailing '>' is not preceded by '/', so every '<' candidate+ // must reject on the probe alone — without letting '[^>]*' consume, then+ // backtrack across, the whole remainder up to that distant '>'. This is+ // the residual super-linear shape a mere "a '>' exists somewhere" probe+ // lets through.+ const line = `${'<Mirror '.repeat(6400)}>`; // ~50 KB, one unmatched '>' at the end+ const startedAt = performance.now();+ expect(extractJsxSrcRefsFromMarkdown(line, 'notes/index')).toEqual([]);+ expect(computeBrokenOutboundLinks(line, 'notes/index', new Set())).toEqual([]);+ expect(performance.now() - startedAt).toBeLessThan(2000);+ });+});++describe('BacklinkIndex with JSX src refs', () => {+ test('a JSX-src-only document becomes a backlink source for the board', () => {+ const index = new BacklinkIndex({ projectDir: '/tmp/x', contentDir: '/tmp/x' });+ index.updateDocumentFromMarkdown(+ 'notes/embeds-only',+ '# Embeds\n\n<Excalidraw src="board.excalidraw" />\n',+ );+ expect(index.getBacklinks('notes/board.excalidraw')).toEqual([+ expect.objectContaining({ source: 'notes/embeds-only' }),+ ]);+ expect(index.getForwardLinks('notes/embeds-only')).toEqual(['notes/board.excalidraw']);+ });++ test('a Mirror-only document becomes a backlink source for the mirrored doc', () => {+ const index = new BacklinkIndex({ projectDir: '/tmp/x', contentDir: '/tmp/x' });+ index.updateDocumentFromMarkdown('mirror-only', '<Mirror src="api-spec" anchor="dep" />\n');+ expect(index.getBacklinks('api-spec')).toEqual([+ expect.objectContaining({ source: 'mirror-only' }),+ ]);+ });++ test('dead-links: an existing board is exempt, a missing board reports, no oracle stays silent', () => {+ const files = new Set<string>();+ const makeIndex = (withOracle: boolean) => {+ const index = new BacklinkIndex({+ projectDir: '/tmp/x',+ contentDir: '/tmp/x',+ ...(withOracle ? { getFileOracle: () => ({ hasFile: (p: string) => files.has(p) }) } : {}),+ });+ index.updateDocumentFromMarkdown(+ 'notes/embeds-only',+ '<Excalidraw src="board.excalidraw" />\n',+ );+ return index;+ };++ files.add('notes/board.excalidraw');+ expect(makeIndex(true).getDeadLinks(['notes/embeds-only'])).toEqual([]);++ files.clear();+ expect(makeIndex(true).getDeadLinks(['notes/embeds-only'])).toEqual([+ expect.objectContaining({ target: 'notes/board.excalidraw' }),+ ]);++ // Oracle unavailable (file inventory not seeded) — silent, never a false+ // dead-link report for a board the inventory simply hasn't seen yet.+ expect(makeIndex(false).getDeadLinks(['notes/embeds-only'])).toEqual([]);+ });++ test('dead-links: a Mirror src naming a missing doc still reports', () => {+ const index = new BacklinkIndex({ projectDir: '/tmp/x', contentDir: '/tmp/x' });+ index.updateDocumentFromMarkdown('mirror-only', '<Mirror src="ghost-doc" anchor="x" />\n');+ expect(index.getDeadLinks(['mirror-only'])).toEqual([+ expect.objectContaining({ target: 'ghost-doc' }),+ ]);+ index.updateDocumentFromMarkdown('ghost-doc', '# Now it exists\n');+ expect(index.getDeadLinks(['mirror-only', 'ghost-doc'])).toEqual([]);+ });+});++describe('computeBrokenOutboundLinks — JSX src refs', () => {+ const fileOracle = (existing: string[]) => {+ const set = new Set(existing);+ return (p: string) => set.has(p);+ };++ test('a missing board reports no-such-file; an existing board is clean', () => {+ const md = '<Excalidraw src="board.excalidraw" />\n';+ expect(computeBrokenOutboundLinks(md, 'notes/index', new Set(), fileOracle([]))).toEqual([+ {+ href: 'board.excalidraw',+ resolvedTo: 'notes/board.excalidraw',+ reason: 'no-such-file',+ sourceForm: 'jsx',+ },+ ]);+ expect(+ computeBrokenOutboundLinks(+ md,+ 'notes/index',+ new Set(),+ fileOracle(['notes/board.excalidraw']),+ ),+ ).toEqual([]);+ });++ test('a Mirror src naming a missing doc reports no-such-doc', () => {+ const md = '<Mirror src="ghost-doc" anchor="x" />\n';+ expect(computeBrokenOutboundLinks(md, 'index', new Set(['api-spec']))).toEqual([+ { href: 'ghost-doc', resolvedTo: 'ghost-doc', reason: 'no-such-doc', sourceForm: 'jsx' },+ ]);+ expect(+ computeBrokenOutboundLinks(+ md.replace('ghost-doc', 'api-spec'),+ 'index',+ new Set(['api-spec']),+ ),+ ).toEqual([]);+ });++ test('contentDir-escaping and scheme-valued srcs report unresolvable; empty stays silent', () => {+ // A scheme-valued src records no graph edge (a rename can never track+ // it), so silence here would leave the reference to go stale with zero+ // signal — it must surface as an advisory instead.+ const md = [+ '<Excalidraw src="../../escape.excalidraw" />',+ '<Excalidraw src="https://example.com/b.excalidraw" />',+ '<Mirror src="mailto:[email protected]" anchor="x" />',+ '<Excalidraw src="" />',+ '',+ ].join('\n');+ expect(computeBrokenOutboundLinks(md, 'notes/index', new Set(), fileOracle([]))).toEqual([+ {+ href: '../../escape.excalidraw',+ resolvedTo: null,+ reason: 'unresolvable',+ sourceForm: 'jsx',+ },+ {+ href: 'https://example.com/b.excalidraw',+ resolvedTo: null,+ reason: 'unresolvable',+ sourceForm: 'jsx',+ },+ {+ href: 'mailto:[email protected]',+ resolvedTo: null,+ reason: 'unresolvable',+ sourceForm: 'jsx',+ },+ ]);+ });++ test('without a file oracle, board existence is unknowable and stays silent', () => {+ expect(+ computeBrokenOutboundLinks(+ '<Excalidraw src="board.excalidraw" />\n',+ 'notes/index',+ new Set(),+ ),+ ).toEqual([]);+ });++ test('JSX refs inside fences and inline code are not validated', () => {+ const md = [+ '```mdx',+ '<Excalidraw src="fenced.excalidraw" />',+ '```',+ 'Use `<Mirror src="ghost" anchor="x" />` like this.',+ '',+ ].join('\n');+ expect(computeBrokenOutboundLinks(md, 'notes/index', new Set(), fileOracle([]))).toEqual([]);+ });+});diff --git a/packages/server/src/backlink-index.ts b/packages/server/src/backlink-index.tsindex 582ba551a..525c6f41c 100644--- a/packages/server/src/backlink-index.ts+++ b/packages/server/src/backlink-index.ts@@ -9,7 +9,10 @@ import {classifyWikiLinkTarget,extractSkillRefs,getWikiLinkText,+ isExcalidrawDocFile,+ isExternalHref,isOrphanMode,+ type JsxSrcRefTagSpec,MANAGED_ARTIFACT_PREFIX_SKILL,ORPHAN_MODES,type OrphanMode,@@ -30,6 +33,11 @@ import { getLocalDir } from './config/paths.ts';import type { ContentFilter } from './content-filter.ts';import { isSupportedDocFile, stripDocExtension } from './doc-extensions.ts';import { instrumentIndexRebuild } from './index-telemetry.ts';+import {+ createJsxSrcAttrRe,+ readJsxSrcRefTagAt,+ resolveJsxSrcRefTarget,+} from './jsx-src-ref-tags.ts';import { readMarkdownLinkAt, readWikiLinkAt } from './link-syntax.ts';import { extractLocalTargetOccurrences } from './local-target-occurrences.ts';import { getLogger } from './logger.ts';@@ -99,7 +107,7 @@ export interface ExtractedWikiLink {anchor: string | null;snippet: string | null;/** Authored syntax that produced this graph edge. */- sourceForm?: 'wiki' | 'markdown';+ sourceForm?: 'wiki' | 'markdown' | 'jsx';/*** 0-based source line of the occurrence (the extractor's `lineOffset` param* folds a stripped-frontmatter prefix back in, keeping this full-doc exact).@@ -109,6 +117,8 @@ export interface ExtractedWikiLink {* 0-based offset into the markdown-stripped flat rendering of the line —* approximate against the raw source column (escapes, inline-code backticks,* and leading list/heading prefixes are collapsed before offsets are taken).+ * Exception: `sourceForm: 'jsx'` occurrences report the RAW source column —+ * the JSX extractor walks the raw line without building a flat rendering.*/column?: number;/**@@ -141,7 +151,7 @@ export interface BacklinkEntry {anchor: string | null;snippet: string | null;/** Authored syntax retained for cross-plane audit reconciliation. */- sourceForm?: 'wiki' | 'markdown';+ sourceForm?: 'wiki' | 'markdown' | 'jsx';/*** 0-based full-doc position of the link occurrence in the source doc (line* exact, column approximate — see `ExtractedWikiLink`). Absent on entries@@ -199,7 +209,7 @@ export { isOrphanMode, ORPHAN_MODES, type OrphanMode };interface BackwardLinkMeta {anchor: string | null;snippet: string | null;- sourceForm?: 'wiki' | 'markdown';+ sourceForm?: 'wiki' | 'markdown' | 'jsx';line?: number;column?: number;/** See {@link ExtractedWikiLink.rawWikiTarget}. */@@ -248,8 +258,14 @@ interface BranchGraphState {* a project skill authors is missing until that file happens to be edited.* Global bundles hid the bug — `ingestGlobalSkillBundles` re-reads them on* every boot, so their refs looked fine while project skills had none.+ *+ * Bump on a CHANGED extraction rule too. v3 covers JSX src-ref edges+ * (`<Mirror src>` / `<Excalidraw src>`): a v2 cache holds no such edge, and+ * the mtime reconcile skips every unchanged file, so a doc whose only+ * reference to a board is a JSX embed would stay invisible to backlinks —+ * and to rename discovery — until it happened to be edited.*/-const SNAPSHOT_VERSION = 2;+const SNAPSHOT_VERSION = 3;interface SerializedBranchGraphState {version?: number;@@ -760,6 +776,88 @@ function extractExternalMarkdownLinksFromLine(return { text: flatText, occurrences };}+/**+ * JSX by-reference src occurrences (`<Mirror src>` / `<Excalidraw src>`,+ * per `JSX_SRC_REF_TAGS`) as document graph edges.+ *+ * Without this, a document whose ONLY reference to a board or mirror source+ * is the JSX embed has no backlink — so managed rename (which discovers+ * rewrite candidates via `getBacklinks`) never rewrites it, and the graph,+ * orphan, and dead-link surfaces all under-report the reference.+ *+ * Same fence / inline-code masking as the sibling extractors, and the same+ * resolution rule as the rename rewriter (`resolveJsxSrcRefTarget`, pinned to+ * the renderer's normalization), so the edges the graph records are exactly+ * the references the rewriter can rewrite.+ *+ * Scheme-valued src values (`isExternalHref`) record no edge — a deliberate+ * divergence from the renderer, which hands a bare `<Mirror src>` to the+ * live-doc provider without scheme-filtering: a rename can never track such+ * a reference, so instead of a graph edge it surfaces as an advisory in+ * `computeBrokenOutboundLinks`.+ */+export function extractJsxSrcRefsFromMarkdown(+ markdown: string,+ sourceDocName: string,+ lineOffset = 0,+): ExtractedWikiLink[] {+ const source = markdown.replaceAll('\r\n', '\n').replaceAll('\r', '\n');+ const lines = source.split('\n');+ const links: ExtractedWikiLink[] = [];+ let fence: FenceState | null = null;++ for (let lineIndex = 0; lineIndex < lines.length; lineIndex++) {+ const line = lines[lineIndex] ?? '';+ if (fence) {+ if (isFenceClose(line, fence)) fence = null;+ continue;+ }+ const nextFence = matchFence(line);+ if (nextFence) {+ fence = nextFence;+ continue;+ }+ let idx = 0;+ while (idx < line.length) {+ if (line[idx] === '\\' && idx + 1 < line.length) {+ idx += 2;+ continue;+ }+ if (line[idx] === '`') {+ const inlineCode = readInlineCode(line, idx);+ if (inlineCode) {+ idx = inlineCode.nextIndex;+ continue;+ }+ }+ if (line[idx] === '<') {+ const tag = readJsxSrcRefTagAt(line, idx);+ if (tag) {+ for (const attrMatch of tag.attrs.matchAll(createJsxSrcAttrRe(tag.spec.attrName))) {+ const value = attrMatch[3] ?? '';+ if (isExternalHref(value)) continue;+ const target = resolveJsxSrcRefTarget(tag.spec, value, sourceDocName);+ if (target === null) continue;+ links.push({+ target,+ anchor: null,+ // The tag itself is the occurrence's visible evidence — there+ // is no label text to build a prose snippet from.+ snippet: line.slice(idx, idx + tag.matchLength),+ line: lineOffset + lineIndex,+ column: idx,+ });+ }+ idx += tag.matchLength;+ continue;+ }+ }+ idx++;+ }+ }+ return links;+}+/*** Number of source lines a `stripFrontmatter` frontmatter block occupied —* the line offset that maps body-relative extractor lines back to full-doc@@ -991,6 +1089,13 @@ export interface BrokenOutboundLink {href: string;resolvedTo: string | null;reason: BrokenLinkReason;+ /**+ * Present on entries found via a JSX src-ref (`<Mirror src>` /+ * `<Excalidraw src>`). The write-advisory layer keeps these through its+ * inline-href reconciliation filter — the lossless markdown extractor+ * cannot observe JSX attributes, so they'd otherwise be dropped.+ */+ sourceForm?: 'jsx';}/**@@ -1064,10 +1169,27 @@ export function computeBrokenOutboundLinks(const seen = new Set<string>();let fence: FenceState | null = null;- const record = (href: string, resolvedTo: string | null, reason: BrokenLinkReason): void => {- if (seen.has(href)) return;- seen.add(href);- broken.push({ href, resolvedTo, reason });+ const record = (+ href: string,+ resolvedTo: string | null,+ reason: BrokenLinkReason,+ sourceForm?: 'jsx',+ ): void => {+ // Deduped per (plane, href), not per href: the markdown and JSX planes+ // resolve the identical bytes through different resolvers (`[x](api-spec)`+ // is doc-relative; `<Mirror src="api-spec">` is the docName verbatim), so+ // each occurrence must surface with its OWN resolver's `resolvedTo` and+ // `reason` — collapsing them would label one plane's entry with the+ // other's verdict.+ const key = `${sourceForm ?? 'md'}\0${href}`;+ if (seen.has(key)) return;+ seen.add(key);+ broken.push({+ href,+ resolvedTo,+ reason,+ ...(sourceForm ? { sourceForm } : {}),+ });};const recordMarkdownLink = (rawHref: string): void => {@@ -1111,6 +1233,39 @@ export function computeBrokenOutboundLinks(// External URLs aren't a local link target — not our concern.};+ // JSX src-refs (`<Mirror src>` / `<Excalidraw src>`) are document+ // references too — the same class the backlink graph indexes — so a write+ // whose embed points at a missing board or mirror source reports it here,+ // in the same advisory the graph-shaped links use. Resolution is the+ // renderer's own (`resolveJsxSrcRefTarget`); an `.excalidraw` target is a+ // doc class with no CRDT admission entry, so like ordinary file links it is+ // validated against disk via `fileExists` (skipped when no oracle).+ const recordJsxSrcRef = (spec: JsxSrcRefTagSpec, value: string): void => {+ if (value === '') return; // unconfigured placeholder state, not a broken link+ // Scheme-valued src: the renderer does not scheme-filter a bare+ // `<Mirror src>` (it hands the value to the live-doc provider verbatim),+ // but the graph records no edge for it — a rename can never track it —+ // so the reference would go stale with zero signal. Keep the signal loud:+ // report it here as unresolvable rather than returning silently.+ if (isExternalHref(value)) {+ record(value, null, 'unresolvable', 'jsx');+ return;+ }+ const resolved = resolveJsxSrcRefTarget(spec, value, sourceDocName);+ if (resolved === null) {+ record(value, null, 'unresolvable', 'jsx');+ return;+ }+ if (isExcalidrawDocFile(resolved)) {+ if (!fileExists) return;+ if (!fileExists(resolved)) record(value, resolved, 'no-such-file', 'jsx');+ return;+ }+ if (!admitted.has(resolved) && folderExists?.(resolved) !== true) {+ record(value, resolved, 'no-such-doc', 'jsx');+ }+ };+// Built on first read, not per call: the two maps cost a pass over the// admitted corpus each, and a body with no wiki links — or whose wiki links// all name their target exactly — never needs them, because@@ -1178,6 +1333,16 @@ export function computeBrokenOutboundLinks(continue;}}+ if (line[idx] === '<') {+ const tag = readJsxSrcRefTagAt(line, idx);+ if (tag) {+ for (const attrMatch of tag.attrs.matchAll(createJsxSrcAttrRe(tag.spec.attrName))) {+ recordJsxSrcRef(tag.spec, attrMatch[3] ?? '');+ }+ idx += tag.matchLength;+ continue;+ }+ }// Wiki form first, so `[[…]]` (and `![[…]]` doc-embeds) aren't re-read as// a markdown link — mirrors the indexer's extraction order.if (line[idx] === '[' && line[idx + 1] === '[') {@@ -1300,7 +1465,9 @@ function deserializeState(data: SerializedBranchGraphState): BranchGraphState {anchor: entry.anchor ?? null,snippet: entry.snippet ?? null,sourceForm:- entry.sourceForm === 'wiki' || entry.sourceForm === 'markdown'+ entry.sourceForm === 'wiki' ||+ entry.sourceForm === 'markdown' ||+ entry.sourceForm === 'jsx'? entry.sourceForm: undefined,// Cache files predating position indexing lack these fields, and@@ -1669,11 +1836,20 @@ export class BacklinkIndex {lineOffset,this.getFileOracle(),).map((link) => ({ ...link, sourceForm: 'markdown' as const }));+ const jsxLinks = extractJsxSrcRefsFromMarkdown(body, docName, lineOffset).map((link) => ({+ ...link,+ sourceForm: 'jsx' as const,+ }));const wikiExternalLinks = extractExternalWikiLinksFromMarkdown(body);const mdExternalLinks = extractExternalMarkdownLinksFromMarkdown(body, docName);// Merge: wiki links take precedence for duplicate targets (they have richer snippet context)const seen = new Set(wikiLinks.map((l) => l.target));- const merged = [...wikiLinks, ...mdLinks.filter((l) => !seen.has(l.target))];+ const merged: ExtractedWikiLink[] = [+ ...wikiLinks,+ ...mdLinks.filter((l) => !seen.has(l.target)),+ ];+ for (const link of merged) seen.add(link.target);+ merged.push(...jsxLinks.filter((l) => !seen.has(l.target)));const externalSeen = new Set(wikiExternalLinks.map((l) => l.url));const mergedExternal = [...wikiExternalLinks,@@ -1918,6 +2094,19 @@ export class BacklinkIndex {// asset would fill with dead links. A target left with no decided// occurrence drops out below..filter(([, meta]) => meta.rawWikiTarget !== true)+ // A JSX src-ref to an `.excalidraw` board names a doc class the+ // graph never indexes (`walkForPaths` admits `.md`/`.mdx` only) and+ // the admitted set never carries, so the doc-existence test above+ // can't clear it. The board IS an on-disk file the watcher+ // inventory tracks, so ask the file oracle instead: an existing+ // board is not dead, a missing one is, and an unavailable oracle+ // (inventory not seeded) stays silent — the safe default, matching+ // the undecided-wiki-target rule above.+ .filter(([, meta]) => {+ if (meta.sourceForm !== 'jsx' || !isExcalidrawDocFile(target)) return true;+ const oracle = this.getFileOracle();+ return oracle !== undefined && !oracle.hasFile(target);+ })// The existence test above compares literal names, but a wiki target// reaches its document through the whole chain — slug, folder index,// basename. Without this, `[[analysis]]` naming `research/analysis`@@ -2284,10 +2473,19 @@ export class BacklinkIndex {lineOffset,this.getFileOracle(),).map((link) => ({ ...link, sourceForm: 'markdown' as const }));+ const jsxLinks = extractJsxSrcRefsFromMarkdown(body, docName, lineOffset).map((link) => ({+ ...link,+ sourceForm: 'jsx' as const,+ }));const wikiExternalLinks = extractExternalWikiLinksFromMarkdown(body);const mdExternalLinks = extractExternalMarkdownLinksFromMarkdown(body, docName);const seen = new Set(wikiLinks.map((l) => l.target));- const links = [...wikiLinks, ...mdLinks.filter((l) => !seen.has(l.target))];+ const links: ExtractedWikiLink[] = [+ ...wikiLinks,+ ...mdLinks.filter((l) => !seen.has(l.target)),+ ];+ for (const link of links) seen.add(link.target);+ links.push(...jsxLinks.filter((l) => !seen.has(l.target)));const externalSeen = new Set(wikiExternalLinks.map((l) => l.url));const externalLinks = [...wikiExternalLinks,diff --git a/packages/server/src/jsx-src-ref-tags.test.ts b/packages/server/src/jsx-src-ref-tags.test.tsnew file mode 100644index 000000000..e70b43fcc--- /dev/null+++ b/packages/server/src/jsx-src-ref-tags.test.ts@@ -0,0 +1,93 @@+import { JSX_SRC_REF_TAGS, normalizeDocRelativeAssetUrl } from '@inkeep/open-knowledge-core';+import { describe, expect, test } from 'vitest';+import {+ createJsxSrcAttrRe,+ readJsxSrcRefTagAt,+ resolveJsxSrcRefTarget,+} from './jsx-src-ref-tags.ts';++describe('readJsxSrcRefTagAt', () => {+ test('matches a registry tag whose first > is its own self-close', () => {+ const line = '<Mirror src="api-spec" anchor="x" />';+ const match = readJsxSrcRefTagAt(line, 0);+ expect(match?.spec.tagName).toBe('Mirror');+ expect(match?.matchLength).toBe(line.length);+ });++ test('rejects when the first > at-or-after idx is not a self-close', () => {+ // The probe must reject on the unmatched distant `>` without letting the+ // attribute window consume-and-backtrack across the line.+ expect(readJsxSrcRefTagAt('<Mirror src="a" > <Mirror src="b" />', 0)).toBeNull();+ expect(readJsxSrcRefTagAt('<Mirror src="a"', 0)).toBeNull();+ });+});++describe('createJsxSrcAttrRe', () => {+ test('attribute matcher requires whitespace before the attribute name', () => {+ const re = createJsxSrcAttrRe('src');+ expect(' src="a"'.match(re)).toEqual(['src="a"']);+ expect(' data-src="a"'.match(re)).toBeNull();+ });+});++describe('resolveJsxSrcRefTarget', () => {+ const mirror = JSX_SRC_REF_TAGS.find((tag) => tag.tagName === 'Mirror');+ const excalidraw = JSX_SRC_REF_TAGS.find((tag) => tag.tagName === 'Excalidraw');+ if (!mirror || !excalidraw) throw new Error('registry entries missing');++ test('bare-doc-name values resolve verbatim, without path arithmetic', () => {+ expect(resolveJsxSrcRefTarget(mirror, 'api-spec', 'notes/index')).toBe('api-spec');+ expect(resolveJsxSrcRefTarget(mirror, '', 'notes/index')).toBeNull();+ });++ test('bare-doc-name values are not scheme-filtered — renderer parity', () => {+ // The renderer hands a <Mirror src> straight to the live-doc provider+ // without scheme-testing it, so the resolver must not reject a+ // colon-bearing docName here. Callers that cannot track such a reference+ // (graph extractor, broken-link advisory) gate on isExternalHref+ // themselves.+ expect(resolveJsxSrcRefTarget(mirror, 'https://example.com/x', 'notes/index')).toBe(+ 'https://example.com/x',+ );+ expect(resolveJsxSrcRefTarget(mirror, 'meeting:standup', 'notes/index')).toBe(+ 'meeting:standup',+ );+ });++ test('doc-relative external-scheme values resolve to null', () => {+ for (const value of ['https://example.com/x', 'mailto:[email protected]']) {+ expect(resolveJsxSrcRefTarget(excalidraw, value, 'notes/index')).toBeNull();+ }+ // A plain scheme-free path still resolves under both kinds.+ expect(resolveJsxSrcRefTarget(mirror, 'notes/board.excalidraw', 'notes/index')).toBe(+ 'notes/board.excalidraw',+ );+ expect(resolveJsxSrcRefTarget(excalidraw, '/notes/board.excalidraw', 'notes/index')).toBe(+ 'notes/board.excalidraw',+ );+ });++ test('doc-relative values resolve the way the renderer resolves them', () => {+ // Pinned to normalizeDocRelativeAssetUrl — the function the app's+ // render-prop normalization applies before the component sees `src`.+ for (const [value, sourceDocName] of [+ ['board.excalidraw', 'notes/index'],+ ['./board.excalidraw', 'notes/index'],+ ['../diagrams/board.excalidraw', 'notes/index'],+ ['/diagrams/board.excalidraw', 'notes/index'],+ ] as const) {+ expect(resolveJsxSrcRefTarget(excalidraw, value, sourceDocName)).toBe(+ normalizeDocRelativeAssetUrl(value, sourceDocName).slice(1),+ );+ }+ });++ test('unresolvable doc-relative values return null', () => {+ expect(resolveJsxSrcRefTarget(excalidraw, '', 'notes/index')).toBeNull();+ expect(+ resolveJsxSrcRefTarget(excalidraw, 'https://example.com/b.excalidraw', 'notes/index'),+ ).toBeNull();+ expect(resolveJsxSrcRefTarget(excalidraw, '../../escape.excalidraw', 'notes/index')).toBeNull();+ expect(resolveJsxSrcRefTarget(excalidraw, '/', 'notes/index')).toBeNull();+ });+});diff --git a/packages/server/src/jsx-src-ref-tags.ts b/packages/server/src/jsx-src-ref-tags.tsnew file mode 100644index 000000000..6437257e1--- /dev/null+++ b/packages/server/src/jsx-src-ref-tags.ts@@ -0,0 +1,114 @@+/**+ * Syntax helpers over the by-reference JSX component registry+ * (`JSX_SRC_REF_TAGS` in core, beside the component descriptors it is+ * guarded against).+ *+ * Shared by the rename rewriter (`managed-rename-rewrite.ts`) and the+ * backlink extractor (`backlink-index.ts`): both must agree on how a+ * registry tag is matched in source and how a `src` value resolves to a+ * docName, or a reference the graph discovers is one the rewriter cannot+ * rewrite (and vice versa).+ */++import {+ isExternalHref,+ JSX_SRC_REF_TAGS,+ type JsxSrcRefTagSpec,+ normalizeDocRelativeAssetUrl,+} from '@inkeep/open-knowledge-core';++// Single-line JSX matcher over the registry tags: a self-closing tag whose+// attributes are captured for the per-attribute pass. Every registry+// canonical is jsx-void / self-closing per its descriptor, so paired+// open/close forms don't need handling. Sticky (`y`): `readJsxSrcRefTagAt`+// owns this instance and re-anchors `lastIndex` on every call, and every+// caller consumes its match synchronously, so the shared mutable `lastIndex`+// is safe — the same discipline as `WIKI_AT_RE` in link-syntax.ts.+const JSX_SRC_REF_TAG_AT_RE = new RegExp(+ `<(${JSX_SRC_REF_TAGS.map((tag) => tag.tagName).join('|')})\\b([^>]*)\\/>`,+ 'y',+);++export interface JsxSrcRefTagMatch {+ readonly spec: JsxSrcRefTagSpec;+ /** The tag's attribute region, exactly as authored (between the tag name and `/>`). */+ readonly attrs: string;+ /** Source length of the whole `<Tag …/>` match, for advancing a scan past it. */+ readonly matchLength: number;+}++/**+ * Match a registry src-ref tag starting exactly at `idx` (the `<`), or null.+ * Mirrors `readWikiLinkAt` / `readMarkdownLinkAt` in link-syntax.ts: one+ * hoisted sticky regex anchored via `lastIndex`, no per-candidate slice+ * allocation, and no regex work at all for a `<` that cannot open a tag.+ * A rejected candidate still costs a native scan to the next `>`, so a+ * whole-line walk is not linear — it is quadratic with a memchr constant+ * rather than a regex-engine one. Callers scanning untrusted single lines+ * should bound line length rather than rely on this being cheap.+ */+export function readJsxSrcRefTagAt(line: string, idx: number): JsxSrcRefTagMatch | null {+ // A self-closing tag's first `>` at or after `idx` must be its own,+ // immediately preceded by `/` — `[^>]*` cannot span a `>`. Testing that,+ // rather than merely "a `>` exists somewhere", keeps the attribute window+ // from consuming (then backtracking across) the remainder of a line whose+ // only `>` is distant and unmatched. With the probe satisfied, the regex's+ // backtracking is bounded by that first `>`.+ const close = line.indexOf('>', idx);+ if (close === -1 || line[close - 1] !== '/') return null;+ JSX_SRC_REF_TAG_AT_RE.lastIndex = idx;+ const match = JSX_SRC_REF_TAG_AT_RE.exec(line);+ if (!match) return null;+ const spec = JSX_SRC_REF_TAGS.find((tag) => tag.tagName === match[1]);+ if (!spec) return null;+ return { spec, attrs: match[2] ?? '', matchLength: match[0].length };+}++/**+ * Attribute matcher for a registry entry's ref-carrying attribute. Anchored on+ * a preceding whitespace character (not `\b`): a word boundary also matches+ * the `-`→`s` transition inside `data-src=`, which would read a+ * coincidentally-suffixed attribute as the tag's real `src`. Same anchoring+ * choice as `HTML_ASSET_ATTR_RE` in `managed-rename-rewrite.ts`.+ */+export function createJsxSrcAttrRe(attrName: string): RegExp {+ return new RegExp(`(?<=\\s)(${attrName}=)(["'])([^"']*)\\2`, 'g');+}++/**+ * Resolve a src-ref attribute value to the docName it addresses at render+ * time, or null when it addresses none (empty value, and for doc-relative+ * entries an external scheme or contentDir escape).+ *+ * `'bare-doc-name'` values return verbatim, scheme-looking ones included —+ * deliberate parity with the renderer, which hands a `<Mirror src>` straight+ * to the live-doc provider without scheme-filtering. A scheme-valued bare+ * name is a reference the rename machinery can never track, so the graph+ * extractor and the broken-link advisory apply their own `isExternalHref`+ * gate before calling this (skip the edge; surface an advisory).+ *+ * For `'doc-relative'` entries this is pinned to the renderer's own+ * resolution (`normalizeDocRelativeAssetUrl`, the function the app's+ * render-prop normalization calls before the component ever sees `src`), so+ * the rewriter and the graph cannot diverge from what the embed loads.+ */+export function resolveJsxSrcRefTarget(+ spec: JsxSrcRefTagSpec,+ value: string,+ sourceDocName: string,+): string | null {+ if (value === '') return null;+ if (spec.resolution === 'bare-doc-name') return value;+ // Scheme-qualified values (`https:`, `mailto:`) address no document under+ // doc-relative resolution. A fast path, not a verdict change: the+ // renderer's normalizer below returns them un-anchored and they'd resolve+ // to null anyway.+ if (isExternalHref(value)) return null;+ const normalized = normalizeDocRelativeAssetUrl(value, sourceDocName);+ // The renderer's normalizer returns unresolvable input unchanged (external+ // scheme, contentDir escape, missing source doc) — only a `/`-anchored+ // result addresses a document.+ if (!normalized.startsWith('/')) return null;+ const docName = normalized.slice(1);+ return docName === '' ? null : docName;+}diff --git a/packages/server/src/managed-rename-rewrite.test.ts b/packages/server/src/managed-rename-rewrite.test.tsindex 9a70d135d..e3a35b295 100644--- a/packages/server/src/managed-rename-rewrite.test.ts+++ b/packages/server/src/managed-rename-rewrite.test.ts@@ -2,8 +2,8 @@ import { resolveAssetProjectPath, resolveInternalHref } from '@inkeep/open-knowlimport { describe, expect, test } from 'vitest';import {rewriteAssetReferencesForRename,+ rewriteJsxSrcRefsForDocumentRename,rewriteMarkdownLinksForDocumentRename,- rewriteMirrorSrcForDocumentRename,rewriteOutboundMarkdownLinksForSourceMove,rewriteWikiLinksForDocumentRename,} from './managed-rename-rewrite.ts';@@ -359,11 +359,12 @@ describe('rewriteMarkdownLinksForDocumentRename — image refs (FR-7)', () => {});});-describe('rewriteMirrorSrcForDocumentRename', () => {+describe('rewriteJsxSrcRefsForDocumentRename', () => {test('rewrites Mirror src when value matches the rename source', () => {expect(- rewriteMirrorSrcForDocumentRename(+ rewriteJsxSrcRefsForDocumentRename('Before <Mirror src="api-spec" anchor="deprecation" /> after.\n',+ 'index','api-spec','api-reference',),@@ -375,8 +376,9 @@ describe('rewriteMirrorSrcForDocumentRename', () => {test('leaves Mirror src that points at a different doc untouched', () => {expect(- rewriteMirrorSrcForDocumentRename(+ rewriteJsxSrcRefsForDocumentRename('<Mirror src="other-doc" anchor="foo" />\n',+ 'index','api-spec','api-reference',),@@ -388,8 +390,9 @@ describe('rewriteMirrorSrcForDocumentRename', () => {test('supports single-quoted attribute values', () => {expect(- rewriteMirrorSrcForDocumentRename(+ rewriteJsxSrcRefsForDocumentRename("<Mirror src='api-spec' anchor='deprecation' />\n",+ 'index','api-spec','api-reference',),@@ -401,8 +404,9 @@ describe('rewriteMirrorSrcForDocumentRename', () => {test('handles multiple Mirrors on the same line', () => {expect(- rewriteMirrorSrcForDocumentRename(+ rewriteJsxSrcRefsForDocumentRename('<Mirror src="api-spec" anchor="a" /> and <Mirror src="api-spec" anchor="b" />\n',+ 'index','api-spec','api-reference',),@@ -415,7 +419,7 @@ describe('rewriteMirrorSrcForDocumentRename', () => {test('ignores Mirror tags inside fenced code blocks', () => {const md = ['```mdx', '<Mirror src="api-spec" anchor="x" />', '```', ''].join('\n');- expect(rewriteMirrorSrcForDocumentRename(md, 'api-spec', 'api-reference')).toEqual({+ expect(rewriteJsxSrcRefsForDocumentRename(md, 'index', 'api-spec', 'api-reference')).toEqual({markdown: md,rewrites: 0,});@@ -423,7 +427,12 @@ describe('rewriteMirrorSrcForDocumentRename', () => {test('preserves prop order (anchor stays after src)', () => {expect(- rewriteMirrorSrcForDocumentRename('<Mirror anchor="x" src="old" />\n', 'old', 'new'),+ rewriteJsxSrcRefsForDocumentRename(+ '<Mirror anchor="x" src="old" />\n',+ 'index',+ 'old',+ 'new',+ ),).toEqual({markdown: '<Mirror anchor="x" src="new" />\n',rewrites: 1,@@ -431,7 +440,9 @@ describe('rewriteMirrorSrcForDocumentRename', () => {});test('returns rewrites=0 for docs with no Mirror tags', () => {- expect(rewriteMirrorSrcForDocumentRename('Just prose, no JSX here.\n', 'old', 'new')).toEqual({+ expect(+ rewriteJsxSrcRefsForDocumentRename('Just prose, no JSX here.\n', 'index', 'old', 'new'),+ ).toEqual({markdown: 'Just prose, no JSX here.\n',rewrites: 0,});@@ -443,10 +454,12 @@ describe('rewriteMirrorSrcForDocumentRename', () => {// Mirrors `rewriteWikiLinksInLine`'s `readInlineCode` skip behavior.const input ='To embed the deprecation block, write `<Mirror src="api-spec" anchor="dep" />`.\n';- expect(rewriteMirrorSrcForDocumentRename(input, 'api-spec', 'api-reference')).toEqual({- markdown: input,- rewrites: 0,- });+ expect(rewriteJsxSrcRefsForDocumentRename(input, 'index', 'api-spec', 'api-reference')).toEqual(+ {+ markdown: input,+ rewrites: 0,+ },+ );});test('ignores Mirror tags inside tilde fences', () => {@@ -454,7 +467,7 @@ describe('rewriteMirrorSrcForDocumentRename', () => {// use the same `matchFence` / `isFenceClose` machinery and must skip// identically. Symmetry guard.const markdown = ['~~~md', '<Mirror src="old" anchor="x" />', '~~~', ''].join('\n');- expect(rewriteMirrorSrcForDocumentRename(markdown, 'old', 'new')).toEqual({+ expect(rewriteJsxSrcRefsForDocumentRename(markdown, 'index', 'old', 'new')).toEqual({markdown,rewrites: 0,});@@ -467,11 +480,297 @@ describe('rewriteMirrorSrcForDocumentRename', () => {'See `<Mirror src="api-spec" anchor="x" />` in docs. Live: <Mirror src="api-spec" anchor="y" />\n';const out ='See `<Mirror src="api-spec" anchor="x" />` in docs. Live: <Mirror src="api-reference" anchor="y" />\n';- expect(rewriteMirrorSrcForDocumentRename(input, 'api-spec', 'api-reference')).toEqual({- markdown: out,+ expect(rewriteJsxSrcRefsForDocumentRename(input, 'index', 'api-spec', 'api-reference')).toEqual(+ {+ markdown: out,+ rewrites: 1,+ },+ );+ });++ test('rewrites Excalidraw src preserving the leading slash', () => {+ expect(+ rewriteJsxSrcRefsForDocumentRename(+ 'Board: <Excalidraw src="/old/board.excalidraw" />\n',+ 'index',+ 'old/board.excalidraw',+ 'new/board.excalidraw',+ ),+ ).toEqual({+ markdown: 'Board: <Excalidraw src="/new/board.excalidraw" />\n',+ rewrites: 1,+ });+ });++ test('rewrites a bare (no leading slash) Excalidraw src without adding one', () => {+ expect(+ rewriteJsxSrcRefsForDocumentRename(+ '<Excalidraw src="old/board.excalidraw" />\n',+ 'index',+ 'old/board.excalidraw',+ 'new/board.excalidraw',+ ),+ ).toEqual({+ markdown: '<Excalidraw src="new/board.excalidraw" />\n',+ rewrites: 1,+ });+ });++ test('leaves an Excalidraw src that points at a different board untouched', () => {+ expect(+ rewriteJsxSrcRefsForDocumentRename(+ '<Excalidraw src="/other/board.excalidraw" />\n',+ 'index',+ 'old/board.excalidraw',+ 'new/board.excalidraw',+ ),+ ).toEqual({+ markdown: '<Excalidraw src="/other/board.excalidraw" />\n',+ rewrites: 0,+ });+ });++ test('skips Excalidraw tags inside inline code spans', () => {+ const input = 'Write `<Excalidraw src="/old/board.excalidraw" />` to embed a board.\n';+ expect(+ rewriteJsxSrcRefsForDocumentRename(+ input,+ 'index',+ 'old/board.excalidraw',+ 'new/board.excalidraw',+ ),+ ).toEqual({+ markdown: input,+ rewrites: 0,+ });+ });++ test('ignores Excalidraw tags inside fenced code blocks', () => {+ const markdown = ['```mdx', '<Excalidraw src="/old/board.excalidraw" />', '```', ''].join('\n');+ expect(+ rewriteJsxSrcRefsForDocumentRename(+ markdown,+ 'index',+ 'old/board.excalidraw',+ 'new/board.excalidraw',+ ),+ ).toEqual({+ markdown,+ rewrites: 0,+ });+ });++ test('renaming a plain .md doc does not touch an Excalidraw src pointing elsewhere', () => {+ const markdown = 'See [[guides/setup]] and <Excalidraw src="/diagrams/arch.excalidraw" />\n';+ expect(+ rewriteJsxSrcRefsForDocumentRename(+ markdown,+ 'docs/overview',+ 'guides/setup',+ 'guides/install',+ ),+ ).toEqual({+ markdown,+ rewrites: 0,+ });+ });++ test('preserves title and other Excalidraw attrs byte-for-byte', () => {+ expect(+ rewriteJsxSrcRefsForDocumentRename(+ '<Excalidraw title="Architecture sketch" src=\'/old/board.excalidraw\' height="480" />\n',+ 'index',+ 'old/board.excalidraw',+ 'new/board.excalidraw',+ ),+ ).toEqual({+ markdown:+ '<Excalidraw title="Architecture sketch" src=\'/new/board.excalidraw\' height="480" />\n',rewrites: 1,});});++ test('rewrites Mirror and Excalidraw refs in one pass when both name the renamed doc', () => {+ // Degenerate on purpose: one docName referenced through both registry+ // tags proves the single pass covers every entry, not just the first.+ expect(+ rewriteJsxSrcRefsForDocumentRename(+ '<Mirror src="old" anchor="x" /> and <Excalidraw src="/old" />\n',+ 'index',+ 'old',+ 'new',+ ),+ ).toEqual({+ markdown: '<Mirror src="new" anchor="x" /> and <Excalidraw src="/new" />\n',+ rewrites: 2,+ });+ });++ test('matches a doc-relative Excalidraw src the way the renderer resolves it', () => {+ // `board.excalidraw` inside `notes/index` addresses docName+ // `notes/board.excalidraw` (normalizeDocRelativeAssetUrl) — the rename+ // must match on the resolved name, and write back doc-relative.+ expect(+ rewriteJsxSrcRefsForDocumentRename(+ '<Excalidraw src="board.excalidraw" />\n',+ 'notes/index',+ 'notes/board.excalidraw',+ 'notes/sketch.excalidraw',+ ),+ ).toEqual({+ markdown: '<Excalidraw src="sketch.excalidraw" />\n',+ rewrites: 1,+ });+ });++ test('a doc-relative src stays doc-relative when the board moves to a sibling folder', () => {+ expect(+ rewriteJsxSrcRefsForDocumentRename(+ '<Excalidraw src="board.excalidraw" />\n',+ 'notes/index',+ 'notes/board.excalidraw',+ 'archive/board.excalidraw',+ ),+ ).toEqual({+ markdown: '<Excalidraw src="../archive/board.excalidraw" />\n',+ rewrites: 1,+ });+ });++ test('a ./-prefixed doc-relative src keeps its prefix on a same-folder rename', () => {+ expect(+ rewriteJsxSrcRefsForDocumentRename(+ '<Excalidraw src="./board.excalidraw" />\n',+ 'notes/index',+ 'notes/board.excalidraw',+ 'notes/sketch.excalidraw',+ ),+ ).toEqual({+ markdown: '<Excalidraw src="./sketch.excalidraw" />\n',+ rewrites: 1,+ });+ });++ test('a doc-relative-looking src that resolves elsewhere does not match the rename', () => {+ // From `notes/index`, `diagrams/board.excalidraw` resolves to+ // `notes/diagrams/board.excalidraw` — NOT the renamed board. Rewriting it+ // would repoint a (broken or sibling) reference at a doc it never named.+ const markdown = '<Excalidraw src="diagrams/board.excalidraw" />\n';+ expect(+ rewriteJsxSrcRefsForDocumentRename(+ markdown,+ 'notes/index',+ 'diagrams/board.excalidraw',+ 'archive/board.excalidraw',+ ),+ ).toEqual({ markdown, rewrites: 0 });+ });++ test('root-relative spelling is preserved on a doc-relative-capable tag', () => {+ expect(+ rewriteJsxSrcRefsForDocumentRename(+ '<Excalidraw src="/notes/board.excalidraw" />\n',+ 'notes/index',+ 'notes/board.excalidraw',+ 'archive/board.excalidraw',+ ),+ ).toEqual({+ markdown: '<Excalidraw src="/archive/board.excalidraw" />\n',+ rewrites: 1,+ });+ });++ test('containing-doc move recomputes a doc-relative src for the new location', () => {+ // `notes/index` moves to `archive/index`; the board stays put. The+ // doc-relative src must be recomputed or the embed silently addresses+ // `archive/board.excalidraw` — a different board.+ expect(+ rewriteJsxSrcRefsForDocumentRename(+ '<Excalidraw src="board.excalidraw" />\n',+ 'notes/index',+ 'notes/index',+ 'archive/index',+ ),+ ).toEqual({+ markdown: '<Excalidraw src="../notes/board.excalidraw" />\n',+ rewrites: 1,+ });+ });++ test('containing-doc same-folder rename leaves a doc-relative src untouched', () => {+ const markdown = '<Excalidraw src="board.excalidraw" />\n';+ expect(+ rewriteJsxSrcRefsForDocumentRename(markdown, 'notes/index', 'notes/index', 'notes/overview'),+ ).toEqual({ markdown, rewrites: 0 });+ });++ test('containing-doc move leaves root-relative and bare-doc-name srcs untouched', () => {+ // Both spellings are location-independent — only doc-relative values need+ // recomputing when the containing doc moves.+ const markdown =+ '<Excalidraw src="/notes/board.excalidraw" /> and <Mirror src="api-spec" anchor="x" />\n';+ expect(+ rewriteJsxSrcRefsForDocumentRename(markdown, 'notes/index', 'notes/index', 'archive/index'),+ ).toEqual({ markdown, rewrites: 0 });+ });++ test('refuses a quote-bearing newDocName on the bare-doc-name branch', () => {+ // The next value is spliced between the original quote pair unescaped, so+ // a quote in it would terminate the attribute early and inject markup+ // into the containing document. The rewriter must refuse and leave the+ // line byte-identical; the stale src surfaces via the broken-links+ // advisory instead.+ const markdown = '<Mirror src="api-spec" anchor="x" />\n';+ expect(rewriteJsxSrcRefsForDocumentRename(markdown, 'index', 'api-spec', 'api"spec')).toEqual({+ markdown,+ rewrites: 0,+ });+ });++ test('refuses a >-bearing newDocName on the bare-doc-name branch', () => {+ // `notes > archive` is a name a person might actually type. Written back,+ // the `[^>]*` tag matcher could never re-match the tag — one-way+ // corruption no later rename could repair — so the rewrite must refuse.+ const markdown = '<Mirror src="api-spec" anchor="x" />\n';+ expect(+ rewriteJsxSrcRefsForDocumentRename(markdown, 'index', 'api-spec', 'notes > archive'),+ ).toEqual({ markdown, rewrites: 0 });+ });++ test('refuses a quote-bearing newDocName on the doc-relative branch', () => {+ const markdown = '<Excalidraw src="board.excalidraw" />\n';+ expect(+ rewriteJsxSrcRefsForDocumentRename(+ markdown,+ 'notes/index',+ 'notes/board.excalidraw',+ 'notes/bo"ard.excalidraw',+ ),+ ).toEqual({ markdown, rewrites: 0 });+ });++ test('refuses a >-bearing newDocName on the doc-relative branch', () => {+ const markdown = '<Excalidraw src="/notes/board.excalidraw" />\n';+ expect(+ rewriteJsxSrcRefsForDocumentRename(+ markdown,+ 'index',+ 'notes/board.excalidraw',+ 'notes > archive.excalidraw',+ ),+ ).toEqual({ markdown, rewrites: 0 });+ });++ test('data-src is not read as src (whitespace-anchored attribute matcher)', () => {+ // `\b` would match the `-`→`s` transition inside `data-src=`; the matcher+ // anchors on preceding whitespace like HTML_ASSET_ATTR_RE, so a+ // coincidentally-suffixed attribute is never rewritten.+ const markdown = '<Mirror data-src="old" anchor="x" src="other" />\n';+ expect(rewriteJsxSrcRefsForDocumentRename(markdown, 'index', 'old', 'new')).toEqual({+ markdown,+ rewrites: 0,+ });+ });});describe('rewriteAssetReferencesForRename', () => {diff --git a/packages/server/src/managed-rename-rewrite.ts b/packages/server/src/managed-rename-rewrite.tsindex 9ef46c5c3..6a579614a 100644--- a/packages/server/src/managed-rename-rewrite.ts+++ b/packages/server/src/managed-rename-rewrite.ts@@ -2,9 +2,16 @@ import { posix } from 'node:path';import {encodeHrefPath,encodeHrefPathSegment,+ isExternalHref,+ type JsxSrcRefTagSpec,resolveAssetProjectPath,resolveInternalHref,} from '@inkeep/open-knowledge-core';+import {+ createJsxSrcAttrRe,+ readJsxSrcRefTagAt,+ resolveJsxSrcRefTarget,+} from './jsx-src-ref-tags.ts';import { readMarkdownLinkAt, readWikiLinkAt } from './link-syntax.ts';interface FenceState {@@ -229,7 +236,7 @@ function recomputeRelativeImageHref(// Absolute / external — leave unchanged.if (pathPart.startsWith('/') || pathPart.startsWith('//')) return null;- if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(pathPart)) return null;+ if (isExternalHref(pathPart)) return null;const oldDir = posix.dirname(oldSourceDocName);const newDir = posix.dirname(newSourceDocName);@@ -620,25 +627,105 @@ function rewriteAssetReferencesInLine(return { markdown: rewritten, rewrites };}-// Single-line `<Mirror>` JSX scanner. Matches a self-closing tag and-// rewrites the `src=` attribute when its value equals `oldDocName`. The-// `<Mirror>` canonical is jsx-void / self-closing per its descriptor, so-// we don't need to handle paired open/close. Multi-line tag content-// (`<Mirror\n src="…"\n anchor="…"\n/>`) is intentionally NOT rewritten-// here — a rare authoring shape; if it becomes common, lift this scanner-// to an mdast-walking variant. The line-scoped scanner keeps the rewrite-// path predictable + idempotent for the common single-line case.-const MIRROR_TAG_RE = /<Mirror\b([^>]*)\/>/g;-const MIRROR_SRC_ATTR_RE = /(\bsrc=)(["'])([^"']*)\2/g;+/**+ * Doc-relative spelling of `targetDocName` as seen from `anchorDocName`'s+ * directory, preserving an authored `./` prefix when the result stays+ * descendant-shaped. Mirrors `buildAssetHrefFromSource`'s relative branch,+ * minus URI encoding — JSX attribute values are literal doc paths, not hrefs.+ */+function relativeJsxSrcRef(+ anchorDocName: string,+ targetDocName: string,+ originalValue: string,+): string {+ const anchorDir = posix.dirname(anchorDocName);+ let ref = posix.relative(anchorDir === '.' ? '' : anchorDir, targetDocName);+ ref ||= posix.basename(targetDocName);+ if (originalValue.startsWith('./') && !ref.startsWith('./') && !ref.startsWith('../')) {+ ref = `./${ref}`;+ }+ return ref;+}++/**+ * Next value for one src-ref attribute, or null when it must stay untouched.+ *+ * Matching compares the docName the value RESOLVES to (per the registry+ * entry's resolution rule — the renderer's own) against `oldDocName`, so all+ * three documented spellings match: root-relative `/notes/board.excalidraw`,+ * doc-relative `board.excalidraw`, and (for bare-doc-name tags) the verbatim+ * docName. Write-back preserves the author's spelling class; a doc-relative+ * result is verified to round-trip through the renderer's normalizer back to+ * the target docName, else falls back to root-relative.+ *+ * When the CONTAINING doc itself moves (`sourceDocName === oldDocName`),+ * doc-relative values pointing at NON-renamed targets are recomputed so they+ * still address the same document from the new location — the JSX analog of+ * `rewriteMarkdownLinksInLine`'s containing-doc-move image-ref branch.+ */+function rewriteJsxSrcAttrValue(+ spec: JsxSrcRefTagSpec,+ value: string,+ sourceDocName: string,+ oldDocName: string,+ newDocName: string,+): string | null {+ const next = computeNextJsxSrcAttrValue(spec, value, sourceDocName, oldDocName, newDocName);+ // Refuse-not-corrupt: the caller splices the result back between the+ // original quote pair with no escaping, so a quote or angle bracket in it+ // would inject markup into the CONTAINING document — and a `>` breaks the+ // tag matcher, making the corruption unrepairable by any later rename.+ // Leaving the attribute untouched surfaces later as a broken-link advisory+ // on the stale src — on the problems plane / write advisory, NOT in the+ // rename response itself: a refusal leaves `rewrites` unincremented, so a+ // doc whose only pending change was refused never enters `rewrittenDocs`.+ if (next !== null && /["'<>]/.test(next)) return null;+ return next;+}++function computeNextJsxSrcAttrValue(+ spec: JsxSrcRefTagSpec,+ value: string,+ sourceDocName: string,+ oldDocName: string,+ newDocName: string,+): string | null {+ if (spec.resolution === 'bare-doc-name') {+ // Location-independent spelling — nothing to recompute on a containing-doc+ // move; only a rename of the referenced doc itself rewrites it.+ return value === oldDocName ? newDocName : null;+ }+ const resolved = resolveJsxSrcRefTarget(spec, value, sourceDocName);+ if (resolved === null) return null;+ const isContainingDocMove = sourceDocName === oldDocName && oldDocName !== newDocName;+ if (resolved !== oldDocName && !isContainingDocMove) return null;+ const target = resolved === oldDocName ? newDocName : resolved;+ if (value.startsWith('/')) {+ // Root-relative spelling resolves identically from any location — a+ // containing-doc move alone leaves it untouched.+ return resolved === oldDocName ? `/${target}` : null;+ }+ const anchorDocName = isContainingDocMove ? newDocName : sourceDocName;+ const candidate = relativeJsxSrcRef(anchorDocName, target, value);+ const next =+ resolveJsxSrcRefTarget(spec, candidate, anchorDocName) === target ? candidate : `/${target}`;+ return next === value ? null : next;+}-function rewriteMirrorSrcInLine(+// Multi-line tag content (`<Mirror\n src="…"\n anchor="…"\n/>`) is+// intentionally NOT rewritten here — a rare authoring shape; if it becomes+// common, lift this scanner to an mdast-walking variant. The line-scoped+// scanner keeps the rewrite path predictable + idempotent for the common+// single-line case.+function rewriteJsxSrcRefsInLine(line: string,+ sourceDocName: string,oldDocName: string,newDocName: string,): RenameRewriteResult {// Walk the line so inline-code spans are skipped verbatim — mirrors// `rewriteWikiLinksInLine` and the markdown-link rewriter. Without this,- // an `<Mirror src="…" />` inside backticks (e.g. documentation showing+ // a `<Mirror src="…" />` inside backticks (e.g. documentation showing// Mirror syntax) gets rewritten on doc rename and corrupts the example.let rewritten = '';let rewrites = 0;@@ -661,22 +748,23 @@ function rewriteMirrorSrcInLine(}if (line[idx] === '<') {- // Per-tag regex instance — concurrent rename passes share no state.- const tagRe = new RegExp(MIRROR_TAG_RE.source);- const sliceFromHere = line.slice(idx);- const match = tagRe.exec(sliceFromHere);- if (match && match.index === 0) {- const [full, attrs] = match;- const attrRe = new RegExp(MIRROR_SRC_ATTR_RE.source, MIRROR_SRC_ATTR_RE.flags);- const newAttrs = attrs.replace(attrRe, (whole, prefix, quote, value) => {- if (value === oldDocName) {- rewrites++;- return `${prefix}${quote}${newDocName}${quote}`;- }- return whole;+ const tag = readJsxSrcRefTagAt(line, idx);+ if (tag) {+ const attrRe = createJsxSrcAttrRe(tag.spec.attrName);+ const newAttrs = tag.attrs.replace(attrRe, (whole, prefix, quote, value) => {+ const nextValue = rewriteJsxSrcAttrValue(+ tag.spec,+ value,+ sourceDocName,+ oldDocName,+ newDocName,+ );+ if (nextValue === null) return whole;+ rewrites++;+ return `${prefix}${quote}${nextValue}${quote}`;});- rewritten += `<Mirror${newAttrs}/>`;- idx += full.length;+ rewritten += `<${tag.spec.tagName}${newAttrs}/>`;+ idx += tag.matchLength;continue;}}@@ -688,8 +776,9 @@ function rewriteMirrorSrcInLine(return { markdown: rewritten, rewrites };}-export function rewriteMirrorSrcForDocumentRename(+export function rewriteJsxSrcRefsForDocumentRename(markdown: string,+ sourceDocName: string,oldDocName: string,newDocName: string,): RenameRewriteResult {@@ -711,7 +800,7 @@ export function rewriteMirrorSrcForDocumentRename(return `${line}${ending}`;}- const rewrittenLine = rewriteMirrorSrcInLine(line, oldDocName, newDocName);+ const rewrittenLine = rewriteJsxSrcRefsInLine(line, sourceDocName, oldDocName, newDocName);rewrites += rewrittenLine.rewrites;return `${rewrittenLine.markdown}${ending}`;})diff --git a/packages/server/src/write-advisory-links.test.ts b/packages/server/src/write-advisory-links.test.tsindex c6de56d6f..fb9c81a47 100644--- a/packages/server/src/write-advisory-links.test.ts+++ b/packages/server/src/write-advisory-links.test.ts@@ -259,4 +259,55 @@ describe('computeWriteAdvisoryLinks', () => {);expect(links).toEqual([]);});++ test('a JSX src-ref to a missing board survives the inline-href reconciliation filter', () => {+ // The lossless extractor cannot observe JSX attributes, so without the+ // sourceForm passthrough this entry would be filtered out and a write+ // embedding a missing board would report no broken links at all.+ const links = computeWriteAdvisoryLinks(+ '<Excalidraw src="board.excalidraw" />\n',+ 'notes/index',+ new Set<string>(),+ fileOracle(),+ );+ expect(links).toEqual([+ {+ href: 'board.excalidraw',+ resolvedTo: 'notes/board.excalidraw',+ reason: 'no-such-file',+ sourceForm: 'jsx',+ },+ ]);+ });++ test('a JSX src-ref to an existing board reports nothing', () => {+ const links = computeWriteAdvisoryLinks(+ '<Excalidraw src="board.excalidraw" /> and <Mirror src="api-spec" anchor="x" />\n',+ 'notes/index',+ new Set(['api-spec']),+ fileOracle('notes/board.excalidraw'),+ );+ expect(links).toEqual([]);+ });++ test('a JSX src-ref survives when a markdown-looking link with the identical href scans first', () => {+ // The byte scanner has no comment skip, so the markdown-shaped link inside+ // the HTML comment records the href first — with no sourceForm. The scan+ // dedupes per (plane, href), so the JSX record still lands as its own+ // entry; the markdown-plane one (never observed by the lossless+ // extractor) is dropped by the reconciliation filter. Keyed on href alone+ // the JSX record would be swallowed and the missing board unreported.+ const md = ['<!-- [b](board.excalidraw) -->', '<Excalidraw src="board.excalidraw" />', ''].join(+ '\n',+ );+ const links = computeWriteAdvisoryLinks(md, 'notes/index', new Set<string>(), fileOracle());+ expect(links).toEqual([+ expect.objectContaining({+ href: 'board.excalidraw',+ resolvedTo: 'notes/board.excalidraw',+ reason: 'no-such-file',+ sourceForm: 'jsx',+ }),+ ]);+ });});diff --git a/packages/server/src/write-advisory-links.ts b/packages/server/src/write-advisory-links.tsindex 2a2ce9d52..65474de31 100644--- a/packages/server/src/write-advisory-links.ts+++ b/packages/server/src/write-advisory-links.ts@@ -88,13 +88,19 @@ export function computeWriteAdvisoryLinks(// image destination as a link and does not model every non-rendering block;// retain markdown entries only when the lossless extractor observed a real// inline link. Wiki entries keep their graph-owned `[[...]]` representation.+ // JSX src-ref entries pass through unconditionally: the lossless extractor+ // reads markdown link forms only, so a JSX attribute href can never appear+ // in `inlineLinkHrefs` and the reconciliation filter would drop it.const links: WriteAdvisoryLink[] = computeBrokenOutboundLinks(markdown,sourceDocName,admitted,fileExists,hasFolder,- ).filter((link) => link.href.startsWith('[[') || inlineLinkHrefs.has(link.href));+ ).filter(+ (link) =>+ link.sourceForm === 'jsx' || link.href.startsWith('[[') || inlineLinkHrefs.has(link.href),+ );const graphHrefs = new Set(links.map((link) => link.href));const seenRepairSites = new Set<string>();