OpenMetadata icon indicating copy to clipboard operation
OpenMetadata copied to clipboard

Add new SVG icons for entity; refactor entity icon rendering in various components

Open Rohit0301 opened this issue 5 months ago โ€ข 5 comments

Describe your changes:

Fixes #

I worked on ... because ...

Type of change:

  • [ ] Bug fix
  • [ ] Improvement
  • [ ] New feature
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Documentation

High-level design:

N/A โ€” small change.

Tests:

Use cases covered

Unit tests

Backend integration tests

Ingestion integration tests

Playwright (UI) tests

Manual testing performed

UI screen recording / screenshots:

Not applicable.

Checklist:

  • [x] I have read the CONTRIBUTING document.
  • [ ] My PR title is Fixes <issue-number>: <short explanation>
  • [ ] My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • [ ] I have commented on my code, particularly in hard-to-understand areas.
  • [ ] For JSON Schema changes: I updated the migration scripts or explained why it is not needed.
  • [ ] For UI changes: I attached a screen recording and/or screenshots above.
  • [ ] I have added tests (unit / integration / Playwright as applicable) and listed them above.

Summary by Gitar

  • Entity iconography:
    • Centralized entity-to-SVG mapping with ENTITY_ICON_MAPPER and added getEntityIconWithBg for consistent, safe rendering.
  • Data Asset picker overhaul:
    • Introduced a reusable DataAssetPickerShell with search, filtering, and pagination support.
    • Added DataAssetFilterPopover for single-selection filtering and DataAssetMultiSelectPopover for multi-selection linking.
  • UI enhancements:
    • Refactored ContextCenterMemoriesPage to use the new DataAssetFilterPopover.
    • Added keyboard shortcut support (Esc) and footer usage hints in picker components.
  • Localization:
    • Added comprehensive i18n keys for search, selection, and asset count labels across all locales.

This will update automatically on new commits.

------|----------| | openmetadata-ui/src/main/resources/ui/src/constants/Assets.constants.ts | Adds new SVG-based icon imports and wires them into ENTITY_ICON_MAPPER for newly supported entity types; some added SVGs (classification.svg, ml-model.svg, storge-service.svg) remain unused in the mapper. | | openmetadata-ui/src/main/resources/ui/src/utils/Assets/AssetsUtils.tsx | Adds getEntityIconWithBg utility that safely looks up entity icons from ENTITY_ICON_MAPPER with null guards; SVG ReactComponents in the mapper ignore the size/strokeWidth/color props passed by this function. | | openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/MemoriesView/MemoriesView.component.tsx | Renders linked entity badges using ENTITY_ICON_MAPPER[entity.type].iconClass with no null guard โ€” crashes with TypeError for any unmapped entity type. | | openmetadata-ui/src/main/resources/ui/src/components/DataAssets/DataAssetAsyncSelectList/DataAssetSelectList.tsx | Replaces inline icon logic with getEntityIconWithBg; import uses absolute src/ path instead of the relative convention used throughout this file. | | openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/CreateMemoryModal/CreateMemoryModal.component.tsx | Uses getEntityIconWithBg for linked-asset cards with explicit size={18}; SVG-based icons won't honor that size. Import uses absolute path. | | openmetadata-ui/src/main/resources/ui/src/pages/ContextCenterPage/ContextCenterMemoriesPage/ContextCenterMemoriesPage.tsx | Integrates getEntityIconWithBg in the asset-filter dropdown; logic and null-handling are correct. Import uses absolute path. |

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    SVGs["New SVG entity icons\n(api-service, chart, dashboard, etc.)"] --> MAPPER
    Icons["@untitledui/icons\n(Table, Database01, Folder, etc.)"] --> MAPPER
    MAPPER["ENTITY_ICON_MAPPER\n(Assets.constants.ts)"] --> Util
    Util["getEntityIconWithBg()\n(AssetsUtils.tsx)\npasses size/strokeWidth/iconClass"] --> DSL
    Util --> CMM
    Util --> CCP
    MAPPER --> MV

    DSL["DataAssetSelectList\n(uses getEntityIconWithBg)"]
    CMM["CreateMemoryModal\n(uses getEntityIconWithBg)"]
    CCP["ContextCenterMemoriesPage\n(uses getEntityIconWithBg)"]
    MV["MemoriesView\n(accesses mapper directly โ€”\nno null guard โš ๏ธ)"]

    SVGs -.->|"hardcoded stroke colors\nignore size/color props"| Util
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    SVGs["New SVG entity icons\n(api-service, chart, dashboard, etc.)"] --> MAPPER
    Icons["@untitledui/icons\n(Table, Database01, Folder, etc.)"] --> MAPPER
    MAPPER["ENTITY_ICON_MAPPER\n(Assets.constants.ts)"] --> Util
    Util["getEntityIconWithBg()\n(AssetsUtils.tsx)\npasses size/strokeWidth/iconClass"] --> DSL
    Util --> CMM
    Util --> CCP
    MAPPER --> MV

    DSL["DataAssetSelectList\n(uses getEntityIconWithBg)"]
    CMM["CreateMemoryModal\n(uses getEntityIconWithBg)"]
    CCP["ContextCenterMemoriesPage\n(uses getEntityIconWithBg)"]
    MV["MemoriesView\n(accesses mapper directly โ€”\nno null guard โš ๏ธ)"]

    SVGs -.->|"hardcoded stroke colors\nignore size/color props"| Util

Reviews (3): Last reviewed commit: "Fixed the UI for data asset select list" | Re-trigger Greptile

Greptile Summary

This PR centralizes entity iconography into ENTITY_ICON_MAPPER and getEntityIconWithBg, adds 14 new SVG icons, and refactors the data-asset picker into a composable set of components (DataAssetPickerShell, DataAssetFilterPopover, DataAssetMultiSelectPopover).

  • Icon system: ENTITY_ICON_MAPPER in Assets.constants.ts maps ~30 entity types to icon, background, and color classes; getEntityIconWithBg in AssetsUtils.tsx wraps the lookup with null guards and a consistent rounded container.
  • Picker refactor: The old monolithic DataAssetSelectList is replaced by a shell + two popover variants; keyboard navigation (arrows, Enter, Esc) and infinite-scroll pagination are handled cleanly, with async fetch logic extracted into useAsyncDataAssetOptions.
  • Consumer updates: MemoriesView, CreateMemoryModal, and ContextCenterMemoriesPage are updated to use the new utilities; localization keys are added across all 21 locale files.

Confidence Score: 4/5

The new picker components and icon utility are well-structured, but two issues flagged in the prior review round remain unaddressed in the current HEAD.

The unguarded ENTITY_ICON_MAPPER[entity.type].iconClass in MemoriesView still crashes for any entity type not in the mapper, and the All Authors dropdown item using id=all-author causes the author filter to match zero memories instead of clearing. Both are present in the code at this commit.

MemoriesView.component.tsx (unguarded mapper access) and ContextCenterMemoriesPage.tsx (broken author filter sentinel id) need attention before merging.

Important Files Changed

