Skip to content

feat: add practice typing mode (no stats, xp, or pb) (@Vishal27alpha)#7482

Open
Vishal27alpha wants to merge 11 commits intomonkeytypegame:masterfrom
Vishal27alpha:feature/my-new-feature
Open

feat: add practice typing mode (no stats, xp, or pb) (@Vishal27alpha)#7482
Vishal27alpha wants to merge 11 commits intomonkeytypegame:masterfrom
Vishal27alpha:feature/my-new-feature

Conversation

@Vishal27alpha
Copy link

Description

What

Adds a new practice typing mode that allows users to type freely without affecting:

  • personal bests
  • XP
  • leaderboards
  • result history

Why

This enables low-pressure practice sessions while preserving competitive integrity of stats.

How

  • Extended shared schemas to include practice mode
  • Backend ignores practice results for persistence, XP, PB, and leaderboards
  • Frontend hides practice mode from result filters

Notes

  • API response shape remains unchanged
  • No database or contract changes required

Relevant files:

  • packages/schemas/src/shared.ts
  • backend/src/api/controllers/result.ts
  • frontend/src/ts/constants/default-result-filters.ts

Copilot AI review requested due to automatic review settings February 8, 2026 10:13
@monkeytypegeorge monkeytypegeorge added backend Server stuff frontend User interface or web stuff packages Changes in local packages labels Feb 8, 2026
@github-actions github-actions bot added the waiting for review Pull requests that require a review before continuing label Feb 8, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2026

Continuous integration check(s) failed. Please review the failing check's logs and make the necessary changes.

@github-actions github-actions bot 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 Feb 8, 2026
Copy link
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

Adds a new practice typing mode intended for “no-stats” sessions, wiring it through shared mode schemas, backend result submission, and default frontend result filters.

Changes:

  • Extend shared mode/schema typing to include practice.
  • Backend: special-case practice in result submission (skip PB checks, skip DB insert, XP=0).
  • Frontend: default result filters mark practice as excluded.

Reviewed changes

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

File Description
packages/schemas/src/shared.ts Adds practice to the modes derived from PersonalBestsSchema.
backend/src/api/controllers/result.ts Adds practice handling in result endpoints and XP calculation.
frontend/src/ts/constants/default-result-filters.ts Excludes practice from default stats/result filtering.

@fehmer
Copy link
Member

fehmer commented Feb 8, 2026

You can already turn off result saving in the comand line result saving off.

@Vishal27alpha Vishal27alpha changed the title feat: add practice typing mode (no stats, xp, or pb) feat: add practice typing mode (no stats, xp, or pb) (@Vishal27alpha) Feb 8, 2026
@github-actions github-actions bot removed the waiting for update Pull requests or issues that require changes/comments before continuing label Feb 8, 2026
@Vishal27alpha
Copy link
Author

Thanks for pointing that out, I wasn’t aware this already existed via the command line.

That explains the gap I felt from a user perspective. Would you be open to reframing this PR to focus on exposing the existing practice mode in the UI (making it more discoverable), rather than adding new backend behavior?

Happy to adjust or close the PR based on your preference.

@Miodec
Copy link
Member

Miodec commented Feb 8, 2026

Thanks for pointing that out, I wasn’t aware this already existed via the command line.

That explains the gap I felt from a user perspective. Would you be open to reframing this PR to focus on exposing the existing practice mode in the UI (making it more discoverable), rather than adding new backend behavior?

Happy to adjust or close the PR based on your preference.

Lets add a "result saving" settin to the account section in the settings page. In the description mention the word 'practice' so its easier to find. We should also add a 'practice' alias to the result saving commandline commands.

@Vishal27alpha
Copy link
Author

Thanks a lot for the clarification that makes perfect sense.
I’m happy to try reworking this PR in that direction:

-Add a “Result saving” toggle in the Account section of Settings
-Explicitly mention practice in the UI copy for better discoverability
-Add practice as an alias to the existing command-line commands

