[nu-demo] Office Diagrams island has no seeded content — needs .vsdx generation tooling (drawio-desktop?) #183

Closed
opened 2026-04-25 03:10:28 +00:00 by mik-tf · 2 comments
Owner

Symptom

Office archipelago's Diagrams island shows "No Diagrams files in geomind. Use Upload to add one." on a fresh herodemo deploy. The island machinery works (file list renders, upload button works, OnlyOffice would render any uploaded .vsdx) — there's just no seeded content.

Why it's harder than the other Office types

OnlyOffice's document_type() recognizes only Microsoft Visio formats for the diagram document type (hero_office/crates/hero_office_server/src/onlyoffice.rs:33):

vsdx, vsdm, vssx, vssm, vstx, vstm

LibreOffice (which we use for the other Office seeds + companion-PDF generation) can't export .vsdx — it only imports it:

$ libreoffice --headless --convert-to vsdx -env:UserInstallation=... --outdir /tmp diag_test.fodg
Error: no export filter for /tmp/diag_test.vsdx found, aborting.

So unlike .docx / .xlsx / .pptx (pandoc + python-openpyxl + libreoffice all generate them cleanly), .vsdx needs a Visio-specific builder.

Options

A. Skip diagrams seeding; accept the empty-state message

Cheapest. Demo viewers see "No Diagrams files. Use Upload to add one." which is at least honest and clearly invites user interaction. The island machinery is fully functional — uploading a real .vsdx would render in OnlyOffice.

B. Add drawio-desktop CLI to the install

wget https://github.com/jgraph/drawio-desktop/releases/download/v25.0.1/drawio-amd64-25.0.1.deb
apt install -y ./drawio-amd64-25.0.1.deb

Then drawio --crop -x -o output.vsdx input.drawio exports .vsdx from a draw.io source. We could ship 5-10 sample diagrams as seed content (architecture diagram, network topology, etc.).

C. Replace Diagrams island with Whiteboard for the demo

hero_whiteboard already exists in the dock. It's effectively the same use case — interactive 2D drawing. Drop the Diagrams sub-island from hero_os_app's registry, route users to Whiteboard for "draw something" tasks.

Pro: no new dependency, no .vsdx tooling. Con: lose OnlyOffice's diagram rendering quality.

D. Pre-generate sample .vsdx offline and bake into the seed step

Generate sample .vsdx once on a workstation (via Visio, drawio-desktop, or similar), commit to hero_demo/data/seed/diagrams/, copy during install.

Recommendation

For demo: Option A now; address as part of broader content seeding work.
For prod: Option B (drawio-desktop in installer + 5-10 sample .drawio files in hero_demo/data/) is the cleanest. drawio-desktop is open source, ~150 MB, no subscription needed.

Demo state on herodemo (2026-04-24)

Diagrams island machinery verified:

  • /hero_office/ui/diagram?context=geomind returns 200 with empty-state HTML
  • File list view renders correctly
  • Upload button is functional (confirmed end-to-end with curl)
  • OnlyOffice editor would render any .vsdx uploaded (same routing as .docx/.xlsx/.pptx)

Just no seeded files.

  • home#160 — consolidated demo state
  • home#174 — OnlyOffice integration (lands the editor that would render .vsdx)
  • hero_office/crates/hero_office_server/src/onlyoffice.rs:33 — supported diagram extensions

Signed-off-by: mik-tf

## Symptom Office archipelago's **Diagrams** island shows "No Diagrams files in geomind. Use Upload to add one." on a fresh herodemo deploy. The island machinery works (file list renders, upload button works, OnlyOffice would render any uploaded `.vsdx`) — there's just no seeded content. ## Why it's harder than the other Office types OnlyOffice's `document_type()` recognizes only Microsoft Visio formats for the `diagram` document type (`hero_office/crates/hero_office_server/src/onlyoffice.rs:33`): ``` vsdx, vsdm, vssx, vssm, vstx, vstm ``` LibreOffice (which we use for the other Office seeds + companion-PDF generation) **can't export `.vsdx`** — it only imports it: ``` $ libreoffice --headless --convert-to vsdx -env:UserInstallation=... --outdir /tmp diag_test.fodg Error: no export filter for /tmp/diag_test.vsdx found, aborting. ``` So unlike `.docx` / `.xlsx` / `.pptx` (pandoc + python-openpyxl + libreoffice all generate them cleanly), `.vsdx` needs a Visio-specific builder. ## Options ### A. Skip diagrams seeding; accept the empty-state message Cheapest. Demo viewers see "No Diagrams files. Use Upload to add one." which is at least honest and clearly invites user interaction. The island machinery is fully functional — uploading a real `.vsdx` would render in OnlyOffice. ### B. Add `drawio-desktop` CLI to the install ``` wget https://github.com/jgraph/drawio-desktop/releases/download/v25.0.1/drawio-amd64-25.0.1.deb apt install -y ./drawio-amd64-25.0.1.deb ``` Then `drawio --crop -x -o output.vsdx input.drawio` exports `.vsdx` from a draw.io source. We could ship 5-10 sample diagrams as seed content (architecture diagram, network topology, etc.). ### C. Replace Diagrams island with Whiteboard for the demo `hero_whiteboard` already exists in the dock. It's effectively the same use case — interactive 2D drawing. Drop the Diagrams sub-island from `hero_os_app`'s registry, route users to Whiteboard for "draw something" tasks. Pro: no new dependency, no .vsdx tooling. Con: lose OnlyOffice's diagram rendering quality. ### D. Pre-generate sample `.vsdx` offline and bake into the seed step Generate sample `.vsdx` once on a workstation (via Visio, drawio-desktop, or similar), commit to `hero_demo/data/seed/diagrams/`, copy during install. ## Recommendation **For demo:** Option A now; address as part of broader content seeding work. **For prod:** Option B (drawio-desktop in installer + 5-10 sample `.drawio` files in `hero_demo/data/`) is the cleanest. drawio-desktop is open source, ~150 MB, no subscription needed. ## Demo state on herodemo (2026-04-24) Diagrams island machinery verified: - `/hero_office/ui/diagram?context=geomind` returns 200 with empty-state HTML - File list view renders correctly - Upload button is functional (confirmed end-to-end with curl) - OnlyOffice editor would render any `.vsdx` uploaded (same routing as `.docx`/`.xlsx`/`.pptx`) Just no seeded files. ## Related - [home#160](https://forge.ourworld.tf/lhumina_code/home/issues/160) — consolidated demo state - [home#174](https://forge.ourworld.tf/lhumina_code/home/issues/174) — OnlyOffice integration (lands the editor that would render .vsdx) - `hero_office/crates/hero_office_server/src/onlyoffice.rs:33` — supported diagram extensions Signed-off-by: mik-tf
Author
Owner

