Build S4: Convert to Post — in-place, transform choice at conversion #114
Notifications
Due Date
No due date set.
Depends on
#111 Build S7: mixed-content outline guard — no silent prose loss
AlexKucera/museion
Reference: AlexKucera/museion#114
Reference in new issue
Block a user
Part of #110
Question
Build S4: Convert to Post — in-place, transform choice at conversion. A Convert to Post command on outline pieces: id, folder, pass state, origin kept;
typefrontmatter flips topost; body transforms once. At conversion the writer chooses the transform: (1) verbatim bullets — nested-bullet markdown becomes the post body unchanged; (2) headings ladder — a heading-depth mapping of the outline levels (root →##, deeper levels step down to a floor, remainder stay bullets; exact ladder per build's simplest honest rule;# Titlepreamble stays above the body either way). Open session flush-first, re-route the editor to the prose surface, fliplastDraftWasOutlinemachinery the other way; scan reads the new type on rescan. One-way in v1 (Post → Outline is not built).[Generated by AI]
LANDED in main @
c0513aa(2026-10-16).What landed — Convert to Post on outline pieces (library row menu + Archive pane): id, folder, Pass State, origin kept;
typeflips topost; body transforms once. The ask (ConvertSheet, house pattern): Verbatim Bullets (default — lossless, body unchanged) or Headings (roots →##, each level steps one heading down to the######floor, deeper levels stay bullets re-based flush;# Titlepreamble rides above either way). One-way in v1.Flow — open session flushes first (
flushOrAbort), convert reads disk, the piece reopens routed to prose viaproseOverridePostID(lastDraftWasOutline's machinery reversed — the existing override slot, no new routing state). An unopened piece converts in place; archived pieces stay archived. Scan reads the new type on rescan.Audit round (finish-audit, three reviewers) folded in before landing:
session.textwhen the piece is open (disk lags the debounce)flushOrAbortseam — convert, rename, move, archive, restore); the alert stays answerableVerification —
xcodebuild build+ fulltestgreen (206 unit incl. 13 new pins + UI smoke); swiftlint 0 new; pin discrimination verified (guards flipped off → pins failed, restored). Record:docs/devlog/20261016-issue114-convert-to-post_log.md.[Generated by AI]