fix(FLEETMDM-010-2): CU-86akj32d7 Brave icon reuses the same uniqueId-generated variable name for two distinct linearGradient defs, causing duplicate 'id' attributes in the DOM - #178
Draft
flamingo[bot] wants to merge 1 commit into
Conversation
…riable name for two distinct linearGradient defs, causing duplicate 'id' attributes in the DOM
| fill={`url(#${fillPathId2})`} | ||
| /> | ||
| </g> | ||
| <defs> |
Author
There was a problem hiding this comment.
🦩 🟠 Brave icon reuses the same uniqueId-generated variable name for two distinct linearGradient defs, causing duplicate 'id' attributes in the DOM
In frontend/pages/SoftwarePage/components/icons/Brave.tsx, added a second uniqueId("fill-path-") call assigned to a new fillPathId2 variable. The second <linearGradient> in <defs> now uses id={fillPathId2} instead of reusing fillPathId, and the third <path> element (which referenced the second gradient) now uses fill={url(#${fillPathId2})} so it correctly points at its own gradient definition, eliminating the duplicate id attribute.
🤖 Prompt for AI agents
In frontend/pages/SoftwarePage/components/icons/Brave.tsx around line 29, review and complete this code-review fix: Brave icon reuses the same uniqueId-generated variable name for two distinct linearGradient defs, causing duplicate 'id' attributes in the DOM.
What the draft fix changed: In `frontend/pages/SoftwarePage/components/icons/Brave.tsx`, added a second `uniqueId("fill-path-")` call assigned to a new `fillPathId2` variable. The second `<linearGradient>` in `<defs>` now uses `id={fillPathId2}` instead of reusing `fillPathId`, and the third `<path>` element (which referenced the second gradient) now uses `fill={`url(#${fillPathId2})`}` so it correctly points at its own gradient definition, eliminating the duplicate `id` attribute.
Verify the change is correct and complete; do not refactor unrelated code.
fix confidence: 🟢 95 high — react 👍/👎 to teach the reviewer
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.
Closes findings from rule FLEETMDM-010-2 — Brave icon reuses the same uniqueId-generated variable name for two distinct linearGradient defs, causing duplicate 'id' attributes in the DOM.
Draft — this is a starting point, not a finished change. The fix required judgment, so read it before trusting it.
frontend/pages/SoftwarePage/components/icons/Brave.tsx:29What changed — and what was deliberately left — is explained per finding as inline review comments on the lines each finding touched.
Run: https://product-hub.flamingo.so/admin/code-review
Run id:
1446a072-096e-4294-8082-c7cadffe76deMerging this PR is recorded as acceptance of the rule that produced it;
closing it unmerged is recorded as rejection. Both feed rule health, so
closing a wrong suggestion is useful rather than merely tidy.
ClickUp task: CU-86akj32d7 FleetMDM bulk review findings sweep (12 PRs)