chris.giteaandClaude Sonnet 5 9bcee4ada7 fix(gallery): PhotoDetailPane's currentFile went stale after any metadata edit
One root cause behind three visible symptoms: GalleryView.updateRating
(favorite toggle and MediaInfoPane's star control), openDateDialog and
openLocationDialog all completed by refreshing the info panes but
never told PhotoDetailPane its own currentFile had just changed.
MediaFile is a record, and MediaLibraryState replaces that file's
entry in the shared list every other view reads from -- so the stale
value left behind no longer equals the fresh one, breaking:

1. A second favorite-star press (reads the stale, pre-edit rating,
   computes the same target rating again -- can never toggle back off)
2. ThumbnailGalleryPane.previous/next (an equals-based lookup against
   the now-refreshed list; the stale file is never found in it)
3. revealAndPulse on Escape/close (same lookup, same failure -- lands
   back on the grid without scrolling to the photo that was open)

PhotoDetailPane.updateCurrentFile(MediaFile) swaps in the fresh value
(and refreshes the favorite icon) whenever it's the same file (by id)
this pane is already showing; all three completion handlers in
GalleryView now call it instead of just refreshing the info panes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JzvA5ySQUsYrMUTj7sHxFA
2026-09-17 22:26:14 -04:00
2026-08-22 17:52:02 -04:00
2026-08-22 11:54:20 -04:00
2026-08-22 11:54:20 -04:00
2026-08-22 11:54:20 -04:00
2026-08-08 23:21:21 -04:00
2026-07-26 18:49:07 -04:00
2026-07-26 18:49:07 -04:00
S
Description
No description provided
54 MiB
Languages
Java 97.4%
CSS 1.5%
Python 0.9%
JavaScript 0.2%