Repository navigation
A Small PR - #560
A Small PR#560
Conversation
WalkthroughExtensive refactor reorganizing frontend authentication architecture, layout system, logs display, and routing. Replaces tabbed auth pages with role-based routes, simplifies AppSidebar with composed menu components, redesigns logs UI from table-based to DataGrid with severity badges, refactors functions listing, and consolidates routing under unified authentication guard. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant AppSidebar
participant PrimaryMenu
participant SecondaryMenu
participant Route
User->>AppSidebar: Navigate
AppSidebar->>AppSidebar: useLocation() + matchPath()
AppSidebar->>AppSidebar: Derive active primary item
AppSidebar->>PrimaryMenu: items, bottomItems, activeItemId
PrimaryMenu->>PrimaryMenu: Render with active styling
alt Active item has secondaryMenu
AppSidebar->>SecondaryMenu: items from primaryItem.secondaryMenu
else Active item is Logs
AppSidebar->>AppSidebar: useLogSources()
AppSidebar->>SecondaryMenu: items from useLogSources.menuItems
end
SecondaryMenu->>SecondaryMenu: useMatch() for each item
SecondaryMenu->>User: Highlight matched route
sequenceDiagram
participant User
participant AppRoutes
participant Layout
participant AuthPage as Auth Pages
User->>AppRoutes: Visit /dashboard/*
AppRoutes->>AppRoutes: Check RequireAuth
alt Authenticated
AppRoutes->>Layout: Render Layout wrapper
Layout->>Layout: Detect isIframe, apply theme
else Not authenticated
AppRoutes->>AppRoutes: Redirect to login
Note over AppRoutes: isIframe ? /cloud/login : /dashboard/login
end
alt Navigate to /dashboard/authentication/users
AppRoutes->>AuthPage: UsersPage
else Navigate to /dashboard/authentication/auth-methods
AppRoutes->>AuthPage: AuthMethodsPage
else Navigate to /dashboard/authentication/config
AppRoutes->>AuthPage: ConfigurationPage
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes
Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
frontend/src/features/visualizer/components/TableNode.tsx (1)
53-55: Remove commented-out code.The commented-out ExternalLink icon should be removed. If this functionality is needed in the future, it can be retrieved from version control history.
- {/* <div className="p-1.5"> - <ExternalLink className="w-4 h-4 text-neutral-400" /> - </div> */}frontend/src/features/dashboard/page/DashboardPage.tsx (1)
45-48: “View More” no longer lands on MCP logs
LogsPagenow pulls its source from the route param (and falls back to'insforge.logs'). Navigating to/dashboard/logs(or/cloud/logs) without a param means the user ends up on the default source instead of the MCP stream, so the button no longer fulfills its promise. Please navigate to the MCP-specific route (and drop the now-unused localStorage write).Apply something like:
- localStorage.setItem('selectedLogSource', 'MCP'); - const isCloudRoute = location.pathname.startsWith('/cloud'); - void navigate(isCloudRoute ? '/cloud/logs' : '/dashboard/logs'); + const isCloudRoute = location.pathname.startsWith('/cloud'); + const target = isCloudRoute ? '/cloud/logs/mcp' : '/dashboard/logs/mcp'; + void navigate(target);(or whatever slug the MCP source uses). As per coding guidelines.
🧹 Nitpick comments (7)
frontend/src/features/visualizer/components/TableNode.tsx (1)
12-141: Consider extracting sub-components for improved composition.While the current implementation is readable, extracting smaller focused components (
TableHeader,ColumnRow,ColumnIcon,EmptyState) would align better with the component composition guidelines and improve testability. This is a nice-to-have improvement that could be considered for future refactoring.Based on learnings
frontend/src/features/functions/page/FunctionsPage.tsx (1)
3-9: Consider extracting the common page wrapper pattern.Both
FunctionsPageandSecretsPage(lines 3-9 in both files) share an identical wrapper structure, differing only in the content component they render. This duplication could be eliminated by creating a reusable page layout component.Example refactor:
// components/layout/PageWrapper.tsx export function PageWrapper({ children }: { children: React.ReactNode }) { return ( <div className="h-full flex flex-col overflow-hidden"> {children} </div> ); }Then use it in both pages:
+import { PageWrapper } from '@/components/layout/PageWrapper'; import { FunctionsContent } from '@/features/functions/components/FunctionsContent'; export default function FunctionsPage() { - return ( - <div className="h-full flex flex-col overflow-hidden"> - <FunctionsContent /> - </div> - ); + return <PageWrapper><FunctionsContent /></PageWrapper>; }frontend/src/features/logs/hooks/useLogSources.ts (1)
39-54: Consider extracting the MCP logs route constant.The menu items logic is well-implemented with proper memoization. However, the MCP logs entry contains a hardcoded route path
/dashboard/logs/MCPthat could be extracted to a routing constants file for consistency and easier maintenance.Example:
// lib/routing/routes.ts export const ROUTES = { LOGS_MCP: '/dashboard/logs/MCP', // ... other routes } as const;Then use it:
+import { ROUTES } from '@/lib/routing/routes'; + const menuItems: SecondaryMenuItem[] = useMemo( () => [ { id: 'mcp-logs', label: 'MCP logs', - href: '/dashboard/logs/MCP', + href: ROUTES.LOGS_MCP, }, // ... ], [sourceNames] );frontend/src/features/logs/components/SeverityBadge.tsx (1)
3-5: Refine the prop type for type safety.The
severityprop is typed asstring, butSeverityTypeis available and provides better type safety. Consider usingSeverityTypedirectly to catch invalid values at compile time.Apply this diff:
interface SeverityBadgeProps { - severity: string; + severity: SeverityType; }frontend/src/components/layout/Layout.tsx (1)
12-27: Consider memoizing theisIframe()result.The
isIframe()function is called twice during render (lines 16 and 18). While this is unlikely to be a performance bottleneck, memoizing the result would follow React best practices for avoiding unnecessary function calls.Apply this diff:
export default function Layout({ children }: LayoutProps) { const { user, logout } = useAuth(); + const inIframe = isIframe(); return ( - <ThemeProvider forcedTheme={isIframe() ? 'dark' : undefined}> + <ThemeProvider forcedTheme={inIframe ? 'dark' : undefined}> <div className="h-screen bg-gray-50 dark:bg-neutral-800 flex flex-col"> - {!isIframe() && <AppHeader currentUser={user} onLogout={logout} />} + {!inIframe && <AppHeader currentUser={user} onLogout={logout} />}Based on learnings
frontend/src/components/layout/SecondaryMenu.tsx (1)
12-31: Review the route matching strategy.Line 14 uses
useMatchwithend: false, which performs prefix matching. This could cause unintended active states if routes share prefixes. For example,/dashboard/logswould match both/dashboard/logand/dashboard/logs.If secondary menu items are expected to be exact matches or have distinct path prefixes, consider using
end: trueor ensuring route paths are sufficiently unique.If exact matching is needed:
- const match = useMatch({ path: item.href, end: false }); + const match = useMatch({ path: item.href, end: true });frontend/src/features/logs/components/LogsDataGrid.tsx (1)
22-43: Respect column configurability increateLogsColumns.
LogsColumnDefexposes asortableflag, butcreateLogsColumnscurrently hardcodessortable: false, making the option ineffective. Please propagate the caller’s intent so pages can enable sorting when needed.- resizable: true, - sortable: false, + resizable: true, + sortable: def.sortable ?? false,
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (51)
frontend/src/components/datagrid/DataGrid.tsx(2 hunks)frontend/src/components/layout/AppSidebar.tsx(1 hunks)frontend/src/components/layout/CloudLayout.tsx(0 hunks)frontend/src/components/layout/Layout.tsx(1 hunks)frontend/src/components/layout/PrimaryMenu.tsx(1 hunks)frontend/src/components/layout/SecondaryMenu.tsx(1 hunks)frontend/src/features/auth/components/AuthMethodsTab.tsx(0 hunks)frontend/src/features/auth/components/ConfigurationTab.tsx(0 hunks)frontend/src/features/auth/page/AuthMethodsPage.tsx(1 hunks)frontend/src/features/auth/page/AuthenticationPage.tsx(0 hunks)frontend/src/features/auth/page/ConfigurationPage.tsx(1 hunks)frontend/src/features/auth/page/UsersPage.tsx(1 hunks)frontend/src/features/dashboard/page/DashboardPage.tsx(3 hunks)frontend/src/features/database/components/TableSidebar.tsx(1 hunks)frontend/src/features/database/helpers.ts(1 hunks)frontend/src/features/database/page/TablesPage.tsx(3 hunks)frontend/src/features/functions/components/SecretRow.tsx(1 hunks)frontend/src/features/functions/components/SecretsContent.tsx(1 hunks)frontend/src/features/functions/hooks/useSecrets.ts(1 hunks)frontend/src/features/functions/page/FunctionsPage.tsx(1 hunks)frontend/src/features/functions/page/SecretsPage.tsx(1 hunks)frontend/src/features/login/page/CloudLoginPage.tsx(2 hunks)frontend/src/features/login/page/LoginPage.tsx(1 hunks)frontend/src/features/logs/components/LogsContent.tsx(0 hunks)frontend/src/features/logs/components/LogsDataGrid.tsx(1 hunks)frontend/src/features/logs/components/LogsSidebar.tsx(0 hunks)frontend/src/features/logs/components/LogsTable.tsx(0 hunks)frontend/src/features/logs/components/SeverityBadge.tsx(1 hunks)frontend/src/features/logs/helpers.ts(1 hunks)frontend/src/features/logs/hooks/useLogSources.ts(3 hunks)frontend/src/features/logs/hooks/useLogs.ts(2 hunks)frontend/src/features/logs/hooks/useMcpUsage.ts(2 hunks)frontend/src/features/logs/index.ts(1 hunks)frontend/src/features/logs/page/AuditsPage.tsx(5 hunks)frontend/src/features/logs/page/LogsPage.tsx(1 hunks)frontend/src/features/logs/page/MCPLogsPage.tsx(1 hunks)frontend/src/features/metadata/page/MetadataPage.tsx(0 hunks)frontend/src/features/onboard/components/mcp/McpInstallation.tsx(1 hunks)frontend/src/features/storage/page/StoragePage.tsx(1 hunks)frontend/src/features/visualizer/components/AuthNode.tsx(4 hunks)frontend/src/features/visualizer/components/BucketNode.tsx(1 hunks)frontend/src/features/visualizer/components/SchemaVisualizer.tsx(6 hunks)frontend/src/features/visualizer/components/TableNode.tsx(4 hunks)frontend/src/features/visualizer/components/VisualizerSkeleton.tsx(2 hunks)frontend/src/features/visualizer/page/VisualizerPage.tsx(3 hunks)frontend/src/lib/hooks/useToast.tsx(2 hunks)frontend/src/lib/routing/AppRoutes.tsx(2 hunks)frontend/src/lib/routing/RequireAuth.tsx(2 hunks)frontend/src/lib/utils/menuConfig.ts(1 hunks)frontend/src/lib/utils/utils.ts(2 hunks)shared-schemas/src/cloud-events.schema.ts(2 hunks)
💤 Files with no reviewable changes (8)
- frontend/src/features/auth/components/AuthMethodsTab.tsx
- frontend/src/features/auth/components/ConfigurationTab.tsx
- frontend/src/features/logs/components/LogsContent.tsx
- frontend/src/features/logs/components/LogsSidebar.tsx
- frontend/src/features/metadata/page/MetadataPage.tsx
- frontend/src/components/layout/CloudLayout.tsx
- frontend/src/features/logs/components/LogsTable.tsx
- frontend/src/features/auth/page/AuthenticationPage.tsx
🧰 Additional context used
📓 Path-based instructions (8)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.{ts,tsx}: Use TypeScript for all code files
Use ES modules (import/export syntax)
Prefer descriptive, unabbreviated variable and function names
Implement proper error handling with try-catch blocks and logging where appropriate
Use single quotes for strings
Include semicolons at the end of statements
Use arrow functions for callbacks and inline functions
Prefer const over let; avoid var
Use template literals for string interpolation
Maintain 2-space indentation
Format code with the repository Prettier configuration
Variables, parameters, properties, and functions must use camelCase
Constants and enum members must use UPPER_CASE
Include JSDoc comments for complex functions
Files:
frontend/src/features/login/page/LoginPage.tsxfrontend/src/components/layout/SecondaryMenu.tsxfrontend/src/features/logs/helpers.tsfrontend/src/features/visualizer/components/AuthNode.tsxfrontend/src/features/logs/hooks/useLogs.tsfrontend/src/features/functions/components/SecretRow.tsxfrontend/src/features/functions/page/SecretsPage.tsxfrontend/src/lib/routing/RequireAuth.tsxfrontend/src/features/logs/page/MCPLogsPage.tsxfrontend/src/features/onboard/components/mcp/McpInstallation.tsxfrontend/src/features/auth/page/AuthMethodsPage.tsxfrontend/src/features/logs/hooks/useMcpUsage.tsfrontend/src/components/layout/PrimaryMenu.tsxfrontend/src/features/storage/page/StoragePage.tsxfrontend/src/features/database/components/TableSidebar.tsxfrontend/src/features/auth/page/ConfigurationPage.tsxfrontend/src/features/functions/components/SecretsContent.tsxfrontend/src/components/layout/AppSidebar.tsxfrontend/src/features/logs/hooks/useLogSources.tsfrontend/src/components/datagrid/DataGrid.tsxfrontend/src/features/login/page/CloudLoginPage.tsxfrontend/src/features/dashboard/page/DashboardPage.tsxfrontend/src/features/functions/page/FunctionsPage.tsxfrontend/src/lib/utils/menuConfig.tsfrontend/src/features/database/helpers.tsfrontend/src/features/logs/components/LogsDataGrid.tsxfrontend/src/features/functions/hooks/useSecrets.tsfrontend/src/features/visualizer/components/TableNode.tsxshared-schemas/src/cloud-events.schema.tsfrontend/src/features/visualizer/page/VisualizerPage.tsxfrontend/src/features/auth/page/UsersPage.tsxfrontend/src/features/logs/components/SeverityBadge.tsxfrontend/src/lib/utils/utils.tsfrontend/src/lib/routing/AppRoutes.tsxfrontend/src/features/logs/page/LogsPage.tsxfrontend/src/components/layout/Layout.tsxfrontend/src/features/visualizer/components/SchemaVisualizer.tsxfrontend/src/features/visualizer/components/VisualizerSkeleton.tsxfrontend/src/features/visualizer/components/BucketNode.tsxfrontend/src/features/logs/page/AuditsPage.tsxfrontend/src/features/database/page/TablesPage.tsxfrontend/src/lib/hooks/useToast.tsxfrontend/src/features/logs/index.ts
frontend/src/**/*.{tsx,ts}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
frontend/src/**/*.{tsx,ts}: Use functional React components with hooks exclusively
Use Radix UI primitives for accessibility
Optimize React component re-renders
Files:
frontend/src/features/login/page/LoginPage.tsxfrontend/src/components/layout/SecondaryMenu.tsxfrontend/src/features/logs/helpers.tsfrontend/src/features/visualizer/components/AuthNode.tsxfrontend/src/features/logs/hooks/useLogs.tsfrontend/src/features/functions/components/SecretRow.tsxfrontend/src/features/functions/page/SecretsPage.tsxfrontend/src/lib/routing/RequireAuth.tsxfrontend/src/features/logs/page/MCPLogsPage.tsxfrontend/src/features/onboard/components/mcp/McpInstallation.tsxfrontend/src/features/auth/page/AuthMethodsPage.tsxfrontend/src/features/logs/hooks/useMcpUsage.tsfrontend/src/components/layout/PrimaryMenu.tsxfrontend/src/features/storage/page/StoragePage.tsxfrontend/src/features/database/components/TableSidebar.tsxfrontend/src/features/auth/page/ConfigurationPage.tsxfrontend/src/features/functions/components/SecretsContent.tsxfrontend/src/components/layout/AppSidebar.tsxfrontend/src/features/logs/hooks/useLogSources.tsfrontend/src/components/datagrid/DataGrid.tsxfrontend/src/features/login/page/CloudLoginPage.tsxfrontend/src/features/dashboard/page/DashboardPage.tsxfrontend/src/features/functions/page/FunctionsPage.tsxfrontend/src/lib/utils/menuConfig.tsfrontend/src/features/database/helpers.tsfrontend/src/features/logs/components/LogsDataGrid.tsxfrontend/src/features/functions/hooks/useSecrets.tsfrontend/src/features/visualizer/components/TableNode.tsxfrontend/src/features/visualizer/page/VisualizerPage.tsxfrontend/src/features/auth/page/UsersPage.tsxfrontend/src/features/logs/components/SeverityBadge.tsxfrontend/src/lib/utils/utils.tsfrontend/src/lib/routing/AppRoutes.tsxfrontend/src/features/logs/page/LogsPage.tsxfrontend/src/components/layout/Layout.tsxfrontend/src/features/visualizer/components/SchemaVisualizer.tsxfrontend/src/features/visualizer/components/VisualizerSkeleton.tsxfrontend/src/features/visualizer/components/BucketNode.tsxfrontend/src/features/logs/page/AuditsPage.tsxfrontend/src/features/database/page/TablesPage.tsxfrontend/src/lib/hooks/useToast.tsxfrontend/src/features/logs/index.ts
frontend/src/**/*.tsx
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
frontend/src/**/*.tsx: Implement TypeScript interfaces/types for all component props
Follow component composition patterns; keep components focused and single-purpose
Implement proper loading and error states in UI
Use a consistent icon set from lucide-react
Files:
frontend/src/features/login/page/LoginPage.tsxfrontend/src/components/layout/SecondaryMenu.tsxfrontend/src/features/visualizer/components/AuthNode.tsxfrontend/src/features/functions/components/SecretRow.tsxfrontend/src/features/functions/page/SecretsPage.tsxfrontend/src/lib/routing/RequireAuth.tsxfrontend/src/features/logs/page/MCPLogsPage.tsxfrontend/src/features/onboard/components/mcp/McpInstallation.tsxfrontend/src/features/auth/page/AuthMethodsPage.tsxfrontend/src/components/layout/PrimaryMenu.tsxfrontend/src/features/storage/page/StoragePage.tsxfrontend/src/features/database/components/TableSidebar.tsxfrontend/src/features/auth/page/ConfigurationPage.tsxfrontend/src/features/functions/components/SecretsContent.tsxfrontend/src/components/layout/AppSidebar.tsxfrontend/src/components/datagrid/DataGrid.tsxfrontend/src/features/login/page/CloudLoginPage.tsxfrontend/src/features/dashboard/page/DashboardPage.tsxfrontend/src/features/functions/page/FunctionsPage.tsxfrontend/src/features/logs/components/LogsDataGrid.tsxfrontend/src/features/visualizer/components/TableNode.tsxfrontend/src/features/visualizer/page/VisualizerPage.tsxfrontend/src/features/auth/page/UsersPage.tsxfrontend/src/features/logs/components/SeverityBadge.tsxfrontend/src/lib/routing/AppRoutes.tsxfrontend/src/features/logs/page/LogsPage.tsxfrontend/src/components/layout/Layout.tsxfrontend/src/features/visualizer/components/SchemaVisualizer.tsxfrontend/src/features/visualizer/components/VisualizerSkeleton.tsxfrontend/src/features/visualizer/components/BucketNode.tsxfrontend/src/features/logs/page/AuditsPage.tsxfrontend/src/features/database/page/TablesPage.tsxfrontend/src/lib/hooks/useToast.tsx
frontend/src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
frontend/src/**/*.{ts,tsx}: Use TanStack Query for server state management
Use React Hook Form for form handling with Zod validation
Optimize bundle size with proper imports
Files:
frontend/src/features/login/page/LoginPage.tsxfrontend/src/components/layout/SecondaryMenu.tsxfrontend/src/features/logs/helpers.tsfrontend/src/features/visualizer/components/AuthNode.tsxfrontend/src/features/logs/hooks/useLogs.tsfrontend/src/features/functions/components/SecretRow.tsxfrontend/src/features/functions/page/SecretsPage.tsxfrontend/src/lib/routing/RequireAuth.tsxfrontend/src/features/logs/page/MCPLogsPage.tsxfrontend/src/features/onboard/components/mcp/McpInstallation.tsxfrontend/src/features/auth/page/AuthMethodsPage.tsxfrontend/src/features/logs/hooks/useMcpUsage.tsfrontend/src/components/layout/PrimaryMenu.tsxfrontend/src/features/storage/page/StoragePage.tsxfrontend/src/features/database/components/TableSidebar.tsxfrontend/src/features/auth/page/ConfigurationPage.tsxfrontend/src/features/functions/components/SecretsContent.tsxfrontend/src/components/layout/AppSidebar.tsxfrontend/src/features/logs/hooks/useLogSources.tsfrontend/src/components/datagrid/DataGrid.tsxfrontend/src/features/login/page/CloudLoginPage.tsxfrontend/src/features/dashboard/page/DashboardPage.tsxfrontend/src/features/functions/page/FunctionsPage.tsxfrontend/src/lib/utils/menuConfig.tsfrontend/src/features/database/helpers.tsfrontend/src/features/logs/components/LogsDataGrid.tsxfrontend/src/features/functions/hooks/useSecrets.tsfrontend/src/features/visualizer/components/TableNode.tsxfrontend/src/features/visualizer/page/VisualizerPage.tsxfrontend/src/features/auth/page/UsersPage.tsxfrontend/src/features/logs/components/SeverityBadge.tsxfrontend/src/lib/utils/utils.tsfrontend/src/lib/routing/AppRoutes.tsxfrontend/src/features/logs/page/LogsPage.tsxfrontend/src/components/layout/Layout.tsxfrontend/src/features/visualizer/components/SchemaVisualizer.tsxfrontend/src/features/visualizer/components/VisualizerSkeleton.tsxfrontend/src/features/visualizer/components/BucketNode.tsxfrontend/src/features/logs/page/AuditsPage.tsxfrontend/src/features/database/page/TablesPage.tsxfrontend/src/lib/hooks/useToast.tsxfrontend/src/features/logs/index.ts
**/*.{tsx,ts}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
React components and TypeScript types/interfaces must use PascalCase
Files:
frontend/src/features/login/page/LoginPage.tsxfrontend/src/components/layout/SecondaryMenu.tsxfrontend/src/features/logs/helpers.tsfrontend/src/features/visualizer/components/AuthNode.tsxfrontend/src/features/logs/hooks/useLogs.tsfrontend/src/features/functions/components/SecretRow.tsxfrontend/src/features/functions/page/SecretsPage.tsxfrontend/src/lib/routing/RequireAuth.tsxfrontend/src/features/logs/page/MCPLogsPage.tsxfrontend/src/features/onboard/components/mcp/McpInstallation.tsxfrontend/src/features/auth/page/AuthMethodsPage.tsxfrontend/src/features/logs/hooks/useMcpUsage.tsfrontend/src/components/layout/PrimaryMenu.tsxfrontend/src/features/storage/page/StoragePage.tsxfrontend/src/features/database/components/TableSidebar.tsxfrontend/src/features/auth/page/ConfigurationPage.tsxfrontend/src/features/functions/components/SecretsContent.tsxfrontend/src/components/layout/AppSidebar.tsxfrontend/src/features/logs/hooks/useLogSources.tsfrontend/src/components/datagrid/DataGrid.tsxfrontend/src/features/login/page/CloudLoginPage.tsxfrontend/src/features/dashboard/page/DashboardPage.tsxfrontend/src/features/functions/page/FunctionsPage.tsxfrontend/src/lib/utils/menuConfig.tsfrontend/src/features/database/helpers.tsfrontend/src/features/logs/components/LogsDataGrid.tsxfrontend/src/features/functions/hooks/useSecrets.tsfrontend/src/features/visualizer/components/TableNode.tsxshared-schemas/src/cloud-events.schema.tsfrontend/src/features/visualizer/page/VisualizerPage.tsxfrontend/src/features/auth/page/UsersPage.tsxfrontend/src/features/logs/components/SeverityBadge.tsxfrontend/src/lib/utils/utils.tsfrontend/src/lib/routing/AppRoutes.tsxfrontend/src/features/logs/page/LogsPage.tsxfrontend/src/components/layout/Layout.tsxfrontend/src/features/visualizer/components/SchemaVisualizer.tsxfrontend/src/features/visualizer/components/VisualizerSkeleton.tsxfrontend/src/features/visualizer/components/BucketNode.tsxfrontend/src/features/logs/page/AuditsPage.tsxfrontend/src/features/database/page/TablesPage.tsxfrontend/src/lib/hooks/useToast.tsxfrontend/src/features/logs/index.ts
frontend/src/**/[A-Z]*.tsx
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Component files must use PascalCase filenames (e.g., DataGrid.tsx)
Files:
frontend/src/features/login/page/LoginPage.tsxfrontend/src/components/layout/SecondaryMenu.tsxfrontend/src/features/visualizer/components/AuthNode.tsxfrontend/src/features/functions/components/SecretRow.tsxfrontend/src/features/functions/page/SecretsPage.tsxfrontend/src/lib/routing/RequireAuth.tsxfrontend/src/features/logs/page/MCPLogsPage.tsxfrontend/src/features/onboard/components/mcp/McpInstallation.tsxfrontend/src/features/auth/page/AuthMethodsPage.tsxfrontend/src/components/layout/PrimaryMenu.tsxfrontend/src/features/storage/page/StoragePage.tsxfrontend/src/features/database/components/TableSidebar.tsxfrontend/src/features/auth/page/ConfigurationPage.tsxfrontend/src/features/functions/components/SecretsContent.tsxfrontend/src/components/layout/AppSidebar.tsxfrontend/src/components/datagrid/DataGrid.tsxfrontend/src/features/login/page/CloudLoginPage.tsxfrontend/src/features/dashboard/page/DashboardPage.tsxfrontend/src/features/functions/page/FunctionsPage.tsxfrontend/src/features/logs/components/LogsDataGrid.tsxfrontend/src/features/visualizer/components/TableNode.tsxfrontend/src/features/visualizer/page/VisualizerPage.tsxfrontend/src/features/auth/page/UsersPage.tsxfrontend/src/features/logs/components/SeverityBadge.tsxfrontend/src/lib/routing/AppRoutes.tsxfrontend/src/features/logs/page/LogsPage.tsxfrontend/src/components/layout/Layout.tsxfrontend/src/features/visualizer/components/SchemaVisualizer.tsxfrontend/src/features/visualizer/components/VisualizerSkeleton.tsxfrontend/src/features/visualizer/components/BucketNode.tsxfrontend/src/features/logs/page/AuditsPage.tsxfrontend/src/features/database/page/TablesPage.tsx
**/[a-z][a-z0-9-]*.ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Utility files should use kebab-case or camelCase (kebab-case validated here)
Files:
frontend/src/features/logs/helpers.tsfrontend/src/features/logs/hooks/useLogs.tsfrontend/src/features/logs/hooks/useMcpUsage.tsfrontend/src/features/logs/hooks/useLogSources.tsfrontend/src/lib/utils/menuConfig.tsfrontend/src/features/database/helpers.tsfrontend/src/features/functions/hooks/useSecrets.tsshared-schemas/src/cloud-events.schema.tsfrontend/src/lib/utils/utils.tsfrontend/src/features/logs/index.ts
frontend/src/**/use[A-Z]*.ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Hook files must be named usePascalCase.ts (e.g., useAuth.ts)
Files:
frontend/src/features/logs/hooks/useLogs.tsfrontend/src/features/logs/hooks/useMcpUsage.tsfrontend/src/features/logs/hooks/useLogSources.tsfrontend/src/features/functions/hooks/useSecrets.ts
🧠 Learnings (16)
📓 Common learnings
Learnt from: CR
Repo: InsForge/InsForge PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-15T18:18:47.519Z
Learning: Applies to frontend/src/**/*.tsx : Follow component composition patterns; keep components focused and single-purpose
📚 Learning: 2025-10-15T18:18:47.519Z
Learnt from: CR
Repo: InsForge/InsForge PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-15T18:18:47.519Z
Learning: Applies to frontend/src/**/*.{ts,tsx} : Use React Hook Form for form handling with Zod validation
Applied to files:
frontend/src/features/login/page/LoginPage.tsxfrontend/src/features/auth/page/ConfigurationPage.tsxfrontend/src/features/logs/page/AuditsPage.tsx
📚 Learning: 2025-10-15T18:18:47.519Z
Learnt from: CR
Repo: InsForge/InsForge PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-15T18:18:47.519Z
Learning: Applies to backend/src/**/*.{ts,tsx} : Validate all user inputs
Applied to files:
frontend/src/features/login/page/LoginPage.tsx
📚 Learning: 2025-10-15T18:18:47.519Z
Learnt from: CR
Repo: InsForge/InsForge PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-15T18:18:47.519Z
Learning: Applies to backend/src/**/*.{ts,tsx} : Use Zod schemas for request/response validation
Applied to files:
frontend/src/features/login/page/LoginPage.tsxfrontend/src/features/database/helpers.tsfrontend/src/lib/utils/utils.ts
📚 Learning: 2025-10-15T18:18:47.519Z
Learnt from: CR
Repo: InsForge/InsForge PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-15T18:18:47.519Z
Learning: Applies to frontend/src/**/*.{tsx} : Use lazy loading for code splitting
Applied to files:
frontend/src/components/layout/SecondaryMenu.tsx
📚 Learning: 2025-10-15T18:18:47.519Z
Learnt from: CR
Repo: InsForge/InsForge PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-15T18:18:47.519Z
Learning: Applies to frontend/src/**/*.{ts,tsx} : Use TanStack Query for server state management
Applied to files:
frontend/src/features/logs/hooks/useLogs.tsfrontend/src/features/logs/hooks/useLogSources.tsfrontend/src/features/visualizer/page/VisualizerPage.tsx
📚 Learning: 2025-10-15T18:18:47.519Z
Learnt from: CR
Repo: InsForge/InsForge PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-15T18:18:47.519Z
Learning: Applies to frontend/src/**/*.tsx : Use a consistent icon set from lucide-react
Applied to files:
frontend/src/features/functions/components/SecretRow.tsxfrontend/src/features/logs/page/AuditsPage.tsxfrontend/src/lib/hooks/useToast.tsx
📚 Learning: 2025-10-15T18:18:47.519Z
Learnt from: CR
Repo: InsForge/InsForge PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-15T18:18:47.519Z
Learning: Applies to frontend/src/**/use[A-Z]*.ts : Hook files must be named usePascalCase.ts (e.g., useAuth.ts)
Applied to files:
frontend/src/features/onboard/components/mcp/McpInstallation.tsxfrontend/src/features/logs/hooks/useMcpUsage.tsfrontend/src/features/functions/components/SecretsContent.tsxfrontend/src/features/functions/hooks/useSecrets.tsfrontend/src/lib/hooks/useToast.tsx
📚 Learning: 2025-10-15T18:18:47.519Z
Learnt from: CR
Repo: InsForge/InsForge PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-15T18:18:47.519Z
Learning: Applies to frontend/src/**/*.{tsx,ts} : Use Radix UI primitives for accessibility
Applied to files:
frontend/src/components/layout/PrimaryMenu.tsxfrontend/src/features/logs/page/AuditsPage.tsx
📚 Learning: 2025-10-15T18:18:47.519Z
Learnt from: CR
Repo: InsForge/InsForge PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-15T18:18:47.519Z
Learning: Applies to frontend/src/**/*.{tsx,ts} : Optimize React component re-renders
Applied to files:
frontend/src/features/storage/page/StoragePage.tsxfrontend/src/features/functions/page/FunctionsPage.tsxfrontend/src/components/layout/Layout.tsxfrontend/src/features/logs/page/AuditsPage.tsx
📚 Learning: 2025-10-15T18:18:47.519Z
Learnt from: CR
Repo: InsForge/InsForge PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-15T18:18:47.519Z
Learning: Applies to frontend/src/**/*.{tsx,ts} : Use functional React components with hooks exclusively
Applied to files:
frontend/src/features/functions/components/SecretsContent.tsxfrontend/src/features/functions/page/FunctionsPage.tsxfrontend/src/components/layout/Layout.tsxfrontend/src/features/logs/page/AuditsPage.tsxfrontend/src/lib/hooks/useToast.tsx
📚 Learning: 2025-10-15T18:18:47.519Z
Learnt from: CR
Repo: InsForge/InsForge PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-15T18:18:47.519Z
Learning: Applies to frontend/src/**/*.{ts,tsx} : Optimize bundle size with proper imports
Applied to files:
frontend/src/features/functions/components/SecretsContent.tsxfrontend/src/features/database/helpers.tsfrontend/src/features/functions/hooks/useSecrets.tsfrontend/src/lib/hooks/useToast.tsx
📚 Learning: 2025-10-15T18:18:47.519Z
Learnt from: CR
Repo: InsForge/InsForge PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-15T18:18:47.519Z
Learning: Applies to frontend/src/**/*.tsx : Implement proper loading and error states in UI
Applied to files:
frontend/src/components/datagrid/DataGrid.tsxfrontend/src/features/visualizer/page/VisualizerPage.tsxfrontend/src/features/visualizer/components/VisualizerSkeleton.tsx
📚 Learning: 2025-10-15T18:18:47.519Z
Learnt from: CR
Repo: InsForge/InsForge PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-15T18:18:47.519Z
Learning: Applies to frontend/src/**/*.tsx : Follow component composition patterns; keep components focused and single-purpose
Applied to files:
frontend/src/features/functions/page/FunctionsPage.tsxfrontend/src/components/layout/Layout.tsx
📚 Learning: 2025-10-15T18:18:47.519Z
Learnt from: CR
Repo: InsForge/InsForge PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-15T18:18:47.519Z
Learning: Applies to backend/src/{controllers,core}/**/*.ts : Implement proper database transaction handling
Applied to files:
frontend/src/features/database/helpers.ts
📚 Learning: 2025-10-15T18:18:47.519Z
Learnt from: CR
Repo: InsForge/InsForge PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-15T18:18:47.519Z
Learning: Applies to backend/src/api/**/*.ts : Implement authentication and error-handling middleware
Applied to files:
frontend/src/lib/routing/AppRoutes.tsx
🧬 Code graph analysis (24)
frontend/src/components/layout/SecondaryMenu.tsx (2)
frontend/src/lib/utils/menuConfig.ts (1)
SecondaryMenuItem(19-23)frontend/src/lib/utils/utils.ts (1)
cn(19-21)
frontend/src/features/visualizer/components/AuthNode.tsx (1)
frontend/src/lib/utils/utils.ts (1)
cn(19-21)
frontend/src/features/logs/hooks/useLogs.ts (1)
frontend/src/features/logs/helpers.ts (1)
LOGS_PAGE_SIZE(24-24)
frontend/src/features/functions/page/SecretsPage.tsx (1)
frontend/src/features/functions/components/SecretsContent.tsx (1)
SecretsContent(11-120)
frontend/src/lib/routing/RequireAuth.tsx (1)
frontend/src/lib/utils/utils.ts (1)
isIframe(167-169)
frontend/src/features/logs/page/MCPLogsPage.tsx (5)
frontend/src/features/logs/hooks/useMcpUsage.ts (1)
useMcpUsage(33-178)frontend/src/features/logs/components/LogsDataGrid.tsx (2)
LogsColumnDef(11-19)LogsDataGrid(58-89)frontend/src/lib/utils/utils.ts (1)
formatTime(177-183)frontend/src/components/index.ts (1)
EmptyState(26-26)frontend/src/features/logs/helpers.ts (1)
LOGS_PAGE_SIZE(24-24)
frontend/src/features/auth/page/AuthMethodsPage.tsx (6)
frontend/src/features/auth/helpers.tsx (2)
OAuthProviderInfo(16-22)oauthProviders(24-67)frontend/src/lib/hooks/useConfirm.ts (1)
useConfirm(11-55)frontend/src/features/auth/hooks/useOAuthConfig.ts (1)
useOAuthConfig(13-133)frontend/src/features/auth/components/OAuthConfigDialog.tsx (1)
OAuthConfigDialog(39-321)frontend/src/features/auth/components/AddOAuthDialog.tsx (1)
AddOAuthDialog(22-109)frontend/src/components/ConfirmDialog.tsx (1)
ConfirmDialog(25-96)
frontend/src/features/logs/hooks/useMcpUsage.ts (1)
frontend/src/features/logs/helpers.ts (1)
LOGS_PAGE_SIZE(24-24)
frontend/src/components/layout/PrimaryMenu.tsx (1)
frontend/src/lib/utils/menuConfig.ts (1)
PrimaryMenuItem(25-33)
frontend/src/features/auth/page/ConfigurationPage.tsx (3)
frontend/src/features/auth/hooks/useAuthConfig.ts (1)
useAuthConfig(6-48)shared-schemas/src/auth-api.schema.ts (2)
UpdateAuthConfigRequest(313-313)updateAuthConfigRequestSchema(260-266)frontend/src/lib/utils/utils.ts (1)
isInsForgeCloudProject(158-160)
frontend/src/components/layout/AppSidebar.tsx (5)
frontend/src/features/logs/hooks/useMcpUsage.ts (1)
useMcpUsage(33-178)frontend/src/features/logs/hooks/useLogSources.ts (1)
useLogSources(7-137)frontend/src/lib/utils/menuConfig.ts (2)
getMenuItems(136-150)getBottomMenuItems(155-191)frontend/src/components/layout/PrimaryMenu.tsx (1)
PrimaryMenu(18-99)frontend/src/components/layout/SecondaryMenu.tsx (1)
SecondaryMenu(33-66)
frontend/src/features/logs/hooks/useLogSources.ts (1)
frontend/src/lib/utils/menuConfig.ts (1)
SecondaryMenuItem(19-23)
frontend/src/features/dashboard/page/DashboardPage.tsx (2)
frontend/src/features/logs/components/LogsDataGrid.tsx (2)
LogsColumnDef(11-19)LogsDataGrid(58-89)frontend/src/lib/utils/utils.ts (2)
formatTime(177-183)cn(19-21)
frontend/src/features/functions/page/FunctionsPage.tsx (1)
frontend/src/features/functions/components/FunctionsContent.tsx (1)
FunctionsContent(10-88)
frontend/src/lib/utils/menuConfig.ts (2)
frontend/src/lib/utils/utils.ts (1)
isInsForgeCloudProject(158-160)frontend/src/lib/utils/cloudMessaging.ts (1)
postMessageToParent(3-10)
frontend/src/features/logs/components/LogsDataGrid.tsx (2)
frontend/src/components/datagrid/datagridTypes.tsx (2)
DataGridRowType(51-51)DataGridColumn(57-65)frontend/src/components/datagrid/DataGrid.tsx (2)
DataGridProps(20-43)DataGrid(46-257)
frontend/src/features/auth/page/UsersPage.tsx (3)
frontend/src/lib/hooks/useToast.tsx (1)
useToast(227-233)frontend/src/features/auth/services/user.service.ts (1)
deleteUsers(58-63)frontend/src/components/ConfirmDialog.tsx (1)
ConfirmDialog(25-96)
frontend/src/features/logs/components/SeverityBadge.tsx (2)
frontend/src/features/logs/index.ts (3)
SeverityBadge(3-3)SEVERITY_CONFIG(6-6)SeverityType(7-7)frontend/src/features/logs/helpers.ts (2)
SEVERITY_CONFIG(13-17)SeverityType(19-19)
frontend/src/lib/routing/AppRoutes.tsx (12)
frontend/src/lib/routing/RequireAuth.tsx (1)
RequireAuth(11-27)frontend/src/components/layout/Layout.tsx (1)
Layout(12-28)frontend/src/features/dashboard/page/DashboardPage.tsx (1)
DashboardPage(11-119)frontend/src/features/auth/page/UsersPage.tsx (1)
UsersPage(17-146)frontend/src/features/auth/page/AuthMethodsPage.tsx (1)
AuthMethodsPage(18-228)frontend/src/features/auth/page/ConfigurationPage.tsx (1)
ConfigurationPage(16-376)frontend/src/features/database/page/TablesPage.tsx (1)
TablesPage(39-598)frontend/src/features/database/page/SQLEditorPage.tsx (1)
SQLEditorPage(106-186)frontend/src/features/logs/page/MCPLogsPage.tsx (1)
MCPLogsPage(9-85)frontend/src/features/logs/page/LogsPage.tsx (1)
LogsPage(20-152)frontend/src/features/functions/page/FunctionsPage.tsx (1)
FunctionsPage(3-9)frontend/src/features/functions/page/SecretsPage.tsx (1)
SecretsPage(3-9)
frontend/src/features/logs/page/LogsPage.tsx (9)
frontend/src/features/logs/hooks/useLogs.ts (1)
useLogs(9-163)frontend/src/features/logs/components/LogsDataGrid.tsx (2)
LogsColumnDef(11-19)LogsDataGrid(58-89)frontend/src/features/logs/components/SeverityBadge.tsx (1)
SeverityBadge(7-18)shared-schemas/src/logs.schema.ts (1)
LogSchema(39-39)frontend/src/lib/utils/utils.ts (1)
formatTime(177-183)frontend/src/components/index.ts (3)
SearchInput(30-30)Checkbox(34-34)EmptyState(26-26)frontend/src/components/radix/DropdownMenu.tsx (3)
DropdownMenu(170-170)DropdownMenuTrigger(171-171)DropdownMenuContent(172-172)frontend/src/components/radix/Button.tsx (1)
Button(50-50)frontend/src/features/logs/helpers.ts (2)
SEVERITY_OPTIONS(4-8)LOGS_PAGE_SIZE(24-24)
frontend/src/components/layout/Layout.tsx (5)
frontend/src/lib/contexts/AuthContext.tsx (1)
useAuth(27-33)frontend/src/lib/contexts/ThemeContext.tsx (1)
ThemeProvider(37-117)frontend/src/lib/utils/utils.ts (1)
isIframe(167-169)frontend/src/components/layout/AppHeader.tsx (1)
AppHeader(27-148)frontend/src/components/layout/AppSidebar.tsx (1)
AppSidebar(12-41)
frontend/src/features/visualizer/components/SchemaVisualizer.tsx (1)
frontend/src/lib/contexts/ThemeContext.tsx (1)
useTheme(119-125)
frontend/src/features/logs/page/AuditsPage.tsx (3)
frontend/src/features/logs/helpers.ts (1)
LOGS_PAGE_SIZE(24-24)frontend/src/features/logs/components/LogsDataGrid.tsx (2)
LogsColumnDef(11-19)LogsDataGrid(58-89)frontend/src/lib/utils/utils.ts (1)
formatTime(177-183)
frontend/src/lib/hooks/useToast.tsx (1)
frontend/src/lib/utils/utils.ts (1)
cn(19-21)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: CI Pre-merge Check
- GitHub Check: E2E Tests
🔇 Additional comments (41)
shared-schemas/src/cloud-events.schema.ts (2)
28-30: LGTM!The schema definition follows the established pattern and is consistent with other event schemas in the file.
38-38: LGTM!The schema is correctly integrated into the discriminated union.
frontend/src/features/login/page/CloudLoginPage.tsx (5)
5-5: LGTM: Import path refactored.The import path change to
cloudMessaging(camelCase) aligns with the codebase reorganization mentioned in the PR summary.
16-17: Verify domain control for origin validation.The
endsWith('.insforge.dev')check allows any subdomain ofinsforge.dev. While this approach is pragmatic, ensure your team has full control over DNS for theinsforge.devdomain to prevent subdomain spoofing. If stricter validation is needed, consider an allowlist of specific origins or a regex pattern that validates the subdomain structure.
73-76: LGTM: Simplified redirect logic is clean and correct.The streamlined redirect effect correctly:
- Uses
voidprefix for the asyncnavigate()call- Employs
replace: trueto prevent back-button navigation issues- Targets
/dashboard, which aligns with the unified Cloud/Local layout approach described in the PR summaryThe removal of onboarding checks simplifies the authentication flow appropriately.
13-70: LGTM: Authorization code flow implemented correctly.The postMessage handler properly:
- Validates message origin before processing
- Exchanges authorization code for access token via AuthContext
- Handles success/failure scenarios with appropriate parent notifications
- Cleans up event listener on unmount to prevent memory leaks
The error handling and messaging logic are solid.
78-102: LGTM: Clean conditional rendering.The error and loading states are clearly separated with appropriate visual feedback using lucide-react icons and Tailwind styling. The component follows React and TypeScript best practices.
frontend/src/features/visualizer/components/TableNode.tsx (1)
22-46: LGTM! Dark mode implementation looks solid.The dark mode styling changes are well-implemented with proper contrast ratios and consistent color schemes. The use of
gray-*classes for light mode andneutral-*classes for dark mode provides appropriate tonal variation. All UI elements (diamonds, borders, text, icons, badges) have been updated to support both themes correctly.Also applies to: 63-124, 134-135
frontend/src/features/onboard/components/mcp/McpInstallation.tsx (1)
15-15: Import refactor verified—approved.The refactor to centralize
useApiKeyunder@/lib/hooks/useMetadatais complete and consistent. No remaining imports from the old path detected; all usage is correctly migrated to the new location.frontend/src/features/storage/page/StoragePage.tsx (1)
347-362: Clarify what conditional guard was removed from the Refresh button.The git diff confirms a conditional wrapper was removed (the closing
)}is gone), making the Refresh button now unconditional. However, the specific guard type appears unclear. The AI summary indicates it was!isIframe(), but there's noisIframeusage anywhere in the storage features—only in Layout and RequireAuth components.Please confirm:
- What was the actual guard condition (e.g.,
!isIframe(),selectedBucket && !isIframe(), or something else)?- Why was it removed?
The code quality is solid (proper disabled state, accessible tooltip, correct async handling).
frontend/src/features/login/page/LoginPage.tsx (1)
27-27: LGTM! Clean import path refactor.The schema validation import has been updated to align with the repository-wide consolidation of validation utilities under
schemaValidations. No functional changes.frontend/src/features/database/helpers.ts (1)
1-1: LGTM! Consistent with schema validation consolidation.This import path update aligns with the repository-wide refactor moving validation utilities to
schemaValidations.frontend/src/features/visualizer/components/SchemaVisualizer.tsx (4)
19-19: LGTM! Theme context properly integrated.The
useThemeimport enables dynamic theming for the visualizer component.
186-187: LGTM! Theme resolution extracted for styling.The
resolvedThemevalue is correctly extracted and will be used to determine edge colors and ReactFlow's color mode.
247-276: LGTM! Theme-aware edge styling implemented correctly.The edge color is dynamically computed based on the resolved theme (white for dark mode, zinc-950 for light mode), and
resolvedThemeis correctly included in theuseMemodependency array since edge styling depends on the theme.
323-323: LGTM! ReactFlow color mode synchronized with theme.The
colorModeprop is correctly set based onresolvedTheme, ensuring ReactFlow's internal styling matches the application theme.frontend/src/features/functions/components/SecretRow.tsx (1)
3-3: LGTM! Module reorganization aligning secrets with functions.The
Secrettype import path has been updated to reflect the reorganization of secrets functionality under the functions feature. No behavioral changes.frontend/src/features/functions/components/SecretsContent.tsx (1)
9-9: LGTM! Hook import updated for module reorganization.The
useSecretshook import path reflects the consolidation of secrets functionality within the functions feature.frontend/src/features/database/components/TableSidebar.tsx (1)
27-27: LGTM! More accurate title for the sidebar.Changing the title from "Database" to "Tables" better reflects the component's specific purpose of managing database tables.
frontend/src/features/functions/hooks/useSecrets.ts (1)
3-7: LGTM! Service imports updated for module consolidation.The secret service and types are now imported from the functions feature, completing the reorganization of secrets functionality.
frontend/src/features/logs/hooks/useMcpUsage.ts (2)
7-7: LGTM! Centralizing page size constant.Importing
LOGS_PAGE_SIZEfrom a shared helper reduces code duplication and ensures consistent pagination across log-related hooks.
77-82: LGTM! Pagination logic is correct.The pagination calculations correctly use the centralized
LOGS_PAGE_SIZEconstant:
- Total pages:
Math.ceil(length / pageSize)- Start index:
(page - 1) * pageSize- End index:
startIndex + pageSizefrontend/src/components/datagrid/DataGrid.tsx (2)
205-205: LGTM! Dark mode border improvement.The change from
dark:border-0todark:border-neutral-700provides a visible border in dark mode, improving visual hierarchy and component separation.
190-190: No action required—token is properly defined via Tailwind v4@themedirective.The custom
bg-bg-graytoken is correctly defined infrontend/src/index.css(line 221) using Tailwind CSS v4's@themeblock, which automatically generates the corresponding utility class. The codebase uses Tailwind^4.1.11, where this is the standard pattern for custom design tokens. The token is properly scoped and functional across all usages in the codebase.frontend/src/features/logs/hooks/useLogs.ts (1)
5-5: LGTM! Centralized pagination constant.Replacing the hardcoded page size with
LOGS_PAGE_SIZEimproves maintainability and ensures consistency across log-related components.Also applies to: 120-124
frontend/src/lib/hooks/useToast.tsx (1)
3-3: Verify toast positioning doesn't overlap with navigation.The toast container positioning changed from
top-7.5(30px) totop-2(8px), moving toasts significantly closer to the top edge. With the new layout changes in this PR, ensure this doesn't cause overlap with the header or navigation elements.The
cnutility usage is good for consistent class merging.Also applies to: 194-198
frontend/src/features/visualizer/components/BucketNode.tsx (1)
14-26: LGTM! Consistent light theme support.The color updates provide proper light mode theming while maintaining the existing dark mode styles. The changes are consistent across background, border, and text colors.
frontend/src/lib/utils/utils.ts (1)
171-183: LGTM! Well-implemented timestamp formatter.The
formatTimefunction includes:
- Proper error handling (returns original timestamp if invalid)
- Clear JSDoc documentation
- Consistent formatting across the application
frontend/src/features/logs/components/SeverityBadge.tsx (1)
7-17: LGTM! Well-focused component with defensive fallback.The component correctly uses a fallback to
SEVERITY_CONFIG.informationalwhen an invalid severity is provided, and the rendering logic is clean and accessible.frontend/src/components/layout/Layout.tsx (1)
1-6: LGTM! Clean imports.frontend/src/features/logs/index.ts (1)
1-11: LGTM! Clean barrel exports.The centralized exports follow good module organization patterns and make imports cleaner for consumers.
frontend/src/features/database/page/TablesPage.tsx (2)
39-39: LGTM! Clean component export.The renaming from
DatabasePageContenttoTablesPagewith direct export improves clarity.
443-458: Verify the removal of theisIframecheck is intentional.The Refresh button now renders unconditionally. Previously, it was gated by an
isIframe()check. Given that CloudLayout was removed in this PR, this change may be intentional, but please confirm that the Refresh action should be available in all contexts (including when the app is embedded in an iframe).frontend/src/components/layout/SecondaryMenu.tsx (1)
33-66: LGTM! Clean loading states and composition.The skeleton loading state provides good UX, and the component follows the single-purpose pattern.
Based on learnings
frontend/src/features/visualizer/components/AuthNode.tsx (1)
14-95: LGTM! Consistent dark mode styling.The styling updates provide proper dark mode support with consistent color tokens throughout the component.
frontend/src/features/logs/page/MCPLogsPage.tsx (2)
9-41: LGTM! Well-structured component with proper memoization.The component correctly destructures state from
useMcpUsageand memoizes column definitions. TheformatTimeutility is used appropriately for date formatting.Based on learnings
43-84: LGTM! Clean UI composition with proper error handling.The component provides good UX with search functionality, error states, and appropriate empty state messaging that adapts to search context.
frontend/src/features/logs/helpers.ts (1)
1-24: LGTM! Well-defined constants with strong typing.The use of
as constassertions ensures type safety, and the exported constants provide good centralization for log-related configuration.frontend/src/lib/routing/RequireAuth.tsx (1)
11-24: Login redirect logic reads wellThanks for centralizing the unauthenticated redirect—splitting between
/cloud/loginand/dashboard/loginvia the iframe check matches the new layout strategy.frontend/src/features/visualizer/page/VisualizerPage.tsx (1)
68-132: Visualizer loading/error flow looks solidThe shared skeleton, refresh handling, and themed backdrop behave consistently across loading/error/success states.
frontend/src/features/visualizer/components/VisualizerSkeleton.tsx (1)
1-31: Skeleton matches the new themingThe light/dark backdrop split keeps the skeleton aligned with the main page visuals—nice touch.
|
too much frontend code that i don't understand XD. I wil check from users perspetive and see if it works. @Leo-rq-yu to review code |
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
frontend/src/features/functions/page/SecretsPage.tsx (2)
95-95: Fix CSS class typo:cols-span-full→col-span-full.The Tailwind class name is misspelled in three locations. The correct class is
col-span-full(singular "col"), notcols-span-full. This typo prevents proper grid spanning for the skeleton loading state, secret rows, and empty state.Apply this diff to fix all three occurrences:
- <Skeleton key={i} className="h-14 rounded-[8px] cols-span-full" /> + <Skeleton key={i} className="h-14 rounded-[8px] col-span-full" />className="cols-span-full" + className="col-span-full"- <div className="cols-span-full"> + <div className="col-span-full">Also applies to: 105-105, 110-110
48-48: Use standard abbreviation format with period.Abbreviations like "e.g." should include a period per standard English conventions.
Apply this diff:
- placeholder="e.g CLIENT_KEY" + placeholder="e.g. CLIENT_KEY"- placeholder="e.g 1234567890" + placeholder="e.g. 1234567890"Also applies to: 57-57
🧹 Nitpick comments (1)
frontend/src/features/functions/page/SecretsPage.tsx (1)
58-58: Remove redundanttype="text"attribute.Input components default to
type="text", making this attribute unnecessary.Apply this diff:
placeholder="e.g 1234567890" - type="text" value={newSecretValue}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
frontend/src/features/functions/components/FunctionsContent.tsx(0 hunks)frontend/src/features/functions/page/FunctionsPage.tsx(1 hunks)frontend/src/features/functions/page/SecretsPage.tsx(3 hunks)frontend/src/features/logs/components/SeverityBadge.tsx(1 hunks)frontend/src/features/logs/hooks/useLogs.ts(3 hunks)shared-schemas/src/cloud-events.schema.ts(2 hunks)
💤 Files with no reviewable changes (1)
- frontend/src/features/functions/components/FunctionsContent.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
- shared-schemas/src/cloud-events.schema.ts
- frontend/src/features/logs/hooks/useLogs.ts
🧰 Additional context used
📓 Path-based instructions (6)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.{ts,tsx}: Use TypeScript for all code files
Use ES modules (import/export syntax)
Prefer descriptive, unabbreviated variable and function names
Implement proper error handling with try-catch blocks and logging where appropriate
Use single quotes for strings
Include semicolons at the end of statements
Use arrow functions for callbacks and inline functions
Prefer const over let; avoid var
Use template literals for string interpolation
Maintain 2-space indentation
Format code with the repository Prettier configuration
Variables, parameters, properties, and functions must use camelCase
Constants and enum members must use UPPER_CASE
Include JSDoc comments for complex functions
Files:
frontend/src/features/logs/components/SeverityBadge.tsxfrontend/src/features/functions/page/FunctionsPage.tsxfrontend/src/features/functions/page/SecretsPage.tsx
frontend/src/**/*.{tsx,ts}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
frontend/src/**/*.{tsx,ts}: Use functional React components with hooks exclusively
Use Radix UI primitives for accessibility
Optimize React component re-renders
Files:
frontend/src/features/logs/components/SeverityBadge.tsxfrontend/src/features/functions/page/FunctionsPage.tsxfrontend/src/features/functions/page/SecretsPage.tsx
frontend/src/**/*.tsx
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
frontend/src/**/*.tsx: Implement TypeScript interfaces/types for all component props
Follow component composition patterns; keep components focused and single-purpose
Implement proper loading and error states in UI
Use a consistent icon set from lucide-react
Files:
frontend/src/features/logs/components/SeverityBadge.tsxfrontend/src/features/functions/page/FunctionsPage.tsxfrontend/src/features/functions/page/SecretsPage.tsx
frontend/src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
frontend/src/**/*.{ts,tsx}: Use TanStack Query for server state management
Use React Hook Form for form handling with Zod validation
Optimize bundle size with proper imports
Files:
frontend/src/features/logs/components/SeverityBadge.tsxfrontend/src/features/functions/page/FunctionsPage.tsxfrontend/src/features/functions/page/SecretsPage.tsx
**/*.{tsx,ts}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
React components and TypeScript types/interfaces must use PascalCase
Files:
frontend/src/features/logs/components/SeverityBadge.tsxfrontend/src/features/functions/page/FunctionsPage.tsxfrontend/src/features/functions/page/SecretsPage.tsx
frontend/src/**/[A-Z]*.tsx
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Component files must use PascalCase filenames (e.g., DataGrid.tsx)
Files:
frontend/src/features/logs/components/SeverityBadge.tsxfrontend/src/features/functions/page/FunctionsPage.tsxfrontend/src/features/functions/page/SecretsPage.tsx
🧠 Learnings (2)
📚 Learning: 2025-10-15T18:18:47.519Z
Learnt from: CR
Repo: InsForge/InsForge PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-15T18:18:47.519Z
Learning: Applies to frontend/src/**/*.{tsx,ts} : Use functional React components with hooks exclusively
Applied to files:
frontend/src/features/functions/page/FunctionsPage.tsx
📚 Learning: 2025-10-15T18:18:47.519Z
Learnt from: CR
Repo: InsForge/InsForge PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-15T18:18:47.519Z
Learning: Applies to **/*.{ts,tsx} : Use arrow functions for callbacks and inline functions
Applied to files:
frontend/src/features/functions/page/FunctionsPage.tsx
🧬 Code graph analysis (2)
frontend/src/features/logs/components/SeverityBadge.tsx (2)
frontend/src/features/logs/helpers.ts (2)
SeverityType(19-19)SEVERITY_CONFIG(13-17)frontend/src/features/logs/index.ts (3)
SeverityType(7-7)SeverityBadge(3-3)SEVERITY_CONFIG(6-6)
frontend/src/features/functions/page/FunctionsPage.tsx (5)
frontend/src/lib/hooks/useToast.tsx (1)
useToast(227-233)frontend/src/features/functions/hooks/useFunctions.ts (1)
useFunctions(6-106)frontend/src/components/CodeEditor.tsx (1)
CodeEditor(19-92)frontend/src/features/functions/components/FunctionRow.tsx (1)
FunctionRow(11-71)frontend/src/features/functions/components/FunctionEmptyState.tsx (1)
FunctionEmptyState(3-15)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: CI Pre-merge Check
- GitHub Check: E2E Tests
🔇 Additional comments (5)
frontend/src/features/functions/page/SecretsPage.tsx (2)
7-11: LGTM — Import and export refactoring looks correct.The namespace reorganization (moving from secrets to functions) and the switch to a default export are consistent with the PR's broader refactoring goals.
12-120: Well-structured component with proper state management.The component correctly uses React hooks, implements loading/empty states, and follows the established patterns for secrets management. The form validation, search filtering, and CRUD operations are properly handled.
frontend/src/features/logs/components/SeverityBadge.tsx (3)
1-1: LGTM!Good use of type-only import for
SeverityTypeto optimize the bundle.
3-5: LGTM!Props interface is properly typed and follows naming conventions.
7-8: LGTM!The fallback to
informationalis good defensive programming, even though theSeverityTypeconstraint should guarantee a valid key.
| return ( | ||
| <div className="h-full flex flex-col overflow-hidden"> | ||
| <div className="flex flex-col gap-6 p-4"> | ||
| <p className="h-7 text-xl text-zinc-950 dark:text-white">Functions</p> | ||
| <div className="flex flex-col gap-2"> | ||
| {/* Table Header */} | ||
| <div className="grid grid-cols-12 px-3 text-sm text-muted-foreground dark:text-neutral-400"> | ||
| <div className="col-span-2 py-1 px-3">Name</div> | ||
| <div className="col-span-6 py-1 px-3">URL</div> | ||
| <div className="col-span-2 py-1 px-3">Created</div> | ||
| <div className="col-span-2 py-1 px-3">Last Update</div> | ||
| </div> | ||
| {loading ? ( | ||
| <> | ||
| {[...Array(4)].map((_, i) => ( | ||
| <Skeleton key={i} className="h-14 rounded-[8px] cols-span-full" /> | ||
| ))} | ||
| </> | ||
| ) : functions.length >= 1 ? ( | ||
| <> | ||
| {functions.map((func) => ( | ||
| <FunctionRow | ||
| key={func.id} | ||
| function={func} | ||
| onClick={() => void selectFunction(func)} | ||
| className="cols-span-full" | ||
| /> | ||
| ))} | ||
| </> | ||
| ) : ( | ||
| <div className="cols-span-full"> | ||
| <FunctionEmptyState /> | ||
| </div> | ||
| )} |
There was a problem hiding this comment.
Handle query errors instead of falling through to the empty state.
When the useFunctions query fails, functions comes back as an empty array and this branch renders FunctionEmptyState, so users just see “No functions available” instead of an error. Per our frontend guidelines we need an explicit error pathway (toast, inline banner, or both) before showing the empty state.
Please surface error from useFunctions() (e.g., guard with an if (error) section that renders an error block or fires a toast) so API failures aren’t silently masked.
🤖 Prompt for AI Agents
frontend/src/features/functions/page/FunctionsPage.tsx around lines 52 to 85:
the component currently treats a failed useFunctions() query as an empty array
and shows FunctionEmptyState; instead, guard for the query error and render an
explicit error pathway. Add an early check for error (e.g., if (error) { render
an inline error banner or return a fragment that triggers a toast and shows a
retry/button } ) before the functions empty-state branch, keep the loading
branch intact, and ensure the error UI surfaces the error message and/or a retry
action so API failures aren’t silently masked.
| {[...Array(4)].map((_, i) => ( | ||
| <Skeleton key={i} className="h-14 rounded-[8px] cols-span-full" /> | ||
| ))} | ||
| </> | ||
| ) : functions.length >= 1 ? ( | ||
| <> | ||
| {functions.map((func) => ( | ||
| <FunctionRow | ||
| key={func.id} | ||
| function={func} | ||
| onClick={() => void selectFunction(func)} | ||
| className="cols-span-full" | ||
| /> | ||
| ))} | ||
| </> | ||
| ) : ( | ||
| <div className="cols-span-full"> | ||
| <FunctionEmptyState /> |
There was a problem hiding this comment.
Fix the Tailwind class typo.
cols-span-full isn’t a Tailwind utility, so these elements don’t span the full grid width. Use col-span-full (or the desired breakpoint variant) instead.
Apply:
- <Skeleton key={i} className="h-14 rounded-[8px] cols-span-full" />
+ <Skeleton key={i} className="h-14 rounded-[8px] col-span-full" />
…
- className="cols-span-full"
+ className="col-span-full"
…
- <div className="cols-span-full">
+ <div className="col-span-full">📝 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.
| {[...Array(4)].map((_, i) => ( | |
| <Skeleton key={i} className="h-14 rounded-[8px] cols-span-full" /> | |
| ))} | |
| </> | |
| ) : functions.length >= 1 ? ( | |
| <> | |
| {functions.map((func) => ( | |
| <FunctionRow | |
| key={func.id} | |
| function={func} | |
| onClick={() => void selectFunction(func)} | |
| className="cols-span-full" | |
| /> | |
| ))} | |
| </> | |
| ) : ( | |
| <div className="cols-span-full"> | |
| <FunctionEmptyState /> | |
| {[...Array(4)].map((_, i) => ( | |
| <Skeleton key={i} className="h-14 rounded-[8px] col-span-full" /> | |
| ))} | |
| </> | |
| ) : functions.length >= 1 ? ( | |
| <> | |
| {functions.map((func) => ( | |
| <FunctionRow | |
| key={func.id} | |
| function={func} | |
| onClick={() => void selectFunction(func)} | |
| className="col-span-full" | |
| /> | |
| ))} | |
| </> | |
| ) : ( | |
| <div className="col-span-full"> | |
| <FunctionEmptyState /> |
🤖 Prompt for AI Agents
In frontend/src/features/functions/page/FunctionsPage.tsx around lines 66 to 83,
there is a typo using the non-existent Tailwind class "cols-span-full"; replace
every occurrence of "cols-span-full" with the correct "col-span-full" (or a
specific breakpoint variant like "md:col-span-full" if desired) so the elements
properly span the full grid width.
| return ( | ||
| <div className="flex items-center gap-2 pr-1"> | ||
| <div className="w-2 h-2 rounded-full shrink-0" style={{ backgroundColor: config.color }} /> | ||
| <span className="text-sm text-gray-900 dark:text-white font-normal leading-6"> | ||
| {config.label} | ||
| </span> | ||
| </div> | ||
| ); |
There was a problem hiding this comment.
Add accessible severity information for screen readers.
The colored dot conveys severity visually but screen readers won't announce it, and users with color vision deficiencies may struggle to distinguish severities.
Consider one of these solutions:
Solution 1: Add visually-hidden text (recommended)
return (
<div className="flex items-center gap-2 pr-1">
<div className="w-2 h-2 rounded-full shrink-0" style={{ backgroundColor: config.color }} />
+ <span className="sr-only">{config.label} severity</span>
<span className="text-sm text-gray-900 dark:text-white font-normal leading-6">
{config.label}
</span>
</div>
);Solution 2: Add aria-label to container
- return (
- <div className="flex items-center gap-2 pr-1">
+ return (
+ <div className="flex items-center gap-2 pr-1" role="status" aria-label={`${config.label} severity`}>
<div className="w-2 h-2 rounded-full shrink-0" style={{ backgroundColor: config.color }} />
<span className="text-sm text-gray-900 dark:text-white font-normal leading-6">
{config.label}
</span>
</div>
);Also consider: Verify WCAG contrast ratios for the colored dots in dark mode, especially the warning yellow (#FCD34D).
📝 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.
| return ( | |
| <div className="flex items-center gap-2 pr-1"> | |
| <div className="w-2 h-2 rounded-full shrink-0" style={{ backgroundColor: config.color }} /> | |
| <span className="text-sm text-gray-900 dark:text-white font-normal leading-6"> | |
| {config.label} | |
| </span> | |
| </div> | |
| ); | |
| return ( | |
| <div className="flex items-center gap-2 pr-1"> | |
| <div className="w-2 h-2 rounded-full shrink-0" style={{ backgroundColor: config.color }} /> | |
| <span className="sr-only">{config.label} severity</span> | |
| <span className="text-sm text-gray-900 dark:text-white font-normal leading-6"> | |
| {config.label} | |
| </span> | |
| </div> | |
| ); |
| return ( | |
| <div className="flex items-center gap-2 pr-1"> | |
| <div className="w-2 h-2 rounded-full shrink-0" style={{ backgroundColor: config.color }} /> | |
| <span className="text-sm text-gray-900 dark:text-white font-normal leading-6"> | |
| {config.label} | |
| </span> | |
| </div> | |
| ); | |
| return ( | |
| <div className="flex items-center gap-2 pr-1" role="status" aria-label={`${config.label} severity`}> | |
| <div className="w-2 h-2 rounded-full shrink-0" style={{ backgroundColor: config.color }} /> | |
| <span className="text-sm text-gray-900 dark:text-white font-normal leading-6"> | |
| {config.label} | |
| </span> | |
| </div> | |
| ); |
🤖 Prompt for AI Agents
In frontend/src/features/logs/components/SeverityBadge.tsx around lines 10 to
17, the colored dot is purely visual and not announced by screen readers; add
accessible text so severity is conveyed to assistive tech: make the decorative
dot aria-hidden="true" (so it’s ignored by screen readers) and add a
visually-hidden span (or role="status"/aria-live if dynamic) with the severity
label adjacent to the dot so screen readers announce it; alternatively you may
set an aria-label on the outer container describing the severity, but prefer the
visually-hidden span for explicit content; also verify WCAG contrast ratios for
the dot colors in dark mode (especially #FCD34D) and adjust colors or add
borders if they fail contrast.
Summary
How did you test this change?
Tested both locally and on cloud
Summary by CodeRabbit
New Features
Bug Fixes
Chores