Skip to content

BDMS-773 Fix hydrograph stale data when switching wells#262

Merged
jeremyzilar merged 1 commit intostagingfrom
BDMS-773
Apr 27, 2026
Merged

BDMS-773 Fix hydrograph stale data when switching wells#262
jeremyzilar merged 1 commit intostagingfrom
BDMS-773

Conversation

@jeremyzilar
Copy link
Copy Markdown
Contributor

@jeremyzilar jeremyzilar commented Apr 27, 2026

What is changing

Fixes the hydrograph showing the previous well's series after client-side navigation (for example from a well with observations to one with none) until a full refresh.

Changes

  • Read thing_id from the React Query queryKey inside the hydrograph queryFn so list requests always match the active well key (avoids stale closure behavior).
  • Forward AbortSignal from TanStack Query through getList meta to axios so in-flight pagination requests cancel when the route id changes.
  • Use isPending for the hydrograph card loading state instead of isLoading so the UI waits for the first result for the new key.
  • Remount <Hydrograph /> with key={well.id} so ECharts resets when the well changes.
  • Add .cursor to .gitignore so local Cursor IDE metadata stays out of the repo.

Manual QA

Navigate between two wells where one has hydrograph data and one does not; confirm the chart or empty state matches the current well without refreshing.

Drive thing_id from React Query queryKey inside the hydrograph queryFn, forward AbortSignal through ocotillo getList and axios, show loading while the query is pending, and remount the chart when the well id changes. Add .cursor to gitignore for local Cursor metadata.
@jeremyzilar jeremyzilar self-assigned this Apr 27, 2026
@jeremyzilar jeremyzilar added the bug Something isn't working label Apr 27, 2026
@github-actions
Copy link
Copy Markdown

Preview Deployment

Preview URL: https://preview-bdms-773-auejgdbofq-uc.a.run.app

Note: This preview uses the staging API endpoints.

@jeremyzilar
Copy link
Copy Markdown
Contributor Author

This seems to be working on the Preview branch

@jeremyzilar jeremyzilar merged commit 3aa4fd3 into staging Apr 27, 2026
3 of 4 checks passed
@jeremyzilar jeremyzilar deleted the BDMS-773 branch April 28, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants