Repository navigation
PowerPoint: a slide saved here reads back with the ids it was saved with - #862
Merged
Merged
Conversation
A deck opened and saved again gave its text boxes, shapes and structures new ids, so the second save wrote other sid numbers and other ids in the slide's links (corpus check R1 on a deck from PowerPoint with a text box before a ChemDraw object; office samplers F-P-001, F-P-005, F-P-010 and F-P-015). - A slide saved here is read with ids from 2^40 up, then each thing takes the id it was saved with, the rest new ids after those; every mention of a reading id in its contents and animations follows. - A ChemDraw object kept as PowerPoint had it carries its things' ids in a tag (CHEMILLUSTRATOR_OLE_IDS, with the object's CDX print), used while the object is unchanged. - A group saved here keeps its number. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015xDL2RDfbKRYtRtSD1GTmQ
- A kept ChemDraw object's id tag is read only up to 200,000 ids in all. - A thing dragged out of a group in PowerPoint no longer shares the group's number. - A kept object's ids are written in id order, whatever order the drawing holds them in. - A saved reference naming only things deleted in PowerPoint is taken off, so it can't name something new that now has the deleted thing's id. - Ids given while reading are followed only in numbers, numeric keys and short id strings in lists, never in text. - Tests for each, and for a ChemDraw object copied in PowerPoint. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015xDL2RDfbKRYtRtSD1GTmQ
nathanohare
marked this pull request as ready for review
November 29, 2026 11:49
nathanohare
enabled auto-merge (squash)
November 29, 2026 11:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Nate · project thread
What this changes
A deck opened and saved again, with no changes, now saves the same file. Before, a second save gave text boxes, shapes and structures new internal ids, and gave groups new numbers. The second save then wrote different
sidnumbers and different ids in the slide's links. The corpus check R1 flagged this on a PowerPoint deck where a text box comes before a ChemDraw object, and the office samplers listed it as known problems F-P-001, F-P-005, F-P-010 and F-P-015.Reading. A slide saved here (one with our layout tag) is read with ids starting at 2^40. Those are far above any id a file has, so they can't be mixed up with ids the tags keep as saved. Once the slide is read:
sid, a drawing's CDXML ids, or a kept ChemDraw object's ids;followIds(remap-refs.ts) then updates every mention of a reading id in the slide's contents and animations: numbers, numeric keys, and short id strings in lists (step roles), never text.Fields the reader keeps as saved hold ids below 2^40, so they now name the right things too. A saved reference that names only things deleted in PowerPoint is taken off, so it can't name a new thing that now has the deleted one's id. Slides from PowerPoint are read as before.
Kept ChemDraw objects. A ChemDraw object kept as PowerPoint had it now writes its things' ids in a tag (
CHEMILLUSTRATOR_OLE_IDS, next to the object's CDX print), in id order. The reader uses those ids only while the object is unchanged and the counts match, and reads at most 200,000 ids from one tag.Groups. A group saved here keeps its number when its things all carry that number and nothing outside the group does. A thing dragged out of the group in PowerPoint (its tag still naming the group) no longer shares the number.
Changelog
changes/pptx-saved-ids.mdChecklist
Real-program check: done.
tests/corpus.test.tswithCHEMWEAVE_CORPUSon the deck from the R1 report passes all 7 tests, the second save included. No laptop items needed.Edge cases tested (tests built in code in
tests/pptx-saved-ids.test.ts):followIdson step roles, keys, numbers that aren't ids, text, bytes, and a__proto__key.tests/pptx-tag-stable.test.tsnow comparessidnumbers too. The sampler entries are off the known list (PPTX_FINDINGSis empty).Not covered: decks saved before this change still read their kept ChemDraw objects with new ids once, and the ids are written from then on.
License and IP: not needed.
Screens: no visible change.
Privacy:
node scripts/privacy-check.mjspasses. No file from the R1 report is in the repository.Chemistry test values: none added.
Replaces: nothing.
Kept in step: not affected.
Tests: the PowerPoint, deck, OLE and sampler tests pass (878), as do the regex and catch lints, the tests' name check and
npm run typecheck:strict.🤖 Generated with Claude Code
https://claude.ai/code/session_015xDL2RDfbKRYtRtSD1GTmQ