Skip to content

Add optional bring-to-front on file change#3

Merged
myrison merged 1 commit intomainfrom
upstream/auto-raise-on-change
Feb 6, 2026
Merged

Add optional bring-to-front on file change#3
myrison merged 1 commit intomainfrom
upstream/auto-raise-on-change

Conversation

@myrison
Copy link
Owner

@myrison myrison commented Feb 6, 2026

Summary

  • Adds a View menu toggle ("Bring to Front on File Change") that raises the viewer window when the monitored file is modified externally
  • Off by default — opt-in behavior
  • No new files; just 2 small edits to existing files

Details

  • DocumentState: Checks UserDefaults in the file monitor event handler and calls NSApplication.shared.activate(ignoringOtherApps: true) when enabled
  • MarkdownViewerApp: Adds @AppStorage-backed toggle in the View menu (after zoom controls)

Follow-up

If frankdilo#13 is also merged upstream, this toggle can be moved into the Settings modal for a cleaner UI. As a standalone, the View menu toggle is self-contained.

How to test

  • Open a .md file in the viewer
  • Enable View > Bring to Front on File Change
  • Switch to another app, edit the file externally and save
  • Verify the viewer window comes to front
  • Disable the toggle, repeat — viewer should stay in background
  • Verify the setting persists across app restarts

🤖 Generated with Claude Code

Adds a View menu toggle that, when enabled, raises the viewer window
whenever the monitored file is modified externally. Off by default.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@myrison myrison force-pushed the upstream/auto-raise-on-change branch from 5f20691 to fc3cfb1 Compare February 6, 2026 05:00
@myrison myrison merged commit b176db2 into main Feb 6, 2026
@myrison myrison deleted the upstream/auto-raise-on-change branch February 6, 2026 05:00
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.

1 participant