Skip to content

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

Open
myrison wants to merge 1 commit intofrankdilo:mainfrom
myrison:upstream/auto-raise-on-change
Open

Add optional bring-to-front on file change#15
myrison wants to merge 1 commit intofrankdilo:mainfrom
myrison:upstream/auto-raise-on-change

Conversation

@myrison
Copy link

@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
  • Minimal change: 2 files, 9 lines added

Details

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

Note

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

Companion to #13 — as noted in that PR's follow-up section — but independent and submitted against main.

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>
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