Skip to content

fix(FLEETMDM-010-2): Duplicate SVG gradient id 'fillPathId' generated once but used on two different <linearGradient> elements - #130

Draft
flamingo[bot] wants to merge 1 commit into
mainfrom
ai-fix/fleetmdm-010-2-20dfefe9-f6d23861
Draft

fix(FLEETMDM-010-2): Duplicate SVG gradient id 'fillPathId' generated once but used on two different <linearGradient> elements#130
flamingo[bot] wants to merge 1 commit into
mainfrom
ai-fix/fleetmdm-010-2-20dfefe9-f6d23861

Conversation

@flamingo

@flamingo flamingo Bot commented Aug 24, 2026

Copy link
Copy Markdown

Closes findings from rule FLEETMDM-010-2 — Duplicate SVG gradient id 'fillPathId' generated once but used on two different elements.

Draft — this is a starting point, not a finished change. The fix required judgment, so read it before trusting it.

# Fix confidence Finding Location
1 🟢 95 high Duplicate SVG gradient id 'fillPathId' generated once but used on two different elements frontend/pages/SoftwarePage/components/icons/Brave.tsx:6

What 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: f6d23861-693f-45a1-b5b3-570aa3bc9ea7

Merging 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.

… once but used on two different <linearGradient> elements

@flamingo flamingo Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

🦩 What this fix changed, finding by finding

1 finding(s) fixed in this draft — 1 explained inline on the diff.

@@ -5,6 +5,7 @@ import type { SVGProps } from "react";
const Brave = (props: SVGProps<SVGSVGElement>) => {
const clipPathId = uniqueId("clip-path-");

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

🦩 🔴 Duplicate SVG gradient id 'fillPathId' generated once but used on two different elements

In Brave component, added a second uniqueId("fill-path-") call assigned to fillPathId2, applied it as the id of the second <linearGradient> element (the FF452A -> FF2000 gradient), and updated the third <path>'s fill attribute (previously url(#${fillPathId})) to reference url(#${fillPathId2}) so it correctly points to that gradient instead of colliding with the first one.

🤖 Prompt for AI agents
In frontend/pages/SoftwarePage/components/icons/Brave.tsx around line 6, review and complete this code-review fix: Duplicate SVG gradient id 'fillPathId' generated once but used on two different <linearGradient> elements.
What the draft fix changed: In `Brave` component, added a second `uniqueId("fill-path-")` call assigned to `fillPathId2`, applied it as the `id` of the second `<linearGradient>` element (the FF452A -> FF2000 gradient), and updated the third `<path>`'s `fill` attribute (previously `url(#${fillPathId})`) to reference `url(#${fillPathId2})` so it correctly points to that gradient instead of colliding with the first one.
Verify the change is correct and complete; do not refactor unrelated code.

fix confidence: 🟢 95 high — react 👍/👎 to teach the reviewer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants