Skip to content

feat: animate the UMAP reindex ring for updates started in the Album Manager#347

Open
lstein wants to merge 1 commit into
masterfrom
lstein/feature/umap-ring-follows-album-manager
Open

feat: animate the UMAP reindex ring for updates started in the Album Manager#347
lstein wants to merge 1 commit into
masterfrom
lstein/feature/umap-ring-follows-album-manager

Conversation

@lstein

@lstein lstein commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Summary

The semantic map's titlebar refresh icon already swaps to a progress ring when it starts an index update, and the Album Manager's card shows progress for runs started from the map. But the reverse didn't hold: starting "Update Index" (or "Update All") from the Album Manager while the map sat open left the refresh icon inert. This PR makes the ring animate for the currently viewed album regardless of which control initiated the reindex.

How

  • index.jsupdateIndex() dispatches a new albumIndexStarted window event (with the album key) whenever it successfully starts a run. Every initiator — Album Manager button, Update All, auto-indexing, the UMAP button itself — funnels through this helper, so they all announce themselves.
  • umap-reindex.jsinitUmapReindexButton() listens for albumIndexStarted; when the event names the album being viewed, it raises the progress ring and polls that run to completion (with the existing completion behavior: map reload + in-place slideshow refresh). If the ring is already tracking a run, the listener is a no-op, so the button's own runs aren't double-handled.
  • album-manager.js — the "backend reports indexing already in progress" guard branch also fires the event, so the ring attaches when the Manager latches onto a run it didn't start (e.g. one begun in another tab), mirroring what the Manager's own card UI does.

Tests

  • tests/frontend/umap-reindex.test.js: albumIndexStarted for the current album raises the ring and tracks the run to completion; an event for a different album is ignored.
  • tests/frontend/index-api.test.js (new): updateIndex dispatches the event and passes the response through on success; returns null and stays silent on failure.
  • Full frontend suite: 414 passed; eslint and prettier clean. Verified live: with the semantic map open, an Update Index started from the Album Manager now animates the titlebar ring.

🤖 Generated with Claude Code

…Manager

The semantic map's titlebar progress ring only attached to a run when the
map was opened or the album changed, so an "Update Index" started from the
Album Manager (or Update All) while the map sat open never animated it.

updateIndex() now dispatches an "albumIndexStarted" window event whenever
it successfully starts a run, and the Album Manager fires the same event
when it attaches to a run it didn't start (e.g. begun in another tab).
The ring listens for the event and, when it names the album being viewed,
raises itself and polls that run to completion — a no-op if it is already
tracking one.

Co-Authored-By: Claude Fable 5 <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