Skip to content

fix: updating the page refresh while importing#102

Merged
TEJASNARAYANS merged 1 commit into
mainfrom
state-refresh
Jul 13, 2026
Merged

fix: updating the page refresh while importing#102
TEJASNARAYANS merged 1 commit into
mainfrom
state-refresh

Conversation

@TEJASNARAYANS

Copy link
Copy Markdown
Contributor

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 version
  • minor - backward-compatible feature, next release bumps minor version
  • fix - backward-compatible bug fix, next release bumps patch version
  • No label (defaults to patch release)

If you do not have permission to apply labels, mention the intended release label here and a maintainer will set it.

Checklist

  • I have read the CONTRIBUTING.md guide.
  • My code follows the project's style guidelines.
  • I have added tests that prove my fix is effective or my feature works.
  • I have updated documentation where needed.

@TEJASNARAYANS TEJASNARAYANS added the fix Fix version release label Jul 13, 2026
@greptile-apps

greptile-apps Bot commented Jul 13, 2026

Copy link
Copy Markdown

Greptile Summary

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.

No files require special attention.

Important Files Changed

Filename Overview
frontend/src/pages/callImports/components/ImportPanel.tsx Adds activeWorkspaceId to the call-import invalidation cache key, aligning it with the 4-segment key used in CallImportDetail.tsx.
frontend/src/pages/callImports/components/MappingPanel.tsx Adds activeWorkspaceId to the call-import cache key used in both setQueriesData and invalidateQueries, matching the query key structure in CallImportDetail.tsx.

Reviews (1): Last reviewed commit: "fix: updating the refresh while importin..." | Re-trigger Greptile

@TEJASNARAYANS TEJASNARAYANS merged commit 0089b1c into main Jul 13, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Fix version release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant