fix(flasher): render failedToFlash progress message as HTML, not text - #2678
Merged
sensei-hacker merged 1 commit intoJul 10, 2026
Conversation
The failedToFlash i18n string embeds a <span style="color: red"> tag so "Failed" renders in red, matching the flashingMessage() styling used elsewhere for span.progressLabel. The DFU timeout path instead inserted it with jQuery .text(), so users see the literal markup in the progress bar instead of styled text.
Contributor
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
|
Configurator test build ready — commit Download build artifacts for PR #2678 Available platforms (scroll to the Artifacts section at the bottom of the run page):
|
This was referenced Jul 12, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Fixes the firmware-flasher progress bar showing the literal markup
<span style="color: red">Failed</span> to flash COM3as plain text instead of styled red text, when a DFU/bootloader detection timeout occurs during flashing.Root Cause
The
failedToFlashi18n string (locale/en/messages.json) intentionally embeds an HTML<span style="color: red">tag, matching the pattern used for several other i18n strings displayed in this UI.GUI.log(...)renders it correctly because it inserts content via.append(), which parses HTML. The very next line, however, updatedspan.progressLabelwith jQuery's.text(), which escapes markup instead of interpreting it — so users saw the raw tag text.Checked every other call site that writes to
span.progressLabel: all other i18n keys used there are plain text with no markup, andfirmwareFlasherTab.flashingMessage()(the primary path for updating this element) already uses.html(). This was the one inconsistent call site.Changes
js/protocols/stm32.js: changed$('span.progressLabel').text(...)to.html(...)in the DFU/bootloader timeout handler, matching the existing.html()pattern used elsewhere for this element.tests/firmware-flasher-progress-html.test.mjs: a regression test that source-inspects theonTimeoutcallback and asserts it uses.html()(not.text()) when writing thefailedToFlashmessage, consistent with this repo's existingtests/firmware-flasher.test.mjsconventions.Testing
npm test— 45/45 passing..text()→.html()) matching an existing, proven pattern already used elsewhere for the same UI element, so this is low risk, but flagging that live-hardware confirmation wasn't performed.Other progress bar states checked
Confirmed no other progress bar messages (success, in-progress, cancelled) have the same text/HTML mismatch.