Skip to content

fix(chart): stabilize market and timeframe switching (#716) - #789

Merged
IbrahimIjai merged 2 commits into
SO4-Markets:mainfrom
feranmiba:716-ob-064-market-timeframe-switching
Sep 26, 2026
Merged

IbrahimIjai merged 2 commits into
SO4-Markets:mainfrom
feranmiba:716-ob-064-market-timeframe-switching

Conversation

@feranmiba

Copy link
Copy Markdown
Contributor

Added AbortSignal cancellation to fetchOracleCandles and fetchPythBenchmarkCandles so in-flight requests are cancelled immediately when switching market or timeframe.
Configured useOracleCandles TanStack Query placeholderData to retain previous data only when switching timeframes for the same market, preventing old-market candles from rendering into a newly selected market.
Cleared price lines and un-cached series immediately on market switch to prevent cross-market candle tweening and invalid price displays.
Removed redundant invalidateQueries call on period click to allow instant warm-cache rendering when switching to previously loaded timeframes.
Preserved chart layout container stability and added a restrained stale timeframe loading badge (Updating {period}…) with opacity-60 canvas transitions.
closes #716

@vercel

vercel Bot commented Sep 24, 2026

Copy link
Copy Markdown

@feranmiba is attempting to deploy a commit to the Ijai's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Sep 24, 2026

Copy link
Copy Markdown

@feranmiba Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@IbrahimIjai
IbrahimIjai merged commit 5a7c8b4 into SO4-Markets:main Sep 26, 2026
1 of 4 checks passed
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.

OB-064: Make market and timeframe switching stable

2 participants