Filename Overview
openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/MemoriesView/MemoriesView.component.tsx Replaces tag badges with linked-entity badges; unguarded ENTITY_ICON_MAPPER[entity.type].iconClass (line 275) still crashes for any unmapped entity type โ€” previously flagged, not yet fixed.
openmetadata-ui/src/main/resources/ui/src/pages/ContextCenterPage/ContextCenterMemoriesPage/ContextCenterMemoriesPage.tsx Replaces asset-filter Dropdown with DataAssetFilterPopover (correct); adds All Authors item with id=all-author which breaks the author filter (previously flagged, not yet fixed).
openmetadata-ui/src/main/resources/ui/src/components/DataAssets/DataAssetSelectList/DataAssetFilterPopover.tsx New single-selection filter popover backed by DataAssetPickerShell; searchText is not cleared on close so stale query persists on next open.
openmetadata-ui/src/main/resources/ui/src/components/DataAssets/DataAssetSelectList/DataAssetPickerShell.tsx New reusable picker shell with keyboard navigation (ArrowUp/Down, Enter, Esc), overlay-click-to-close, optional count bar, and footer hints; logic is correct.
openmetadata-ui/src/main/resources/ui/src/components/DataAssets/DataAssetSelectList/DataAssetMultiSelectPopover.tsx New async multi-select popover; delegates fetch/scroll/search to useAsyncDataAssetOptions and correctly resets options on each open.
openmetadata-ui/src/main/resources/ui/src/components/DataAssets/DataAssetSelectList/useAsyncDataAssetOptions.ts Clean extraction of fetch/debounce/pagination logic from the old DataAssetSelectList; debounce cancel on close is handled correctly.
openmetadata-ui/src/main/resources/ui/src/constants/Assets.constants.ts Adds ENTITY_ICON_MAPPER with ~30 entity type entries; classification.svg and ml-model.svg are not imported here, and EntityType.FILE uses the Folder icon (already flagged in prior review).
openmetadata-ui/src/main/resources/ui/src/utils/Assets/AssetsUtils.tsx Adds getEntityIconWithBg with safe null guards; SVG-based icons receive width/height props that they may not honor, but this is a rendering limitation rather than a crash.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    SVGs["New SVG entity icons\n(api-service, chart, dashboard, etc.)"] --> MAPPER
    UntitledIcons["@untitledui/icons\n(Table, Database01, Folder, etc.)"] --> MAPPER
    MAPPER["ENTITY_ICON_MAPPER\nAssets.constants.ts"] --> Util["getEntityIconWithBg\nAssetsUtils.tsx"]
    Util --> Row["DataAssetPickerRow\n(icon + label + type badge)"]
    Row --> Shell["DataAssetPickerShell\n(keyboard nav, overlay, count bar)"]
    Shell --> Filter["DataAssetFilterPopover\n(single-select, pre-loaded options)"]
    Shell --> Multi["DataAssetMultiSelectPopover\n(multi-select, async + paginated)"]
    AsyncHook["useAsyncDataAssetOptions\n(fetch, debounce, scroll-pagination)"] --> Multi
    Filter --> CCP["ContextCenterMemoriesPage\nasset filter dropdown"]
    Multi --> CMM["CreateMemoryModal\nlink assets to memory"]
    MAPPER --> MV["MemoriesView\ndirect ENTITY_ICON_MAPPER access\nโš ๏ธ no null guard"]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    SVGs["New SVG entity icons\n(api-service, chart, dashboard, etc.)"] --> MAPPER
    UntitledIcons["@untitledui/icons\n(Table, Database01, Folder, etc.)"] --> MAPPER
    MAPPER["ENTITY_ICON_MAPPER\nAssets.constants.ts"] --> Util["getEntityIconWithBg\nAssetsUtils.tsx"]
    Util --> Row["DataAssetPickerRow\n(icon + label + type badge)"]
    Row --> Shell["DataAssetPickerShell\n(keyboard nav, overlay, count bar)"]
    Shell --> Filter["DataAssetFilterPopover\n(single-select, pre-loaded options)"]
    Shell --> Multi["DataAssetMultiSelectPopover\n(multi-select, async + paginated)"]
    AsyncHook["useAsyncDataAssetOptions\n(fetch, debounce, scroll-pagination)"] --> Multi
    Filter --> CCP["ContextCenterMemoriesPage\nasset filter dropdown"]
    Multi --> CMM["CreateMemoryModal\nlink assets to memory"]
    MAPPER --> MV["MemoriesView\ndirect ENTITY_ICON_MAPPER access\nโš ๏ธ no null guard"]

Reviews (8): Last reviewed commit: "minor fix" | Re-trigger Greptile

Rohit0301 avatar Jun 17 '26 18:06 Rohit0301

๐Ÿ”ด Playwright Results โ€” 1 failure(s), 69 flaky

โœ… 4416 passed ยท โŒ 1 failed ยท ๐ŸŸก 69 flaky ยท โญ๏ธ 37 skipped

Shard Passed Failed Flaky Skipped
๐ŸŸก Shard 1 384 0 3 11
๐Ÿ”ด Shard 2 805 1 11 8
๐ŸŸก Shard 3 812 0 9 7
๐ŸŸก Shard 4 802 0 10 10
๐ŸŸก Shard 5 841 0 24 0
๐ŸŸก Shard 6 772 0 12 1

Genuine Failures (failed on all attempts)

โŒ Features/BulkImport.spec.ts โ€บ Database Schema (shard 2)
Error: expect(locator).toContainText(expected) failed

Locator: locator('.rdg-cell-details')
Timeout: 15000ms
- Expected  - 2
+ Received  + 2

  Array [
-   "Entity created",
+   "#FIELD_REQUIRED: Field 1 is required;#FIELD_REQUIRED: Field 13 is required",
+   "#FIELD_REQUIRED: Field 1 is required;#FIELD_REQUIRED: Field 13 is required",
    "Entity updated",
-   "Entity created",
    "Entity updated",
  ]

Call log:
  - Expect "toContainText" with timeout 15000ms
  - waiting for locator('.rdg-cell-details')
    12 ร— locator resolved to 0 elements
    7 ร— locator resolved to 4 elements

๐ŸŸก 69 flaky test(s) (passed on retry)
  • Features/DataAssetRulesEnabled.spec.ts โ€บ Verify the Dashboard Entity Action items after rules is Enabled (shard 1, 1 retry)
  • Features/DataAssetRulesDisabled.spec.ts โ€บ Verify the Worksheet entity item action after rules disabled (shard 1, 1 retry)
  • Flow/SearchRBAC.spec.ts โ€บ a fully denied user sees neither asset type when browsing (shard 1, 2 retries)
  • Features/BulkEditEntity.spec.ts โ€บ Glossary (shard 2, 2 retries)
  • Features/BulkImport.spec.ts โ€บ Database service (shard 2, 2 retries)
  • Features/BulkImport.spec.ts โ€บ Database (shard 2, 1 retry)
  • Features/BulkImport.spec.ts โ€บ Table (shard 2, 1 retry)
  • Features/BulkImportWithDotInName.spec.ts โ€บ Bulk edit existing entity with dot in service name (shard 2, 1 retry)
  • Features/Container.spec.ts โ€บ Container page should show Schema and Children count (shard 2, 1 retry)
  • Features/Container.spec.ts โ€บ expand / collapse should not appear after updating nested fields for container (shard 2, 1 retry)
  • Features/ContextCenterPermission.spec.ts โ€บ user with editAll permission can see restore action but not delete action on an archived document, and can restore it (shard 2, 1 retry)
  • Features/DataQuality/TableLevelTests.spec.ts โ€บ Table Column To Match Set (shard 2, 1 retry)
  • Features/DataQuality/TestCaseImportExportE2eFlow.spec.ts โ€บ Admin: Complete export-import-validate flow (shard 2, 2 retries)
  • Features/ExploreQuickFilters.spec.ts โ€บ explore tree sidebar selection is not cleared when a top dropdown filter is applied (shard 2, 1 retry)
  • Features/MetricBulkImportExportEdit.spec.ts โ€บ Restricted roles cannot access metric import or bulk edit (shard 3, 1 retry)
  • Features/NestedColumnsExpandCollapse.spec.ts โ€บ should not duplicate rows when expanding and collapsing nested columns with same names (shard 3, 1 retry)
  • Features/NestedColumnsExpandCollapse.spec.ts โ€บ should not duplicate rows when expanding and collapsing nested columns with same names in Version History (shard 3, 1 retry)
  • Features/Permissions/EntityPermissions.spec.ts โ€บ Worksheet allow common operations permissions (shard 3, 1 retry)
  • Features/RecentlyViewed.spec.ts โ€บ Check MlModel in recently viewed (shard 3, 1 retry)
  • Features/RestoreEntityInheritedFields.spec.ts โ€บ Validate restore with Inherited domain and data products assigned (shard 3, 1 retry)
  • Features/SearchExport.spec.ts โ€บ Export queues a background job and downloads from the jobs tray (shard 3, 1 retry)
  • Features/Table.spec.ts โ€บ Table pagination with sorting should works (shard 3, 1 retry)
  • Features/TableConstraint.spec.ts โ€บ Table Constraint (shard 3, 1 retry)
  • Flow/ApiCollection.spec.ts โ€บ Verify Owner Propagation: owner should be propagated to the API Collection's API Endpoint (shard 4, 1 retry)
  • Flow/IngestionBot.spec.ts โ€บ Ingestion bot should be able to access domain specific domain (shard 4, 1 retry)
  • Flow/NestedChildrenUpdates.spec.ts โ€บ should update nested column description immediately without page refresh (shard 4, 1 retry)
  • Flow/NestedChildrenUpdates.spec.ts โ€บ should add and remove tags to nested column immediately without refresh (shard 4, 1 retry)
  • Flow/NestedChildrenUpdates.spec.ts โ€บ should add and remove tags to nested column immediately without refresh (shard 4, 1 retry)
  • Flow/NestedChildrenUpdates.spec.ts โ€บ should update nested column description immediately without page refresh (shard 4, 1 retry)
  • Pages/CustomProperties.spec.ts โ€บ Should display custom properties for apiCollection in right panel (shard 4, 1 retry)
  • ... and 39 more

๐Ÿ“ฆ Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

github-actions[bot] avatar Jun 17 '26 21:06 github-actions[bot]

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 63%
63.18% (70730/111947) 46.01% (40827/88733) 47.49% (12632/26598)

github-actions[bot] avatar Jun 22 '26 18:06 github-actions[bot]

โŒ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

The fields live on the linked issue in the Shipping project (open the issue โ†’ right sidebar โ†’ Projects). After you set them, re-run this check (or push a commit) โ€” issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

github-actions[bot] avatar Jun 25 '26 10:06 github-actions[bot]

Code Review โœ… Approved 14 resolved / 14 findings

Refactors entity icon rendering with a centralized mapper and introduces a reusable DataAssetPickerShell for keyboard-navigable asset selection. All previously reported stability, null-handling, and focus-management issues have been resolved.

โœ… 14 resolved
โœ… Edge Case: linkedEntities filter assumes entity.id is always defined

๐Ÿ“„ openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/MemoriesView/MemoriesView.component.tsx:170-182 ๐Ÿ“„ openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/MemoriesView/MemoriesView.component.tsx:266 In MemoriesView.component.tsx (lines 170-182), the dedupe logic uses seenIds.has(entity.id) / seenIds.add(entity.id) and the JSX uses key={entity.id}. EntityReference.id is typed but in practice some references (especially relatedEntities) may have an undefined/empty id. If multiple entities have undefined id they will be deduped into a single entry (only the first kept) and the React key will collide, causing rendering warnings and possibly dropped items. Consider falling back to fullyQualifiedName when id is absent, or filtering out entities without an id explicitly.

โœ… Quality: New i18n keys missing from non-English locale files

๐Ÿ“„ openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json:326 ๐Ÿ“„ openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json:1693 ๐Ÿ“„ openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json:2025 ๐Ÿ“„ openmetadata-ui/src/main/resources/ui/src/locale/languages/ar-sa.json This commit adds the label keys close-lowercase, plus-count, and select-lowercase to en-us.json (used in DataAssetSelectList footer and MemoriesView +N badge), but only esc and showing-count-of-total-assets were propagated to the other locale files (e.g. ar-sa.json, de-de.json receive only +2 keys each). i18next will fall back to the English string for the missing keys, so this is not user-breaking, but it is inconsistent with the codebase convention of seeding every locale with the English value. Add close-lowercase, plus-count, and select-lowercase to all locale files for consistency.

โœ… Quality: Stray blank line introduced in en-us.json

๐Ÿ“„ openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json:3462-3464 A stray empty line was added at line 3463 between the sinks and size-evolution-description keys in en-us.json. This appears accidental and should be removed to keep the JSON clean and avoid lint/prettier diffs.

โœ… Quality: storge-service.svg added but never imported/used; STORAGE_SERVICE still a TODO placeholder

๐Ÿ“„ openmetadata-ui/src/main/resources/ui/src/constants/Assets.constants.ts:36-46 ๐Ÿ“„ openmetadata-ui/src/main/resources/ui/src/assets/svg/entity/storge-service.svg This PR adds the new asset src/assets/svg/entity/storge-service.svg, but unlike the other 5 new icons (api/drive/metadata/ml-model/pipeline-service), it is never imported in Assets.constants.ts and never wired into ENTITY_ICON_MAPPER. As a result, [EntityType.STORAGE_SERVICE] still uses icon: Browser, // TODO: icon, so the storage service entity continues to render the placeholder icon and the new SVG is dead/orphaned.

Additionally the filename is misspelled storge-service.svg (should be storage-service.svg), which is inconsistent with the other *-service.svg names and with the STORAGE_SERVICE enum.

Fix: rename the file to storage-service.svg, add an import, and assign it to the STORAGE_SERVICE mapping.

โœ… Bug: Unguarded ENTITY_ICON_MAPPER lookup can crash on unknown entity type

๐Ÿ“„ openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/MemoriesView/MemoriesView.component.tsx:271 ๐Ÿ“„ openmetadata-ui/src/main/resources/ui/src/utils/Assets/AssetsUtils.tsx:352 In MemoriesView.component.tsx line 271, the code accesses ENTITY_ICON_MAPPER[entity.type].iconClass with no null/undefined guard. ENTITY_ICON_MAPPER only contains entries for a subset of EntityType values (e.g. TABLE, DASHBOARD, PIPELINE, etc.). linkedEntities is built from memory.primaryEntity and memory.relatedEntities, whose type can be any entity type โ€” including ones not in the map (e.g. USER, TEAM, BOT, TEST_CASE, etc.). When entity.type is missing from the map, ENTITY_ICON_MAPPER[entity.type] is undefined, and reading .iconClass throws Cannot read properties of undefined (reading 'iconClass'), crashing the render of the entire memory list.

Note that the sibling helper getEntityIconWithBg in AssetsUtils.tsx correctly guards this with optional chaining (style?.iconClass ?? 'tw:text-gray-500'), so this direct access is inconsistent and unsafe.

Fix: use optional chaining with a fallback, e.g. className={ENTITY_ICON_MAPPER[entity.type]?.iconClass ?? 'tw:text-gray-500'}.

...and 9 more resolved from earlier reviews

Options

Display: compact โ†’ Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with ๐Ÿ‘ / ๐Ÿ‘Ž | Gitar

gitar-bot avatar Jul 01 '26 12:07 gitar-bot