I’ll start exploring this and update the PR accordingly, unless you’d prefer this to be handled as a separate PR instead.

@Miodec
Copy link
Member

Miodec commented Feb 8, 2026

Thanks a lot for the clarification that makes perfect sense. I’m happy to try reworking this PR in that direction:

-Add a “Result saving” toggle in the Account section of Settings -Explicitly mention practice in the UI copy for better discoverability -Add practice as an alias to the existing command-line commands

I’ll start exploring this and update the PR accordingly, unless you’d prefer this to be handled as a separate PR instead.

Same pr is fine

@github-actions
Copy link
Contributor

Continuous integration check(s) failed. Please review the failing check's logs and make the necessary changes.

@github-actions github-actions bot added waiting for update Pull requests or issues that require changes/comments before continuing and removed waiting for update Pull requests or issues that require changes/comments before continuing labels Feb 10, 2026
@github-actions
Copy link
Contributor

Continuous integration check(s) failed. Please review the failing check's logs and make the necessary changes.

@github-actions github-actions bot added waiting for update Pull requests or issues that require changes/comments before continuing and removed waiting for update Pull requests or issues that require changes/comments before continuing labels Feb 11, 2026
@github-actions
Copy link
Contributor

Continuous integration check(s) failed. Please review the failing check's logs and make the necessary changes.

@github-actions github-actions bot added the waiting for update Pull requests or issues that require changes/comments before continuing label Feb 11, 2026
@github-actions github-actions bot removed the waiting for update Pull requests or issues that require changes/comments before continuing label Feb 11, 2026
@monkeytypegeorge monkeytypegeorge removed the backend Server stuff label Feb 13, 2026
@Vishal27alpha
Copy link
Author

Thanks for the review!
I’ve addressed the requested changes:

reverted the dev-auth change
removed unused modal/imports
updated the toggle implementation to match existing settings toggles
synced branch with latest master

All checks are passing now.

@fehmer
Copy link
Member

fehmer commented Feb 13, 2026

hi @Vishal27alpha ,

i talked to @Miodec. There was a misunderstanding on where to put the setting. Mio requested the new setting to be added to the settings page under account settings, but that got moved. Please add it to the settings page after presents and before test difficulty. https://monkeytype.com/settings?highlight=difficulty

@Vishal27alpha
Copy link
Author

Thanks for the clarification @fehmer!

I’ve moved the result saving setting to the main settings page (between presets and test difficulty) and added the missing active state for the command-line command.

@monkeytypegeorge monkeytypegeorge added the packages Changes in local packages label Feb 14, 2026
@fehmer
Copy link
Member

fehmer commented Feb 14, 2026

Hi @Vishal27alpha , nice work 👍

To get rid of the lists/result-saving.ts and fully use the command-metadata this changes are needed:

  • in commandline/lists.ts
    • add "resultsSavingEnabled" as first command in the behavior section, line 103
    • remove the ResultSavingCommands from line 101 and remove the import
  • in elements/modes-notice.ts
    • change the commands property from resultSaving to resultSavingEnabled, line 55

@github-actions github-actions bot added the waiting for update Pull requests or issues that require changes/comments before continuing label Feb 14, 2026
fix(settings): move result saving to config and align command metadata

- removed localStorage persistence
- deleted result-saving command list
- added alias to command metadata
- reverted unnecessary modal changes#
@github-actions github-actions bot removed the waiting for update Pull requests or issues that require changes/comments before continuing label Feb 15, 2026
@Vishal27alpha
Copy link
Author

@fehmer I’ve reverted the requested changes and updated the implementation accordingly.

Copy link
Member

@fehmer fehmer left a comment

Choose a reason for hiding this comment

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

nice work 👍

@Vishal27alpha
Copy link
Author

Thanks! Really appreciate the review

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 packages Changes in local packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants