Skip to content

fix(config): auto-resolve monkey live stats conflicts (@d1rshan)#7715

Merged
Miodec merged 11 commits intomonkeytypegame:masterfrom
d1rshan:fix/monkey-live-stats-validation
Apr 8, 2026
Merged

fix(config): auto-resolve monkey live stats conflicts (@d1rshan)#7715
Miodec merged 11 commits intomonkeytypegame:masterfrom
d1rshan:fix/monkey-live-stats-validation

Conversation

@d1rshan
Copy link
Copy Markdown
Contributor

@d1rshan d1rshan commented Mar 24, 2026

Adds handling for the invalid monkey + live text stats combination by auto-resolving conflicting settings instead of blocking them.

Behavior:

  • enabling monkey while live speed style or live accuracy style is text will automatically set those conflicting live stat styles to off
  • setting live speed style to text while monkey is enabled will automatically disable monkey
  • setting live accuracy style to text while monkey is enabled will automatically disable monkey

This follows the existing overrideConfig pattern used for other conflicting settings, where the latest selection takes priority.

Also adds tests to cover these auto-resolved config combinations.

Closes #7714

Copilot AI review requested due to automatic review settings March 24, 2026 12:06
@monkeytypegeorge monkeytypegeorge added the frontend User interface or web stuff label Mar 24, 2026
@github-actions github-actions bot added the waiting for review Pull requests that require a review before continuing label Mar 24, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Prevents unsupported UI config combinations that cause the monkey to overlap live stats when those stats use the text style, by blocking the conflicting settings at config-set time and notifying the user (closes #7714).

Changes:

  • Add isBlocked guards + notice toasts for liveSpeedStyle=text / liveAccStyle=text when monkey=true, and for enabling monkey when either live stat style is text.
  • Add setter-level tests verifying the blocked monkey/liveSpeedStyle combination triggers the expected notice.
  • Add metadata-level tests covering blocked combinations for monkey, liveSpeedStyle, and liveAccStyle.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
frontend/src/ts/config/metadata.ts Adds isBlocked rules + user notices to prevent monkey + live text stats conflicts.
frontend/tests/root/config.spec.ts Adds tests asserting setConfig rejects conflicting settings and emits the expected notice.
frontend/tests/root/config-metadata.spec.ts Adds table-driven isBlocked coverage for the new conflict rules.

@d1rshan d1rshan changed the title fix(config): block monkey with live text stats (@d1rshan) fix(config): prevent monkey + live text stats overlap (@d1rshan) Mar 29, 2026
@d1rshan
Copy link
Copy Markdown
Contributor Author

d1rshan commented Apr 4, 2026

hey @Miodec, just following up on this PR, it fixes #7714. lmk if you want any changes

@Miodec
Copy link
Copy Markdown
Member

Miodec commented Apr 7, 2026

I think blocking the config change is a bit overkill, but also im not sure whats the best way of handling this. Maybe just allow the overlap and let the user deal with it.

@Miodec Miodec added waiting for update Pull requests or issues that require changes/comments before continuing and removed waiting for review Pull requests that require a review before continuing labels Apr 7, 2026
@d1rshan
Copy link
Copy Markdown
Contributor Author

d1rshan commented Apr 7, 2026

understandable, what if we automatically resolve conflicting settings by disabling the existing one when another is enabled, with a toast to inform the user. (priority for latest selection)

@github-actions github-actions bot removed the waiting for update Pull requests or issues that require changes/comments before continuing label Apr 7, 2026
@Miodec
Copy link
Copy Markdown
Member

Miodec commented Apr 7, 2026

Thats how confidence and freedom mode work, maybe we could try that

image

@d1rshan d1rshan changed the title fix(config): prevent monkey + live text stats overlap (@d1rshan) fix(config): auto-resolve monkey live stats conflicts (@d1rshan) Apr 7, 2026
@d1rshan
Copy link
Copy Markdown
Contributor Author

d1rshan commented Apr 7, 2026

Thats how confidence and freedom mode work, maybe we could try that

image

updated for this behaviour!

Copy link
Copy Markdown
Member

@Miodec Miodec left a comment

Choose a reason for hiding this comment

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

Thanks

@Miodec Miodec added the waiting for update Pull requests or issues that require changes/comments before continuing label Apr 8, 2026
@github-actions github-actions bot removed the waiting for update Pull requests or issues that require changes/comments before continuing label Apr 8, 2026
@d1rshan d1rshan requested a review from Miodec April 8, 2026 10:50
@github-actions github-actions bot added the waiting for review Pull requests that require a review before continuing label Apr 8, 2026
@Miodec Miodec merged commit 4ec8aea into monkeytypegame:master Apr 8, 2026
16 checks passed
@Miodec
Copy link
Copy Markdown
Member

Miodec commented Apr 8, 2026

Thanks

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 waiting for review Pull requests that require a review before continuing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI: Monkey overlaps live speed/live accuracy when those stats use text style

4 participants