Skip to content
CAI
Software that uses CAICheck a score

tw93/MiaoYan

54.2

Adequate · 27 September 2026

36.7k

lines of production code

Swift

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

MiaoYan is a cross-platform Markdown editor for macOS and iOS that provides a split-view interface for simultaneous editing and live preview. It features robust rendering capabilities including syntax highlighting, LaTeX math, and diagram support, alongside utilities for exporting content to PDF or presentations. The system ensures data continuity through iCloud synchronization and offers extensive customization for typography, themes, and local file management.

How it got here

2020–2022 — Initial project setup and rendering engine development

9 changes.

The MiaoYan project was initialized with foundational configuration, documentation, and an Xcode project structure supporting macOS and iOS targets. Significant effort focused on building the Markdown preview and PPT export engines, introducing robust dark mode support, advanced rendering for math and diagrams, and syntax highlighting capabilities.

2025 — Swift 6 migration and UI rewrite

10 changes.

The project migrated to Swift Package Manager and Swift 6, upgrading deployment targets to macOS 11 and iOS 18. A comprehensive UI overhaul replaced storyboards with programmatic Cocoa views, introducing a modular preferences architecture and a robust split-view editor. Supporting changes included centralized font and environment management, new utility extensions, and added localization for Japanese and Chinese.

2026 — iOS app launch and release automation

10 changes.

This period focused on introducing the MiaoYanMobile iOS application, implementing core features such as iCloud sync, a split-view interface for iPad, and a markdown editor with syntax highlighting. Concurrently, the project established a robust automated release pipeline with notarization and per-language support, while adding Spanish localization and enhancing test coverage to ensure stability.

Features

Add Spanish (es) localization

Users can now use the application in Spanish. This change adds the Spanish localization bundle, providing translated strings for the main menu, preferences, editor interface, and toast messages.

Resources/Localization/es.lproj · high confidence

Added Simplified Chinese localization for MiaoYan

The application now displays its user interface in Simplified Chinese. This change adds the \zh-Hans.lproj\ localization bundle, including \Localizable.strings\ for core UI elements (menus, dialogs, settings), \Main.strings\ for menu titles and window labels, \ContentViewController.strings\ for metadata labels, and \InfoPlist.strings\ for the app name and bundle display name.

Resources/Localization/zh-Hans.lproj · high confidence

Added syntax highlighting support for presentations

The presentation plugin now includes a bundled version of the Highlight.js library (v10.7.0) to enable syntax highlighting for code blocks within slides. This addition introduces a new \highlight.js\ file in the plugin directory, providing the core engine for rendering highlighted code snippets in the PPT viewer.

Resources/DownView.bundle/ppt/plugin · high confidence

Initial iOS app resource configuration and localization

The MiaoYan iOS app is introduced with its core resource bundle, including an Info.plist that defines the app identity, iCloud Drive integration, and supported interface orientations. Localization is established for English and Simplified Chinese via xcstrings files for both bundle metadata and in-app UI text. A privacy manifest is added to declare API usage for file timestamps and user defaults, and a mobile-specific CSS stylesheet is provided to handle typography, dark mode, and mixed CJK/Latin line wrapping in the reader view.

MiaoYanMobile/Resources · high confidence

Initial project structure and source file registration

The MiaoYan Xcode project has been initialized with a comprehensive set of source files, frameworks, and resources. This includes the core application components (AppDelegate, MainWindowController, ViewController), UI elements (Sidebar, Editor, Preview, Settings), and supporting modules (CloudSync, PinService, FontConfiguration). The project also registers key third-party dependencies such as CMarkGFM, Highlightr, Sparkle, and KeyboardShortcuts, along with test targets for various features like HTML management, font handling, and storage logic.

MiaoYan.xcodeproj · high confidence

Initial repository structure and configuration

The repository is initialized with the foundational configuration files required for the MiaoYan project, including \.gitattributes\ and \.gitignore\ to manage version control and build artifacts, \.swift-format\ and \.swiftlint.yml\ to enforce code style and quality standards, and \Info.plist\ defining the macOS application metadata and entitlements. Essential documentation files such as \AGENTS.md\, \ARCHITECTURE.md\, \DEPENDENCIES.md\, \LICENSE\, \README\_CN.md\, \CONTRIBUTING.md\, and \CODE\_OF\_CONDUCT.md\ are added to guide development and usage, alongside entitlement files for the macOS and iOS targets.

(repo-wide) · high confidence

Introduce MiaoYanMobile iOS app with iPad split-view and enhanced editing

