Skip to content

fix(live-stats): update progress after custom text change (@MohdMaaz000) - #8341

Open
MohdMaaz000 wants to merge 1 commit into
monkeytypegame:masterfrom
MohdMaaz000:fix/live-progress-custom-text
Open

fix(live-stats): update progress after custom text change (@MohdMaaz000)#8341
MohdMaaz000 wants to merge 1 commit into
monkeytypegame:masterfrom
MohdMaaz000:fix/live-progress-custom-text

Conversation

@MohdMaaz000

Copy link
Copy Markdown

Description

When using Custom mode, changing the custom text through the command line could leave the live progress counter showing the previous text length until the first word was typed.

For example, if the previous text had 9 words and I changed it to asdf asdf, the progress would still show 0/9 immediately after confirming the new text. After typing, it would update to 0/2.

I traced this to getTimerText not being notified when the test restarted. The custom text limit is stored outside SolidJS's reactive state, and the active word index was already 0, so resetting it during the restart did not trigger the memo to recalculate.

I fixed this by making getTimerText react to isTestRestarting(). This causes the progress calculation to run again when the restart finishes and pick up the new custom text limit immediately.

I also added a regression test to make sure the progress changes from 0/9 to 0/2 without requiring a keystroke.

Closes #8334

@monkeytypegeorge monkeytypegeorge added the frontend User interface or web stuff label Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend User interface or web stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Live progress doesn't update after custom text change

2 participants