forked from bots-garden/ori
| ✨ Workspace panel, selectors, previews, desktop app, sandbox template, resizable file tree, light/dark theme | 1 | # Managed by IssueSpec. Hand edits are welcome; keep the schema valid. |
| 2 | id: 9 | |
| 3 | title: Preview drawio | |
| 4 | state: closed | |
| 5 | author: | |
| 6 | name: k33g | |
| 7 | email: ph.charriere@gmail.com | |
| 8 | createdAt: 2026-09-17T21:05:28.282Z | |
| 9 | updatedAt: 2026-09-17T22:56:38.766Z | |
| 10 | labels: [] | |
| 11 | body: | | |
| 12 | Preview draw.io diagrams in the workspace Preview tab. | |
| 13 | ||
| 14 | Implemented (2026-09-17): | |
| 15 | - `.drawio` / `.dio` (XML): rendered with the diagrams.net embed viewer | |
| 16 | (`embed.diagrams.net`, iframe, read-only lightbox) fed the XML locally over its | |
| 17 | postMessage protocol (`init` → `load`); the diagram is not uploaded. Rendered/Source | |
| 18 | toggle shows the XML. If the viewer does not answer within 8 s (isolated sandbox, | |
| 19 | no network), a notice appears and the Source view remains. | |
| 20 | - `.drawio.svg` / `.drawio.png`: plain images, shown by the image preview | |
| 21 | (`GET /api/raw`). | |
| 22 | - Trade-off recorded in docs/*/explanation/architecture.md: no offline renderer | |
| 23 | could be bundled (draw.io's viewer is not on npm, `mxgraph` is archived and lacks | |
| 24 | draw.io's shapes, `@markdown-viewer/drawio2svg` is GPL-3.0-only). Vendoring | |
| 25 | `viewer-static.min.js` (Apache-2.0, ~3 MB) is the future offline path. | |
| 26 | tasks: [] | |
| 27 | comments: [] |