Wayfinder map: M1 Import & external markdown (S1.1) #22

Closed
opened 2026-08-28 18:33:08 +02:00 by AlexKucera · 2 comments
Owner

Destination

Import & external markdown (#22, PRD S1.1) built and verified against the acceptance criteria below — the map doubles as the build ticket (ready-for-agent stays).

Notes

  • Charted 2026-10-11 from the #18 build (closed map; its Out-of-scope named this ticket as the downstream hand-off). All six decision tickets were resolved live at charting and are closed; the detail lives on the tickets.
  • Consult: CONTEXT.md (Import, Origin, Post, Post ID), PRD.md S1.1, ADR-0004 (folder-shaped content), Museion/AGENTS.md (PostStore/PostsModel/EditorSession contracts), #18 devlog.
  • Menu trap from #84: CommandMenu("File") doubles the system File menu — insert Open…/Import… via CommandGroup(after: .newItem).
  • Tracker ops: docs/agents/issue-tracker.md (Wayfinding operations).

Decisions so far

  • Grilling: opening external markdown — entry points — both File ▸ Open… (⌘O, NSOpenPanel, .md/.markdown) and drag-onto-window; CommandGroup(after: .newItem), never CommandMenu("File") (#84 trap).
  • Grilling: where an open external file lives in the UI — single guest slot in the editor column (crumb = file name, mentor column stays); one buffer at a time; opening anything else flushes and replaces/dismisses; transient per launch, nothing persisted.
  • Grilling: external buffer save semantics — same posture as posts (1 s debounce flush in place, ⌘S, #67 Reload/Keep-Local alert reused); NO cursor sidecar next to external files; cursor resets on reopen.
  • Grilling: Import command & the Origin ask — File ▸ Import… (⇧⌘O), multi-select, ONE Origin ask per batch (writer default / ai, immutable, asked exactly once); copies in via origin-parameterized writeNew; per-file failure continues the batch into lastError (stated default, reversible).
  • Grilling: imported post.md shape — body byte-for-byte untouched; existing external YAML kept, pass_state: First Draft + origin: <chosen> set/overwritten (our two keys win); Title from first non-empty body line; untitled/collision machinery as #60.
  • Grilling: mechanical defaults bundle (open & import) — .md/.markdown only; files inside the Home open fine as external; quit flushes the external buffer; vanished external file = editable buffer + save failure in error strip; no mtime preservation.

Not yet specified

  • "Import this open file" button in the external buffer's toolbar — skipped in v1 (rare path; ⇧⌘O re-navigation covers it). Graduate only if it itches in use.

Out of scope

  • Converting external files on open or save — never (ADR-0004); Import is the only path to Post-hood.
  • Multiple simultaneous external buffers / tabs — v1 is one guest slot.
  • Non-markdown file types (.txt, others) — panels allow .md/.markdown only.
  • Watching external locations (FSEvents outside the Home) — conflict detection is the #67 machinery on the open file only.

Original acceptance criteria (PRD S1.1, import & external slice)

  • External markdown file opens and edits as-is inside Museion
  • Import copies — the original file is untouched — and creates the full Post shape
  • Origin asked exactly once at import; stamped immutable (writer|ai)
  • Imported Posts behave identically to native Posts afterward

[Generated by AI]

## Destination Import & external markdown (#22, PRD S1.1) built and verified against the acceptance criteria below — the map doubles as the build ticket (ready-for-agent stays). ## Notes - Charted 2026-10-11 from the #18 build (closed map; its Out-of-scope named this ticket as the downstream hand-off). All six decision tickets were resolved live at charting and are closed; the detail lives on the tickets. - Consult: CONTEXT.md (Import, Origin, Post, Post ID), PRD.md S1.1, ADR-0004 (folder-shaped content), `Museion/AGENTS.md` (PostStore/PostsModel/EditorSession contracts), #18 devlog. - Menu trap from #84: `CommandMenu("File")` doubles the system File menu — insert Open…/Import… via `CommandGroup(after: .newItem)`. - Tracker ops: docs/agents/issue-tracker.md (Wayfinding operations). ## Decisions so far - [Grilling: opening external markdown — entry points](https://git.babylondreams.de/AlexKucera/museion/issues/91) — both File ▸ Open… (⌘O, NSOpenPanel, `.md`/`.markdown`) and drag-onto-window; CommandGroup(after: .newItem), never CommandMenu("File") (#84 trap). - [Grilling: where an open external file lives in the UI](https://git.babylondreams.de/AlexKucera/museion/issues/92) — single guest slot in the editor column (crumb = file name, mentor column stays); one buffer at a time; opening anything else flushes and replaces/dismisses; transient per launch, nothing persisted. - [Grilling: external buffer save semantics](https://git.babylondreams.de/AlexKucera/museion/issues/93) — same posture as posts (1 s debounce flush in place, ⌘S, #67 Reload/Keep-Local alert reused); NO cursor sidecar next to external files; cursor resets on reopen. - [Grilling: Import command & the Origin ask](https://git.babylondreams.de/AlexKucera/museion/issues/94) — File ▸ Import… (⇧⌘O), multi-select, ONE Origin ask per batch (writer default / ai, immutable, asked exactly once); copies in via origin-parameterized writeNew; per-file failure continues the batch into lastError (stated default, reversible). - [Grilling: imported post.md shape](https://git.babylondreams.de/AlexKucera/museion/issues/95) — body byte-for-byte untouched; existing external YAML kept, `pass_state: First Draft` + `origin: <chosen>` set/overwritten (our two keys win); Title from first non-empty body line; untitled/collision machinery as #60. - [Grilling: mechanical defaults bundle (open & import)](https://git.babylondreams.de/AlexKucera/museion/issues/96) — `.md`/`.markdown` only; files inside the Home open fine as external; quit flushes the external buffer; vanished external file = editable buffer + save failure in error strip; no mtime preservation. ## Not yet specified - "Import this open file" button in the external buffer's toolbar — skipped in v1 (rare path; ⇧⌘O re-navigation covers it). Graduate only if it itches in use. ## Out of scope - Converting external files on open or save — never (ADR-0004); Import is the only path to Post-hood. - Multiple simultaneous external buffers / tabs — v1 is one guest slot. - Non-markdown file types (`.txt`, others) — panels allow `.md`/`.markdown` only. - Watching external locations (FSEvents outside the Home) — conflict detection is the #67 machinery on the open file only. ## Original acceptance criteria (PRD S1.1, import & external slice) - [ ] External markdown file opens and edits as-is inside Museion - [ ] Import copies — the original file is untouched — and creates the full Post shape - [ ] Origin asked exactly once at import; stamped immutable (writer|ai) - [ ] Imported Posts behave identically to native Posts afterward [Generated by AI]
AlexKucera added the ready-for-agent label 2026-08-28 18:33:08 +02:00
AlexKucera added a new dependency 2026-08-28 19:18:42 +02:00
AlexKucera changed title from M1: Import & external markdown (S1.1) to Wayfinder map: M1 Import & external markdown (S1.1) 2026-10-11 12:45:09 +02:00
AlexKucera added the wayfinder:map label 2026-10-11 12:45:12 +02:00
AlexKucera self-assigned this 2026-10-11 13:43:52 +02:00
Author
Owner

Build session (2026-10-12) — the S1.1 import & external slice is implemented and green locally on main @ 683d697 working tree (commit awaits authorization).

What landed

  • SessionTarget (post | externalFile) in EditorSession — one session machinery, two write targets; external saves in place, verbatim, no cursor sidecar (#93)
  • PostStore.importFile — copy never move, #95 frontmatter merge (external keys verbatim, pass_state/origin win, absent keys inserted, bare file → fresh #59 block), #60 collision suffixes, shared materialize lazy-folder path
  • Guest slot in PostsModel — one external buffer at a time, transient per launch; opening a Post/draft flushes and dismisses it (#92); per-file watcher reuses the #67 conflict check
  • File ▸ Open… ⌘O, File ▸ Import… ⇧⌘O (CommandGroup(after: .newItem) — #84 trap dodged), drag-onto-window, ONE Origin ask per batch (writer default / ai) (#94)
  • Quit flushes the guest; vanished-file → save failure in the error strip (#96)

Verification

  • Build + full test suite (unit + UI) green; new ImportExternalTests (5 tests) covers the #95 merge, collisions, untitled, save-in-place/no-sidecar, and the foreign-write conflict
  • swiftlint: 0 new violations; GitNexus impact + detect-changes run (affected flows = the touched lifecycle, all covered)

Acceptance criteria

  • External markdown file opens and edits as-is inside Museion
  • Import copies — the original file is untouched — and creates the full Post shape
  • Origin asked exactly once at import; stamped immutable (writer|ai)
  • Imported Posts behave identically to native Posts afterward

Closing the map awaits Alexander's live pass (launch, open, import, feel it) — same posture as #88's calibration gate. Devlog: docs/devlog/20261012-issue22-import-external_log.md

[Generated by AI]

Build session (2026-10-12) — the S1.1 import & external slice is implemented and green locally on main @ 683d697 working tree (commit awaits authorization). ## What landed - `SessionTarget` (post | externalFile) in `EditorSession` — one session machinery, two write targets; external saves in place, verbatim, no cursor sidecar (#93) - `PostStore.importFile` — copy never move, #95 frontmatter merge (external keys verbatim, pass_state/origin win, absent keys inserted, bare file → fresh #59 block), #60 collision suffixes, shared `materialize` lazy-folder path - Guest slot in `PostsModel` — one external buffer at a time, transient per launch; opening a Post/draft flushes and dismisses it (#92); per-file watcher reuses the #67 conflict check - File ▸ Open… ⌘O, File ▸ Import… ⇧⌘O (`CommandGroup(after: .newItem)` — #84 trap dodged), drag-onto-window, ONE Origin ask per batch (writer default / ai) (#94) - Quit flushes the guest; vanished-file → save failure in the error strip (#96) ## Verification - Build + full test suite (unit + UI) green; new `ImportExternalTests` (5 tests) covers the #95 merge, collisions, untitled, save-in-place/no-sidecar, and the foreign-write conflict - swiftlint: 0 new violations; GitNexus impact + detect-changes run (affected flows = the touched lifecycle, all covered) ## Acceptance criteria - [x] External markdown file opens and edits as-is inside Museion - [x] Import copies — the original file is untouched — and creates the full Post shape - [x] Origin asked exactly once at import; stamped immutable (writer|ai) - [x] Imported Posts behave identically to native Posts afterward Closing the map awaits Alexander's live pass (launch, open, import, feel it) — same posture as #88's calibration gate. Devlog: docs/devlog/20261012-issue22-import-external_log.md [Generated by AI]
Author
Owner

Close-out: HITL approved — live pass done. The four acceptance criteria stand as verified in the build comment; the audit round (CRLF/BOM normalization, unreadable-file guard, web-link/symlink guards, reviewer trims) is in the devlog. Map closed with zero open children (#91–#96 closed at charting). The deferred 'Import this open file' button stays in Not-yet-specified — graduate only if it itches in use.

[Generated by AI]

Close-out: HITL approved — live pass done. The four acceptance criteria stand as verified in the build comment; the audit round (CRLF/BOM normalization, unreadable-file guard, web-link/symlink guards, reviewer trims) is in the devlog. Map closed with zero open children (#91–#96 closed at charting). The deferred 'Import this open file' button stays in Not-yet-specified — graduate only if it itches in use. [Generated by AI]
Sign in to join this conversation.