Skip to content

Fix hashrate chart stuck after navigating to settings and back#33

Closed
pavlenex wants to merge 1 commit intomainfrom
hashrate-chart
Closed

Fix hashrate chart stuck after navigating to settings and back#33
pavlenex wants to merge 1 commit intomainfrom
hashrate-chart

Conversation

@pavlenex
Copy link
Copy Markdown
Contributor

The Hashrate History chart would get stuck after visiting the Settings page and returning to the Dashboard.

According to Claude:

On remount, the hook immediately recorded a 0 sample (from the loading state) and then only re-sampled when the hashrate value actually changed — so on a stable miner it would freeze on that single zero point for several minutes. Replaced the change-triggered effect with a fixed 5-second interval that skips zero values, so the chart collects data reliably and recovers instantly after navigation.

I tested and it works, but needs code review.

Before

Screen.Recording.2026-03-24.at.11.03.03.mov

Stuck like this forever...

After

Screen.Recording.2026-03-24.at.11.00.51.mov

@pavlenex pavlenex requested a review from GitGab19 March 24, 2026 10:04
Copy link
Copy Markdown
Member

@GitGab19 GitGab19 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem on the current setup which this PR is not solving yet is that we're not really persisting any historical hashrate data.

To handle the chart properly, we have to start persisting it for sure.

@pavlenex
Copy link
Copy Markdown
Contributor Author

@GitGab19 Yeah. What this one solves is that user will get data much faster if they navigate to settings and then back to dashboard. Try it out locally and check the code. I had issues sometimes reproducing reliably. On main ssometimes it took a minute or more to get data. We can close this one and address once we add proper persistence.

@pavlenex pavlenex closed this Mar 24, 2026
@GitGab19 GitGab19 deleted the hashrate-chart branch March 24, 2026 11:54
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.

2 participants