You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR fixes a stale-data bug where the call-import detail page required a full browser refresh to reflect state changes after saving a mapping or starting an import. The root cause was that ImportPanel and MappingPanel were calling invalidateQueries/setQueriesData with the 2-segment key ['call-import', callImport.id], which never prefix-matched the actual 4-segment cache entry ['call-import', activeWorkspaceId, id, queryParams] registered in CallImportDetail.
ImportPanel.tsx: The onSuccess handler's invalidateQueries call now uses ['call-import', activeWorkspaceId, callImport.id], correctly targeting the cached query.
MappingPanel.tsx: Both the optimistic setQueriesData and the subsequent invalidateQueries call use the same corrected key, ensuring the detail view updates immediately after saving a mapping.
Confidence Score: 5/5
Safe to merge — the change is a targeted, minimal fix that corrects a cache key mismatch causing silent no-op invalidations.
Both mutations now use a 3-segment prefix that matches the 4-segment query key used in CallImportDetail.tsx. The activeWorkspaceId value comes from the same Zustand store in all locations, so the key will be consistent. No other files still reference the old 2-segment ['call-import', callImport.id] pattern.
Adds activeWorkspaceId to the call-import cache key used in both setQueriesData and invalidateQueries, matching the query key structure in CallImportDetail.tsx.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed?
Briefly describe what this PR changes.
Why?
Explain the problem this solves and why this approach was chosen.
How to Test?
List clear steps for reviewers to verify the change.
Release Label
Select one semantic version bump intent for this PR:
major- breaking change, next release bumps major versionminor- backward-compatible feature, next release bumps minor versionfix- backward-compatible bug fix, next release bumps patch versionIf you do not have permission to apply labels, mention the intended release label here and a maintainer will set it.
Checklist
CONTRIBUTING.mdguide.