This change introduces the initial iOS version of MiaoYan, adding a new folder list view that adapts to device size: iPhones use a three-tab layout (Notes, Folders, Search), while iPads in regular width get a three-column split view. The app supports external cloud folders and iCloud sync, with a new markdown editor that includes syntax highlighting, image paste support, and improved font handling. Search results now feature aligned cards with highlighted matches, and the note detail view includes a skeleton loading state to prevent layout jumps. Settings allow users to customize font family and size, which apply to both editing and reading views.

MiaoYanMobile/Views · high confidence

Introduce iOS iCloud sync, fast cold-start, and markdown editing services

This change adds the core service layer for the new MiaoYanMobile iOS app. CloudSyncManager handles iCloud container provisioning, metadata querying, and sync status to support cross-device note storage. RecentNotesCache and FileReader provide a snapshot-based cold-start path that renders the Notes tab instantly without blocking on disk I/O or iCloud placeholder resolution. MarkdownHighlighter brings syntax highlighting to the iOS editor, while MobileHtmlRenderer handles reader output including frontmatter hiding, local asset rewriting, and wikilink navigation. Additional services include PinService for device-local note pinning via extended attributes, NoteSearchReader for cancellable chunked file reads, and NoteFile/FolderItem models for the UI layer.

MiaoYanMobile/Services · high confidence

Introduce split-view settings and unified preferences architecture

The application now features a redesigned Preferences window with a sidebar navigation and dedicated pages for General, Editor, and Typography settings. This change introduces specific configuration options for the new split-view mode, allowing users to toggle between single and split layouts directly from the General settings. Additionally, the Editor settings page provides controls for line break styles, image upload services, and preview location/width, while the General settings page manages appearance, language, storage location, and always-on-top behavior. The underlying controller architecture has been refactored to support this modular preferences structure, including new view controllers for handling these specific settings and a centralized base class for preference form layout.

Controllers · high confidence

Japanese and Traditional Chinese localization files added

The application now includes localized user interface strings for Japanese (ja) and Traditional Chinese (zh-Hant). This change adds new \.strings\ files for the main menu, settings, content view, and system info, enabling these languages to be displayed in the app's menus, dialogs, and preferences.

Resources/Localization/ja.lproj · high confidence

New MiaoYan App entry point with enhanced Markdown rendering and image handling

The DownView bundle now initializes via a new MiaoYanApp entry point that integrates common utilities for improved Markdown preview. This includes wrapping wide tables in scrollable containers to prevent content clipping, enabling interactive checkboxes that sync with the host app, and implementing aggressive lazy loading for images using Intersection Observer to improve performance. Additionally, the bundle now includes auto-render.min.js for default LaTeX math support and d3.min.js (v6.7.0) to support markmap visualizations.

Resources/DownView.bundle/js · high confidence

New PPT presentation themes (Night and White) added

The PPT preview engine now supports two new visual themes, 'Night' and 'White', in addition to existing options. These themes provide distinct styling for text, backgrounds, code syntax highlighting, and interactive elements like links and selections, allowing users to choose a color scheme that best fits their content or preference.

Resources/DownView.bundle/ppt/dist/theme · high confidence

New helper modules for syntax highlighting, clipboard management, and file system events

The Helpers directory now includes several new modules that enhance the editor's core capabilities. BacktickAndFontNormalizer and CodeBlockHighlighter manage syntax highlighting for code blocks and inline code, with performance optimizations for large files. ClipboardManager handles rich text pasting by converting structured HTML to Markdown and supports image uploads via PicGo/PicList. FileSystemEventManager and FileWatcher integrate FSEvents to detect external file changes, enabling live reloads and automatic note imports. Diagnostics provides a structured logging sink for error tracking, and EditorMenuManager centralizes formatting actions.

Helpers · high confidence

New iOS target, App Store build pipeline, and CLI installer

This change introduces the MiaoYanMobile iOS target (Swift 6.0, iOS 18.0) with CloudKit support and a CMarkGFM dependency, alongside a new App Store build script (build-appstore.sh) and ExportOptions.plist configured for Mac App Store submission. It also adds a CLI installer (install.sh) and the miao command-line tool for terminal-based note operations, plus helper scripts to wire test and source files into the Xcode project.

scripts · high confidence

New iPad split-view interface with three-column layout

The app now includes a dedicated iPad interface using a three-column NavigationSplitView (sidebar, note list, and detail pane) via the new MobilePadShell, PadSidebarView, PadContentColumn, and PadDetailPlaceholder components. This layout replaces the previous single-column or tab-based approach on iPad, allowing users to browse folders and notes in the sidebar and middle columns while reading or editing in the detail column, with support for pinned notes, recent notes, trash, and scoped search within the note list.

MiaoYanMobile/Views/iPad · high confidence

New utility extensions for export, formatting, and system integration

The Extensions directory now includes a suite of new helper files to support core application features. MPreviewView+Export introduces a robust export pipeline with progress tracking, timeout protection, and dynamic style injection for PDF and image outputs. ImageAttachment+ and NSImage+ provide comprehensive image handling, including caching, thumbnail generation, and resizing. NSMenu+ centralizes menu icon management using a symbol registry, while NSFont+, NSMutableAttributedString+, and NSTextStorage+ handle text styling, letter spacing, and paragraph layout. Additional extensions like Date+, FileManager+, NSColor+, String+, and URL+ add utility functions for date formatting, file system checks, CSS color parsing, regex caching, and extended attribute management.

Extensions · high confidence

Behavioural changes

Automated release pipeline with notarization and per-language release notes

The release process now automates the full build, notarization, and publishing workflow. The new \build\_notarize\_package.sh\ script handles code signing, notarization (supporting both API key and Apple ID credentials), and creates a DMG with a custom background and Finder layout. Release content generation has been split: \generate\_release\_content.sh\ creates structured JSON highlights (with an AI fallback), while \notes\_to\_html.sh\ and \render\_release\_body.sh\ convert \RELEASE\_NOTES.md\ into HTML. Crucially, the appcast update (\update\_appcast.sh\) now supports per-language release notes (\en\ and \zh-Hans\), allowing Sparkle to display the correct language to users based on their system settings. Signature verification is also hardened with a new \verify\_sparkle\_signature.sh\ script.

scripts/release-ci · high confidence

Centralized font management and unified environment facade

The app now uses a centralized font configuration system that classifies installed fonts into text, code, and Latin categories, displaying them in localized sections within the font picker and ensuring proper fallback stacks for mixed-script content. A new AppEnvironment facade centralizes access to core services like storage and session state, replacing scattered singleton usage. Additionally, the default editor font has shifted to TsangerJinKai02 (now a system-installed font rather than bundled), with a dedicated download link provided if the user does not have it installed.

Business · high confidence

The .claude directory now references tracked skills through symlinks instead of maintaining local copies. This change introduces a new Swift-specific rules file (.claude/rules/swift.md) defining guidelines for AppKit vs SwiftUI usage, threading, and CJK text handling, while replacing local skill definitions with symlinks to the shared .agents/skills directory for appstore, code-review, github-ops, lint, and release.

.claude · high confidence

Improved iOS app startup performance and visual consistency

The iOS app now launches faster by pre-warming the haptic engine and the WebView, reducing the initial interaction delay. Additionally, the app's visual presentation has been refined: the UIWindow, NavigationBar, and TabBar backgrounds are now painted to match the paper theme color, eliminating the brief white flash that previously occurred during navigation transitions in dark mode. A new, more readable color palette for ink and surfaces has also been applied to enhance long-form reading comfort.

MiaoYanMobile/App · high confidence

Introduce ContentViewController UI and restructure main menu

The app now displays note metadata (word count, creation time, and update time) in a dedicated ContentViewController view, replacing the previous layout. The main menu has been reorganized to include a Folder submenu with options like New Folder, Rename Folder, Show in Finder, and Open in Terminal, while the File menu now features Search (⌘/), Reload Note (⇧⌘R), and Clean Unused Attachments (⌃⌥⌘C). These changes improve navigation and provide quick access to file management and note details.

Resources/Localization/Base.lproj · high confidence

New Xcode build schemes for MiaoYan and MiaoYanMobile

The project now includes dedicated Xcode schemes for the desktop (MiaoYan) and mobile (MiaoYanMobile) targets. These schemes configure the build, test, and archive actions, ensuring that archive operations for both targets use the AppStore build configuration to streamline the release process.

MiaoYan.xcodeproj/xcshareddata · high confidence

Redesigned Markdown preview and PPT export with enhanced rendering and dark mode support

The DownView bundle has been completely restructured with new \index.html\ and \ppt.html\ templates to improve the user experience. The preview view now features robust dark mode support via CSS variables, lazy-loaded images, and immediate text rendering to prevent layout shifts. It also supports Table of Contents pinning, clickable checkboxes, and math formula rendering (KaTeX) deferred via \requestIdleCallback\ for performance. The PPT export view now integrates Reveal.js with dedicated support for Mermaid, PlantUML, and Markmap diagrams, allowing for inline configuration of presentation settings via markdown comments and handling PDF export flags robustly.

