mirror of
https://github.com/storytold/deckcraft.git
synced 2026-10-24 10:37:03 -06:00
Format: retain imported chart parts through native saves (#851)
* M2.1: preserve chart parts through native saves Serialize retained chart relationships and payloads in native files. Add native and headless file-command round-trip regressions. Contribution on behalf of @MMexicann. * Format: bound opaque chart parts as native ZIP entries Address maintainer feedback on the existing PR. Preserve upstream work and document tested scope and validation limits. * Model: track transient native chart part entries Address maintainer feedback on the existing PR. Preserve upstream work and document tested scope and validation limits. * PPTX: initialize native chart entry metadata Address maintainer feedback on the existing PR. Preserve upstream work and document tested scope and validation limits. * Engine: adapt chart native roundtrip fixtures Address maintainer feedback on the existing PR. Preserve upstream work and document tested scope and validation limits. * Docs: describe bounded chart sidecars and validation Address maintainer feedback on the existing PR. Preserve upstream work and document tested scope and validation limits. * Roadmap: record bounded chart persistence evidence Address maintainer feedback on the existing PR. Preserve upstream work and document tested scope and validation limits. --------- Co-authored-by: skylar taylor-barrick <hi@skylar.cc>
This commit is contained in:
co-authored by
skylar taylor-barrick
parent
010941ec60
commit
f34f4121c8
@@ -1,6 +1,6 @@
|
||||
# DeckCraft architecture
|
||||
|
||||
> **Last reviewed:** 2026-10-14 · **Last updated:** 2026-10-14 · **Change:** minor (community PR wave 2026-10-14: 320 engine commands, 41 dialogs, the `metafile` crate, 1,641 tests; duplicated L2/L5/L6 rows and headers folded; previous: minor, transition frames) · **Target:** Microsoft PowerPoint for Mac 16.113 (Microsoft 365)
|
||||
> **Last reviewed:** 2026-10-14 · **Last updated:** 2026-10-18 · **Change:** minor (native chart payloads stored in bounded ZIP members; previous: minor, community PR wave 2026-10-14: 320 engine commands, 41 dialogs, the `metafile` crate, 1,641 tests; duplicated L2/L5/L6 rows and headers folded; previous: minor, transition frames) · **Target:** Microsoft PowerPoint for Mac 16.113 (Microsoft 365)
|
||||
|
||||
How DeckCraft is built today. The binding rules (layering, everything is a command, thin UI, never
|
||||
break wasm, never crash) are in [AGENTS.md](../AGENTS.md) §3–§5; this document describes what
|
||||
@@ -64,8 +64,10 @@ overlays an invisible real-text layer with embedded font subsets.
|
||||
- **PPTX** (`crates/pptx`): lenient reader (unknown parts skipped, malformed parts logged and
|
||||
ignored, sizes and depths bounded, zip bombs capped), writer that PowerPoint opens without
|
||||
repair. Unknown elements round-trip through `Opaque` and `raw_ext` fields.
|
||||
- **Native** (`crates/format`): zip with `mimetype`, `presentation.json` and `media/<id>`; readers
|
||||
ignore unknown fields; `.slidecraft` files from before the rename still open.
|
||||
- **Native** (`crates/format`): zip with `mimetype`, `presentation.json`, `media/<id>` and
|
||||
`chart-parts/<index>`. Chart relationships and payload references stay in the manifest; binary
|
||||
chart parts use bounded ZIP reads and share the media byte/item budgets. Earlier inline chart
|
||||
bytes still load and migrate on save; `.slidecraft` files from before the rename still open.
|
||||
- Formats and their gaps: [file-format-parity.md](file-format-parity.md).
|
||||
|
||||
## Quality gates
|
||||
@@ -79,6 +81,7 @@ macOS, Windows, Linux, FreeBSD and web artifacts.
|
||||
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 2026-10-18 | minor | Native chart payloads use referenced ZIP members and share media byte/item limits; old inline sidecars remain readable. Synthetic tests cover multi-megabyte layout, all shape owners, shared budgets, missing/corrupt members and invalid references. Scores and milestone scope unchanged |
|
||||
| 2026-10-14 | minor | Community PR wave folded: one L2/L5/L6 row each; command registry 320 (`cmd!` registrations in `cmd/*`), 41 dialogs (titled in `dialogs.rs`), 202k lines, 24 crates (`metafile` added at L0), 1,641 tests. The per-PR rows below give the counts each PR saw on its own branch |
|
||||
| 2026-10-14 | minor | Size and Position dialog (`shape.sizePosition`): position, size, rotation, scale and lock aspect in one undo step. 227 commands, 28 dialogs |
|
||||
| 2026-10-14 | trivial | Command registry: 228 (`comment.next`, `comment.prev`) |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# File-format parity with PowerPoint
|
||||
|
||||
> **Last reviewed:** 2026-10-14 · **Last updated:** 2026-10-15 · **Change:** major (community PR wave 2026-10-14: seven owned PPTX corpus files, embedded fonts, EMF/WMF clip regions, threaded comments (#70), chart trendlines and workbooks (#335), SmartArt written as a diagram, tags and custom XML kept, picture export DPI; duplicated rows and headers folded; previous: trivial, lines in scaled groups, #233) · **Target:** Microsoft PowerPoint for Mac 16.113 (Microsoft 365)
|
||||
> **Last reviewed:** 2026-10-14 · **Last updated:** 2026-10-18 · **Change:** minor (native chart payloads stored in bounded ZIP members; previous: major, community PR wave 2026-10-14: seven owned PPTX corpus files, embedded fonts, EMF/WMF clip regions, threaded comments (#70), chart trendlines and workbooks (#335), SmartArt written as a diagram, tags and custom XML kept, picture export DPI; duplicated rows and headers folded; previous: trivial, lines in scaled groups, #233) · **Target:** Microsoft PowerPoint for Mac 16.113 (Microsoft 365)
|
||||
|
||||
Every format PowerPoint reads or writes, DeckCraft's support, fidelity and how it is tested.
|
||||
Gaps are itemized in [gaps.md](gaps.md#file-formats). Dimension score: **~58% ready**
|
||||
@@ -34,6 +34,22 @@ PowerPoint opens and saves; Viewer = opens only).
|
||||
|
||||
## Pictures and media inside decks
|
||||
|
||||
Native files retain a nonempty chart `kept` sidecar: relationships, part names, content types
|
||||
and `nativeEntry` references live in `presentation.json`; exact binary payloads live in distinct
|
||||
`chart-parts/<index>` ZIP members. This keeps workbooks and drawings through a native save before
|
||||
exporting back to PPTX without expanding workbook bytes into JSON numbers. Chart parts and
|
||||
media share the 4 GiB inflated-byte and 100,000-item budgets; each member is read through the
|
||||
existing 2 GiB entry limit. Missing chart members are reported by `load_checked` and left empty.
|
||||
A present chart member that fails decoding, CRC or its entry limit refuses the file immediately,
|
||||
so later corrupt members cannot reuse the remaining inflation budget. Invalid, reused or
|
||||
ambiguous references are refused. A synthetic 3 MiB payload test
|
||||
checks the ZIP layout and bounded reads, alongside shared-budget and all-owner round trips.
|
||||
|
||||
Older native files without a sidecar still load. Earlier inline chart byte arrays are read
|
||||
under the existing manifest-size limit, then charged to the shared budget; saving migrates them
|
||||
to ZIP members. Builds predating chart-sidecar support ignore it and lose it on resave. The
|
||||
intermediate build that required inline `bytes` cannot read the new referenced representation.
|
||||
|
||||
| Kind | PowerPoint | DeckCraft | Notes |
|
||||
|---|---|---|---|
|
||||
| PNG, JPEG, GIF (animated), BMP, TIFF, WebP | yes | yes | `image` 0.25; animated GIFs play since #39 |
|
||||
@@ -103,6 +119,8 @@ the round trip even though DeckCraft doesn't model it.
|
||||
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 2026-10-18 | minor | Native chart payloads use referenced ZIP members and share media byte/item limits; old inline sidecars remain readable. Synthetic tests cover multi-megabyte layout, all shape owners, shared budgets, missing/corrupt members and invalid references. Scores and milestone scope unchanged |
|
||||
| 2026-10-15 | trivial | Native `.deckcraft` files serialize a nonempty chart `kept` sidecar (relationships, part names, content types and bytes). Older files without it still load; empty sidecars are omitted. Headless PPTX → edit → native save/reopen → PPTX checks keep the workbook and drawing bytes; editing chart data still drops the stale workbook |
|
||||
| 2026-10-15 | trivial | PPTX interactive timing sequences keep later On Click steps and paragraph click builds (`trigger_steps.rs`); mixed starts and independent buttons survive import/edit/save/reopen |
|
||||
| 2026-10-15 | minor | A `.pptx` slide that can't be read is reported instead of dropped in silence: `file.open` and `file.openBytes` return `lostSlides`, the app shows a message and opens a repaired copy (Save asks for a new name), and `deckcraft-cli` warns on stderr (#203) |
|
||||
| 2026-10-16 | minor | PNG slide export with a transparent background (#784) |
|
||||
|
||||
+6
-2
@@ -1,6 +1,6 @@
|
||||
# Where DeckCraft falls short of PowerPoint
|
||||
|
||||
> **Last reviewed:** 2026-10-14 · **Last updated:** 2026-10-14 · **Change:** major (community PR wave 2026-10-14: soak tests, PPTX corpus, comment threads (#70), embedded fonts, SmartArt Text Pane, Animation Pane timeline, Hunspell spelling, thesaurus, AutoCorrect, 14 new dialogs, pen pressure and trackpad gestures; duplicated entries and headers folded; previous: minor, 3-D bevel, camera and face lighting rendered) · **Target:** Microsoft PowerPoint for Mac 16.113 (Microsoft 365)
|
||||
> **Last reviewed:** 2026-10-14 · **Last updated:** 2026-10-18 · **Change:** minor (native chart payloads stored in bounded ZIP members; previous: major, community PR wave 2026-10-14: soak tests, PPTX corpus, comment threads (#70), embedded fonts, SmartArt Text Pane, Animation Pane timeline, Hunspell spelling, thesaurus, AutoCorrect, 14 new dialogs, pen pressure and trackpad gestures; duplicated entries and headers folded; previous: minor, 3-D bevel, camera and face lighting rendered) · **Target:** Microsoft PowerPoint for Mac 16.113 (Microsoft 365)
|
||||
|
||||
Every known shortfall, one entry each, ranked by how much it stops someone who presents with
|
||||
PowerPoint from switching. This is the work list: pick from the top. Numbers are summarized in
|
||||
@@ -180,7 +180,9 @@ Detail in [file-format-parity.md](file-format-parity.md).
|
||||
neither label. A combo chart's secondary value axis is read (`y2_*`,
|
||||
`Series.secondary_axis`) and is not written back when the chart is rebuilt.
|
||||
An unchanged chart's embedded workbook now survives save (#335); editing the chart still
|
||||
drops it rather than writing a stale spreadsheet.
|
||||
drops it rather than writing a stale spreadsheet. The workbook and other retained chart parts
|
||||
also survive `.deckcraft` save/reopen (`crates/engine/tests/chart_native.rs`), with binary
|
||||
payloads in bounded ZIP entries sharing the media load budget (`crates/format` tests).
|
||||
- **Impact:** most business decks have charts; editing their data is routine.
|
||||
- **Estimate:** 12–20 h. Data and elements are **beta blockers** (6–10 h).
|
||||
|
||||
@@ -354,6 +356,8 @@ Detail in [localization-parity.md](localization-parity.md).
|
||||
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 2026-10-18 | minor | Native chart payloads use referenced ZIP members and share media byte/item limits; old inline sidecars remain readable. Synthetic tests cover multi-megabyte layout, all shape owners, shared budgets, missing/corrupt members and invalid references. Scores and milestone scope unchanged |
|
||||
| 2026-10-15 | trivial | Native saves retain chart package parts and relationships, including charts in groups; edited chart data still does not export a stale source workbook. Chart editing gaps and scores remain unchanged |
|
||||
| 2026-10-15 | trivial | PPTX trigger sequences keep later On Click steps instead of converting them to After Previous; mixed starts, independent buttons and paragraph builds have synthetic round-trip regressions |
|
||||
| 2026-10-16 | trivial | AutoFormat superscripts ordinals (1st, 22nd) as you type, with an AutoCorrect option to turn it off; automatic bulleted lists remain |
|
||||
| 2026-10-14 | trivial | Fixed #718: remote MCP no longer accepts unrelated or buffered stale success; loopback regressions cover invalid envelopes, incomplete and oversized frames |
|
||||
|
||||
@@ -54,7 +54,7 @@ Open P0 items: Contextual tabs (Shape Format, Picture Format, Table Design/Layou
|
||||
| Application shell | Multiple open presentations | P1 | P |
|
||||
| Application shell | Preferences (autosave, units, defaults) | P2 | P |
|
||||
| Files | New blank presentation | P0 | D |
|
||||
| Files | Native file format (open/save) | P0 | D |
|
||||
| Files | Native file format (open/save; chart package parts retained, `crates/engine/tests/chart_native.rs`) | P0 | D |
|
||||
| Files | Open PowerPoint .pptx | P0 | D |
|
||||
| Files | Save as PowerPoint .pptx | P0 | D |
|
||||
| Files | Open/save .potx/.ppsx/.pptm variants (.potx/.ppsx open; saved with the .pptx content type; no .pptm) | P2 | P |
|
||||
|
||||
+3
-1
@@ -1,6 +1,6 @@
|
||||
# DeckCraft roadmap: milestones and what's next
|
||||
|
||||
> **Last reviewed:** 2026-10-14 · **Last updated:** 2026-10-14 · **Change:** major (community PR wave 2026-10-14: PPTX corpus, presenter and show controls, review navigation, starter decks, Grid Options and New Window, WordArt gallery and handles, pen pressure; beta items 9 and 10 narrowed; duplicated rows and headers folded; previous: minor, core-workflow alpha gate added) · **Target:** Microsoft PowerPoint for Mac 16.113 (Microsoft 365)
|
||||
> **Last reviewed:** 2026-10-14 · **Last updated:** 2026-10-18 · **Change:** minor (native chart payloads stored in bounded ZIP members; previous: major, community PR wave 2026-10-14: PPTX corpus, presenter and show controls, review navigation, starter decks, Grid Options and New Window, WordArt gallery and handles, pen pressure; beta items 9 and 10 narrowed; duplicated rows and headers folded; previous: minor, core-workflow alpha gate added) · **Target:** Microsoft PowerPoint for Mac 16.113 (Microsoft 365)
|
||||
|
||||
Forward-looking: where DeckCraft is going and in what order. The one-page summary is
|
||||
[ROADMAP.md](../ROADMAP.md); every shortfall is in [gaps.md](gaps.md); numbers are in
|
||||
@@ -115,6 +115,8 @@ plan above.
|
||||
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 2026-10-18 | minor | Native chart payloads use referenced ZIP members and share media byte/item limits; old inline sidecars remain readable. Synthetic tests cover multi-megabyte layout, all shape owners, shared budgets, missing/corrupt members and invalid references. Scores and milestone scope unchanged |
|
||||
| 2026-10-15 | trivial | Native save/reopen retains imported chart workbooks and related parts; headless command tests cover a PPTX → native → PPTX cycle and stale-workbook rejection. Milestone scope and scores unchanged |
|
||||
| 2026-10-15 | trivial | PPTX trigger click steps survive save, including by-paragraph builds. Interactive-deck gaps remain media actions, audio triggers and click-box geometry; milestone scope and feature scores unchanged |
|
||||
| 2026-10-14 | trivial | M13 reliability: remote MCP validates IDs and envelopes, caps replies and rejects incomplete frames; #718 |
|
||||
| 2026-10-14 | minor | Community PR wave folded: one Review gate row, one Current focus item 2, one beta row each for items 9 and 10 (timeline and timer controls are in), one after-beta paragraph, one M9 and M10 row, one corpus row in the 2026-10-07 history |
|
||||
|
||||
Reference in New Issue
Block a user