From e3ec67169e1938de7840e3eea3170fb9ad16013c Mon Sep 17 00:00:00 2001 From: roroghost17 Date: Fri, 5 Jun 2026 17:27:55 +0530 Subject: [PATCH 1/2] fix: replicates vk hierarchy flow for ghost nodes reconcilation From 390d19e1f1f2af322f77256b362000dacc465f29 Mon Sep 17 00:00:00 2001 From: Suresh Chaudhary Date: Fri, 5 Jun 2026 11:23:25 +0530 Subject: [PATCH 2/2] feat: allow viewing filtered logs for Governance entities --- ui/app/main.tsx | 16 ++++++++++++-- .../governance/views/customerTable.tsx | 21 ++++++++++++++++--- .../workspace/governance/views/teamsTable.tsx | 11 ++++++++-- .../virtual-keys/views/virtualKeysTable.tsx | 14 ++++++++++++- 4 files changed, 54 insertions(+), 8 deletions(-) diff --git a/ui/app/main.tsx b/ui/app/main.tsx index 35e327c3a35..55cf51495f6 100644 --- a/ui/app/main.tsx +++ b/ui/app/main.tsx @@ -1,4 +1,4 @@ -import { RouterProvider, createRouter, parseSearchWith } from "@tanstack/react-router"; +import { RouterProvider, createRouter, parseSearchWith, stringifySearchWith } from "@tanstack/react-router"; import { StrictMode } from "react"; import { createRoot } from "react-dom/client"; @@ -23,6 +23,17 @@ function safeJsonParse(value: string): unknown { return value; } +// Keep query params compatible with nuqs parsers: primitive strings stay raw +// (so numeric-looking IDs are not JSON-quoted), while arrays use comma lists. +function stringifySearchValue(value: unknown): string { + if (Array.isArray(value)) return value.map(String).join(","); + if (value === null || value === undefined) return ""; + if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { + return String(value); + } + return JSON.stringify(value); +} + const router = createRouter({ routeTree, defaultPreload: "intent", @@ -31,6 +42,7 @@ const router = createRouter({ defaultNotFoundComponent: NotFoundComponent, defaultErrorComponent: ErrorComponent, parseSearch: parseSearchWith(safeJsonParse), + stringifySearch: stringifySearchWith(stringifySearchValue), }); declare module "@tanstack/react-router" { @@ -46,4 +58,4 @@ createRoot(rootEl).render( , -); \ No newline at end of file +); diff --git a/ui/app/workspace/governance/views/customerTable.tsx b/ui/app/workspace/governance/views/customerTable.tsx index 5837503f214..98ca641e5e8 100644 --- a/ui/app/workspace/governance/views/customerTable.tsx +++ b/ui/app/workspace/governance/views/customerTable.tsx @@ -23,7 +23,8 @@ import { cn } from "@/lib/utils"; import { formatCurrency } from "@/lib/utils/governance"; import { CustomerDetailSheet } from "@enterprise/components/user-groups/sheets/customerDetailSheet"; import { RbacOperation, RbacResource, useRbac } from "@enterprise/lib"; -import { ChevronLeft, ChevronRight, Edit, MoreHorizontal, Plus, Search, Trash2 } from "lucide-react"; +import { Link } from "@tanstack/react-router"; +import { ChevronLeft, ChevronRight, Edit, MoreHorizontal, Plus, ScrollText, Search, Trash2 } from "lucide-react"; import { useState } from "react"; import { toast } from "sonner"; import { CustomersEmptyState } from "./customersEmptyState"; @@ -67,7 +68,7 @@ function CustomerActionsMenu({ customer, canUpdate, canDelete, onEdit, onDelete disabled={!canUpdate} data-testid={`customer-button-edit-${customer.id}`} onSelect={(e) => { - e.stopPropagation() + e.stopPropagation(); e.preventDefault(); onEdit(customer); setIsOpen(false); @@ -78,6 +79,20 @@ function CustomerActionsMenu({ customer, canUpdate, canDelete, onEdit, onDelete Edit + + { + e.stopPropagation(); + setIsOpen(false); + }} + onPointerDown={(e) => e.stopPropagation()} + > + + View logs + + ); -} \ No newline at end of file +} diff --git a/ui/app/workspace/governance/views/teamsTable.tsx b/ui/app/workspace/governance/views/teamsTable.tsx index a548ac3dfa0..c0213b302a7 100644 --- a/ui/app/workspace/governance/views/teamsTable.tsx +++ b/ui/app/workspace/governance/views/teamsTable.tsx @@ -22,7 +22,8 @@ import { Customer, Team, VirtualKey } from "@/lib/types/governance"; import { cn } from "@/lib/utils"; import { formatCurrency } from "@/lib/utils/governance"; import { RbacOperation, RbacResource, useRbac } from "@enterprise/lib"; -import { ChevronLeft, ChevronRight, Edit, MoreHorizontal, Plus, Search, Trash2 } from "lucide-react"; +import { Link } from "@tanstack/react-router"; +import { ChevronLeft, ChevronRight, Edit, MoreHorizontal, Plus, ScrollText, Search, Trash2 } from "lucide-react"; import { useEffect, useState } from "react"; import { toast } from "sonner"; import TeamSheet from "./teamSheet"; @@ -79,6 +80,12 @@ function TeamActionsMenu({ Edit + + setIsOpen(false)}> + + View logs + + ); -} \ No newline at end of file +} diff --git a/ui/app/workspace/virtual-keys/views/virtualKeysTable.tsx b/ui/app/workspace/virtual-keys/views/virtualKeysTable.tsx index 8d8f7c762da..5e4b4f34ad4 100644 --- a/ui/app/workspace/virtual-keys/views/virtualKeysTable.tsx +++ b/ui/app/workspace/virtual-keys/views/virtualKeysTable.tsx @@ -36,6 +36,7 @@ import { Customer, Team, VirtualKey } from "@/lib/types/governance"; import { cn } from "@/lib/utils"; import { formatCurrency } from "@/lib/utils/governance"; import { RbacOperation, RbacResource, useRbac } from "@enterprise/lib"; +import { Link } from "@tanstack/react-router"; import { ArrowDown, ArrowUp, @@ -53,6 +54,7 @@ import { RotateCcw, Search, ShieldCheck, + ScrollText, Trash2, } from "lucide-react"; import { useQueryState } from "nuqs"; @@ -215,6 +217,16 @@ function VKActionsMenu({ Edit + + setIsOpen(false)}> + + View logs + + ); -} \ No newline at end of file +}