Skip to content

fix: collection edit modal not reflecting changes IN-1158#1903

Open
gaspergrom wants to merge 1 commit into
mainfrom
fix/IN-1158-collection-edit-modal-not-reflecting-changes
Open

fix: collection edit modal not reflecting changes IN-1158#1903
gaspergrom wants to merge 1 commit into
mainfrom
fix/IN-1158-collection-edit-modal-not-reflecting-changes

Conversation

@gaspergrom
Copy link
Copy Markdown
Collaborator

Summary

  • After editing a community collection (adding or removing projects/repos), the edit modal showed stale data on next open until the page was reloaded
  • Root cause: updateCollection() in the edit modal did not invalidate TanStack Query caches after a successful mutation
  • Fix: invalidate COLLECTIONS, MY_COLLECTIONS, and COLLECTION_PROJECTS query caches on successful update, matching the pattern used in add-to-collection-modal

Changes

  • edit-collection-modal.vue: added useQueryClient and three invalidateQueries calls after successful updateCollection() response

Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
@gaspergrom gaspergrom self-assigned this May 13, 2026
Copilot AI review requested due to automatic review settings May 13, 2026 09:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes stale data in the collection edit modal by ensuring TanStack Query caches are invalidated after a successful updateCollection() mutation. This aligns the edit flow with other collection mutation flows so subsequent modal opens and other views pick up updated collection/project membership without requiring a full page reload.

Changes:

  • Add TanStack Query queryClient usage to the edit modal.
  • Invalidate COLLECTIONS, MY_COLLECTIONS, and COLLECTION_PROJECTS queries after a successful collection update.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gaspergrom gaspergrom requested a review from joanagmaia May 15, 2026 08:39
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.

3 participants