Build S7: mixed-content outline guard — no silent prose loss #111
Notifications
Due Date
No due date set.
Blocks
#114 Build S4: Convert to Post — in-place, transform choice at conversion
AlexKucera/museion
#115 Build S5: prose-list shortcuts — Tab/⇧Tab, ⌥ moves, visual collapse
AlexKucera/museion
Reference: AlexKucera/museion#111
Reference in new issue
Block a user
Part of #110
Question
Build S7: mixed-content outline guard — no silent prose loss. External outlines with paragraph lines between bullets currently drop those lines on the next in-app save (parse drops non-item lines after the first bullet; serialize never writes them back). Ruling: on open, when a
type: outlinepiece parses with dropped non-item lines, warn and offer opening the piece in prose mode instead — outlines still render in prose mode (nested lists, apex pipeline), just not as well; no data loss. Accepting outline mode anyway = the save normalizes (drops) as today, but only after the explicit choice. Flush discipline: the choice happens before any edit; a piece already being edited in-session when the drop is detected can't silently normalize on ⌘S either — the guard fires at load/route time (draft staging + session open), where the type decision lives.[Generated by AI]
Resolved — S7 landed.
What shipped (302 insertions across 6 files, 176/176 tests green, build + swiftformat/swiftlint clean):
OutlineTree.parsesWithLoss(_:)— the detector: any non-blank non-item line after the first item (sharesparseItem, so detector and parser can never disagree; blanks/preamble don't count).PostsModel.selectguard branch — atype: outlinepiece that parses with loss ends the old session (flush-first, prose-mode flush can't drop), nils the new one, and holds the open (outlineGuardPieceID). The ask presents over an EMPTY editor — nothing can edit, so nothing can normalize on ⌘S before the choice (the ticket's flush discipline).proseOverridePostID, a routing override withlastDraftWasOutline's exact lifecycle) · Open as Outline (explicit consent — saves drop as today) · Cancel/Esc (no session; still guarded on next open).OutlineGuardSheetin WorkspaceView — the third house ask (OriginAsk/NewProject binding pattern).parsesWithLosspin + guard lifecycle (fires/holds/file untouched, prose edit-flush cycle drops nothing, outline answer consented drop, cancel re-guards, clean pieces open untouched).Record: docs/devlog/20261015-issue111-outline-guard_log.md
Uncommitted on main — awaiting explicit authorization per repo policy.
[Generated by AI]
Audit round (finish-audit, 3 parallel fresh-context reviewers) — findings fixed, pins verified to bite:
outlineGuardPieceIDdies in newPost/newOutline/openExternal +openUnguarded(select's tail now routes through it — one open body).3 pinning tests added; both lifecycle pins verified to FAIL with the fixes reverted. 179/179 green, build + swiftformat/swiftlint clean. Deferred: remembered per-piece prose preference (per-open consent is the ruled direction); main-actor guard reads (existing house posture).
[Generated by AI]