Skip to content

MindManager .mmap: faithful round trip, import report, UTF-16, safer links - #29

Merged
thierrysays merged 2 commits into
mainfrom
claude/clever-goodall-xn72z5
Nov 13, 2026
Merged

thierrysays merged 2 commits into
mainfrom
claude/clever-goodall-xn72z5

Conversation

@thierrysays

@thierrysays thierrysays commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to the MindManager .mmap reader/writer.

Round trip

Saving a map as .mmap and re-opening it changed the map.

  • Structure: the writer now emits SubTopicsShape/SubTopicsGrowthDirection on each central topic (Right, Left, LeftAndRight). Before, the direction was absent and the reader took that as "both sides", so every exported chart re-opened as a two-sided map. Structures MindManager lacks go out as a right-growing chart.
  • Floating topics: written as FloatingTopics with an Offset in millimetres instead of ordinary subtopics.
  • Relationships, export: those of every sheet are written, not only the first sheet's.
  • Relationships, import: each one is attached to the sheet holding both of its ends; one spanning two maps is dropped. Before, all went on the first sheet, where those of other sheets were pruned.

Import

  • Import report: the reader feeds the same Report as the XMind import, so the user is told about dropped links to other topics, other unusable links, pictures, boundaries, icons with no counterpart, relationships that lost an end, callouts opened as subtopics, and maps with unequal sides.
  • Links: a Hyperlink is kept only when it is an http(s) or mailto address that normalizeUrl accepts; file paths and javascript: are dropped and reported.
  • UTF-16: flat XML (and Document.xml) in UTF-16 is decoded, with or without a byte order mark.

Export

  • Escaping: a shared escXml / escXmlAttr in src/xmindxml.ts removes the characters XML 1.0 forbids and keeps tabs, CR and LF in attribute values. The FreeMind writer uses it too, in place of its identical private copy.

Not fixed

A two-sided map splits its topics by count (layout in src/model.ts), so a file whose left and right sides hold unequal numbers of topics still opens split evenly. Fixing it needs a notion of side in the model; it is marked with a // ponytail: comment, stated in the README, and now shown in the import report.

Tests

Five tests added in src/mindmanager.test.ts. tsc --noEmit clean, vitest run: 134 passed.

The format is still unchecked against MindManager itself, as the README says.

🤖 Generated with Claude Code

https://claude.ai/code/session_016C1G4PM7XGqJdpzydsnBCc

….mmap round trip

The writer now emits the growth direction of each sheet, writes floating
topics as FloatingTopics with their offset, and exports the relationships
of every sheet. The reader attaches each relationship to the sheet that
holds both of its ends instead of putting them all on the first one.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016C1G4PM7XGqJdpzydsnBCc
The MindManager reader now feeds the import report, keeps only links that
are web or mail addresses, and decodes UTF-16 flat files. The XML escaper
is shared with the FreeMind writer: it removes the characters XML 1.0
forbids and keeps tabs and line breaks in attribute values.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016C1G4PM7XGqJdpzydsnBCc
@thierrysays thierrysays changed the title Keep structure, floating topics and relationships across a .mmap round trip MindManager .mmap: faithful round trip, import report, UTF-16, safer links Nov 13, 2026
@thierrysays
thierrysays marked this pull request as ready for review November 13, 2026 15:26
@thierrysays
thierrysays merged commit d7ec22c into main Nov 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants