Skip to content

feat(result): option to copy slow words list with filtering (@vrutant08) - #8290

Open
vrutant08 wants to merge 3 commits into
monkeytypegame:masterfrom
vrutant08:feat/copy-slow-words
Open

feat(result): option to copy slow words list with filtering (@vrutant08)#8290
vrutant08 wants to merge 3 commits into
monkeytypegame:masterfrom
vrutant08:feat/copy-slow-words

Conversation

@vrutant08

Copy link
Copy Markdown

Description

Added a "Copy slow words list" option to the test result screen under the input history section, alongside the existing "Copy missed words" button.
When clicked, a theme-matched input pop up opens prompting the user for a WPM threshold (defaults to the average wpm of that test). Words typed below that threshold are fetched(eg. if entered 120, then every word typed below 120 will be copied) and copied to the clipboard.

Features Added

  • Added #copySlowWordsListButton button to test-result.html with a speedometer icon (fa-tachometer-alt).
  • Intergrated showSimpleModal with WPM input validation.
  • Integrated getWordBurstHistory(eventLog) to filter words typed under the requested speed.

Screenshots

image Screenshot 2026-07-27 183512 Screenshot 2026-07-27 183814 Screenshot 2026-07-27 183829

Checks

  • Adding quotes?
    • Make sure to follow the quotes documentation
    • 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
    • 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
    • Add theme to packages/schemas/src/themes.ts
    • Add theme to frontend/src/ts/constants/themes.ts
    • (optional) Add theme css file to frontend/static/themes
    • Add some screenshots 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
    • Add layout to packages/schemas/src/layouts.ts
    • Add layout json file to frontend/static/layouts
  • Adding a font?
    • Make sure to follow the fonts documentation
    • 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)
  • Make sure to include your GitHub username prefixed with @ inside parentheses at the end of the PR title.

Closes #

Copilot AI review requested due to automatic review settings July 27, 2026 13:43
@monkeytypegeorge monkeytypegeorge added the frontend User interface or web stuff label Jul 27, 2026
@github-actions github-actions Bot added the waiting for review Pull requests that require a review before continuing label Jul 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds result-screen action to copy “slow words” (below user-set WPM threshold) to clipboard, via SimpleModal, alongside existing input-history copy buttons.

Changes:

  • Add copySlowWordsListButton to test result input-history header.
  • Add click handler to compute burst WPMs, prompt threshold, filter words, copy to clipboard.
  • Extend copyToClipboard to accept optional custom notification text.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
frontend/src/ts/test/test-ui.ts Wire new “copy slow words” modal + filtering; enhance clipboard helper message
frontend/src/html/pages/test-result.html Add new button in input history toolbar
Comments suppressed due to low confidence (1)

frontend/src/ts/test/test-ui.ts:1962

  • Slow words list can include an empty word (and copy extra spaces) when inputHistory contains abandoned/empty words (getInputHistory returns ""), because speed 0 is always < threshold. Skip empty history entries/non-finite bursts and avoid recomputing inputHistory repeatedly.
      typedWords.forEach((word, index) => {
        const speed = burstHistory[index] ?? Infinity;
        if (speed < speedThreshold) {
          slowWords.push(word);
        }

Comment thread frontend/src/ts/test/test-ui.ts
vrutant08 and others added 2 commits July 27, 2026 19:21
…ge WPM

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

3 participants