# Existing draw.io → document and presentation

This study starts with an original two-page draw.io file and keeps its content while changing the composition for a document and a 16:9 presentation.

[Open the document](./index.html) · [Original editable source](./source/workshop.drawio) · [Extracted content](./extracted/all.json) · [Content changes](./content-changes.json) · [繁體中文](./README.zh-TW.md)

## Input and output

The source describes a repair workshop's intake and collection handoffs. Page `intake` has the missing-information loop before booking; page `collection` has the issue-found loop before closing the record. Together they contain 11 task nodes, 11 directed relationships and 4 ownership groups.

| Source page | Document SVG | 16:9 SVG | PNG |
| --- | --- | --- | --- |
| 0 · Workshop intake · `intake` | [Document](./document/intake.svg) | [Slide](./slides/intake.svg) | [1600×900 PNG](./slides/intake.png) |
| 1 · Collection & recovery · `collection` | [Document](./document/collection.svg) | [Slide](./slides/collection.svg) | [1600×900 PNG](./slides/collection.png) |

All node, edge and group labels, endpoints and memberships remain. Both source pages remain separate. The renderer reads labels and relationships from the extractor's JSON; its source-specific coordinate maps choose the destination layout. Each drawn object carries its source ID. No general layout engine was added.

Presentation changes are recorded in `content-changes.json`: vertical document reading order, horizontal slide sequence, connector routing, line wraps, ownership regions and an original Repair Room palette/masthead. The original `source/workshop.drawio` is retained.

## Portable package command

```sh
python3 skills/productive-ui/scripts/read-diagram.py docs/studies/source-import/source/workshop.drawio --list
python3 skills/productive-ui/scripts/read-diagram.py docs/studies/source-import/source/workshop.drawio --page id:intake --output intake.json
python3 skills/productive-ui/scripts/read-diagram.py docs/studies/source-import/source/workshop.drawio.svg --page all --output all-pages.json
```

The installed extractor uses only the Python standard library. It ran successfully under `/usr/bin/python3`. The study replay additionally uses the already installed Playwright and Pillow packages for browser screenshots and PNG fixture metadata.

```sh
/home/nvidia/miniforge3/bin/python docs/studies/source-import/replay.py
/home/nvidia/miniforge3/bin/python docs/studies/source-import/native-replay.py
```

The first command rebuilds the extracted JSON, destination SVG/HTML and PNGs, and executes the 18 CLI cases. It uses the existing docs server on port 5840. The second records the official native-editor opening attempt.

## What was operated

The 18 cases cover explicit page selection and ordering; ordinary and compressed mxfile; bare mxGraphModel; SVG content metadata; PNG tEXt, zTXt and iTXt; wrapper properties, HTML labels, attached edge labels, nested and hidden groups, loose endpoints and a missing referenced endpoint. Ambiguous pages, a missing page, invalid compressed data and images without embedded source return actual errors.

The document was rendered at its intended 800px graphic width. Both slides were rendered at 1600×900 and visually inspected. An initial intake-slide label crossed the return connector. The labels were repositioned and the first images retained under the evidence directory.

The embedded SVG/PNG format fixtures display the reflowed intake image and carry **both original pages and their original geometry**. The document and slide SVGs contain the new presentation geometry. These two uses are recorded explicitly in the content-change ledger.

## Native editor result

The official embed editor and the standard app were both requested from this execution environment:

- `https://embed.diagrams.net/`: HTTP 403 in the host request and Chromium; no `init` or `load` event.
- `https://app.diagrams.net/`: HTTP 403.

Native edit → Undo → Save was not executed. The exact requests, responses and screenshots are retained. `native-editor.html` uses the official load/save protocol and can be opened where the official editor is available; Save downloads a separate native copy. The original editable file remains directly downloadable.

## Evidence and provenance

Raw records live in `evidence/v08/capabilities-17/source-import/`:

- `tests.json`: all 18 CLI invocations with stdout/stderr and browser version.
- `visual-corrections.json` and the `before-label-correction` images.
- `intake-document.png`, `collection-document.png`, `document-html.png`.
- `native-first-probe.json`, `native-network-diagnostic.json`, `portable-and-native-app-probe.json`, `native-operation.json`.
- The source formats and their extracted pages are retained in this study.

The extractor and replay were written for this work. Format details came from the [official draw.io file format](https://www.drawio.com/docs/reference/file-format/), [diagram generation](https://www.drawio.com/docs/reference/diagram-generation/) and [embed protocol](https://www.drawio.com/docs/reference/embed-mode/). PNG metadata fixtures use [Pillow's documented PNG writer](https://pillow.readthedocs.io/en/stable/handbook/image-file-formats.html#png).

All work used dedicated WebCodex task `8a5a9998107d4a47ba81199ade7ee247`. Earlier review files and products were unchanged.
