Repository navigation
Conversation
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
|
| Count | Rule |
|---|---|
| 11 | openmetadata-imports/no-circular-imports |
| 6 | react-hooks/exhaustive-deps |
| 3 | sonarjs/cyclomatic-complexity |
| 3 | openmetadata-imports/no-lower-layer-page-imports |
| 2 | sonarjs/no-nested-conditional |
| 2 | sonarjs/no-duplicate-string |
| 1 | openmetadata-imports/no-internal-barrel-imports |
| 1 | sonarjs/cognitive-complexity |
All findings
| Location | Rule | Message | |
|---|---|---|---|
| 🟡 | src/components/Certification/Certification.component.tsx:119:9 |
react-hooks/exhaustive-deps |
The 'handleScroll' function makes the dependencies of useMemo Hook (at line 213) change on every render. Move it inside the useMemo callback. Alternatively, wra |
| 🟡 | src/components/Certification/Certification.component.tsx:183:21 |
sonarjs/no-nested-conditional |
Extract this nested ternary operation into an independent statement. |
| 🟡 | src/components/Certification/Certification.component.tsx:249:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has missing dependencies: 'currentCertificate' and 'getCertificationData'. Either include them or remove the dependency array. If 'setSelec |
| 🟡 | src/components/Tag/TagsV1/TagsV1.component.tsx:34:1 |
openmetadata-imports/no-circular-imports |
This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency. |
| 🟡 | src/components/Tag/TagsV1/TagsV1.component.tsx:35:1 |
openmetadata-imports/no-circular-imports |
This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency. |
| 🟡 | src/components/Tag/TagsV1/TagsV1.component.tsx:36:1 |
openmetadata-imports/no-circular-imports |
This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency. |
| 🟡 | src/components/common/CertificationTag/CertificationTag.tsx:21:1 |
openmetadata-imports/no-circular-imports |
This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency. |
| 🟡 | src/components/common/atoms/TagChip/TagChip.tsx:88:4 |
sonarjs/cyclomatic-complexity |
{"message":"Function has a complexity of 11 which is greater than 10 authorized.","cost":1,"secondaryLocations":[{"line":88,"column":3,"endLine":88,"endColumn": |
| 🟡 | src/pages/TagPage/TagPage.tsx:72:1 |
openmetadata-imports/no-internal-barrel-imports |
Import the internal module directly instead of its index barrel so unrelated siblings do not enter the bundle graph. |
| 🟡 | src/pages/TagPage/TagPage.tsx:138:20 |
sonarjs/cognitive-complexity |
Refactor this function to reduce its Cognitive Complexity from 24 to the 15 allowed. |
| 🟡 | src/pages/TagPage/TagPage.tsx:138:20 |
sonarjs/cyclomatic-complexity |
{"message":"Function has a complexity of 25 which is greater than 10 authorized.","cost":15,"secondaryLocations":[{"line":138,"column":19,"endLine":138,"endColu |
| 🟡 | src/pages/TagPage/TagPage.tsx:277:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 'tagItem'. Either include it or remove the dependency array. |
| 🟡 | src/pages/TagPage/TagPage.tsx:302:9 |
sonarjs/no-nested-conditional |
Extract this nested ternary operation into an independent statement. |
| 🟡 | src/pages/TagPage/TagPage.tsx:326:9 |
react-hooks/exhaustive-deps |
The 'activeTabHandler' function makes the dependencies of useCallback Hook (at line 496) change on every render. To fix this, wrap the definition of 'activeTabH |
| 🟡 | src/pages/TagPage/TagPage.tsx:407:21 |
sonarjs/no-duplicate-string |
Define a constant instead of duplicating this literal 5 times. |
| 🟡 | src/pages/TagPage/TagPage.tsx:457:21 |
sonarjs/no-duplicate-string |
Define a constant instead of duplicating this literal 3 times. |
| 🟡 | src/pages/TagPage/TagPage.tsx:723:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 'fetchFeedCount'. Either include it or remove the dependency array. |
| 🟡 | src/pages/TagPage/TagPage.tsx:800:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/utils/ClassificationUtils.tsx:29:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/utils/DataProductUtils.tsx:32:1 |
openmetadata-imports/no-circular-imports |
This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency. |
| 🟡 | src/utils/DataProductUtils.tsx:33:1 |
openmetadata-imports/no-circular-imports |
This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency. |
| 🟡 | src/utils/DataProductUtils.tsx:34:1 |
openmetadata-imports/no-circular-imports |
This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency. |
| 🟡 | src/utils/DataProductUtils.tsx:35:1 |
openmetadata-imports/no-circular-imports |
This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency. |
| 🟡 | src/utils/DataProductUtils.tsx:47:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/utils/DataProductUtils.tsx:186:35 |
sonarjs/cyclomatic-complexity |
{"message":"Function has a complexity of 19 which is greater than 10 authorized.","cost":9,"secondaryLocations":[{"line":186,"column":34,"endLine":186,"endColum |
| 🟡 | src/utils/DomainUtils.tsx:29:1 |
openmetadata-imports/no-circular-imports |
This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency. |
| 🟡 | src/utils/DomainUtils.tsx:30:1 |
openmetadata-imports/no-circular-imports |
This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency. |
| 🟡 | src/utils/DomainUtils.tsx:40:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/utils/DomainUtils.tsx:41:1 |
openmetadata-imports/no-circular-imports |
This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency. |
Fix locally (fast - only checks files changed in this branch):
make ui-checkstyle-changed
Code Review ✅ Approved 1 resolved / 1 findingsAdds a shared Icon component that handles named icons and asynchronous image loading with fallbacks, and successfully migrates existing icon rendering across UI components. Addresses the icon loadState reset finding. ✅ 1 resolved✅ Bug: Icon loadState not reset when iconValue prop changes
OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|
✅ Playwright Results — workflow succeededValidated commit ✅ 605 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 55m 14s ⏱️ Max setup 5m 46s · max shard execution 19m 14s · max shard-job elapsed before upload 22m 16s · reporting 4s 🌐 218.69 requests/attempt · 2.87 app boots/UI scenario · 5.89% common-shard skew Optimization targets still in progress:
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
…#32066) * fix(ui): port renderIcon → <Icon> component to 1.13 (PR #31982) Adds the new Icon component (components/common/Icon/Icon.tsx) that renders icon names synchronously and image URLs with a loading skeleton + real onLoad/onError fallback, replacing the stateless renderIcon regex-only helper. Migrates all 1.13 call sites: - Certification.component, TagsV1, CertificationTag (preserves 1.13 size variants) - TagPage, ClassificationUtils, DataProductUtils, DomainUtils - MUIIconPicker (1.13-only call site not in main PR) Removes renderIcon from IconUtils.tsx and its tests from IconUtils.test.tsx. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * fix(ui): resolve cached-image icons staying hidden after table re-render When a new tag is added the table unmounts and remounts <Icon> components. On remount loadState resets to 'loading' and the img is hidden. For already- cached images the browser fires the DOM load event synchronously while creating the <img> element — before React attaches its onLoad listener — so the event is silently dropped and the image stays hidden forever. Fix: add imgRef to the <img> and a second useEffect[loadState] that checks img.complete immediately after every 'loading' transition. If the browser already holds the image, complete is true right after mount and we resolve the state without waiting for the missed event. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * fix(ui): give Icon span a fixed size and move className to the img The <span> wrapper had no width/height of its own, causing two issues: - Layout shift between loading (Skeleton) and loaded (img) states because the span is display:inline and collapses to its child's size. - className passed by callers (e.g. certification-img) landed on the <span> rather than the <img>, breaking CSS selectors like img.certification-img. Fix: - Set display:inline-flex + width/height:size + flexShrink:0 on the span so the layout box is stable regardless of which child is visible. - Move className from <span> to <img> so element-type CSS selectors work. - Remove the now-redundant flexShrink:0 from TagsV1's wrapperStyle (the span provides it by default). Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * fix(ui): fix empty certification-icon div when iconURL is unknown JSX elements are always truthy objects, so `renderedIcon ?` was always true whenever iconURL was set — even when <Icon> produced no visible output. For certifications whose iconURL is neither in ICON_MAP nor a valid image URL, <Icon> returned an empty fragment but the truthy check still wrapped it in <div className="certification-icon">, leaving an empty div. Fix: remove the isIcon / renderedIcon variables and the 3-way conditional entirely. Replace with a direct <Icon fallback={<CertificationIcon/>}> call always inside .certification-icon, so every case (named icon, image URL, unknown value, no iconURL) is handled correctly by the component itself. Also drop the now-unused isImageUrl import. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * refactor(ui): address PR review comments on Icon component - Move IconProps to Icon.interface.ts per repo convention (greptile comment: prop interfaces belong in dedicated .interface.ts files) - Restore size=40 for image URLs in Certification.component.tsx — original 1.13 code used size=28 for named SVG icons and size=40 for image URLs; our migration collapsed both to 28 incorrectly The gitar-bot className comment is already resolved: className lands on <img> (not <span>) since the span-size fix commit. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * fix(ui): remove padding from .certification-icon Co-Authored-By: Claude Sonnet 4.6 <[email protected]> --------- Co-authored-by: Claude Sonnet 4.6 <[email protected]>
* fix(ui): render icon/image URLs by real load outcome instead of regex pre-validation (#31982) * fix(ui): render icon/image URLs by real load outcome instead of regex pre-validation * lint fix * addressed gitar comment * addressed gitar comment * lint fix * fix(ui): resolve cached-image race in Icon and move IconProps to interface file (#32067) * fix(ui): resolve cached-image race in Icon and move IconProps to interface file * lint fix * fix(ui): apply icon-image classes to the <img> instead of its wrapper span (#32110) * fix(ui): apply icon-image classes to the <img> instead of its wrapper span * addressed gitar comment * lint fix * unit test fix * fix(playwright): select Collate SaaS Runner before password fill in ServiceCreationPermissions (#32112) * fix(playwright): select Collate SaaS Runner before filling password in ServiceCreationPermissions test When the default runner is Remote Runner the form validation requires passwords to start with the secret: prefix; switching to Collate SaaS Runner before submitting removes that requirement so the test can use a plain-text password value. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * fix(playwright): move runner selection before password fill to prevent blur-time validation error RJSF customValidate can fire on field blur; selecting Collate SaaS Runner after the password is typed means the secret: prefix validation may trigger while Remote Runner is still active. Select the runner first so the error is never recorded. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> --------- Co-authored-by: Claude Sonnet 4.6 <[email protected]> * fix(ui): Renamed context center Dashboard to Overview * lint fix * playwright fix * lint fix * Rename i18n key from what-should-ask-collate-remember to what-should-ai-remember Replace the old product-branded key with a generic AI key across the component and all 20 locale files, and move the key from the label namespace to the message namespace where the component expects it. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * lint fix * class based approach * lint fix --------- Co-authored-by: Claude Sonnet 4.6 <[email protected]>



Describe your changes:
Summary
Iconcomponent (components/common/Icon/Icon.tsx) that renders known icon namessynchronously, and for image URLs shows a loading skeleton then swaps to the real
<img>or acaller-supplied fallback based on the actual browser
onLoad/onErroroutcome — instead of onlypre-validating the URL string against a regex (
isImageUrl) and always rendering an<img>evenwhen it 404s.
renderIcon(the old stateless, regex-only helper) entirely and migrates every call siteto
<Icon>:ClassificationUtils,DomainUtils,DataProductUtils,TagChip,CertificationTag(also collapses a duplicate manual
<img>fallback that's now dead code),TagsV1,Certification,and
TagPage.Iconlives atcomponents/common/Icon/Icon.tsxper the shared-icon-wrapper location alreadynamed in
DEVELOPER_HANDBOOK.md.utils/IconUtils.tsxkeeps only the pure, non-componentutilities (
isImageUrl,getTagImageSrc,ICON_MAP,getEntityAvatarProps, etc.).Fixes 29895
I worked on ... because ...
Type of change:
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:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.Greptile Summary
The PR introduces a shared stateful icon renderer that selects known icons synchronously and handles image URLs according to browser load outcomes.
Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
Reviews (5): Last reviewed commit: "lint fix" | Re-trigger Greptile