Commit graph

12162 commits

Author SHA1 Message Date
Miodec
c8cf1eae54 refactor: optimise fetching last result timestamp when adding a result 2025-08-28 16:19:26 +02:00
Christian Fehmer
984cb3cd9d
fix(testSettings): link with custom limit not applied correctly (@fehmer) (#6917)
fix for
https://www.reddit.com/r/monkeytype/comments/1n0p9fk/custom_timer_changes_to_number_of_words_when/
2025-08-27 19:04:26 +02:00
Miodec
9b93339ac1 chore: release v25.35.0 2025-08-27 18:51:05 +02:00
Miodec
a005467107 chore: add joshu badge 2025-08-27 15:46:07 +02:00
Christian Fehmer
4560257110
ci(assets): use zod in json-validation (@fehmer) (#6902) 2025-08-27 15:23:26 +02:00
Christian Fehmer
d264fce323
fix(theme): problems with theme preview (@fehmer) (#6881)
1. when a custom theme is active preview of regular theme was not
applied, introduced with
fdead53ba9
2. when custom theme is active previewing other custom themes set the
color to the active custom theme first, then the selected one causing
flashing

To reproduce:

1. preview of regular theme not working 
- create a custom theme with black background, activate it
- open commandline to preview a regular theme

2. custom theme colors get set multiple times
- create a custom theme with white background called white and activate
it
- create to custom themes with black background called black1 and black2
- switch preview between black1 and black2
2025-08-27 14:52:21 +02:00
Copilot
44ceb7137e
impr(sign up): add temporary email detection to registration form (@copilot) (#6912)
Implements temporary email detection for the registration email input
field on the login page. When users focus on the email input, the system
dynamically imports the `disposable-email-domains-js` package to check
for temporary/disposable email addresses.

## Changes Made

- **Dynamic Import**: Added lazy loading of
`disposable-email-domains-js` package that triggers on email input focus
- **Email Validation Enhancement**: Extended the existing email
validation in `login.ts` to include temporary email detection
- **User Warning**: Shows warning message "Be careful when using
temporary emails - you will need it to log into your account" for
detected temporary emails
- **Graceful Degradation**: Handles module import failures silently
without breaking existing functionality
- **Dependency Management**: Added `disposable-email-domains-js` to
frontend package dependencies

## Technical Implementation

The implementation integrates seamlessly with the existing
`validateWithIndicator` system:

```typescript
// Dynamic import on focus
emailInputEl.addEventListener("focus", async () => {
  if (!moduleLoadAttempted) {
    moduleLoadAttempted = true;
    try {
      disposableEmailModule = await import("disposable-email-domains-js");
    } catch (e) {
      // Silent failure - continues without temp email detection
    }
  }
});

// Validation check
if (disposableEmailModule && disposableEmailModule.isDisposableEmail) {
  if (disposableEmailModule.isDisposableEmail(email)) {
    return {
      warning: "Be careful when using temporary emails - you will need it to log into your account"
    };
  }
}
```

## Key Features

- **Non-blocking**: Module only loads when needed and failures don't
interrupt the user experience
- **Warning Level**: Uses the existing warning system, allowing users to
continue with registration
- **Preserved Functionality**: All existing email validation (education
emails, typos) continues to work unchanged
- **Performance Optimized**: Lazy loading prevents unnecessary network
requests until the feature is actually used

## Testing

Verified that:
- Temporary emails (e.g., mailinator.com, 10minutemail.com) show
appropriate warnings
- Regular emails (e.g., gmail.com, outlook.com) pass validation normally
- Education emails continue to show existing warnings
- Module import failures are handled gracefully
- All existing validation behavior is preserved

<screenshot>
![Education email validation still
works](https://github.com/user-attachments/assets/c035e0f8-df39-407b-95aa-85abc4409f38)

![Regular emails pass
validation](https://github.com/user-attachments/assets/f1925ecc-e81e-4dec-867c-a2bc0c19b469)
</screenshot>

Resolves the requirement to detect temporary emails while maintaining a
smooth user experience and backward compatibility.

> [!WARNING]
>
> <details>
> <summary>Firewall rules blocked me from connecting to one or more
addresses (expand for details)</summary>
>
> #### I tried to connect to the following addresses, but was blocked by
firewall rules:
>
> -
`https://api.github.com/repos/mziyut/disposable-email-domains-js/contents/package.json`
>   - Triggering command: `curl -s REDACTED` (http block)
>
> If you need me to access, download, or install something from one of
these locations, you can either:
>
> - Configure [Actions setup
steps](https://gh.io/copilot/actions-setup-steps) to set up my
environment, which run before the firewall is enabled
> - Add the appropriate URLs or hosts to the custom allowlist in this
repository's [Copilot coding agent
settings](https://github.com/monkeytypegame/monkeytype/settings/copilot/coding_agent)
(admins only)
>
> </details>



<!-- START COPILOT CODING AGENT TIPS -->
---

 Let Copilot coding agent [set things up for
you](https://github.com/monkeytypegame/monkeytype/issues/new?title=+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Miodec <13181393+Miodec@users.noreply.github.com>
Co-authored-by: Jack <jack@monkeytype.com>
2025-08-27 14:51:01 +02:00
Miodec
b9feaf538b chore(linting): enable restrict-plus-operands 2025-08-27 11:36:50 +02:00
Miodec
10557c9dba chore: move rule to the list of unused rules 2025-08-27 11:36:50 +02:00
Vivien Garcia
02f17eec67
feat(layout): add ergo_split46 layout (@viviengarcia) (#6914)
### Description

<!-- Please describe the change(s) made in your PR -->

### Checks

- [ ] Adding quotes?
- [ ] Make sure to include translations for the quotes in the
description (or another comment) so we can verify their content.
- [ ] Adding a language?
- Make sure to follow the [languages
documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/LANGUAGES.md)
  - [ ] Add language to `packages/schemas/src/languages.ts`
- [ ] Add language to exactly one group in
`frontend/src/ts/constants/languages.ts`
  - [ ] Add language json file to `frontend/static/languages` 
- [ ] Adding a theme?
- Make sure to follow the [themes
documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/THEMES.md)
  - [ ] Add theme to `packages/schemas/src/themes.ts`
  - [ ] Add theme to `frontend/src/ts/constants/themes.ts`
  - [ ] Add theme css file to `frontend/static/themes`
- [ ] Add some screenshot of the theme, especially with different test
settings (colorful, flip colors) to your pull request
- [x] Adding a layout?
- [x] Make sure to follow the [layouts
documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/LAYOUTS.md)
  - [x] Add layout to `packages/schemas/src/layouts.ts`
  - [x] Add layout json file to `frontend/static/layouts` 
- [ ] Adding a font?
- Make sure to follow the [themes
documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/FONTS.md)
  - [ ] Add font file  to `frontend/static/webfonts`
  - [ ] Add font to `packages/schemas/src/fonts.ts`
  - [ ] Add font to `frontend/src/ts/constants/fonts.ts`
- [ ] Check if any open issues are related to this PR; if so, be sure to
tag them below.
- [ ] Make sure the PR title follows the Conventional Commits standard.
(https://www.conventionalcommits.org for more info)
- [x] Make sure to include your GitHub username prefixed with @ inside
parentheses at the end of the PR title.

<!-- label(optional scope): pull request title (@your_github_username)
-->

<!-- I know I know they seem boring but please do them, they help us and
you will find out it also helps you.-->

Closes #

<!-- the issue(s) your PR resolves if any (delete if that is not the
case) -->
<!-- please also reference any issues and or PRs related to your pull
request -->
<!-- Also remove it if you are not following any issues. -->

<!-- pro tip: you can mention an issue, PR, or discussion on GitHub by
referencing its hash number e.g:
[#1234](https://github.com/monkeytypegame/monkeytype/pull/1234) -->

<!-- pro tip: you can press . (dot or period) in the code tab of any
GitHub repo to get access to GitHub's VS Code web editor Enjoy! :) -->
2025-08-26 22:17:24 +02:00
Christian Fehmer
576b35f4d3
fix(test): lazy mode set via command line does not restart test (@fehmer) (#6908) 2025-08-26 22:16:59 +02:00
Jack
e4c0c28150
chore: bump eslint typescript plugin (@miodec) (#6915) 2025-08-26 22:12:27 +02:00
Miodec
cb68421d72 chore: remove duplicate 2025-08-26 17:43:13 +02:00
Miodec
9f1dacd228 fix(language): split merged words in turkish 1k 2025-08-26 17:41:51 +02:00
Miodec
3496768ee6 chore(oxlint): enable alwys-return with ignoreLastCallback 2025-08-26 17:41:51 +02:00
Miodec
b54052913c chore: bump oxlint version 2025-08-26 17:41:51 +02:00
Miodec
072006277d feat: add icelandic 200 2025-08-26 17:41:51 +02:00
Leonabcd123
c30453e2dd
chore(about page): fix punctuation (@Leonabcd123) (#6911)
### Description

Changed punctuation in the about page. We can also make the text in the
parenthesis a standalone sentence by just removing the parenthesis.
2025-08-25 23:06:46 +02:00
Leonabcd123
7a6a54c3c8
impr(custom text): replace control character improvements (@Leonabcd123) (#6909)
### Description

Made it so all \t are converted to tab characters.

### Closes

Fixes #6906

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2025-08-25 23:06:02 +02:00
Miodec
c2cee8bdee impr: always count correct partially completed words for wpm 2025-08-24 13:54:13 +02:00
Miodec
55bbedbcc3 chore: remove opacity 2025-08-24 13:52:45 +02:00
Miodec
d4b3d1489b chore: update grid and ticks colors for all charts for consistency 2025-08-24 13:52:22 +02:00
Miodec
258a437c9d impr: add alpha support to colors utils
!nuf
2025-08-24 13:45:43 +02:00
Miodec
1da6fbd35f chore: make failed blend hot pink to make it more obvious something went wrong 2025-08-24 13:26:48 +02:00
Christian Fehmer
5937f49246
ci(assets): Refactor json-validator (@fehmer) (#6901) 2025-08-22 13:37:56 +02:00
Christian Fehmer
d2c627fcc8
ci: convert json-validation to typescript (@fehmer) (#6899)
- convert json-validation to typescript
- integrate tests for assets back into the json-validation script
2025-08-21 00:42:21 +02:00
Seif Soliman
a1af28bb5d
fix: download screenshot button was not shown (@byseif21) (#6900)
Co-authored-by: Jack <jack@monkeytype.com>
2025-08-21 00:08:45 +02:00
Miodec
cc08930de3 fix: sentry lint issues
!nuf
2025-08-20 23:44:00 +02:00
Dilem351
263984f576
impr(quotes): add French quotes (@Dilem) (#6898)
### Description
Translation of the quote : When you give them a great gift, some people
can't help but wonder why the wrapping paper isn't their favorite color.
<!-- Please describe the change(s) made in your PR -->

### Checks

- [x] Adding quotes?
- [x] Make sure to include translations for the quotes in the
description (or another comment) so we can verify their content.
- [ ] Adding a language?
- Make sure to follow the [languages
documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/LANGUAGES.md)
  - [ ] Add language to `packages/schemas/src/languages.ts`
- [ ] Add language to exactly one group in
`frontend/src/ts/constants/languages.ts`
  - [ ] Add language json file to `frontend/static/languages` 
- [ ] Adding a theme?
- Make sure to follow the [themes
documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/THEMES.md)
  - [ ] Add theme to `packages/schemas/src/themes.ts`
  - [ ] Add theme to `frontend/src/ts/constants/themes.ts`
  - [ ] Add theme css file to `frontend/static/themes`
- [ ] Add some screenshot of the theme, especially with different test
settings (colorful, flip colors) to your pull request
- [ ] Adding a layout?
- [ ] Make sure to follow the [layouts
documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/LAYOUTS.md)
  - [ ] Add layout to `packages/schemas/src/layouts.ts`
  - [ ] Add layout json file to `frontend/static/layouts` 
- [ ] Adding a font?
- Make sure to follow the [themes
documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/FONTS.md)
  - [ ] Add font file  to `frontend/static/webfonts`
  - [ ] Add font to `packages/schemas/src/fonts.ts`
  - [ ] Add font to `frontend/src/ts/constants/fonts.ts`
- [x] Check if any open issues are related to this PR; if so, be sure to
tag them below.
- [x] Make sure the PR title follows the Conventional Commits standard.
(https://www.conventionalcommits.org for more info)
- [x] Make sure to include your GitHub username prefixed with @ inside
parentheses at the end of the PR title.

<!-- label(optional scope): pull request title (@your_github_username)
-->

<!-- I know I know they seem boring but please do them, they help us and
you will find out it also helps you.-->

Closes #

<!-- the issue(s) your PR resolves if any (delete if that is not the
case) -->
<!-- please also reference any issues and or PRs related to your pull
request -->
<!-- Also remove it if you are not following any issues. -->

<!-- pro tip: you can mention an issue, PR, or discussion on GitHub by
referencing its hash number e.g:
[#1234](https://github.com/monkeytypegame/monkeytype/pull/1234) -->

<!-- pro tip: you can press . (dot or period) in the code tab of any
GitHub repo to get access to GitHub's VS Code web editor Enjoy! :) -->
2025-08-20 22:34:04 +02:00
Christian Fehmer
7d04637f7f
impr: validate username on google signup (@fehmer) (#6895) 2025-08-20 22:30:08 +02:00
Christian Fehmer
76597e6a08
impr(settings): Allow webp format for background images (@fehmer) (#6896) 2025-08-20 22:29:14 +02:00
Miodec
4aeadb9a85 chore: implement manual chunks, make sentry a dynamic import 2025-08-20 21:56:26 +02:00
Miodec
71821e31a9 chore: update browserslist 2025-08-20 20:47:04 +02:00
Miodec
a5d0a3e961 chore: update full-check script 2025-08-20 20:45:44 +02:00
Seif Soliman
e6519b166c
impr(screenshot): switch to modern-screenshot for enhancements (@byseif21) (#6884)
Switching the screenshot library from html2canvas to modern-screenshot.
for both visual for users and some technical/codebase benefits.

### Visual Improvements :
 * Background css filters now shows in the screenshot. 
   fix: #6862 , 
        #1613 ,

https://github.com/monkeytypegame/monkeytype/issues/6249#issuecomment-2651215569
* Sharper, higher-quality screenshots noticeably especially on high-DPI
screens.
* Backgrounds now render correctly on small screens that were previously
missing on mobile or small viewports, now included and properly scaled.
* Previously, with extra height e.g input history opened, the background
failed to cover everything even when it should have.
* The screenshot now more closely matches what users actually see across
devices and layouts.

### Non-Visual (Technical/Codebase) Improvements :
* Supporting modern css makes us now able to use css for the heatmap
instead of the JS.
     #5892 ,
      #5879
  * Reduced bundle size: Dropping html2canvas and its dependencies.
  * Up-to-date library, easier future improvements.

---------

Co-authored-by: Samuel Hautamäki <70753342+SirObby@users.noreply.github.com>
Co-authored-by: samuelhautamaki <samuelhautamaki@noreply.codeberg.org>
Co-authored-by: Miodec <jack@monkeytype.com>
2025-08-20 20:39:15 +02:00
Nad Alaba
a1293e79aa
chore: remove gulp dependency (@NadAlaba) (#6889)
Co-authored-by: Miodec <jack@monkeytype.com>
2025-08-20 20:10:41 +02:00
Miodec
f52f262f71 fix: unclosed word tags in words history
!nuf
2025-08-20 12:09:30 +02:00
Miodec
2a6bfbeefb chore: log high wpm results 2025-08-20 11:57:19 +02:00
Samuel Hautamäki
7018b83e27
feat(language): add hawaiian 200 1k (@SirObby) (#6883)
### Description

Added the hawaiian language, 200 and 1k variants. I used the
"freqlist_haw.txt" file from https://dohliam.github.io/corpus/haw/ which
sorts by frequency.

### Checks

- [x] Adding a language?
- Make sure to follow the [languages
documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/LANGUAGES.md)
  - [x] Add language to `packages/schemas/src/languages.ts`
- [x] Add language to exactly one group in
`frontend/src/ts/constants/languages.ts`
  - [x] Add language json file to `frontend/static/languages` 
- [x] Make sure to include your GitHub username prefixed with @ inside
parentheses at the end of the PR title.

---------

Co-authored-by: samuelhautamaki <samuelhautamaki@noreply.codeberg.org>
2025-08-19 22:11:04 +02:00
Miodec
9752e481ef refactor: move file 2025-08-19 21:22:21 +02:00
Miodec
ac05fd997d refactor: rename file 2025-08-19 21:22:03 +02:00
Jack
725fde1ae1
impr: loading page improvements (@miodec) (#6893)
- Refactor the loading page and the functions responsible for showing
elements
- Navigate loading options no longer override but they are used BEFORE
the page loading options. Keyframes are scaled accordingly to transition
smoothly
 - Removed the error element from the account page
 - Added a rejection / error handler to the loading page
 - Removed one more dependency from the account controller
2025-08-19 21:10:51 +02:00
TAMOUSS Radouane
b6959552ab
fix: add comma and period to specials funbox (#6870) (@radouane-tamouss) (#6887)
fix: add comma and period to specials funbox (#6870) (@radouane-tamouss)

- Add missing ',' and '.' characters to specials array in getSpecials()
- Add comprehensive tests for getSpecials() function
- Fixes issue where comma and period never appeared in specials funbox

Closes #6870

### Description

This PR fixes issue #6870 where the "specials" funbox was missing comma
(,) and period (.) characters. Users reported that these common
punctuation marks never appeared when using the specials funbox, making
it impossible to practice typing them in that mode.

**Changes made:**
1. Added ',' and '.' to the `specials` array in the `getSpecials()`
function
2. Added comprehensive unit tests to verify the fix works correctly and
prevent future regressions
3. Tests ensure all special characters (including comma and period) can
be generated

**Testing:**
- Added unit tests that specifically verify comma and period are
included
- Tests run multiple iterations to account for randomness in character
generation
- Verified all existing functionality remains unchanged

### Checks
- [x] Check if any open issues are related to this PR; if so, be sure to
tag them below.
- [x] Make sure the PR title follows the Conventional Commits standard.
(https://www.conventionalcommits.org for more info)
- [x] Make sure to include your GitHub username prefixed with @ inside
parentheses at the end of the PR title.

Closes #6870
2025-08-19 10:48:15 +02:00
Miodec
057fdf3fed chore: bump oxlint version 2025-08-18 15:38:13 +02:00
Miodec
14ce657273 fix: custom min speed mode setting not saving between sessions
closes #6890
2025-08-18 15:13:42 +02:00
Dilem351
6f50752b69
impr(quotes): add French quotes (@Dilem) (#6892)
### Description

Translation of the quote : "I don't think it's that simple. Some people
never observe anything. They simply endure existence with a kind of
passive insistence, and they resist with angry spite anything that might
shake them from their false serenity."

<!-- Please describe the change(s) made in your PR -->

### Checks

- [x] Adding quotes?
- [x] Make sure to include translations for the quotes in the
description (or another comment) so we can verify their content.
- [ ] Adding a language?
- Make sure to follow the [languages
documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/LANGUAGES.md)
  - [ ] Add language to `packages/schemas/src/languages.ts`
- [ ] Add language to exactly one group in
`frontend/src/ts/constants/languages.ts`
  - [ ] Add language json file to `frontend/static/languages` 
- [ ] Adding a theme?
- Make sure to follow the [themes
documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/THEMES.md)
  - [ ] Add theme to `packages/schemas/src/themes.ts`
  - [ ] Add theme to `frontend/src/ts/constants/themes.ts`
  - [ ] Add theme css file to `frontend/static/themes`
- [ ] Add some screenshot of the theme, especially with different test
settings (colorful, flip colors) to your pull request
- [ ] Adding a layout?
- [ ] Make sure to follow the [layouts
documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/LAYOUTS.md)
  - [ ] Add layout to `packages/schemas/src/layouts.ts`
  - [ ] Add layout json file to `frontend/static/layouts` 
- [ ] Adding a font?
- Make sure to follow the [themes
documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/FONTS.md)
  - [ ] Add font file  to `frontend/static/webfonts`
  - [ ] Add font to `packages/schemas/src/fonts.ts`
  - [ ] Add font to `frontend/src/ts/constants/fonts.ts`
- [x] Check if any open issues are related to this PR; if so, be sure to
tag them below.
- [x] Make sure the PR title follows the Conventional Commits standard.
(https://www.conventionalcommits.org for more info)
- [x] Make sure to include your GitHub username prefixed with @ inside
parentheses at the end of the PR title.

<!-- label(optional scope): pull request title (@your_github_username)
-->

<!-- I know I know they seem boring but please do them, they help us and
you will find out it also helps you.-->

Closes #

<!-- the issue(s) your PR resolves if any (delete if that is not the
case) -->
<!-- please also reference any issues and or PRs related to your pull
request -->
<!-- Also remove it if you are not following any issues. -->

<!-- pro tip: you can mention an issue, PR, or discussion on GitHub by
referencing its hash number e.g:
[#1234](https://github.com/monkeytypegame/monkeytype/pull/1234) -->

<!-- pro tip: you can press . (dot or period) in the code tab of any
GitHub repo to get access to GitHub's VS Code web editor Enjoy! :) -->

---------

Co-authored-by: Miodec <13181393+Miodec@users.noreply.github.com>
2025-08-18 14:08:12 +02:00
Jack
ac4a151359
refactor: loading page rework (@miodec) (#6885)
- Moved all loading page logic to the page controller. No other module
handles text or bar updating. The page controller displays either the
spinner or loading bar (depending on the configuration) inbetween the
source and target page. Once a promise resolves the page change
continues.
 - Pages can now say they require a loading page before opening the page
- Navigate function call can override that / add a loading page to any
page load
- Simplified account controller flow a lot - only one `navigate` call
remains
- Removed the preloader from the account page which simplifies things
aswell
 - Moved loading page styles
2025-08-18 14:07:36 +02:00
Miodec
7c27898d0b fix: account menu being shown under the test config
closes #6886
2025-08-16 11:07:24 +02:00
Miodec
1402b3addf refactor: rework change page function
remove unnecessary wrapping promise
use promiseAnimation for easier understanding
2025-08-16 00:01:30 +02:00
Miodec
2b4c3d2efe chore: stronger easing method type, add default easing method 2025-08-15 23:53:29 +02:00