Skip to content

H-6604: Fix entity type icon rendering for relative URLs#8876

Draft
CiaranMn wants to merge 1 commit into
mainfrom
cursor/fix-entity-type-icon-relative-urls-76e4
Draft

H-6604: Fix entity type icon rendering for relative URLs#8876
CiaranMn wants to merge 1 commit into
mainfrom
cursor/fix-entity-type-icon-relative-urls-76e4

Conversation

@CiaranMn

Copy link
Copy Markdown
Member

🌟 What is the purpose of this PR?

This PR fixes broken entity type icon rendering when the icon field contains a relative URL (e.g., /icon/types/cubes.svg). Some components were rendering the raw icon value directly instead of using the EntityOrTypeIcon component, which handles URL conversion properly.

🔗 Related links

  • Linear issue: H-6604
  • Reference implementation: entity-or-type-sidebar-item.tsx (already fixed)

🔍 What does this change?

  • draft-entities-filters.tsx: Replaced direct icon rendering with EntityOrTypeIcon component for filter type icons
  • entity-type-header.tsx: Replaced manual URL conversion and mask styling with EntityOrTypeIcon component
  • graph-data-loader.tsx: Added relative URL to absolute URL conversion before passing icons to the graph visualization library

All changes follow the pattern established in entity-or-type-sidebar-item.tsx, which was already correctly using EntityOrTypeIcon.

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • does not modify any publishable blocks or libraries, or modifications do not need publishing

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • do not affect the execution graph

🛡 What tests cover this?

  • Existing tests that cover these components should continue to pass
  • Manual testing with entity types that have relative URL icons

❓ How to test this?

  1. Checkout the branch
  2. Navigate to the Inbox/Actions page (with draft entities)
  3. Check the filter panel on the left - entity type icons should now render correctly
  4. Navigate to an entity type page and verify the header icon renders correctly
  5. Open the graph visualizer and confirm entity type icons display properly

Linear Issue: H-6604

Open in Web Open in Cursor 

@vercel

vercel Bot commented Jun 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview, Comment Jun 17, 2026 9:00am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
hashdotdesign-tokens Ignored Ignored Preview Jun 17, 2026 9:00am
petrinaut Skipped Skipped Jun 17, 2026 9:00am

Replace direct icon rendering with EntityOrTypeIcon component in:
- draft-entities-filters.tsx: Use EntityOrTypeIcon for filter type icons
- entity-type-header.tsx: Use EntityOrTypeIcon instead of manual URL conversion
- graph-data-loader.tsx: Convert relative URLs to absolute before passing to graph

This ensures relative icon URLs (starting with '/') are properly converted to
absolute URLs and rendered correctly throughout the application.

Co-authored-by: Ciaran Morinan <CiaranMn@users.noreply.github.com>
@cursor cursor Bot force-pushed the cursor/fix-entity-type-icon-relative-urls-76e4 branch from 5808dc0 to d3cf0b8 Compare June 17, 2026 08:53
@vercel vercel Bot temporarily deployed to Preview – petrinaut June 17, 2026 08:53 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/apps > hash* Affects HASH (a `hash-*` app) area/apps type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

2 participants