onlyworlds_obsidian-plugin/Commands
Titus c5e08180f0 S9: resolve link names at download time from payload, not the cache
Link fields rendered as raw UUIDs after a real download: writeElement
resolved id->name via metadataCache, which is cold for freshly-written
sibling notes mid-bulk-write, so nearly every link stayed a bare id.

Fix (restores the old linkifyContent/buildVaultNameIndex approach for the
frontmatter format):
- WriteElementOpts gains an idToName map; when present writeElement uses it
  instead of the cache-scanning buildIdToNameResolver (absent = back-compat).
- DownloadWorldCommand builds ONE complete id->basename map before the write
  loop: seeded from the in-memory payload (freshest names) with a raw-disk
  fallback (parseRawFrontmatterScalars, NO metadataCache) for ids outside an
  incremental pull's changed set. Names pass through sanitizeFileName so the
  written [[Name]] resolves by filename. Unknown id -> raw id (never dropped).
- parseRawFrontmatterScalars added to element-transform (pure, dep-free) +
  unit tests; plus a download-style injected-map render test. 59/59 green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 22:46:31 +02:00
..
CopyWorldCommand.ts gate fixes: frontmatter elements keep their id through Upload/Copy 2026-07-16 13:54:47 +02:00
CreateCategoryFoldersCommand.ts paste world fixes, duplicate world and char name fixes 2025-07-08 19:05:37 +02:00
CreateCoreFilesCommand.ts handlebar API fetch and use 2024-10-08 20:33:14 +02:00
CreateElementCommand.ts Phase B: frontmatter flip (span -> YAML frontmatter) 2026-07-16 13:43:56 +02:00
CreateHandlebarsCommand.ts 2.2.0: Download World restored, round-trip link integrity, key-format sweep 2026-07-12 13:56:56 +02:00
CreateReadmeCommand.ts notice fixes 2024-10-08 21:24:02 +02:00
CreateSettingsCommand.ts email setting 2025-07-08 12:19:39 +02:00
CreateTemplatesCommand.ts 2.0.0: SDK, auto-sync, native settings, modernized build 2026-05-11 12:51:28 +02:00
CreateWorldCommand.ts fix HTML-entity escaping of names (apostrophes) in note write + read paths (2.2.2) 2026-07-12 16:43:24 +02:00
DeleteElementCommand.ts 2.3.0: OnlyWorlds v2 API transport + smoke-hardened sync + Delete Element 2026-07-13 18:22:24 +02:00
DownloadWorldCommand.ts S9: resolve link names at download time from payload, not the cache 2026-07-16 22:46:31 +02:00
export-plan.ts S9: export destination picker -- write straight into Atlas root 2026-07-16 17:39:27 +02:00
ExportFolderCommand.ts S9: export destination picker -- write straight into Atlas root 2026-07-16 17:39:27 +02:00
ExportWorldCommand.ts gate fixes: frontmatter elements keep their id through Upload/Copy 2026-07-16 13:54:47 +02:00
ImportFolderCommand.ts keeper ruling: stable per-vault world identity for the folder bridge 2026-07-16 14:11:38 +02:00
MigrateWorldCommand.ts R9: writer-minted migration fixtures + entity-decode fix 2026-07-16 13:49:32 +02:00
PasteWorldCommand.ts fix HTML-entity escaping of names (apostrophes) in note write + read paths (2.2.2) 2026-07-12 16:43:24 +02:00
RenameWorldCommand.ts fix wrong-world writes + false-success rename toast (2.2.1) 2026-07-12 14:52:40 +02:00
SaveElementCommand.ts Phase B: frontmatter flip (span -> YAML frontmatter) 2026-07-16 13:43:56 +02:00
UpdateCategoryCountsCommand.ts paste world fixes, duplicate world and char name fixes 2025-07-08 19:05:37 +02:00
ValidateWorldCommand.ts update import world with pin logic; fix multi id csv->json 2025-03-15 18:43:40 +01:00