Outerline 1.0-1178
Summary
Build 1178 moves shared Mermaid detection, escaping, and HTML template logic into reusable code used by both platforms, preserving offline diagram rendering in the editor, preview, and HTML/PDF export. On macOS, new document creation is hardened so files land in the correct sidebar folder and unsaved drafts survive iCloud-driven library refreshes; starred document metadata now stays stable when a rename from another device arrives before the matching identity update.
On iOS, editor formatting controls are tightened so heading and list actions work from an empty caret position, and new documents open directly into the editor without a loading state. Library startup is much faster after the first successful sync by restoring the last known vault snapshot immediately, with initial iCloud sync staying active until downloaded documents reload with resolved titles and previews. Rename handling is stabilized across the library, editor, Starred, and Tags views so the active document and library rows stay consistent throughout.
macOS
Improvements
- Settings window now keeps the familiar fixed width while adapting its height per selected tab, with tab content top-aligned to avoid large empty vertical padding.
- Mermaid HTML/PDF export now uses the shared HTML template and bundled script loader path, preserving offline rendering with no network dependency.
Fixes
- Reduced scroll hitch when passing over multi-line fenced code blocks in the editor by limiting code-block background drawing work to the dirty rect range.
- Fixed New Document from the library file list so it targets the selected sidebar folder even if the file-list scope is stale.
- Fixed unsaved New Document drafts disappearing if a library refresh happens before the first save, which could make the empty-folder New Document button appear to do nothing in iCloud-backed libraries.
- Fixed starred documents briefly disappearing from macOS after an external rename and then syncing that dropped star state back to other devices.
iOS
Improvements
- Heading actions in the Aa format sheet now work from an empty caret position, matching the insertion-point behavior already used by inline formatting controls.
- Empty current lines can now receive Markdown line prefixes directly, so starting a heading or list from a blank line is faster and more predictable.
- Editor preview now detects Mermaid fenced code blocks and renders them as diagrams inside the existing Markdown preview, rather than showing raw Mermaid source.
- HTML and PDF export now emit Mermaid containers and wait for the WebKit render completion flag before sizing PDF output.
- iOS now caches derived vault display data after a successful load so cold relaunches can show the library without re-reading every Markdown file first.
- Initial iCloud sync now polls download state while progress is visible, so it can recover when file-provider metadata change events arrive late or are missed.
- Rename flows now share the same identity-preserving file move path while keeping editor-initiated renames separate from library, Starred, Tags, and All Documents renames.
Fixes
- Fixed an issue where tapping Heading 1, Heading 2, or other heading options in the iOS Aa format sheet did nothing when the caret was not selecting text.
- Fixed New Document on iOS showing a loading sequence before the new editor appeared; the app now seeds the editor immediately after creating the file.
- Fixed Mermaid preview initially reserving blank space because the embedded WebView was canceling its own internal HTML load.
- Fixed Mermaid preview showing raw diagram source on device by copying
mermaid.min.jsinto the iOS app bundle through the Xcode resource phase. - Fixed the onboarding screen briefly flashing during cold launch when a persisted vault selection already exists.
- Fixed Starred and Tags sections starting collapsed on cached restore and expanding a beat later after background refresh.
- Fixed initial iCloud sync progress completing while the library still showed placeholder
filename.mdrows; sync now stays active until a hydrated reload resolves titles and previews. - Fixed a case where initial iCloud sync could stall near completion if iCloud download metadata did not emit another update.
- Fixed quick-open after renaming from the library, Starred, Tags, or All Documents views so the app no longer shows a transient “Document not available” state.
- Fixed editor renames briefly flashing out to a missing-document state before returning to the renamed document.
- Fixed starred rows briefly leaving and returning after rename; renames now keep visible library state stable.