Skip to content

Commit 435a111

Browse files
committed
merge: resolve conflicts with develop in MCP Approvals and AuditLog pages
Take develop's structure (children inside PageHeaderExtended, updated Select ids and onChange types). Drop size="small" on Chip per develop.
2 parents eeee0b5 + ce0b892 commit 435a111

File tree

13 files changed

+1091
-54
lines changed

13 files changed

+1091
-54
lines changed

.claude/settings.local.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
"Bash(find /Users/harsh/Data/vw/verifywise/Clients -type f \\\\\\(-name *.yaml -o -name *.yml -o -name docker-compose* \\\\\\))",
1212
"Bash(find /Users/harsh/Data/vw/verifywise -type f \\\\\\(-name *.yaml -o -name *.yml -o -name docker-compose* \\\\\\) -not -path */node_modules/*)",
1313
"Bash(grep -r \"superadmin\\\\|super.admin\\\\|SuperAdmin\" /Users/harsh/Data/vw/verifywise/Servers/src --include=*.ts -i)",
14-
"Bash(grep:*)"
14+
"Bash(grep:*)",
15+
"Bash(git log:*)",
16+
"Bash(echo \"EXIT=$?\")"
1517
]
1618
}
1719
}

Clients/src/presentation/components/EntityLinkSelector/index.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -362,24 +362,24 @@ const EntityLinkSelector: React.FC<EntityLinkSelectorProps> = ({
362362
const nistData = nistResponse?.data || nistResponse;
363363
const functions = nistData?.functions || [];
364364
functions.forEach((func: any) => {
365-
const funcData = func.dataValues || func;
366-
const funcType = funcData.type?.toUpperCase() || "FUNCTION";
367-
const categories = funcData.categories || [];
365+
const funcType = (func.function || "FUNCTION").toUpperCase();
366+
const categories = func.categories || [];
368367
categories.forEach((cat: any, catIndex: number) => {
369-
const catData = cat.dataValues || cat;
370-
const subcategories = catData.subcategories || [];
368+
const subcategories = cat.subcategories || [];
371369
// Always use function type + category index for unique category label
372370
const categoryLabel = `${funcType} ${catIndex + 1}`;
373371
subcategories.forEach((sub: any, subIndex: number) => {
374-
const subData = sub.dataValues || sub;
375-
const subTitle = subData.title || "";
376-
// Format: "GOVERN 1.1: Description..." or just "GOVERN 1.1" if no title
372+
// Skip subcategories that have no implementation record yet —
373+
// the backend returns id: 0 for those, which would collide.
374+
if (!sub.id) return;
375+
const subTitle = sub.description || "";
376+
// Format: "GOVERN 1.1: Description..." or just "GOVERN 1.1" if no description
377377
const subLabel = subTitle
378378
? `${categoryLabel}.${subIndex + 1}: ${subTitle.substring(0, 60)}${subTitle.length > 60 ? "..." : ""}`
379379
: `${categoryLabel}.${subIndex + 1}`;
380380
subEntityList.push({
381-
_id: `nist_subcategory_${subData.id}`,
382-
entity_id: subData.id,
381+
_id: `nist_subcategory_${sub.id}`,
382+
entity_id: sub.id,
383383
name: subLabel,
384384
type: "nist_subcategory",
385385
});

Clients/src/presentation/pages/AIGateway/MCPApprovals/index.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,10 @@ export default function MCPApprovalsPage() {
108108
const items = tab === "pending" ? pending : history;
109109

110110
return (
111-
<Box>
112-
<PageHeaderExtended
113-
title="MCP Approvals"
114-
description="Review and manage tool invocation approval requests."
115-
/>
116-
111+
<PageHeaderExtended
112+
title="MCP Approvals"
113+
description="Review and manage tool invocation approval requests."
114+
>
117115
{/* Tab bar */}
118116
<Box sx={{ px: 3, pt: 1 }}>
119117
<TabContext value={tab}>
@@ -189,7 +187,6 @@ export default function MCPApprovalsPage() {
189187
label={item.status}
190188
backgroundColor={colors.bg}
191189
textColor={colors.text}
192-
size="small"
193190
/>
194191
{tab === "pending" && (
195192
<Typography
@@ -321,6 +318,6 @@ export default function MCPApprovalsPage() {
321318
/>
322319
</StandardModal>
323320
)}
324-
</Box>
321+
</PageHeaderExtended>
325322
);
326323
}

Clients/src/presentation/pages/AIGateway/MCPAuditLog/index.tsx

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -123,22 +123,20 @@ export default function MCPAuditLogPage() {
123123
const noFilterResults = !loading && logs.length === 0 && !isFirstTime;
124124

125125
return (
126-
<Box>
127-
<PageHeaderExtended
128-
title="MCP Audit Log"
129-
description="Review tool invocation history and audit trail."
130-
actionButton={
131-
<Box sx={{ width: 160 }}>
132-
<Select
133-
id="audit-period"
134-
items={PERIOD_ITEMS}
135-
value={days}
136-
onChange={(e) => setDays(String(e.target.value))}
137-
/>
138-
</Box>
139-
}
140-
/>
141-
126+
<PageHeaderExtended
127+
title="MCP Audit Log"
128+
description="Review tool invocation history and audit trail."
129+
actionButton={
130+
<Box sx={{ width: 160 }}>
131+
<Select
132+
id="mcp-audit-period"
133+
items={PERIOD_ITEMS}
134+
value={days}
135+
onChange={(e) => setDays(e.target.value as string)}
136+
/>
137+
</Box>
138+
}
139+
>
142140
{isFirstTime ? (
143141
<Box sx={{ px: 3, pt: 4 }}>
144142
<EmptyState icon={Activity} message="No audit logs yet" showBorder>
@@ -204,7 +202,7 @@ export default function MCPAuditLogPage() {
204202
<Field label="Filter by tool" placeholder="e.g. greet" value={filterTool} onChange={(e: React.ChangeEvent<HTMLInputElement>) => setFilterTool(e.target.value)} />
205203
</Box>
206204
<Box sx={{ width: 180 }}>
207-
<Select id="audit-status-filter" label="Status" items={STATUS_ITEMS} value={filterStatus} onChange={(e) => setFilterStatus(String(e.target.value))} />
205+
<Select id="mcp-audit-status-filter" label="Status" items={STATUS_ITEMS} value={filterStatus} onChange={(e) => setFilterStatus(e.target.value as string)} />
208206
</Box>
209207
</Stack>
210208

@@ -224,7 +222,7 @@ export default function MCPAuditLogPage() {
224222
<Stack direction="row" alignItems="center" justifyContent="space-between">
225223
<Stack direction="row" alignItems="center" spacing={2} sx={{ flex: 1, minWidth: 0 }}>
226224
<Typography sx={{ fontWeight: 600, fontSize: 14, fontFamily: "monospace", minWidth: 120 }}>{log.tool_name}</Typography>
227-
<Chip label={log.result_status.replace("_", " ")} backgroundColor={colors.bg} textColor={colors.text} size="small" />
225+
<Chip label={log.result_status.replace("_", " ")} backgroundColor={colors.bg} textColor={colors.text} />
228226
<Typography variant="body2" color="text.secondary" sx={{ minWidth: 60 }}>{log.latency_ms}ms</Typography>
229227
<Typography variant="body2" color="text.secondary" sx={{ flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }}>{log.result_summary || "—"}</Typography>
230228
</Stack>
@@ -252,6 +250,6 @@ export default function MCPAuditLogPage() {
252250
</Stack>
253251
</>
254252
)}
255-
</Box>
253+
</PageHeaderExtended>
256254
);
257255
}

Clients/src/presentation/pages/Framework/Dashboard/NISTFunctionsOverviewCard.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,21 @@ interface NISTFunctionsOverviewCardProps {
2424

2525
interface SubcategoryData {
2626
id: number;
27-
title: string;
27+
subcategory_id: number;
28+
description: string;
2829
status: string;
2930
owner: number | null;
3031
}
3132

3233
interface CategoryData {
3334
id: number;
34-
title: string;
35+
category_id: number;
36+
description: string;
3537
subcategories: SubcategoryData[];
3638
}
3739

3840
interface FunctionData {
39-
id: number;
40-
type: string;
41+
function: string;
4142
title: string;
4243
icon: LucideIcon;
4344
categories: CategoryData[];
@@ -81,10 +82,9 @@ const NISTFunctionsOverviewCard = ({ frameworksData, onNavigate }: NISTFunctions
8182

8283
if (overviewResponse?.data?.functions) {
8384
const functions = overviewResponse.data.functions.map((func: any) => ({
84-
id: func.id,
85-
type: func.type,
85+
function: func.function,
8686
title: func.title,
87-
icon: NIST_FUNCTION_ICONS[func.type?.toLowerCase()] || Shield,
87+
icon: NIST_FUNCTION_ICONS[func.function?.toLowerCase()] || Shield,
8888
categories: func.categories || [],
8989
}));
9090
setFunctionsData(functions);
@@ -187,7 +187,7 @@ const NISTFunctionsOverviewCard = ({ frameworksData, onNavigate }: NISTFunctions
187187

188188
const handleCardClick = () => {
189189
if (onNavigate) {
190-
onNavigate("NIST AI RMF", func.type.toLowerCase());
190+
onNavigate("NIST AI RMF", func.function.toLowerCase());
191191
}
192192
};
193193

@@ -223,7 +223,7 @@ const NISTFunctionsOverviewCard = ({ frameworksData, onNavigate }: NISTFunctions
223223
textTransform: "capitalize",
224224
}}
225225
>
226-
{func.type}
226+
{func.title}
227227
</Typography>
228228
</Box>
229229
{onNavigate && (
@@ -313,10 +313,10 @@ const NISTFunctionsOverviewCard = ({ frameworksData, onNavigate }: NISTFunctions
313313
};
314314

315315
// Get functions by type for 2x2 grid layout
316-
const governFunc = functionsData.find(f => f.type.toLowerCase() === "govern");
317-
const mapFunc = functionsData.find(f => f.type.toLowerCase() === "map");
318-
const measureFunc = functionsData.find(f => f.type.toLowerCase() === "measure");
319-
const manageFunc = functionsData.find(f => f.type.toLowerCase() === "manage");
316+
const governFunc = functionsData.find(f => f.function?.toLowerCase() === "govern");
317+
const mapFunc = functionsData.find(f => f.function?.toLowerCase() === "map");
318+
const measureFunc = functionsData.find(f => f.function?.toLowerCase() === "measure");
319+
const manageFunc = functionsData.find(f => f.function?.toLowerCase() === "manage");
320320

321321
return (
322322
<Stack spacing={0}>

GRSModule/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: seeds render perturb all export-parquet publish-dataset generate
1+
.PHONY: seeds render perturb validate all backfill-base export-parquet publish-dataset generate
22

33
seeds:
44
uv run grs-scenarios generate --stage seeds
@@ -12,6 +12,10 @@ perturb:
1212
validate:
1313
uv run grs-scenarios generate --stage validate
1414

15+
backfill-base:
16+
@if [ -z "$(VERSION)" ]; then echo "Error: VERSION is required. Usage: make backfill-base VERSION=grs_scenarios_v0.3"; exit 1; fi
17+
uv run grs-scenarios generate --stage backfill-base --dataset-version $(VERSION)
18+
1519
infer-mock-client:
1620
uv run grs-scenarios generate --stage infer --model-id mock-v0 --limit 3
1721

0 commit comments

Comments
 (0)