Skip to content

A Small PR - #560

Merged
Fermionic-Lyu merged 11 commits into
mainfrom
feat-new-sidebar
Nov 7, 2025
Merged

Fermionic-Lyu merged 11 commits into
mainfrom
feat-new-sidebar

Conversation

@Fermionic-Lyu

@Fermionic-Lyu Fermionic-Lyu commented Nov 7, 2025 •

Copy link
Copy Markdown
Member

Summary

  1. Intoduced the new AppSidebar system, which consists of PrimaryMenu and Secondary Menu depending on menuConfig.ts
  2. Reworked LogsPage to use the generic DataGrid component
  3. Added VisualizerPage to self-hosting version, added light theme support
  4. Removed CloudLayout, both Cloud & Local are using the same layout now
image

How did you test this change?

Tested both locally and on cloud

Summary by CodeRabbit

  • New Features

    • Split authentication management into separate pages for Users, Auth Methods, and Configuration
    • Added dedicated MCP logs page with enhanced search and filtering
    • Reorganized sidebar navigation with primary and secondary menu structure
  • Bug Fixes

    • Improved dark mode theme consistency across visualizer components
  • Chores

    • Consolidated dashboard layout and simplified routing structure
    • Refactored logs interface with improved data grid and pagination
    • Updated database section naming and navigation

@coderabbitai

coderabbitai Bot commented Nov 7, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

Extensive 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

Cohort / File(s) Summary
Layout & Sidebar Restructuring
frontend/src/components/layout/AppSidebar.tsx, PrimaryMenu.tsx, SecondaryMenu.tsx, Layout.tsx, CloudLayout.tsx
AppSidebar redesigned to use PrimaryMenu/SecondaryMenu composition with dynamic menu items from getMenuItems/getBottomMenuItems; route-matching-based active state replaces per-item logic. CloudLayout deleted entirely. Layout simplified by removing collapse state management and responsive sidebar logic; iframe-based theming introduced.
DataGrid Styling
frontend/src/components/datagrid/DataGrid.tsx
Loading screen background changed from white to gray; root container classes reordered; border color updated for dark mode.
Authentication Pages Redesign
frontend/src/features/auth/page/AuthenticationPage.tsx, AuthMethodsPage.tsx, ConfigurationPage.tsx, UsersPage.tsx
Old tabbed AuthenticationPage removed; replaced with three dedicated pages (Users, AuthMethods, Configuration). AuthMethodsPage and ConfigurationPage introduced with OAuth provider management and auth config forms. UsersPage new with bulk actions and user management.
Authentication Components
frontend/src/features/auth/components/AuthMethodsTab.tsx, ConfigurationTab.tsx
Both tab components removed; logic migrated into dedicated pages.
Logs Redesign: Components
frontend/src/features/logs/components/LogsContent.tsx, LogsDataGrid.tsx, LogsTable.tsx, LogsSidebar.tsx, SeverityBadge.tsx
LogsContent and LogsSidebar deleted. New LogsDataGrid component with column definitions (LogsColumnDef), default cell rendering, and pagination. SeverityBadge component new for severity-level display with color-coded styling.
Logs Redesign: Hooks & Helpers
frontend/src/features/logs/hooks/useLogSources.ts, useLogs.ts, useMcpUsage.ts, helpers.ts, index.ts
Pagination switched to centralized LOGS_PAGE_SIZE constant. useLogSources enhanced with menuItems export for sidebar navigation. SEVERITY_CONFIG, SEVERITY_OPTIONS, and SeverityType types introduced. LogsDataGrid and SeverityBadge exported in index.ts; LogsTable removed.
Logs Pages
frontend/src/features/logs/page/AuditsPage.tsx, LogsPage.tsx, MCPLogsPage.tsx
AuditsPage and LogsPage migrated to LogsDataGrid with LogsColumnDef. MCPLogsPage new for dedicated MCP logs display. LogsPage now derives source from URL params with search and severity filtering.
Functions Pages & Components
frontend/src/features/functions/page/FunctionsPage.tsx, SecretsPage.tsx, FunctionsContent.tsx
FunctionsContent removed. FunctionsPage refactored to use useFunctions hook with detail/list view states. SecretsPage renamed (formerly SecretsContent); import paths updated to functions namespace.
Functions Services
frontend/src/features/functions/components/SecretRow.tsx, hooks/useSecrets.ts
Secret type imports moved from secrets service to functions service path.
Database Pages
frontend/src/features/database/page/TablesPage.tsx, components/TableSidebar.tsx, helpers.ts
TablesPage renamed (formerly DatabasePage); isIframe conditional removed. TableSidebar title changed to "Tables". Import path for validation schemas updated.
Visualizer Styling
frontend/src/features/visualizer/components/AuthNode.tsx, BucketNode.tsx, TableNode.tsx, VisualizerSkeleton.tsx, SchemaVisualizer.tsx, page/VisualizerPage.tsx
Comprehensive color and styling updates for light/dark theme consistency. VisualizerSkeleton split into theme-specific backgrounds. SchemaVisualizer integrated with ThemeContext for dynamic edge coloring and layout colorMode. VisualizerPage dot-matrix background split by theme.
Login & Onboarding
frontend/src/features/login/page/CloudLoginPage.tsx, LoginPage.tsx, onboard/components/mcp/McpInstallation.tsx
CloudLoginPage removes useMcpUsage and onboarding redirect logic; navigation simplified to /dashboard on auth success. LoginPage and McpInstallation update validation schema import paths.
Storage & Dashboard Pages
frontend/src/features/storage/page/StoragePage.tsx, dashboard/page/DashboardPage.tsx
StoragePage removes isIframe() conditional; Refresh always rendered. DashboardPage switches from LogsTable to LogsDataGrid; useMetadata import path updated.
Metadata Pages
frontend/src/features/metadata/page/MetadataPage.tsx
MetadataPage and MetadataSkeleton helper completely removed.
Routing & Configuration
frontend/src/lib/routing/AppRoutes.tsx, RequireAuth.tsx, utils/menuConfig.ts, utils/utils.ts, hooks/useToast.tsx
AppRoutes consolidated: removes CloudLayout wrapper; adds new auth subroutes (/users, /auth-methods, /config); reorganizes logs and functions routing; removes AuditsPage/MetadataPage references. RequireAuth simplifies by removing redirectTo prop; iframe detection determines login path. New menuConfig.ts provides centralized menu composition (getMenuItems, getBottomMenuItems, menu types). formatTime utility added. useToast styling updated for cn class joining.
Shared Schemas
shared-schemas/src/cloud-events.schema.ts
New ShowSettingsOverlayEvent schema and type added to cloudEventSchema discriminated union.

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

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

  • AppSidebar & menu composition: Verify route-matching logic, secondary menu derivation (especially logs integration), and PrimaryMenu/SecondaryMenu interaction
  • Authentication routing & pages: Review new page structures (AuthMethodsPage, ConfigurationPage, UsersPage), OAuth provider flows, and form state management
  • Logs refactor: Validate LogsDataGrid integration across AuditsPage/LogsPage/MCPLogsPage; ensure LOGS_PAGE_SIZE pagination consistency; check SeverityBadge usage and severity filtering
  • AppRoutes restructuring: Confirm all nested routes map to correct components; validate redirect logic and RequireAuth iframe-based path selection
  • Theme integration: Review VisualizerSkeleton and SchemaVisualizer dark/light mode handling; verify ThemeContext usage consistency
  • Import path migrations: Validate all schema, service, and hook imports resolve correctly (especially metadata, secrets, validation-schemas moves)

Possibly related PRs

  • PR #540: Overlapping authentication subsystem changes (auth pages, hooks, services, shared auth schemas, backend routes)
  • PR #510: OAuth refactor with OAuthProvidersSchema and OAuth config changes, directly aligned with new AuthMethodsPage and ConfigurationPage
  • PR #531: Concurrent authentication routing changes and new auth pages/components in AppRoutes

Suggested reviewers

  • Leo-rq-yu
  • tonychang04

🐰 Menus composed with pride, pages redirected with glee,
Logs in a datagrid, styled so spree!
CloudLayout vanished, routes consolidated tight,
Architecture refactored—our frontend shines bright! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title is vague and generic, using non-descriptive language ('A Small PR') that does not convey meaningful information about the substantial changeset. Replace with a specific title that captures the main change, such as 'Refactor sidebar and layout system with new PrimaryMenu/SecondaryMenu components' or 'Consolidate auth pages and introduce generic DataGrid for logs'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat-new-sidebar

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

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.

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

LogsPage now 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 FunctionsPage and SecretsPage (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/MCP that 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 severity prop is typed as string, but SeverityType is available and provides better type safety. Consider using SeverityType directly 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 the isIframe() 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 useMatch with end: false, which performs prefix matching. This could cause unintended active states if routes share prefixes. For example, /dashboard/logs would match both /dashboard/log and /dashboard/logs.

If secondary menu items are expected to be exact matches or have distinct path prefixes, consider using end: true or 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 in createLogsColumns.

LogsColumnDef exposes a sortable flag, but createLogsColumns currently hardcodes sortable: 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

📥 Commits

Reviewing files that changed from the base of the PR and between b05c43d and 49f53c0.

📒 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.tsx
  • frontend/src/components/layout/SecondaryMenu.tsx
  • frontend/src/features/logs/helpers.ts
  • frontend/src/features/visualizer/components/AuthNode.tsx
  • frontend/src/features/logs/hooks/useLogs.ts
  • frontend/src/features/functions/components/SecretRow.tsx
  • frontend/src/features/functions/page/SecretsPage.tsx
  • frontend/src/lib/routing/RequireAuth.tsx
  • frontend/src/features/logs/page/MCPLogsPage.tsx
  • frontend/src/features/onboard/components/mcp/McpInstallation.tsx
  • frontend/src/features/auth/page/AuthMethodsPage.tsx
  • frontend/src/features/logs/hooks/useMcpUsage.ts
  • frontend/src/components/layout/PrimaryMenu.tsx
  • frontend/src/features/storage/page/StoragePage.tsx
  • frontend/src/features/database/components/TableSidebar.tsx
  • frontend/src/features/auth/page/ConfigurationPage.tsx
  • frontend/src/features/functions/components/SecretsContent.tsx
  • frontend/src/components/layout/AppSidebar.tsx
  • frontend/src/features/logs/hooks/useLogSources.ts
  • frontend/src/components/datagrid/DataGrid.tsx
  • frontend/src/features/login/page/CloudLoginPage.tsx
  • frontend/src/features/dashboard/page/DashboardPage.tsx
  • frontend/src/features/functions/page/FunctionsPage.tsx
  • frontend/src/lib/utils/menuConfig.ts
  • frontend/src/features/database/helpers.ts
  • frontend/src/features/logs/components/LogsDataGrid.tsx
  • frontend/src/features/functions/hooks/useSecrets.ts
  • frontend/src/features/visualizer/components/TableNode.tsx
  • shared-schemas/src/cloud-events.schema.ts
  • frontend/src/features/visualizer/page/VisualizerPage.tsx
  • frontend/src/features/auth/page/UsersPage.tsx
  • frontend/src/features/logs/components/SeverityBadge.tsx
  • frontend/src/lib/utils/utils.ts
  • frontend/src/lib/routing/AppRoutes.tsx
  • frontend/src/features/logs/page/LogsPage.tsx
  • frontend/src/components/layout/Layout.tsx
  • frontend/src/features/visualizer/components/SchemaVisualizer.tsx
  • frontend/src/features/visualizer/components/VisualizerSkeleton.tsx
  • frontend/src/features/visualizer/components/BucketNode.tsx
  • frontend/src/features/logs/page/AuditsPage.tsx
  • frontend/src/features/database/page/TablesPage.tsx
  • frontend/src/lib/hooks/useToast.tsx
  • frontend/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.tsx
  • frontend/src/components/layout/SecondaryMenu.tsx
  • frontend/src/features/logs/helpers.ts
  • frontend/src/features/visualizer/components/AuthNode.tsx
  • frontend/src/features/logs/hooks/useLogs.ts
  • frontend/src/features/functions/components/SecretRow.tsx
  • frontend/src/features/functions/page/SecretsPage.tsx
  • frontend/src/lib/routing/RequireAuth.tsx
  • frontend/src/features/logs/page/MCPLogsPage.tsx
  • frontend/src/features/onboard/components/mcp/McpInstallation.tsx
  • frontend/src/features/auth/page/AuthMethodsPage.tsx
  • frontend/src/features/logs/hooks/useMcpUsage.ts
  • frontend/src/components/layout/PrimaryMenu.tsx
  • frontend/src/features/storage/page/StoragePage.tsx
  • frontend/src/features/database/components/TableSidebar.tsx
  • frontend/src/features/auth/page/ConfigurationPage.tsx
  • frontend/src/features/functions/components/SecretsContent.tsx
  • frontend/src/components/layout/AppSidebar.tsx
  • frontend/src/features/logs/hooks/useLogSources.ts
  • frontend/src/components/datagrid/DataGrid.tsx
  • frontend/src/features/login/page/CloudLoginPage.tsx
  • frontend/src/features/dashboard/page/DashboardPage.tsx
  • frontend/src/features/functions/page/FunctionsPage.tsx
  • frontend/src/lib/utils/menuConfig.ts
  • frontend/src/features/database/helpers.ts
  • frontend/src/features/logs/components/LogsDataGrid.tsx
  • frontend/src/features/functions/hooks/useSecrets.ts
  • frontend/src/features/visualizer/components/TableNode.tsx
  • frontend/src/features/visualizer/page/VisualizerPage.tsx
  • frontend/src/features/auth/page/UsersPage.tsx
  • frontend/src/features/logs/components/SeverityBadge.tsx
  • frontend/src/lib/utils/utils.ts
  • frontend/src/lib/routing/AppRoutes.tsx
  • frontend/src/features/logs/page/LogsPage.tsx
  • frontend/src/components/layout/Layout.tsx
  • frontend/src/features/visualizer/components/SchemaVisualizer.tsx
  • frontend/src/features/visualizer/components/VisualizerSkeleton.tsx
  • frontend/src/features/visualizer/components/BucketNode.tsx
  • frontend/src/features/logs/page/AuditsPage.tsx
  • frontend/src/features/database/page/TablesPage.tsx
  • frontend/src/lib/hooks/useToast.tsx
  • frontend/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.tsx
  • frontend/src/components/layout/SecondaryMenu.tsx
  • frontend/src/features/visualizer/components/AuthNode.tsx
  • frontend/src/features/functions/components/SecretRow.tsx
  • frontend/src/features/functions/page/SecretsPage.tsx
  • frontend/src/lib/routing/RequireAuth.tsx
  • frontend/src/features/logs/page/MCPLogsPage.tsx
  • frontend/src/features/onboard/components/mcp/McpInstallation.tsx
  • frontend/src/features/auth/page/AuthMethodsPage.tsx
  • frontend/src/components/layout/PrimaryMenu.tsx
  • frontend/src/features/storage/page/StoragePage.tsx
  • frontend/src/features/database/components/TableSidebar.tsx
  • frontend/src/features/auth/page/ConfigurationPage.tsx
  • frontend/src/features/functions/components/SecretsContent.tsx
  • frontend/src/components/layout/AppSidebar.tsx
  • frontend/src/components/datagrid/DataGrid.tsx
  • frontend/src/features/login/page/CloudLoginPage.tsx
  • frontend/src/features/dashboard/page/DashboardPage.tsx
  • frontend/src/features/functions/page/FunctionsPage.tsx
  • frontend/src/features/logs/components/LogsDataGrid.tsx
  • frontend/src/features/visualizer/components/TableNode.tsx
  • frontend/src/features/visualizer/page/VisualizerPage.tsx
  • frontend/src/features/auth/page/UsersPage.tsx
  • frontend/src/features/logs/components/SeverityBadge.tsx
  • frontend/src/lib/routing/AppRoutes.tsx
  • frontend/src/features/logs/page/LogsPage.tsx
  • frontend/src/components/layout/Layout.tsx
  • frontend/src/features/visualizer/components/SchemaVisualizer.tsx
  • frontend/src/features/visualizer/components/VisualizerSkeleton.tsx
  • frontend/src/features/visualizer/components/BucketNode.tsx
  • frontend/src/features/logs/page/AuditsPage.tsx
  • frontend/src/features/database/page/TablesPage.tsx
  • frontend/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.tsx
  • frontend/src/components/layout/SecondaryMenu.tsx
  • frontend/src/features/logs/helpers.ts
  • frontend/src/features/visualizer/components/AuthNode.tsx
  • frontend/src/features/logs/hooks/useLogs.ts
  • frontend/src/features/functions/components/SecretRow.tsx
  • frontend/src/features/functions/page/SecretsPage.tsx
  • frontend/src/lib/routing/RequireAuth.tsx
  • frontend/src/features/logs/page/MCPLogsPage.tsx
  • frontend/src/features/onboard/components/mcp/McpInstallation.tsx
  • frontend/src/features/auth/page/AuthMethodsPage.tsx
  • frontend/src/features/logs/hooks/useMcpUsage.ts
  • frontend/src/components/layout/PrimaryMenu.tsx
  • frontend/src/features/storage/page/StoragePage.tsx
  • frontend/src/features/database/components/TableSidebar.tsx
  • frontend/src/features/auth/page/ConfigurationPage.tsx
  • frontend/src/features/functions/components/SecretsContent.tsx
  • frontend/src/components/layout/AppSidebar.tsx
  • frontend/src/features/logs/hooks/useLogSources.ts
  • frontend/src/components/datagrid/DataGrid.tsx
  • frontend/src/features/login/page/CloudLoginPage.tsx
  • frontend/src/features/dashboard/page/DashboardPage.tsx
  • frontend/src/features/functions/page/FunctionsPage.tsx
  • frontend/src/lib/utils/menuConfig.ts
  • frontend/src/features/database/helpers.ts
  • frontend/src/features/logs/components/LogsDataGrid.tsx
  • frontend/src/features/functions/hooks/useSecrets.ts
  • frontend/src/features/visualizer/components/TableNode.tsx
  • frontend/src/features/visualizer/page/VisualizerPage.tsx
  • frontend/src/features/auth/page/UsersPage.tsx
  • frontend/src/features/logs/components/SeverityBadge.tsx
  • frontend/src/lib/utils/utils.ts
  • frontend/src/lib/routing/AppRoutes.tsx
  • frontend/src/features/logs/page/LogsPage.tsx
  • frontend/src/components/layout/Layout.tsx
  • frontend/src/features/visualizer/components/SchemaVisualizer.tsx
  • frontend/src/features/visualizer/components/VisualizerSkeleton.tsx
  • frontend/src/features/visualizer/components/BucketNode.tsx
  • frontend/src/features/logs/page/AuditsPage.tsx
  • frontend/src/features/database/page/TablesPage.tsx
  • frontend/src/lib/hooks/useToast.tsx
  • frontend/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.tsx
  • frontend/src/components/layout/SecondaryMenu.tsx
  • frontend/src/features/logs/helpers.ts
  • frontend/src/features/visualizer/components/AuthNode.tsx
  • frontend/src/features/logs/hooks/useLogs.ts
  • frontend/src/features/functions/components/SecretRow.tsx
  • frontend/src/features/functions/page/SecretsPage.tsx
  • frontend/src/lib/routing/RequireAuth.tsx
  • frontend/src/features/logs/page/MCPLogsPage.tsx
  • frontend/src/features/onboard/components/mcp/McpInstallation.tsx
  • frontend/src/features/auth/page/AuthMethodsPage.tsx
  • frontend/src/features/logs/hooks/useMcpUsage.ts
  • frontend/src/components/layout/PrimaryMenu.tsx
  • frontend/src/features/storage/page/StoragePage.tsx
  • frontend/src/features/database/components/TableSidebar.tsx
  • frontend/src/features/auth/page/ConfigurationPage.tsx
  • frontend/src/features/functions/components/SecretsContent.tsx
  • frontend/src/components/layout/AppSidebar.tsx
  • frontend/src/features/logs/hooks/useLogSources.ts
  • frontend/src/components/datagrid/DataGrid.tsx
  • frontend/src/features/login/page/CloudLoginPage.tsx
  • frontend/src/features/dashboard/page/DashboardPage.tsx
  • frontend/src/features/functions/page/FunctionsPage.tsx
  • frontend/src/lib/utils/menuConfig.ts
  • frontend/src/features/database/helpers.ts
  • frontend/src/features/logs/components/LogsDataGrid.tsx
  • frontend/src/features/functions/hooks/useSecrets.ts
  • frontend/src/features/visualizer/components/TableNode.tsx
  • shared-schemas/src/cloud-events.schema.ts
  • frontend/src/features/visualizer/page/VisualizerPage.tsx
  • frontend/src/features/auth/page/UsersPage.tsx
  • frontend/src/features/logs/components/SeverityBadge.tsx
  • frontend/src/lib/utils/utils.ts
  • frontend/src/lib/routing/AppRoutes.tsx
  • frontend/src/features/logs/page/LogsPage.tsx
  • frontend/src/components/layout/Layout.tsx
  • frontend/src/features/visualizer/components/SchemaVisualizer.tsx
  • frontend/src/features/visualizer/components/VisualizerSkeleton.tsx
  • frontend/src/features/visualizer/components/BucketNode.tsx
  • frontend/src/features/logs/page/AuditsPage.tsx
  • frontend/src/features/database/page/TablesPage.tsx
  • frontend/src/lib/hooks/useToast.tsx
  • frontend/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.tsx
  • frontend/src/components/layout/SecondaryMenu.tsx
  • frontend/src/features/visualizer/components/AuthNode.tsx
  • frontend/src/features/functions/components/SecretRow.tsx
  • frontend/src/features/functions/page/SecretsPage.tsx
  • frontend/src/lib/routing/RequireAuth.tsx
  • frontend/src/features/logs/page/MCPLogsPage.tsx
  • frontend/src/features/onboard/components/mcp/McpInstallation.tsx
  • frontend/src/features/auth/page/AuthMethodsPage.tsx
  • frontend/src/components/layout/PrimaryMenu.tsx
  • frontend/src/features/storage/page/StoragePage.tsx
  • frontend/src/features/database/components/TableSidebar.tsx
  • frontend/src/features/auth/page/ConfigurationPage.tsx
  • frontend/src/features/functions/components/SecretsContent.tsx
  • frontend/src/components/layout/AppSidebar.tsx
  • frontend/src/components/datagrid/DataGrid.tsx
  • frontend/src/features/login/page/CloudLoginPage.tsx
  • frontend/src/features/dashboard/page/DashboardPage.tsx
  • frontend/src/features/functions/page/FunctionsPage.tsx
  • frontend/src/features/logs/components/LogsDataGrid.tsx
  • frontend/src/features/visualizer/components/TableNode.tsx
  • frontend/src/features/visualizer/page/VisualizerPage.tsx
  • frontend/src/features/auth/page/UsersPage.tsx
  • frontend/src/features/logs/components/SeverityBadge.tsx
  • frontend/src/lib/routing/AppRoutes.tsx
  • frontend/src/features/logs/page/LogsPage.tsx
  • frontend/src/components/layout/Layout.tsx
  • frontend/src/features/visualizer/components/SchemaVisualizer.tsx
  • frontend/src/features/visualizer/components/VisualizerSkeleton.tsx
  • frontend/src/features/visualizer/components/BucketNode.tsx
  • frontend/src/features/logs/page/AuditsPage.tsx
  • frontend/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.ts
  • frontend/src/features/logs/hooks/useLogs.ts
  • frontend/src/features/logs/hooks/useMcpUsage.ts
  • frontend/src/features/logs/hooks/useLogSources.ts
  • frontend/src/lib/utils/menuConfig.ts
  • frontend/src/features/database/helpers.ts
  • frontend/src/features/functions/hooks/useSecrets.ts
  • shared-schemas/src/cloud-events.schema.ts
  • frontend/src/lib/utils/utils.ts
  • frontend/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.ts
  • frontend/src/features/logs/hooks/useMcpUsage.ts
  • frontend/src/features/logs/hooks/useLogSources.ts
  • frontend/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.tsx
  • frontend/src/features/auth/page/ConfigurationPage.tsx
  • frontend/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.tsx
  • frontend/src/features/database/helpers.ts
  • frontend/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.ts
  • frontend/src/features/logs/hooks/useLogSources.ts
  • frontend/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.tsx
  • frontend/src/features/logs/page/AuditsPage.tsx
  • frontend/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.tsx
  • frontend/src/features/logs/hooks/useMcpUsage.ts
  • frontend/src/features/functions/components/SecretsContent.tsx
  • frontend/src/features/functions/hooks/useSecrets.ts
  • frontend/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.tsx
  • frontend/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.tsx
  • frontend/src/features/functions/page/FunctionsPage.tsx
  • frontend/src/components/layout/Layout.tsx
  • frontend/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.tsx
  • frontend/src/features/functions/page/FunctionsPage.tsx
  • frontend/src/components/layout/Layout.tsx
  • frontend/src/features/logs/page/AuditsPage.tsx
  • frontend/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.tsx
  • frontend/src/features/database/helpers.ts
  • frontend/src/features/functions/hooks/useSecrets.ts
  • frontend/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.tsx
  • frontend/src/features/visualizer/page/VisualizerPage.tsx
  • frontend/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.tsx
  • frontend/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 of insforge.dev. While this approach is pragmatic, ensure your team has full control over DNS for the insforge.dev domain 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 void prefix for the async navigate() call
  • Employs replace: true to prevent back-button navigation issues
  • Targets /dashboard, which aligns with the unified Cloud/Local layout approach described in the PR summary

The 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 and neutral-* 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 useApiKey under @/lib/hooks/useMetadata is 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 no isIframe usage 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 useTheme import enables dynamic theming for the visualizer component.


186-187: LGTM! Theme resolution extracted for styling.

The resolvedTheme value 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 resolvedTheme is correctly included in the useMemo dependency array since edge styling depends on the theme.


323-323: LGTM! ReactFlow color mode synchronized with theme.

The colorMode prop is correctly set based on resolvedTheme, 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 Secret type 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 useSecrets hook 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_SIZE from 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_SIZE constant:

  • Total pages: Math.ceil(length / pageSize)
  • Start index: (page - 1) * pageSize
  • End index: startIndex + pageSize
frontend/src/components/datagrid/DataGrid.tsx (2)

205-205: LGTM! Dark mode border improvement.

The change from dark:border-0 to dark:border-neutral-700 provides a visible border in dark mode, improving visual hierarchy and component separation.


190-190: No action required—token is properly defined via Tailwind v4 @theme directive.

The custom bg-bg-gray token is correctly defined in frontend/src/index.css (line 221) using Tailwind CSS v4's @theme block, 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_SIZE improves 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) to top-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 cn utility 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 formatTime function 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.informational when 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 DatabasePageContent to TablesPage with direct export improves clarity.


443-458: Verify the removal of the isIframe check 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 useMcpUsage and memoizes column definitions. The formatTime utility 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 const assertions 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 well

Thanks for centralizing the unauthenticated redirect—splitting between /cloud/login and /dashboard/login via the iframe check matches the new layout strategy.

frontend/src/features/visualizer/page/VisualizerPage.tsx (1)

68-132: Visualizer loading/error flow looks solid

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

The light/dark backdrop split keeps the skeleton aligned with the main page visuals—nice touch.

@tonychang04

Copy link
Copy Markdown
Member

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

@Fermionic-Lyu
Fermionic-Lyu merged commit 5fcf885 into main Nov 7, 2025
@Fermionic-Lyu
Fermionic-Lyu deleted the feat-new-sidebar branch November 7, 2025 05:00

@coderabbitai coderabbitai Bot left a comment

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.

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"), not cols-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 redundant type="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

📥 Commits

Reviewing files that changed from the base of the PR and between 49f53c0 and 8743755.

📒 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.tsx
  • frontend/src/features/functions/page/FunctionsPage.tsx
  • frontend/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.tsx
  • frontend/src/features/functions/page/FunctionsPage.tsx
  • frontend/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.tsx
  • frontend/src/features/functions/page/FunctionsPage.tsx
  • frontend/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.tsx
  • frontend/src/features/functions/page/FunctionsPage.tsx
  • frontend/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.tsx
  • frontend/src/features/functions/page/FunctionsPage.tsx
  • frontend/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.tsx
  • frontend/src/features/functions/page/FunctionsPage.tsx
  • frontend/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 SeverityType to optimize the bundle.


3-5: LGTM!

Props interface is properly typed and follows naming conventions.


7-8: LGTM!

The fallback to informational is good defensive programming, even though the SeverityType constraint should guarantee a valid key.

Comment on lines +52 to +85
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>
)}

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

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.

Comment on lines +66 to +83
{[...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 />

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

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.

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

Comment on lines +10 to +17
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>
);

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

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.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants