Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Problem
After a successful upload, the migrated-files list on the home page does not show the new file until you navigate away and back. Reported earlier; no issue existed for it.
Likely cause (code read at main 59aab1a, not reproduced)
src/routes/_authenticated/index.tsx:64definesfilesQuerywith key["csv-files"]; the route loader callsqueryClient.ensureQueryData(filesQuery).- After upload, line 196 calls
router.invalidate(). That re-runs the loader, butensureQueryDatareturns the cached list instead of refetching. - Nothing calls
queryClient.invalidateQueries({ queryKey: ["csv-files"] }).
Suggested fix
Invalidate ["csv-files"] after a successful upload, alongside or instead of router.invalidate(). Add a test next to src/__tests__/job-outcome.test.ts.
Done when
- A new upload appears in the list without navigation.
- A test fails if the invalidation is removed.
Generated by Claude Code
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Activity
Merge pull request #73 from amar-python/fix/issue-64-files-refresh