From 05a1cef556488cf28e64df0df508662165818199 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Mon, 16 Nov 2026 11:11:31 +0100 Subject: [PATCH] Prefer pilot.json for Canvas Pilot projects --- crates/canvas-pilot/src/import.rs | 2 +- crates/canvas-pilot/src/project_ui.rs | 2 +- crates/canvas-pilot/tests/project.rs | 2 +- docs/canvas-pilot/changelog.md | 4 ++-- docs/canvas-pilot/guide/files.md | 10 +++++----- docs/canvas-pilot/guide/format-matrix.md | 2 +- docs/canvas-pilot/guide/quickstart.md | 4 ++-- docs/canvas-pilot/introduction.md | 2 +- docs/interfaces/canvas-pilot.md | 4 ++-- docs/templates/canvas-pilot/catalog.md | 2 +- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/crates/canvas-pilot/src/import.rs b/crates/canvas-pilot/src/import.rs index ad10e0d..fc7e4d0 100644 --- a/crates/canvas-pilot/src/import.rs +++ b/crates/canvas-pilot/src/import.rs @@ -67,7 +67,7 @@ pub fn parse_values(text: &str) -> Result { return crate::geometry_formats::parse_json(text); } return Err( - "This JSON is not a geometry exchange. Use Open project for .capi.json files (or legacy .midra.json projects).".into(), + "This JSON is not a geometry exchange. Use Open project for .pilot.json files (or legacy .midra.json projects).".into(), ); } if crate::geometry_formats::looks_like_csv(text) { diff --git a/crates/canvas-pilot/src/project_ui.rs b/crates/canvas-pilot/src/project_ui.rs index f0225f3..dd44ba7 100644 --- a/crates/canvas-pilot/src/project_ui.rs +++ b/crates/canvas-pilot/src/project_ui.rs @@ -239,7 +239,7 @@ impl Editor { Ok(contents) => { if let Some(path) = rfd::FileDialog::new() .add_filter("Canvas Pilot project", &["json"]) - .set_file_name("layout.capi.json") + .set_file_name("layout.pilot.json") .save_file() { self.queue_write(path, contents); diff --git a/crates/canvas-pilot/tests/project.rs b/crates/canvas-pilot/tests/project.rs index 1f0ed73..cbeedeb 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.capi.json", "layout.midra.json"] { + for filename in ["layout.pilot.json", "layout.capi.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 6766408..33ff0b3 100644 --- a/docs/canvas-pilot/changelog.md +++ b/docs/canvas-pilot/changelog.md @@ -4,9 +4,9 @@ ## Unreleased -- New project saves suggest `.capi.json` (Canvas Pilot). Existing `.midra.json` +- 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 both filenames; JSON + and checked read/write and overwrite protection with all three filenames; JSON contents and schema version are unchanged. - Added user-guide feature matrices for all eleven exchange formats, project saves diff --git a/docs/canvas-pilot/guide/files.md b/docs/canvas-pilot/guide/files.md index dc793d4..c081111 100644 --- a/docs/canvas-pilot/guide/files.md +++ b/docs/canvas-pilot/guide/files.md @@ -139,10 +139,10 @@ 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 `.midra.json` projects still open normally and are not renamed -automatically. **Save project…** suggests a `.capi.json` name. +Existing `.capi.json` and `.midra.json` projects still open normally and are not renamed +automatically. **Save project…** suggests a `.pilot.json` name. -Projects use readable, versioned `.capi.json` files and preserve applied output, +Projects use readable, versioned `.pilot.json` files and preserve applied output, inputs, layer bounds/crops, source assignments, locks, visibility, selection, viewport preferences, and all embedded reference images. Apply pending edits before saving. Opening asks before replacing current work and starts a fresh @@ -171,7 +171,7 @@ are supported. SVG rendered by draw.io Desktop is recognized through its retaine cell IDs; generated HTML labels and raster text fallbacks are ignored. Draw.io may crop and rebase that SVG unless the exported diagram includes the background layer. These exports round-trip whole-pixel visible-box geometry, not -source/crop settings; the separate `.capi.json` project format preserves the full project. See the +source/crop settings; the separate `.pilot.json` project format preserves the full project. See the [geometry exchange contract and native draw.io checks](../../interfaces/canvas-pilot-exchange.md) and [project save contract](../../interfaces/canvas-pilot.md). @@ -383,5 +383,5 @@ service. A missing converter produces an error without changing the project. Use SVG if you do not want to install or configure the converter. AI exchanges layer geometry and optional artwork, not the complete editor project. -Use a `.capi.json` project to preserve all settings. See the +Use a `.pilot.json` project to preserve all settings. See the [AI format contract and round-trip checks](../../interfaces/canvas-pilot-exchange.md#illustrator-ai). diff --git a/docs/canvas-pilot/guide/format-matrix.md b/docs/canvas-pilot/guide/format-matrix.md index 2ba27dd..ddc5c7b 100644 --- a/docs/canvas-pilot/guide/format-matrix.md +++ b/docs/canvas-pilot/guide/format-matrix.md @@ -22,7 +22,7 @@ and layer labels can help identify the boxes; they do not rename destinations. | File | Import | Export | Layer names in export | Background picture | Crop/mask preview pictures | Extra settings snapshot | | --- | :---: | :---: | :---: | :---: | :---: | :---: | -| Canvas Pilot project (`.capi.json`) | ☑* | ☑* | ☑ | ☑* | ☑* | ☑* | +| Canvas Pilot project (`.pilot.json`) | ☑* | ☑* | ☑ | ☑* | ☑* | ☑* | | SVG (`.svg`) | ☑ | ☑ | ☑ | ☑ | ☑ | ☑ | | draw.io (`.drawio`, XML) | ☑ | ☑ | ☑ | ☑ | ☑ | ☑ | | Geometry JSON (`.json`) | ☑ | ☑ | ☑ | ☑ | ☑ | ☑ | diff --git a/docs/canvas-pilot/guide/quickstart.md b/docs/canvas-pilot/guide/quickstart.md index 2f25139..67abe0b 100644 --- a/docs/canvas-pilot/guide/quickstart.md +++ b/docs/canvas-pilot/guide/quickstart.md @@ -51,7 +51,7 @@ You can skip this step if you only need rectangle positions. ## 4. Save the editable project Apply any pending property edits, then choose **Project → Save project…** and -save as `first-layout.capi.json`. This is the file to reopen when you want to continue +save as `first-layout.pilot.json`. This is the file to reopen when you want to continue editing: it retains the project, including source/crop settings and reference images. Use **Project → Open project…** to load it later. @@ -62,7 +62,7 @@ Choose **Project → Export → Export layers…**, select **SVG** and **All lay and save the export. For plain layer boxes, leave the background and placeholder pictures disabled. The SVG can be opened in a vector editor. -Keep the `.capi.json` project as well: a geometry export does not retain all editor +Keep the `.pilot.json` project as well: a geometry export does not retain all editor settings. The [starter-file catalog](../../templates/canvas-pilot/catalog.md) has matching layouts in every supported format if you prefer to start in another app. diff --git a/docs/canvas-pilot/introduction.md b/docs/canvas-pilot/introduction.md index aae6d83..c6cead9 100644 --- a/docs/canvas-pilot/introduction.md +++ b/docs/canvas-pilot/introduction.md @@ -68,7 +68,7 @@ See [formats and crop](guide/formats-and-crop.md) and ## Save, exchange or send a layout -- **Save your work:** use **Project → Save project…** for a `.capi.json` file +- **Save your work:** use **Project → Save project…** for a `.pilot.json` file that retains the full editor project. - **Work with another application:** drop a supported geometry file into the window, use **Import → Geometry file…**, or **Project → Export → Export layers…**. The [starter-file catalog](../templates/canvas-pilot/catalog.md) diff --git a/docs/interfaces/canvas-pilot.md b/docs/interfaces/canvas-pilot.md index e683456..c1c46f7 100644 --- a/docs/interfaces/canvas-pilot.md +++ b/docs/interfaces/canvas-pilot.md @@ -9,8 +9,8 @@ examples and tests in the same change as any save/export schema change. ## Project JSON, version 15 -Suggested filename: `layout.capi.json`. Legacy `.midra.json` projects remain -readable through **Open project**; both names contain the same JSON representation. +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. 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. diff --git a/docs/templates/canvas-pilot/catalog.md b/docs/templates/canvas-pilot/catalog.md index d6fa169..8490d74 100644 --- a/docs/templates/canvas-pilot/catalog.md +++ b/docs/templates/canvas-pilot/catalog.md @@ -45,7 +45,7 @@ CLI to import or export them. See [AI setup](../../canvas-pilot/guide/files.md#i These files exchange visible layer boxes. They do not store the complete editor state, source assignments, crop settings or device links. In particular, the `.json` starter is **geometry JSON**, not a saved Midra project. Use **Project → -Save project…** for a full `.capi.json` project; see the +Save project…** for a full `.pilot.json` project; see the [project format](../../interfaces/canvas-pilot.md). Versioned schema and migration examples stay beside their [interface contracts](../../interfaces/README.md).