Skip to content

fix: Remove square outlines from graph node icons BED-9251 - #3138

Open
justin-prime1 wants to merge 1 commit into
mainfrom
fix/graph-icon-square
Open

fix: Remove square outlines from graph node icons BED-9251#3138
justin-prime1 wants to merge 1 commit into
mainfrom
fix/graph-icon-square

Conversation

@justin-prime1

@justin-prime1 justin-prime1 commented Aug 12, 2026

Copy link
Copy Markdown

Description

Removes the node background color from SVG textures generated for Explore graph icons. The graph renderer continues to draw the circular node background, preventing rectangular texture bounds from appearing around glyphs at low zoom levels.

Adds focused regression coverage that verifies transformed icons use only the foreground color and scale, invoke SVG generation exactly once, and receive the generated URL.

Motivation and Context

Resolves BED-9251

Zoomed-out graph nodes could display a square outline around their glyphs because the generated SVG texture embedded the node background color. The issue applies to standard and custom node icons processed through the Explore icon dictionary, although it was initially reported on a User node.

How Has This Been Tested?

  • Ran the focused UI regression test:
    • yarn workspace bloodhound-ui test --run src/views/Explore/svgIcons.test.ts
  • Ran ESLint against the changed source and test files.
  • Ran Prettier validation against the changed source and test files.
  • Ran the BloodHound UI TypeScript check with tsc --noEmit.
  • Ran just prepare-for-codereview successfully from a clean repository.
  • Validated against an isolated BHCE stack with official AD and Entra sample data. A Playwright zoom scenario passed with no page errors and confirmed that node glyphs render without rectangular backgrounds while circular node colors remain intact.

Screenshots (optional):

The before-state screenshot is attached to BED-9251.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have met the contributing prerequisites
  • I have ensured that related documentation is up-to-date
    • Open API docs: not applicable
    • Code comments: no updates required
  • I have followed proper test practices
    • Added/updated tests to cover my changes
    • All applicable tests passed

Summary by CodeRabbit

  • Bug Fixes

    • Improved Explore icon rendering by consistently applying the default icon color and node scale.
    • Removed unintended background-color styling from generated SVG icon URLs.
  • Tests

    • Added coverage verifying that Explore node icons are transformed with the expected color, scale, and resulting URL.

@justin-prime1 justin-prime1 added the bug Something isn't working label Aug 12, 2026
@justin-prime1 justin-prime1 self-assigned this Aug 12, 2026
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: fdac0d42-c12a-483f-906e-e2cbbebf94f8

📥 Commits

Reviewing files that changed from the base of the PR and between 72643f3 and 1f0fc44.

📒 Files selected for processing (2)
  • cmd/ui/src/views/Explore/svgIcons.test.ts
  • cmd/ui/src/views/Explore/svgIcons.ts

📝 Walkthrough

Walkthrough

The Explore SVG icon transformation now uses the default color and node scale without adding a per-icon background color. Tests mock URL generation and verify the transformation result.

Changes

Explore SVG icon transformation

Layer / File(s) Summary
SVG icon URL generation and validation
cmd/ui/src/views/Explore/svgIcons.ts, cmd/ui/src/views/Explore/svgIcons.test.ts
SVG URL generation removes the per-icon background-color style. Tests verify the default color, node scale, generated URL, and assigned blob URL.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the bug fix and matches the removal of square outlines from graph node icons.
Description check ✅ Passed The description covers the change, motivation, ticket, testing, change type, and checklist with relevant details.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/graph-icon-square

Comment @coderabbitai help to get the list of available commands.

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant