Skip to content

feat: add lyrics search feature to custom text section (@JannisMCMXCV) - #8536

Open
JannisMCMXCV wants to merge 5 commits into
monkeytypegame:masterfrom
JannisMCMXCV:feat/lyrics-search
Open

JannisMCMXCV wants to merge 5 commits into
monkeytypegame:masterfrom
JannisMCMXCV:feat/lyrics-search

Conversation

@JannisMCMXCV

@JannisMCMXCV JannisMCMXCV commented Oct 28, 2026 •

Copy link
Copy Markdown

Description

I like practising typing with lyrics: I used to copy the lyrics of songs into the custom text section. Cleaning them up first (section tags like [Chorus], brackets, odd symbols, accents) was tedious every time, so I built a lyrics search that does this cleanup for me.

What it does

  • Two entry points: a lyrics button (music note) next to the custom-text-change-button, and a "load lyrics" button in the custom text modal (next to "open file"). There is also a command line entry "Search for lyrics".
  • Search by song, artist or album. (request is only sent when pressing enter, to reduce network traffic)
  • Opening a result shows a preview with title, artist, and album, genre and year when available.
  • Cleaning options with a live preview: section tags, special characters, punctuation, repeated lines, brackets, fancy quotes, accents (with an option to keep single characters like ä, ö, ü, ß, ...), lowercase, and line breaks as space or enter. The options are remembered in localStorage.
  • From the test config button / command line, "Start typing" sets the lyrics as custom text and restarts the test. From the custom text modal, "Use lyrics" instead fills the text area and returns to the modal, so the text can still be edited and mode/limit chosen there.

Screenshots

Entry point Landing Page Entry point custom text modal
button custom-button
Search Preview with filters
search preview
Customize which characters to replace
convert-options

Data sources

  • Lyrics: LRCLIB, whose software is MIT licensed. (Requests are sent one at a time with a short pause; 429/503 are handled via Retry-After plus jitter).
  • Album, genre and year: Apple's iTunes Search API, called once, only for the song that was opened. It is not open source. It is a proprietary web service covered by the Apple Developer Program License Agreement and Apple's Search API terms. It is free to use publicly without a key for standard search queries. If it is a problem, it can be removed without breaking anything: the preview then falls back to the LRCLIB data.

Open questions for the maintainers

  • I'm not sure this feature is allowed because of possible copyright issues. Lyrics are never sent to or stored in any Monkeytype database. They are fetched directly by the user's browser and only held in memory. Only when the user presses "Start typing" are they handed over to the pre-existing custom text section, where they behave like any other text a user inserted. I understand if this is a no-go and am happy to close the PR.
  • Is depending on the two external services acceptable? I tested everything against the real LRCLIB and iTunes APIs, but I couldn't verify with the production settings.

Tests

  • Unit tests for the filtering (lyrics-filter.spec.ts) and the data access (lyrics-provider.spec.ts: mapping, rate limiting, request spacing, iTunes matching).
  • Lint and format checks pass via the pre-commit hook.
  • Tested manually against the real LRCLIB and iTunes APIs.

Checks

  • Adding quotes?
  • Adding a language?
  • Adding a theme?
  • Adding a layout?
  • Adding a font?
  • Check if any open issues are related to this PR; if so, be sure to tag them below. (none found)
  • Make sure the PR title follows the Conventional Commits standard.
  • Make sure to include your GitHub username prefixed with @ inside parentheses at the end of the PR title.

AI Disclosure

The implementation of this feature was supported by Anthropic Claude Sonnet 5.5

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@monkeytypegeorge monkeytypegeorge added the frontend User interface or web stuff label Oct 28, 2026
@github-actions

Copy link
Copy Markdown
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 Oct 28, 2026
@github-actions github-actions Bot removed the waiting for update Pull requests or issues that require changes/comments before continuing label Oct 29, 2026
…nnisMCMXCV)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants