onlyworlds_obsidian-plugin/Modals
Titus 59feec9338 Phase B: frontmatter flip (span -> YAML frontmatter)
Wake the dormant vault/element-file.ts write path and make YAML frontmatter
the note format for new writes, with read-tolerance for legacy span notes.

Pure logic (Obsidian-free, unit-tested under `npm test`):
- vault/element-transform.ts: frontmatter<->payload, span parse, span->frontmatter,
  link normalization (single string / multi list, never comma-joined), extension-key
  passthrough (atlas_/shadow_/x_), body<->description|story mapping, read-before-PATCH diff.
- test/element-transform.test.ts + tsconfig.test.json: 16 node:test cases incl. a real
  span-format Character fixture. Wired to `npm test` (pretest compiles to test-dist/).

Wiring:
- element-file.ts: readElement preserves extension fields + maps body to story for
  Narrative (R3/R5); frontmatter-first with legacy span fallback; writeElement round-trips
  extension keys and respects count-suffixed folders.
- DownloadWorldCommand + CreateElementCommand: emit frontmatter via writeElement (no more
  Handlebars element templates).
- NoteLinker: reworked onto metadataCache + SDK FIELD_SCHEMA; writes link IDs into
  frontmatter (new FieldSelectionModal picks the field). NameChanger syncs frontmatter name.
- SaveElementCommand: read-before-PATCH (GET, diff, PATCH only changed fields) (R7).
- ExportWorldCommand + CopyWorldCommand: read frontmatter via readElement, span as fallback
  (mixed worlds upload/copy correctly).
- MigrateWorldCommand: "Migrate world notes to frontmatter" — backup-first (abort on failure),
  idempotent, end report modal (converted/skipped/failed).

Deferred (see docs report): PasteWorld still emits span; ValidateWorld is still a span linter
(diagnostic only, no writes). docs/SMOKE-CHECKLIST.md is the manual release gate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 13:43:56 +02:00
..
ApiResponseModal.ts update import world with pin logic; fix multi id csv->json 2025-03-15 18:43:40 +01:00
CreateElementFromLinkModal.ts Enhance NoteLinker and CreateElementCommand with manifest integration; add CreateElementFromLinkModal for element creation. Update ElementSelectionModal to support new element creation and refresh functionality. 2025-07-09 09:47:30 +02:00
CreateElementModal.ts create element modal 2025-07-08 20:13:22 +02:00
CreateWorldModal.ts email setting 2025-07-08 12:19:39 +02:00
ElementSelectionModal.ts Enhance NoteLinker and CreateElementCommand with manifest integration; add CreateElementFromLinkModal for element creation. Update ElementSelectionModal to support new element creation and refresh functionality. 2025-07-09 09:47:30 +02:00
FieldSelectionModal.ts Phase B: frontmatter flip (span -> YAML frontmatter) 2026-07-16 13:43:56 +02:00
NameInputModal.ts ele create button 2024-10-08 20:50:31 +02:00
PinInputModal.ts more pin maxes 2025-06-29 17:00:43 +02:00
TemplateSelectionModal.ts autoselect text on create element 2025-03-15 17:51:26 +01:00
ValidateCopyResultModal.ts modals 2025-07-07 22:38:41 +02:00
ValidateExportResultModal.ts 2.2.0: Download World restored, round-trip link integrity, key-format sweep 2026-07-12 13:56:56 +02:00
ValidateResultModal.ts update import world with pin logic; fix multi id csv->json 2025-03-15 18:43:40 +01:00
WorldCopyModal.ts feedback changes 2024-08-18 15:36:28 +02:00
WorldDownloadModal.ts 2.2.0: Download World restored, round-trip link integrity, key-format sweep 2026-07-12 13:56:56 +02:00
WorldKeyModal.ts 2.2.0: Download World restored, round-trip link integrity, key-format sweep 2026-07-12 13:56:56 +02:00
WorldKeySelectionModal.ts 2.2.0: Download World restored, round-trip link integrity, key-format sweep 2026-07-12 13:56:56 +02:00
WorldNameModal.ts world create with api call 2025-03-15 17:08:42 +01:00
WorldPasteModal.ts fix paste world by api key 2025-07-08 13:27:30 +02:00
WorldPinSelectionModal.ts refactor: change PIN input type from number to password in multiple modals for enhanced security 2025-06-29 17:02:35 +02:00
WorldRenameModal.ts separate styles, restore WorldHandlebar, remove default worldkey 2024-08-18 15:58:36 +02:00
WorldSelectionModal.ts modals 2025-07-07 22:38:41 +02:00