Conversation
…` icon - Updated imports in `BiasAndFairnessModule.tsx` and `HelperDrawer/index.tsx` to use `close-grey.svg`.
- Replaced `@mui/icons-material/Visibility` and `VisibilityOff` with `visibility-white.svg` and `visibility-off-white.svg`. - Updated imports and adjusted styles for seamless integration of the new SVG icons.
…nt sizing - Updated `separator` styles to set width to 80% and height to auto.
…k-circle-white` - Replaced `@mui/icons-material/CheckCircle` with `check-circle-white.svg`. - Updated imports and adjusted styles for smooth integration of the new SVG icon.
WalkthroughReplaced several MUI icon imports with local SVG ReactComponent imports and adjusted icon sizing/styling (sx → inline style) in a few components; changed Breadcrumbs default separator icon sizing to use inline style { width: '80%', height: 'auto' }. No control-flow or public API changes. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings, 1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
🔇 Additional comments (1)
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
Clients/src/presentation/pages/AITrustCenter/Resources/index.tsx (1)
75-78: Keep leveragingsxfor SVG stylingCasting
styles.visibilityIcontoReact.CSSPropertiesstrips away the advantages of thesxsystem (theme tokens, responsive keys, nested selectors). Wrapping the SVG inBoxlets you keepsxwhile rendering the Figma icon.- <VisibilityIcon style={styles.visibilityIcon as React.CSSProperties} /> + <Box component={VisibilityIcon} sx={styles.visibilityIcon} /> ) : ( - <VisibilityOffIcon style={styles.visibilityOffIcon as React.CSSProperties} /> + <Box component={VisibilityOffIcon} sx={styles.visibilityOffIcon} /> )}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (3)
Clients/src/presentation/assets/icons/check-circle-white.svgis excluded by!**/*.svgClients/src/presentation/assets/icons/visibility-off-white.svgis excluded by!**/*.svgClients/src/presentation/assets/icons/visibility-white.svgis excluded by!**/*.svg
📒 Files selected for processing (6)
Clients/src/presentation/components/Breadcrumbs/index.tsx(1 hunks)Clients/src/presentation/components/HelperDrawer/index.tsx(1 hunks)Clients/src/presentation/pages/AITrustCenter/Resources/index.tsx(2 hunks)Clients/src/presentation/pages/AITrustCenter/index.tsx(1 hunks)Clients/src/presentation/pages/FairnessDashboard/BiasAndFairnessModule.tsx(1 hunks)Clients/src/presentation/pages/FairnessDashboard/BiasAndFairnessResultsPage.tsx(2 hunks)
🔇 Additional comments (4)
Clients/src/presentation/pages/AITrustCenter/index.tsx (1)
8-8: Fix broken Visibility icon import path....
makes sense. Also we may need to mention there are no issues in other files? For `Breadcrumbs` maybe no comment necessary. We flagged 4 issues—they are critical. That's enough. Need to produce final response containing these comment sections and final summary of requested changes? Usually final response includes summary bullet and mention this is blocking etc. Not specified but we can include concluding note referencing issues. Prefer to add final general summary/outcome (not part of code comment). Provide overall as final message: summarizing critical import path issues, say blocking release. Let's craft final message: Provide general summary and mention status (Request changes). Possibly TOT. Let's compile final assistant message. Need to include the 4 comment sections we already wrote plus final summary. Double-check we already wrote 3 comment sections maybe we need to adjust for readability. Did we include spaces? For first comment we included modifications to add spaces and semicolons, but we added spaces in diff (since consistent). For second and third similar. Need to ensure final diff is accurate. Now produce final message:Clients/src/presentation/pages/FairnessDashboard/BiasAndFairnessModule.tsx (1)
20-20: Correct the Close icon import path.This module lives under
presentation/pages/FairnessDashboard, so../../assets/...lands inpresentation/pages/assets, which isn’t present. The actual SVG resides inpresentation/assets/icons/. Without fixing the path, the dialog close button will render blank and the build will emit a module-not-found error.-import {ReactComponent as CloseIcon} from "../../assets/icons/close-grey.svg" +import { ReactComponent as CloseIcon } from "../../../assets/icons/close-grey.svg";Likely an incorrect or invalid review comment.
Clients/src/presentation/components/HelperDrawer/index.tsx (1)
9-9: Fix incorrect relative path for Close icon import.The HelperDrawer file sits in
presentation/components/HelperDrawer, so reachingpresentation/assets/icons/close-grey.svgrequires going up three directories. With the current../../assets/...path the bundler will look forpresentation/components/assets/..., which doesn’t exist, leading to a broken icon import at runtime. Update the import to use../../../assets/icons/close-grey.svg(and keep naming consistent).-import {ReactComponent as CloseIcon} from "../../assets/icons/close-grey.svg" +import { ReactComponent as CloseIcon } from "../../../assets/icons/close-grey.svg";Likely an incorrect or invalid review comment.
Clients/src/presentation/components/Breadcrumbs/index.tsx (1)
72-72: Chevron separator sizing looks goodUsing the SVG with an explicit inline width keeps the separator consistent with the new asset swap.
| import TabPanel from "@mui/lab/TabPanel"; | ||
| import Tab from "@mui/material/Tab"; | ||
| import VisibilityIcon from "@mui/icons-material/Visibility"; | ||
| import {ReactComponent as VisibilityIcon} from "../../assets/icons/visibility-white.svg" |
There was a problem hiding this comment.
Ensure the Visibility icon import resolves.
AITrustCenter/index.tsx sits in presentation/pages/AITrustCenter, so rising two levels (../../) only gets us to presentation/pages. The assets folder is at presentation/assets, so the correct relative path is ../../assets/icons/visibility-white.svg? Wait verifying. Actually.
Hold on.
We already flagged path for other files. Should check this one carefully. Path currently ../../assets/icons/visibility-white.svg. Starting from pages/AITrustCenter/index.tsx:
../->pages/AITrustCenter../../->pages? Wait:
index.tsx -> parent AITrustCenter (1). Another up (2) -> pages. That matches: ../../ leads to presentation/pages. That appended with assets/icons -> presentation/pages/assets/icons (non-existent). So correct path should be ../../..? Let's recompute:
Paths: Clients/src/presentation/pages/AITrustCenter/index.tsx.
../ -> Clients/src/presentation/pages/AITrustCenter.
../../ -> Clients/src/presentation/pages.
../../../ -> Clients/src/presentation.
Hence required path is ../../../assets/icons/visibility-white.svg.
Yes.
Need to adjust comment accordingly.
Let's craft.
Note: Another file resources uses ../../../? Wait they used ../../../. For resources we computed ../../../ is correct. Good.
Continue.
**Fix broken Visibility icon import path.**
Because this file is nested under `presentation/pages/AITrustCenter`, the `../../assets/...` path lands on `presentation/pages/assets`, which doesn't exist. This breaks the preview button icon and causes a module-not-found build error. Update to `../../../assets/icons/visibility-white.svg`.
diff...
OK.
Next file: AITrustCenter/Resources/index.tsx imports with ../../../ already correct (since we computed). Need to confirm stylings for inline style.
But also check CheckCircleIcon startIcon now using ReactComponent. Without sx the icon may render at default size maybe too big? Should we worry? Maybe fine.
Focus on Resource file: style={styles.visibilityIcon as React.CSSProperties}. We need to ensure styles.visibilityIcon values are valid CSSProperties. Without verifying we can't guarantee. Suppose styles.visibilityIcon uses 'fontSize: 16' or 'color: "#13715B"' etc. Should we check? Possibly unstoppable. But potential error: styles.visibilityIcon defined using SxProps. For example styles.visibilityIcon = { color: '#10B981', fontSize: 20 } as used in MUI, which still works when cast to CSSProperties because fontSize: 20 is allowed? In CSSProperties, numbers represent px? For certain fields accepts number. color string fine. So minimal.
But there might be properties like 'backgroundColor: 'primary.main' referencing theme token. Without verifying, but it's likely actual value string.
Check also they replaced Add circle import? Already existing.
Paths: HelperDrawer comment we flagged.
Need to ensure they added whitespace to import. But we flagged critical issues requiring fix.
Now ensure there are no other path errors.
Maybe there are other files not provided? The AI summary mention other files? Provided files maybe not the only ones. There might be AITrustCenter/Resources/index.tsx using styles.visibilityIcon with cast. Good.
Need to review Breadcrumbs change: separator = <ChevronRightGreyIcon style={{ width: '80%', height: 'auto' }} />.
Potential issue: using width: '80%' will scale icon relative to container, but inside MUI separators (which is span?). The icon is inline. Without view no big.
But we should ensure ChevronRightGreyIcon as ReactComponent uses style which expects string values; width height of svg Accept. Works.
Possible but the icon is width: '80%' but height: 'auto' maybe unnatural? Should we raise? Eh.
Double-check for VisibilityIcon being white icon but background? In resource table they probably expect grey? Good.
Focus on raising issue only for broken imports (critical). Are there more? HelperDrawer import path we flagged. FairnessModule path we flagged. ResultsPage path we flagged. AITrustCenter/index.tsx path we flagged. AITrustCenter/Resources path correct.
Need to ensure there aren’t other new import path requiring change like AddCircle? Already existed.
Now we must produce final review comment plus summary & blocking status? According to instructions we must produce review comments with proper format, done. Need to add comment for AITrustCenter file.
Construct comment with diff snippet.
Also ensure we include mention Based on ???? No external.
Now output for AITrustCenter.
Need to produce comment.
Also ensure we mention semicolons? Not necessary.
But also we should check general instructions—they expect final overall summary? Not specified but typical? Maybe expected to still produce general comment? Not specified but we can include final overall message summarizing issues & request changes? Usually code review includes general comment? Not mandated but we can optionally deliver general summary and overall status? Provide final note? Probably necessary.
But instructions only mention generating review comments per changed segment.
We must add comment to AITrustCenter file.
Let's craft.
Also we should ensure comment referencing line number 8 (import line). Provide diff.
Let's produce.
Need to follow format with start and end markers.
For AITrustCenter file comment we need <!-- file_start ... etc, but we already have for other files? Wait we already produced for first file. We need to add new section for AITrustCenter/index.tsx comment.
Add:
<details>
<summary>🤖 Prompt for AI Agents</summary>
Clients/src/presentation/pages/AITrustCenter/index.tsx around line 8: the
Visibility icon import uses ../../assets/... which resolves to
presentation/pages/assets (non-existent); update the import to
../../../assets/icons/visibility-white.svg so it points to
presentation/assets/icons/visibility-white.svg and ensure the file exists and
builds.
</details>
<!-- fingerprinting:phantom:poseidon:sabertoothed -->
<!-- This is an auto-generated comment by CodeRabbit -->
| } from "@mui/material"; | ||
| import ArrowBackIcon from "@mui/icons-material/ArrowBack"; | ||
| import CheckCircleIcon from "@mui/icons-material/CheckCircle"; | ||
| import { ReactComponent as CheckCircleIcon } from "../../assets/icons/check-circle-white.svg"; |
There was a problem hiding this comment.
Import CheckCircle icon from the correct location.
BiasAndFairnessResultsPage is in presentation/pages/FairnessDashboard, so ../../assets/... points to presentation/pages/assets, which doesn’t exist. The SVG lives under presentation/assets/icons, so this import fails and the “Copy” button loses its icon. Adjust the path to ../../../assets/icons/check-circle-white.svg.
-import { ReactComponent as CheckCircleIcon } from "../../assets/icons/check-circle-white.svg";
+import { ReactComponent as CheckCircleIcon } from "../../../assets/icons/check-circle-white.svg";📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| import { ReactComponent as CheckCircleIcon } from "../../assets/icons/check-circle-white.svg"; | |
| import { ReactComponent as CheckCircleIcon } from "../../../assets/icons/check-circle-white.svg"; |
🤖 Prompt for AI Agents
In
Clients/src/presentation/pages/FairnessDashboard/BiasAndFairnessResultsPage.tsx
around line 20 the import path for CheckCircleIcon is incorrect
(../../assets/...) and points to a non-existent presentation/pages/assets
folder; update the import to point to the actual SVG location at
../../../assets/icons/check-circle-white.svg so the component imports the
correct SVG and the Copy button icon is restored.
|
hello @solan117 |
# Conflicts: # Clients/src/presentation/pages/FairnessDashboard/BiasAndFairnessResultsPage.tsx
Describe your changes
refactor(icons): replace MUI Close icon with custom SVG close-grey icon
BiasAndFairnessModule.tsxandHelperDrawer/index.tsxto useclose-grey.svg.refactor(icons): replace MUI CheckCircle icon with custom SVG check-circle-white
@mui/icons-material/CheckCirclewithcheck-circle-white.svg.style(Breadcrumbs): adjust ChevronRightGreyIcon styles for consistent sizing
separatorstyles to set width to 80% and height to auto.refactor(icons): replace MUI Visibility icons with custom SVGs
@mui/icons-material/VisibilityandVisibilityOffwithvisibility-white.svgandvisibility-off-white.svg.Write your issue number after "Fixes "
Fixes #2047
Please ensure all items are checked off before requesting a review: