Skip to content

fix(quotes): use edited quote length instead of original (@HmonWutt)#8233

Open
HmonWutt wants to merge 2 commits into
monkeytypegame:masterfrom
HmonWutt:fix/quote-length-metadata
Open

fix(quotes): use edited quote length instead of original (@HmonWutt)#8233
HmonWutt wants to merge 2 commits into
monkeytypegame:masterfrom
HmonWutt:fix/quote-length-metadata

Conversation

@HmonWutt

Copy link
Copy Markdown
Contributor

When a moderator edits a quote before approving it, the length metadata was calculated from the original (unedited) text instead of the edited text. This caused incorrect quote length display in the quote search modal.

Issue: #8081

Description

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 14, 2026 21:49
@monkeytypegeorge monkeytypegeorge added the backend Server stuff label Jul 14, 2026
@github-actions github-actions Bot added the waiting for review Pull requests that require a review before continuing label Jul 14, 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

Fixes quote approval metadata so length is derived from the edited quote text (when provided), not the original submission text.

Changes:

  • Update approve() to compute length from (editQuote ?? targetQuote.text).

Comment thread backend/src/dal/new-quotes.ts
Comment thread backend/src/dal/new-quotes.ts Outdated
When a moderator edits a quote before approving it, the length
metadata was calculated from the original (unedited) text instead
of the edited text. This caused incorrect quote length display in
the quote search modal.

Issue: monkeytypegame#8081
@HmonWutt
HmonWutt force-pushed the fix/quote-length-metadata branch from e834fd8 to c515924 Compare July 14, 2026 21:57
@monkeytypegeorge monkeytypegeorge added the frontend User interface or web stuff label Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Server stuff 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