Repository navigation
Conversation
WiseMapping keeps its maps as plain XML (the current "tango" dialect and the older "pela" files), and Cartocortex now reads and writes that. Reading is the strict XML parser from the old .xmind files (no DOCTYPE, predefined entities only): texts (a single-line attribute or a multi-line block), notes (the CDATA note and the percent-encoded attribute of the old files), links, fill and text colours, bold and italic, shapes (box and line), folding, the map's relationships (as relationship lines) and its free branches (as floating topics, positions kept). The side a topic sits on comes from its position, so a left-leaning map opens as Logic (left) and a two-sided one as a map. Writing goes the other way (Save as .wxml and a new "Export WiseMapping" button): the first sheet is the map and the sheets after it are WiseMapping's free branches, with positions worked out from the tree shape; markers keep their emoji, but priorities, progress, pictures, per-word style, boundaries, summaries and topic links are not carried. The format was taken from WiseMapping's own serializer and importer, and has not been checked against WiseMapping itself. Agent: Vibe (Mistral, glm-5-latest-short) Relu-par-humain: Martin-PB
This was referenced Oct 17, 2026
The reader drops relationships whose ends are missing, but the type checker still saw both ends as possibly undefined and refused the build; the filter now carries a type guard saying what it keeps. The FreeMind gzip test also compares the two reads without their fresh ids, the same fix the FreeMind branch already carries. Agent: Vibe (Mistral, glm-5-latest-short) Relu-par-humain: Martin-PB
Resolve the conflicts in files.ts (keep main's parseDocReport with the import report and add the .wxml branch to it) and README.md (keep the WiseMapping paragraph, main's unzip limit and the safety rule naming WiseMapping). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G2FX9kDHnPYmocPxX3w7ov
This branch has not been deployed
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.
Intent
Fourth step of the "every mind map format" program (one PR per format): read and write WiseMapping
.wxmlmaps. WiseMapping stores its maps as flat XML — the current "tango" dialect and the older "pela" files — and Cartocortex can now open these files and export to them.This PR was based on the branch of PR #3 (
mp-mindmanager-mmap), itself based on PR #1. PRs #1 and #3 are now merged, so this PR is reviewed againstmain.What was done
src/wisemapping.ts(new):fromWisemapping/toWisemappingreader and writer, reusing the strict XML parser of the.xmindreader (no DOCTYPE, predefined entities only).textattribute or multi-line<text>block), notes ("tango" CDATA or the percent-encoded attribute of older files),<link url>links,<eicon id>icons (emoji), background and text colours (bgColor,fontStyle), bold/italic, shapes (box → rect, line → line, ellipse by default), folding (shrink),order(stable sort), positions,<relationship srcTopicId destTopicId>→ relationship lines, map-level free branches → floating topics (positions kept). A topic's side comes from itsxposition: all left → Logic (left), mixed → Map (right side first).toWisemapping, Save as.wxmland the "Export WiseMapping" button): the first sheet becomes the central<topic central="true">map, the following sheets and floating topics become free branches (positions recomputed from the tree shape: ±200 px at level 1, ±90 px deeper); relations are written back with numeric pre-order ids.src/wisemapping.test.ts(new): 5 vitest tests — a full tango sample (multi-line note, link, icon, styles, folding, relation, free branch), a "pela" file withorderand nocentralattribute, strict errors (DOCTYPE, no topic, invalid XML), a full round trip (multi-line text containing]]>, folding, relations, sheet 2 as a free branch at {200, 250}), writing geometry.src/files.ts: wiring of thewxmlformat intodocBytes/parseDoc, and the open/save dialog filters and extensions.src/files.test.ts: aplan.wxmlround-trip test (flat XML, one map per file, following sheets as free branches).src/App.tsx: "WiseMapping (.wxml)" entry in the export menu.README.md: a WiseMapping paragraph (format, reading, writing, losses, provenance) and updated format lists.What the agent did
XMLSerializerTango/XMLSerializerPela, wisemapping-frontend) and theMindmapImporterimporter.textattributes vs multi-line blocks, CDATA vs percent-encoded notes, colours, styles, shapes, folding,order, positions and sides, relations, free branches, round trip, strict errors, writing geometry).npm test,tsc,npm run build(no Node in the sandbox) — the two CI jobs of the PR cover them instead.Human checks
npm testandnpm run buildpass on the branch..wxmlexported by WiseMapping, then re-export from Cartocortex and reopen in WiseMapping.Agent: Vibe (Mistral, glm-5-latest-short)
Reviewed-by: Martin-PB