Commit graph

35 commits

Author SHA1 Message Date
Titus
4a0ec0f395 Link picker: toggle list (add AND remove) + search box + shows existing
The picker was add-only — calling it 'Edit' but never letting you unlink was
the real wrong. Reworked ElementSelectionModal into a toggle list: every
element of the type shown, already-linked ones pre-checked, click toggles
link/unlink, checked-first ordering, search box for long lists. Multi-link
confirms a set on Done; single-link is radio-style (pick sets + closes) with a
Clear-link option to unset. NoteLinker computes current links (resolving
[[Name]] via the path-aware resolver) to pre-check, and writeLink now REPLACES
the field with exactly the chosen set instead of merge-only.

Gate: tsc clean, build clean, 60/60 tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 09:27:59 +02:00
Titus
7d36a3f137 Link Elements writes [[wikilinks]] + modal UX (was writing raw ids)
THE bug: NoteLinker.writeLink wrote raw UUIDs into link fields — the one
write path never updated for the 3.0.0 readability change, so linking via
the command produced unreadable uuid fields. Now writes [[Name]] wikilinks
(sanitized to match the on-disk basename), merging by name AND id so an
existing raw-id or wikilink entry isn't duplicated — old raw-id links
self-heal to wikilinks on next edit. Merge logic unit-verified (add / re-add /
raw-id-upgrade / colon-name).

Modal UX (Captain's asks): field picker shows each field's current link count
(empty vs filled), sorts single links first then empty-before-filled, dims
already-filled fields, Add/Edit button label. README notes native Property
autocomplete as a second linking path.

Gate: tsc clean, build clean, 60/60 tests + merge unit-check.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 09:21:05 +02:00
Titus
6c04bf692c 3.0.0 batch: template-free everywhere, read-key pinless download, docs
- Template fetch retired: Create/Download/Paste no longer fetch or write the
  legacy PluginFiles/Templates + Handlebars sets (nothing reads them — every
  note write is frontmatter via writeElement). includeLegacyTemplates defaults
  false; the two Create* template commands kept as a reversible margin.
- Read-only keys need no PIN: WorldDownloadModal detects ow_r_ / demo keys and
  greys out the PIN field; validation accepts a blank PIN and sends "". Write
  keys and private-world write keys still require the 4-digit PIN (unit-checked:
  read keys skip, write keys don't — no auth hole). pin type: number -> string.
- Docs: README read-key note + all commands current; release notes reversioned
  2.4.0 -> 3.0.0 (the frontmatter era: format change + folder bridge + span
  retirement = a major).

Gate: tsc clean, build clean, 60/60 tests + pinless-detection unit check.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 09:12:53 +02:00
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
Titus
3e1725918e 2.2.0: Download World restored, round-trip link integrity, key-format sweep
Save Element creates new elements (create-on-404); Upload World renamed
with real error surfacing; Rename World pushes; Download World returns
(prefixed-key clean) with self-healing Map/Pin/Marker templates; upload
parser ships links as _id/_ids UUIDs; per-world key resolution ends the
wrong-world write class; scoped keys primary in all copy.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-12 13:56:56 +02:00
Titus
6bb07d21c1 2.1.0: retire legacy Import World command (prefixed-key readiness)
The legacy ImportWorldCommand + WorldImportModal enforced 10-digit
numeric API keys (digit-strip listener, maxlength, length checks) and
would reject the new prefixed ow_* keys the OnlyWorlds platform issues
after its backend migration. The SDK settings flow (link world + sync)
covers the import job with opaque-string key handling; old 10-digit
keys keep working there too.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-11 11:57:21 +02:00
Titus
2db39c7c7b 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
Titus
f516db71fb create element modal 2025-07-08 20:13:22 +02:00
Titus
8d49288681 fix paste world by api key 2025-07-08 13:27:30 +02:00
Titus
72697c8b8f email setting 2025-07-08 12:19:39 +02:00
Titus
34d1bfca58 modals 2025-07-07 22:38:41 +02:00
Titus
591dbf203c urls and names 2025-07-07 20:27:21 +02:00
Titus
daeb0f731d refactor: change PIN input type from number to password in multiple modals for enhanced security 2025-06-29 17:02:35 +02:00
Titus
1245d91be0 more pin maxes 2025-06-29 17:00:43 +02:00
Titus
7e6d020a1c chore: update world version to 0.30.00, adjust API URL for production, and enhance input validation for API key and PIN fields in modals 2025-06-29 16:48:36 +02:00
Titus
597aa2032b refactor: update enum name from Territory to Zone and adjust GitHub base URLs for Handlebars and templates; enhance PIN input validation in CreateWorldModal 2025-06-29 16:26:39 +02:00
Titus
2ff0a05c59 save element command 2025-04-21 22:06:18 +02:00
Titus
a75d76f09d remove focus text 2025-03-16 18:20:29 +01:00
Titus
c7452b5b7c update copy label 2025-03-15 19:35:17 +01:00
Titus
af861543f0 clear logs 2025-03-15 19:15:14 +01:00
Titus
1fbdfe3bac fix image url display 2025-03-15 19:04:25 +01:00
Titus
4f7706820c update import world with pin logic; fix multi id csv->json 2025-03-15 18:43:40 +01:00
Titus
fd0a095e39 add PIN logic to world export 2025-03-15 18:09:55 +01:00
Titus
c860150e4d autoselect text on create element 2025-03-15 17:51:26 +01:00
Titus
e1c94a7b71 impove world create success modal 2025-03-15 17:49:43 +01:00
Titus
f8d3bb9c1c world create with PIN validation 2025-03-15 17:41:22 +01:00
Titus
9bdb4b2bc7 world create with api call 2025-03-15 17:08:42 +01:00
OnlyWorlds
e635d7962c default category create setting 2024-10-08 21:12:37 +02:00
OnlyWorlds
58b3a80cd5 ele create button 2024-10-08 20:50:31 +02:00
OnlyWorlds
103a9fac5d buttons for confirm create/import 2024-10-08 20:17:40 +02:00
OnlyWorlds
a27db9cb68 separate styles, restore WorldHandlebar, remove default worldkey 2024-08-18 15:58:36 +02:00
Titus Oosting
dec8cf9b31 feedback changes 2024-08-18 15:36:28 +02:00
OnlyWorlds
57d255947e remove logs 2024-08-12 23:01:36 +02:00
OnlyWorlds
3dccb68ae7 validate on copy 2024-08-11 18:56:25 +02:00
OnlyWorlds
73caed562d import 2024-08-11 17:00:15 +02:00