From 3351041cd4ba5fe5bace23014f8ce12cec8ecdb8 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Mon, 16 Nov 2026 11:12:28 +0100 Subject: [PATCH] Document generic JSON project loading and remove unused extension --- crates/canvas-pilot/tests/project.rs | 2 +- docs/canvas-pilot/changelog.md | 9 +++++---- docs/canvas-pilot/guide/files.md | 5 +++-- docs/canvas-pilot/guide/format-matrix.md | 4 +++- docs/interfaces/canvas-pilot.md | 5 +++-- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/crates/canvas-pilot/tests/project.rs b/crates/canvas-pilot/tests/project.rs index cbeedeb..ed31463 100644 --- a/crates/canvas-pilot/tests/project.rs +++ b/crates/canvas-pilot/tests/project.rs @@ -142,7 +142,7 @@ fn exported_svg_roundtrips_rounded_geometry_including_full_screen_layers() { } #[test] fn publication_requires_overwrite_and_read_matches_written_document() { - for filename in ["layout.pilot.json", "layout.capi.json", "layout.midra.json"] { + for filename in ["layout.pilot.json", "arbitrary.json", "layout.midra.json"] { let dir = tempfile::tempdir().unwrap(); let path = dir.path().join(filename); let p = Project::from_layout(&Layout::default()); diff --git a/docs/canvas-pilot/changelog.md b/docs/canvas-pilot/changelog.md index 33ff0b3..5f8567e 100644 --- a/docs/canvas-pilot/changelog.md +++ b/docs/canvas-pilot/changelog.md @@ -4,10 +4,11 @@ ## Unreleased -- New project saves suggest `.pilot.json` (Canvas Pilot). Existing `.capi.json` and `.midra.json` - projects remain readable and are not renamed automatically. Updated the manual - and checked read/write and overwrite protection with all three filenames; JSON - contents and schema version are unchanged. +- New project saves suggest `.pilot.json` (Canvas Pilot). Open project accepts + any `.json` filename and validates its contents, including legacy `.midra.json` + projects. Files are not renamed automatically. Updated the manual and checked + read/write and overwrite protection for preferred, generic and legacy filenames; + JSON contents and schema version are unchanged. - Added user-guide feature matrices for all eleven exchange formats, project saves and separate clipboard workflows. Distinguished geometry, names, visual crop/mask diff --git a/docs/canvas-pilot/guide/files.md b/docs/canvas-pilot/guide/files.md index c081111..c97c591 100644 --- a/docs/canvas-pilot/guide/files.md +++ b/docs/canvas-pilot/guide/files.md @@ -139,8 +139,9 @@ user confirmed actual draw.io copy/paste working on 2026-11-15. ## Save, open and export Use the **Project** toolbar menu to **Save project…** or **Open project…**. -Existing `.capi.json` and `.midra.json` projects still open normally and are not renamed -automatically. **Save project…** suggests a `.pilot.json` name. +**Save project…** suggests a `.pilot.json` name. **Open project…** lets you try +any `.json` file, including legacy `.midra.json` projects; the contents must be a +valid Canvas Pilot project. Existing files are not renamed automatically. Projects use readable, versioned `.pilot.json` files and preserve applied output, inputs, layer bounds/crops, source assignments, locks, visibility, selection, diff --git a/docs/canvas-pilot/guide/format-matrix.md b/docs/canvas-pilot/guide/format-matrix.md index ddc5c7b..fefca46 100644 --- a/docs/canvas-pilot/guide/format-matrix.md +++ b/docs/canvas-pilot/guide/format-matrix.md @@ -35,7 +35,9 @@ and layer labels can help identify the boxes; they do not rename destinations. | FigCraft file (`.figcraft`) | ☑* | ☑* | ☑ | ☑ | ☑ | ☐ | | Illustrator file (`.ai`) | ☑* | ☑* | ☑* | ☑ | ☑ | ☐ | -- **Projects:** use Open/Save project, not geometry import/export. Pictures and +- **Projects:** `.pilot.json` is the suggested name; Open project accepts any + `.json` filename and checks that its contents are a valid project. Use Open/Save + project, not geometry import/export. Pictures and editable settings are saved directly; no optional snapshot is needed. - **Pictures:** enable **Include background layer** and/or **Include placeholder pictures** when exporting. Background pictures flatten visible references. diff --git a/docs/interfaces/canvas-pilot.md b/docs/interfaces/canvas-pilot.md index c1c46f7..fcf0bad 100644 --- a/docs/interfaces/canvas-pilot.md +++ b/docs/interfaces/canvas-pilot.md @@ -9,8 +9,9 @@ examples and tests in the same change as any save/export schema change. ## Project JSON, version 15 -Suggested filename: `layout.pilot.json`. Earlier `.capi.json` and legacy `.midra.json` projects remain -readable through **Open project**; all names contain the same JSON representation. +Suggested filename: `layout.pilot.json`. **Open project** accepts any `.json` +filename, including legacy `.midra.json` projects, and validates the project +representation inside it. Unrelated or invalid JSON is rejected. The file dialog accepts `.json`, and validation uses file contents rather than the filename. **Save project…** suggests the new name and lets the user choose the path; existing files are not renamed automatically. This filename change requires no schema migration.