Skip to content

Conversation

@sirisjo
Copy link
Contributor

@sirisjo sirisjo commented Jan 21, 2026

Description

This change fixes a bug in the API response for graph-search that was preventing OpenGraph custom icons from rendering properly on the explore page canvas.

Motivation and Context

Resolves BED-7181

Solves a bug where OpenGraph custom icons were not rendering on the explore page canvas. This piece of the UI expects nodes in the response to already be styled/formatted, which includes appending the fas fa- prefixes to font-awesome icons.

How Has This Been Tested?

Test updated to include an assertion that the fas fa- prefix is included for a custom icon.

Screenshots (optional):

Before:
image

After:
Screenshot 2026-01-21 at 15 50 15

Types of changes

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

Checklist:

Summary by CodeRabbit

  • Bug Fixes

    • Improved icon rendering in graph visualizations to correctly display font-awesome icons.
    • Added fallback icon support for unrecognized icon types in graph nodes.
  • Tests

    • Updated pathfinding test to validate rendered icon classes in search results.

✏️ Tip: You can customize this high-level summary in your review settings.

@sirisjo sirisjo self-assigned this Jan 21, 2026
@sirisjo sirisjo added bug Something isn't working api A pull request containing changes affecting the API code. labels Jan 21, 2026
@sirisjo sirisjo changed the title fix(OpenGraph): BED-7181 fix(OpenGraph): Custom Node Icons render on Explore Page Canvas BED-7181 Jan 21, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 21, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Reworks icon handling for OpenGraph node conversion: adds font-awesome related constants and switches on icon type to build FontIcon.Text with a solid FontAwesome prefix or a default unknown icon. Updates a pathfinding test to assert the new rendered class for a Person node.

Changes

Cohort / File(s) Summary
Icon constants & conversion logic
cmd/api/src/api/bloodhoundgraph/conversions.go
Adds fontAwesomeIconType, fontAwesomePrefix, and defaultUnknownIcon; replaces unconditional icon formatting with a type-based switch in NodeToBloodHoundGraphWithOpenGraph to set FontIcon.Text to "fas fa-<name>" for FontAwesome or fallback to the default.
Pathfinding test update
cmd/api/src/api/v2/pathfinding_test.go
Modifies test to return a NodeSet with a Person node and mocks GetCustomNodeKinds to supply a FontAwesome icon kind; updates assertion to expect "fas fa-person-half-dress" in the response.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

user interface

Suggested reviewers

  • mistahj67
  • AD7ZJ
  • wes-mil

Poem

🐰 I hopped through code to tweak an icon,
now "fas fa-" fits each node I live on.
A prefix here, a fallback there,
I nibble bugs and polish flair. ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: fixing custom node icon rendering on the explore page canvas for OpenGraph, directly addressing the bug fix in the codebase.
Description check ✅ Passed The description includes all required sections: detailed description of the bug fix, motivation/context with ticket reference (BED-7181), testing approach, before/after screenshots, change type, and completed checklist items.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@sirisjo sirisjo changed the base branch from main to stage/v8.5.1 January 23, 2026 17:23
Copy link
Contributor

@superlinkx superlinkx left a comment

Choose a reason for hiding this comment

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

Excellent, pull!

@sirisjo sirisjo merged commit faacdd2 into stage/v8.5.1 Jan 23, 2026
12 checks passed
@sirisjo sirisjo deleted the BED-7181 branch January 23, 2026 17:34
@github-actions github-actions bot locked and limited conversation to collaborators Jan 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api A pull request containing changes affecting the API code. bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants