Skip to content

Address issue #302: "Move To" fails on macOS Sequoia with ViewBridge error 14#303

Merged
schuyler merged 2 commits into
mainfrom
claude/resolve-issue-302-nz5Z8
Feb 8, 2026
Merged

Address issue #302: "Move To" fails on macOS Sequoia with ViewBridge error 14#303
schuyler merged 2 commits into
mainfrom
claude/resolve-issue-302-nz5Z8

Conversation

@schuyler

@schuyler schuyler commented Feb 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add MacDown/MacDown.entitlements with com.apple.security.files.user-selected.read-write (for NSSavePanel/NSOpenPanel file access) and com.apple.security.automation.apple-events (for AppleScript support)
  • Wire entitlements into Xcode project via CODE_SIGN_ENTITLEMENTS for both Debug and Release configurations
  • Add explicit entitlements parameter to signed CI builds in .github/actions/build-macdown/action.yml
  • Update plans/release-process.md to document the entitlements (previously stated none were needed)

Related Issue

Related to #302

Manual Testing Plan

Prerequisites: macOS Sequoia 15.x, locally built MacDown 3000 from this branch

Primary test (reproduces the original bug):

  1. Open any .md file in MacDown 3000
  2. Click the document title in the window title bar to reveal the popup
  3. Click the path component / location area to invoke the "Move To" panel
  4. Expected: NSSavePanel sheet appears (no ViewBridge error 14)
  5. Navigate to a destination and click Move
  6. Expected: File moves successfully, title bar updates

Additional NSSavePanel dialogs to verify:

  • Save As (Cmd+Shift+S): Panel appears, file saves to new location
  • Export HTML (Cmd+Option+E): Panel appears with .html extension
  • Export PDF (Cmd+Option+P): Panel appears with .pdf extension
  • Save untitled document (Cmd+S on new doc): Panel appears for first save

AppleScript test:

  • In Script Editor, run: tell application "MacDown 3000" to activate
  • Expected: MacDown comes to foreground without automation errors

Edge cases:

  • Cancel all dialogs (no side effects)
  • Move To with unsaved changes (changes preserved)
  • Save As to read-only location (permission error, no crash)
  • Multiple documents open simultaneously (panels work independently)

Regression:

  • Test on macOS Sonoma 14.x if available (no regressions expected)
  • Verify standard Save (Cmd+S) still works
  • Verify Print (Cmd+P) still works

On macOS Sequoia 15.x, NSSavePanel requires explicit file system
entitlements when Hardened Runtime is enabled. Without them, the
"Move To", "Save As", and export dialogs fail with ViewBridge
error 14.

Changes:
- Create MacDown.entitlements with files.user-selected.read-write
  (for NSSavePanel/NSOpenPanel) and automation.apple-events
  (for AppleScript support already enabled in Info.plist)
- Wire entitlements into both Debug and Release build configs
  in the Xcode project via CODE_SIGN_ENTITLEMENTS
- Add explicit entitlements parameter to signed CI builds

Related to #302
Update the Hardened Runtime section to document the actual
entitlements file and its contents, replacing the previous
guidance that said no entitlements were needed.

Related to #302
@github-actions

github-actions Bot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Report

Current Coverage: 53.95%

Coverage Details (Summary)
Name                                                                                                                                   Coverage            
-------------------------------------------------------------------------------------------------------------------------------------- ------------------- 
MASPreferences.bundle                                                                                                                  0.00% (0/0)         
MacDown 3000.app                                                                                                                       59.34% (7887/13291) 
    /Users/runner/work/macdown3000/macdown3000/MacDown/Code/Document/MPDocument.m                                                      54.52% (1110/2036)  
        MPEditorPreferenceKeyWithValueKey                                                                                              85.71% (6/7)        
        MPEditorKeysToObserve                                                                                                          100.00% (15/15)     
        __MPEditorKeysToObserve_block_invoke                                                                                           100.00% (10/10)     
        MPEditorPreferencesToObserve                                                                                                   100.00% (13/13)     
        __MPEditorPreferencesToObserve_block_invoke                                                                                    100.00% (8/8)       
        MPRectStringForAutosaveName                                                                                                    100.00% (6/6)       
        MPAreNilableStringsEqual                                                                                                       100.00% (3/3)       
        MPGetWebViewBackgroundColor                                                                                                    0.00% (0/9)         
        -[NSURL(Convert) absoluteBaseURLString]                                                                                        0.00% (0/6)         
        -[WebView(Shortcut) enclosingScrollView]                                                                                       100.00% (3/3)       
        -[MPPreferences(Hoedown) extensionFlags]                                                                                       78.57% (22/28)      
        -[MPPreferences(Hoedown) rendererFlags]                                                                                        75.00% (9/12)       
        MPGetPreviewLoadingCompletionHandler                                                                                           100.00% (26/26)     
        __MPGetPreviewLoadingCompletionHandler_block_invoke                                                                            100.00% (23/23)     
        -[MPDocument preferences]                                                                                                      100.00% (3/3)       
        -[MPDocument markdown]                                                                                                         100.00% (3/3)       
        -[MPDocument setMarkdown:]                                                                                                     100.00% (3/3)       
        -[MPDocument html]                                                                                                             0.00% (0/3)         
        -[MPDocument toolbarVisible]                                                                                                   0.00% (0/3)         
        -[MPDocument previewVisible]                                                                                                   100.00% (3/3)       
        -[MPDocument editorVisible]                                                                                                    100.00% (3/3)       
        -[MPDocument needsHtml]                                                                                                        80.00% (4/5)        
        -[MPDocument setTotalWords:]                                                                                                   0.00% (0/7)         
        -[MPDocument setTotalCharacters:]                                                                                              0.00% (0/7)         
        -[MPDocument setTotalCharactersNoSpaces:]                                                                                      0.00% (0/8)         
        -[MPDocument setAutosaveName:]                                                                                                 100.00% (4/4)       
        -[MPDocument init]                                                                                                             90.00% (9/10)       
        -[MPDocument windowNibName]                                                                                                    100.00% (3/3)       
        -[MPDocument windowControllerDidLoadNib:]                                                                                      100.00% (94/94)     
        __41-[MPDocument windowControllerDidLoadNib:]_block_invoke                                                                     100.00% (6/6)       
        -[MPDocument reloadFromLoadedString]                                                                                           100.00% (8/8)       
        -[MPDocument close]                                                                                                            16.00% (4/25)       
        +[MPDocument autosavesInPlace]                                                                                                 100.00% (2/2)       
        +[MPDocument writableTypes]                                                                                                    100.00% (3/3)       
        -[MPDocument isDocumentEdited]                                                                                                 100.00% (5/5)       
        -[MPDocument writeToURL:ofType:error:]                                                                                         0.00% (0/28)        
        __38-[MPDocument writeToURL:ofType:error:]_block_invoke                                                                        0.00% (0/2)         
        __38-[MPDocument writeToURL:ofType:error:]_block_invoke_2                                                                      0.00% (0/3)         
        -[MPDocument dataOfType:error:]                                                                                                100.00% (3/3)       
        -[MPDocument readFromData:ofType:error:]                                                                                       100.00% (8/8)       
        -[MPDocument prepareSavePanel:]                                                                                                76.92% (30/39)      
        __31-[MPDocument prepareSavePanel:]_block_invoke                                                                               100.00% (12/12)     
        -[MPDocument printInfo]                                                                                                        0.00% (0/12)        
        -[MPDocument printOperationWithSettings:error:]                                                                                0.00% (0/7)         
        -[MPDocument printDocumentWithSettings:showPrintPanel:delegate:didPrintSelector:contextInfo:]                                  0.00% (0/24)        

... (2597 more lines truncated)

📊 **Full coverage report available in workflow artifacts**

@schuyler schuyler merged commit 3225569 into main Feb 8, 2026
10 checks passed
@schuyler schuyler deleted the claude/resolve-issue-302-nz5Z8 branch February 8, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants