Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions Clients/src/presentation/assets/icons/visibility-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Clients/src/presentation/components/Breadcrumbs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export interface BreadcrumbsProps {
*/
const Breadcrumbs: React.FC<BreadcrumbsProps> = ({
items,
separator = <ChevronRightGreyIcon fontSize="small" />,
separator = <ChevronRightGreyIcon style={{ width: '80%', height: 'auto' }} />,
maxItems = 8,
sx,
autoGenerate = false,
Expand Down
2 changes: 1 addition & 1 deletion Clients/src/presentation/components/HelperDrawer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
Stack,
IconButton,
} from '@mui/material';
import CloseIcon from '@mui/icons-material/Close';
import {ReactComponent as CloseIcon} from "../../assets/icons/close-grey.svg"

// Simple markdown parser for **bold** and *italic*
const parseMarkdown = (text: string) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {
Stack,
} from "@mui/material";
import Alert from "../../../components/Alert";
import VisibilityIcon from "@mui/icons-material/Visibility";
import VisibilityOffIcon from "@mui/icons-material/VisibilityOff";
import {ReactComponent as VisibilityIcon} from "../../../assets/icons/visibility-white.svg"
import {ReactComponent as VisibilityOffIcon} from "../../../assets/icons/visibility-off-white.svg"
import { ReactComponent as AddCircleOutlineIcon } from "../../../assets/icons/plus-circle-white.svg";
import { ReactComponent as CloseGreyIcon } from "../../../assets/icons/close-grey.svg";
import Toggle from "../../../components/Inputs/Toggle";
Expand Down Expand Up @@ -72,9 +72,9 @@ const ResourceTableRow: React.FC<{
</TableCell>
<TableCell>
{resource.visible ? (
<VisibilityIcon sx={styles.visibilityIcon} />
<VisibilityIcon style={styles.visibilityIcon as React.CSSProperties} />
) : (
<VisibilityOffIcon sx={styles.visibilityOffIcon} />
<VisibilityOffIcon style={styles.visibilityOffIcon as React.CSSProperties} />
)}
</TableCell>
<TableCell>
Expand Down
2 changes: 1 addition & 1 deletion Clients/src/presentation/pages/AITrustCenter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import TabContext from "@mui/lab/TabContext";
import TabList from "@mui/lab/TabList";
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"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

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 -->

import TrustCenterResources from "./Resources";
import AITrustCenterSubprocessors from "./Subprocessors";
import AITrustCenterSettings from "./Settings";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
CircularProgress,
} from "@mui/material";
import { ReactComponent as AddCircleOutlineIcon } from "../../assets/icons/plus-circle-white.svg"
import CloseIcon from "@mui/icons-material/Close";
import {ReactComponent as CloseIcon} from "../../assets/icons/close-grey.svg"
import { useNavigate } from "react-router-dom";

import { biasAndFairnessService } from "../../../infrastructure/api/biasAndFairnessService";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
Tooltip,
} 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";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

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.

Suggested change
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.

import { ReactComponent as GreyCircleInfoIcon } from "../../assets/icons/info-circle-grey.svg";
import { ReactComponent as BlueInfoIcon } from "../../assets/icons/info-circle-blue.svg";
import DownloadIcon from "@mui/icons-material/Download";
Expand Down Expand Up @@ -818,7 +818,7 @@ export default function BiasAndFairnessResultsPage() {
variant="outlined"
size="small"
onClick={handleCopyJSON}
startIcon={<CheckCircleIcon sx={{ fontSize: 16 }} />}
startIcon={<CheckCircleIcon />}
>
Copy
</Button>
Expand Down