Skip to content

Auto-reload on file change with dismissable notification#14

Open
myrison wants to merge 1 commit intofrankdilo:mainfrom
myrison:upstream/auto-reload-notification
Open

Auto-reload on file change with dismissable notification#14
myrison wants to merge 1 commit intofrankdilo:mainfrom
myrison:upstream/auto-reload-notification

Conversation

@myrison
Copy link

@myrison myrison commented Feb 6, 2026

Summary

  • Replaces the blocking "File changed" banner (which required clicking to reload) with automatic reload on file change
  • Shows a dismissable "File updated" notice so users are aware content was refreshed
  • Notice dismisses via click, Escape key, and animates in/out with a fade+slide transition

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

Details

  • DocumentState: File monitor now calls reload() immediately on detecting a change, and sets fileChanged for the notification badge
  • ContentView: Replaces the orange click-to-reload button with a blue informational badge ("File updated · esc to dismiss")
  • Transition uses withAnimation for smooth appear/disappear

How to test

  • Open a .md file in the viewer
  • Edit the same file in any external editor and save
  • Verify the viewer auto-reloads with updated content
  • Verify the blue "File updated · esc to dismiss" badge appears (top-right)
  • Verify clicking the badge dismisses it (with animation)
  • Verify pressing Escape dismisses it (with animation)

🤖 Generated with Claude Code

Replace the blocking "File changed" click-to-reload banner with
automatic reload and an animated "File updated" notice that dismisses
via click or Escape.

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