Resources/DownView.bundle · high confidence

Replaced storyboard-based UI with programmatic editor, preview, and split-view components

The application's user interface has been rebuilt from scratch using programmatic Cocoa views, removing reliance on Storyboards and Interface Builder. This change introduces new core components including EditTextView for the editor, MPreviewView for Markdown rendering, and EditorContentSplitView to manage the split-pane layout. The new implementation provides a more robust split-view experience with animated mode switching (editor-only, preview-only, side-by-side), custom search and replace bars for both the editor and preview, and improved handling of image previews and keyboard interactions.

Views · high confidence

Standardized dark mode assets and color palette

The application now uses a centralized set of image assets and color definitions that automatically adapt to light and dark themes. This includes new SVG icons for navigation, editing, and note management (such as home, project, pin, and delete) with dedicated dark variants, alongside a new color system for UI elements like the main background, text, accents, and dividers to ensure consistent visual appearance across macOS modes.

Resources/Images.xcassets · high confidence

Updated PPT preview engine to reveal.js 4.3.1

The PPT preview component now uses reveal.js version 4.3.1 (previously an older version) for rendering slides. This update brings improved CSS resets, better handling of slide fragments and stacking contexts, and enhanced support for embedded media and responsive layouts within the presentation viewer.

Resources/DownView.bundle/ppt/dist · high confidence

Fixes

Redesigned Markdown preview with new typography, theme, and diagram styling

The Markdown preview rendering has been overhauled with a new set of CSS files that replace the previous styling. This introduces a refined typographic system (based on Heti) with adjusted letter-spacing and line-heights, and a new theming architecture using CSS variables for light and dark modes. Key visual improvements include better handling of wide GFM tables (scrollable wrappers instead of breaking layout), corrected Mermaid diagram edge label backgrounds, and proper clamping of HDR photos to SDR on iOS/macOS. The preview now also supports KaTeX v0.16.0 for math rendering and includes dedicated styles for TOC navigation, Markmap, and PlantUML diagrams.

Resources/DownView.bundle/css · high confidence

Test coverage

Added regression tests for clipboard, editor, and rendering fixes

Added a suite of regression tests in MiaoYanTests to prevent recurrence of recent fixes. ClipboardManagerUTF16Tests verify that UTF-16 surrogate pairs (e.g., emojis) do not truncate image upload placeholders during regex matching. EditorStorageOwnershipTests ensure that cross-note buffer saves are refused to prevent content swapping, and that upload placeholders are unique per upload. FontCatalogTests validate that font lists correctly filter non-Chinese faces, handle PostScript-to-family name mapping, and structure font stacks for Latin and CJK scripts. GitHubAlertsTests confirm that GitHub-style alert blocks are rendered with correct CSS classes and edge cases. HtmlManagerTests cover numeric math protection, nested underbrace formulas, and PPT image URL encoding. HtmlToMarkdownTests ensure structured HTML converts to Markdown correctly, including CJK character handling and code block preservation. ImageLinkParserTests verify detection of both Markdown and HTML image links. ImportScanTests check that file imports correctly scan directories, skip attachment/trash folders, and deduplicate files. MermaidExportTests ensure Mermaid diagrams render and reload without orphan errors, and that wide tables are prepared correctly for export. NoteFrontmatterTests verify that YAML frontmatter is stripped from preview content. NoteSaveDebounceTests ensure that pending saves are flushed synchronously to prevent data loss on app termination.

MiaoYanTests · high confidence

Dependencies

Migrate to Swift Package Manager and upgrade to Swift 6