Demo hotfix landed 2026-04-25

Decided to seed real .vsdx files from Apache POI's test-data corpus (Apache 2.0 licensed, public).

for f in test.vsdx:architecture_overview.vsdx \
         test_text_extraction.vsdx:flow_diagram.vsdx \
         60489.vsdx:network_topology.vsdx; do
    src=${f%:*}; dst=${f#*:}
    curl -sLo "$dst" "https://raw.githubusercontent.com/apache/poi/trunk/test-data/diagram/$src"
    cp -f "$dst" /home/driver/hero/var/hero_foundry/webdav/<ctx>/
done

Seeded across geomind/incubaid/threefold/default/root contexts. Diagrams island now lists 3 files.

Status

  • L1 hotfix done — Diagrams island has content
  • Origin: Apache POI test-data on GitHub (Apache 2.0)
  • File names: architecture_overview / flow_diagram / network_topology — match the demo's geomind narrative

Prod-level path remains as in the issue body

For a sustainable solution:

  • drawio-desktop install in hero_skills + sample .drawio source files in hero_demo/data/seed/diagrams/, exported to .vsdx at install time
  • OR: ship architecture_overview.vsdx / flow_diagram.vsdx / network_topology.vsdx directly in hero_demo/data/seed/diagrams/ and cp during install (simpler, no draw.io dependency)

Closing as demo-fixed; prod path stays open for hero_skills enhancement.

Signed-off-by: mik-tf

## Demo hotfix landed 2026-04-25 Decided to seed real `.vsdx` files from Apache POI's test-data corpus (Apache 2.0 licensed, public). ```bash for f in test.vsdx:architecture_overview.vsdx \ test_text_extraction.vsdx:flow_diagram.vsdx \ 60489.vsdx:network_topology.vsdx; do src=${f%:*}; dst=${f#*:} curl -sLo "$dst" "https://raw.githubusercontent.com/apache/poi/trunk/test-data/diagram/$src" cp -f "$dst" /home/driver/hero/var/hero_foundry/webdav/<ctx>/ done ``` Seeded across geomind/incubaid/threefold/default/root contexts. Diagrams island now lists 3 files. ## Status - L1 hotfix done — Diagrams island has content - Origin: Apache POI test-data on GitHub (Apache 2.0) - File names: architecture_overview / flow_diagram / network_topology — match the demo's geomind narrative ## Prod-level path remains as in the issue body For a sustainable solution: - `drawio-desktop` install in hero_skills + sample `.drawio` source files in `hero_demo/data/seed/diagrams/`, exported to `.vsdx` at install time - OR: ship `architecture_overview.vsdx` / `flow_diagram.vsdx` / `network_topology.vsdx` directly in `hero_demo/data/seed/diagrams/` and `cp` during install (simpler, no draw.io dependency) Closing as demo-fixed; prod path stays open for hero_skills enhancement. Signed-off-by: mik-tf
Author
Owner

Resolved by lhumina_code/hero_demo@9318fd0 (hero_demo PR #1). hero_demo/data/seed/ ships markdown + openpyxl source inputs; bash data/seed/seed_install.sh generates .docx/.xlsx/.pdf on the VM (using pandoc, python3-openpyxl, libreoffice from install_core) and copies into hero_foundry webdav + refreshes libraries.txt.

Resolved by https://forge.ourworld.tf/lhumina_code/hero_demo/commit/9318fd0 ([hero_demo PR #1](https://forge.ourworld.tf/lhumina_code/hero_demo/pulls/1)). `hero_demo/data/seed/` ships markdown + openpyxl source inputs; `bash data/seed/seed_install.sh` generates .docx/.xlsx/.pdf on the VM (using pandoc, python3-openpyxl, libreoffice from `install_core`) and copies into `hero_foundry` webdav + refreshes `libraries.txt`.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/home#183
No description provided.