Skip to content

Show "Update Pending..." immediately when index button is clicked#213

Merged
lstein merged 3 commits intomasterfrom
copilot/provide-quicker-user-feedback
Apr 4, 2026
Merged

Show "Update Pending..." immediately when index button is clicked#213
lstein merged 3 commits intomasterfrom
copilot/provide-quicker-user-feedback

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 4, 2026

When the Album Manager loads, per-album metadata is fetched asynchronously. Clicking "Update Index" during this window produced no visible response until the async pre-flight checks completed.

Changes

  • album-manager.jsstartIndexing(): Immediately set button text to "Update Pending..." and disable it on click, before any async operations begin.
  • Error paths: Restore original button text and re-enable on two failure cases — updateIndex() returning nothing, and corrupted-index removal failing — to leave the UI in a usable state.

The normal success flow is unaffected: showProgressUIWithoutScroll() hides the button and replaces it with the progress bar + Cancel button; on completion, handleIndexingCompletion() restores and updateAlbumCardIndexStatus() re-labels it correctly.

// Provide immediate feedback while the indexing request is being processed
const createBtn = cardElement.querySelector(".create-index-btn");
const originalBtnText = createBtn.textContent;
createBtn.textContent = "Update Pending...";
createBtn.disabled = true;

Copilot AI changed the title [WIP] Add immediate feedback for index operation Show "Update Pending..." immediately when index button is clicked Apr 4, 2026
Copilot AI requested a review from lstein April 4, 2026 02:39
@lstein lstein marked this pull request as ready for review April 4, 2026 02:50
Copy link
Copy Markdown
Owner

@lstein lstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as advertised.

@lstein lstein enabled auto-merge (squash) April 4, 2026 02:55
@lstein lstein merged commit f29d1bb into master Apr 4, 2026
6 checks passed
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.

Provide quicker user feedback when starting an index operation

2 participants