The project has replaced its previous dependency management system with Swift Package Manager, introducing a new Package.swift manifest and resolved lockfiles. This migration includes an upgrade to Swift 6 and sets the minimum deployment targets to macOS 11 and iOS 18. The dependency list now explicitly pins Highlightr (2.3.0), KeyboardShortcuts (2.4.0), Prettier (0.2.1), swift-cmark-gfm (1.0.2), and Sparkle (2.8.0 in the root manifest, 2.9.0 in the workspace manifest).

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 45 → 54 (+8.8)
  • Rubric changed (rubric-2026.08.15 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 100 → 82 (-17.6)
  • Architecture 84 (new)
  • Maturity 68 → 76 (+8.1)
  • Readiness 30 → 55 (+25.6)
  • Security 45 → 70 (+24.4)
  • Accessibility 41 (new)

Resolved (9)

  • Dimension evaluation failed
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • No artifact signing
  • No automated tests
  • No exposed public API
  • No tests found
  • Test reliability not included

New (254)

  • BacktickAndFontNormalizer.normalize (cognitive 21) (Helpers/BacktickAndFontNormalizer.swift)
  • Boundary-crossing change coupling: String+.swift ↔ EditTextView.swift (Extensions/String+.swift)
  • Boundary-crossing change coupling: ViewController.swift ↔ Toast.swift (Controllers/ViewController.swift)
  • ClassTooLong: EditTextView (Views/EditTextView.swift)
  • ClassTooLong: HtmlManager (Business/HtmlManager.swift)
  • ClassTooLong: MPreviewView (Views/MPreviewView.swift)
  • ClassTooLong: Note (Business/Note.swift)
  • ClassTooLong: NoteDetailView (MiaoYanMobile/Views/NoteDetailView.swift)
  • ClassTooLong: NoteFileStore (MiaoYanMobile/Services/FileReader.swift)
  • ClassTooLong: NotesTableView (Views/NotesTableView.swift)
  • ClassTooLong: NotesTextProcessor (Helpers/NotesTextProcessor.swift)
  • ClassTooLong: SidebarProjectView (Views/SidebarProjectView.swift)
  • ClassTooLong: Storage (Business/Storage.swift)
  • ClassTooLong: UserDefaultsManagement (Helpers/UserDefaultsManagement.swift)
  • ClassTooLong: ViewController (Controllers/ViewController.swift)
  • ClipboardManager.saveClipboard (cognitive 28) (Helpers/ClipboardManager.swift)
  • CodeTextProcessor.getBlockRanges (cognitive 23) (Helpers/NotesTextProcessor.swift)
  • CodeTextProcessor.getBlockRanges (cyclomatic 16) (Helpers/NotesTextProcessor.swift)
  • CodeTextProcessor.scanCodeBlockDown (cognitive 23) (Helpers/NotesTextProcessor.swift)
  • Coverage not measured — Swift suite
  • …and 234 more

Changes since last survey

  • 60 commits — 29 feature/other, 31 fixes

By area

  • (root) — 12 commits
  • .github/RELEASE_NOTES.md — 6 commits
  • Business/HtmlManager.swift — 6 commits
  • .agents/skills — 5 commits
  • Business/FontCatalog.swift — 5 commits
  • Resources/Localization — 5 commits
  • Resources/DownView.bundle — 4 commits
  • Extensions/MPreviewView+Export.swift — 2 commits
  • (repo) — 1 commit
  • .claude/skills — 1 commit
  • .github/workflows — 1 commit
  • Business/Markdown.swift — 1 commit
  • Business/PrefsModel.swift — 1 commit
  • Controllers/TypographyPrefsViewController.swift — 1 commit
  • Controllers/ViewController+Data.swift — 1 commit
  • Controllers/ViewController.swift — 1 commit
  • MiaoYanMobile/Services — 1 commit
  • MiaoYanMobile/Views — 1 commit
  • MiaoYanTests/FontCatalogTests.swift — 1 commit
  • Resources/Initial — 1 commit

Notable commits

  • fix: Merge pull request #561 from qixiaobo/fix/wide-table-horizontal-scroll
  • fix: fix: accept canonical project skill symlinks
  • fix: fix: allow horizontal scroll for wide GFM tables
  • fix: fix: close deleted note save lifecycle
  • fix: fix: follow the text font for code and restore the preview weight
  • fix: fix: keep sidebar aligned after reloads
  • fix: fix: keep table cells readable in a dark-theme PDF export
  • fix: fix: keep the search bar readable on a dark panel
  • fix: fix: keep wide tables whole in the PNG export
  • fix: fix: let the system set Latin when the chosen face is Chinese
  • fix: fix: make TsangerJinKai02 the default face again without bundling it
  • fix: fix: move note search matching off the main thread
  • fix: fix: only the shipped default yields Latin to the system
  • fix: fix: prepare the live preview for every PNG export
  • fix: fix: preserve markdown blocks after numeric inline math
  • fix: fix: preserve math through markdown rendering
  • fix: fix: preserve synthetic italics with real bold fonts
  • fix: fix: print dark-theme text in PDF ink, not on white paper
  • fix: fix: refresh installed fonts when opening font menus
  • fix: fix: replace bundled commercial font with system typography
  • …and 40 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

tw93/MiaoYan was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 27 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 63fb985b36dd965688836b556d8deee6dbb50813 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-d00c643c3f66.