From 0751fe2bf4dd82d4bc01dca9c1aaf4366a4f91a2 Mon Sep 17 00:00:00 2001 From: Gildas Garcia <1122076+djhi@users.noreply.github.com> Date: Wed, 13 May 2026 09:14:42 +0200 Subject: [PATCH] fix: logs explorer field references doesn't show all sources (#45828) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Problem The field reference side panel doesn't show all sources: there are actually 11 items and users can't see them nor select them. ## Solution Use a combobox instead ## Screenshots Before: image After: image image ## Summary by CodeRabbit * **New Features** * Schema selector in the Logs Query Panel is now a searchable popover and shows the selected source in the button (or prompts “Select source...”). * Field table now displays fields for the chosen schema only. * **Refactor** * UI simplified for faster schema selection and clearer field reference browsing. [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/45828) --- .../Settings/Logs/LogsQueryPanel.tsx | 106 ++++++++++++------ 1 file changed, 72 insertions(+), 34 deletions(-) diff --git a/apps/studio/components/interfaces/Settings/Logs/LogsQueryPanel.tsx b/apps/studio/components/interfaces/Settings/Logs/LogsQueryPanel.tsx index 7471471e430..b1d57775ac1 100644 --- a/apps/studio/components/interfaces/Settings/Logs/LogsQueryPanel.tsx +++ b/apps/studio/components/interfaces/Settings/Logs/LogsQueryPanel.tsx @@ -1,18 +1,27 @@ import { IS_PLATFORM } from 'common' -import { BookOpen, Check, ChevronDown, Copy, ExternalLink, X } from 'lucide-react' +import { BookOpen, Check, ChevronDown, ChevronsUpDown, Copy, ExternalLink, X } from 'lucide-react' import Link from 'next/link' import { ReactNode, useEffect, useState } from 'react' import { logConstants } from 'shared-data' import { Badge, Button, + cn, + Command_Shadcn_, + CommandEmpty_Shadcn_, + CommandGroup_Shadcn_, + CommandInput_Shadcn_, + CommandItem_Shadcn_, + CommandList_Shadcn_, copyToClipboard, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, + Popover_Shadcn_, + PopoverContent_Shadcn_, + PopoverTrigger_Shadcn_, SidePanel, - Tabs, Tooltip, TooltipContent, TooltipTrigger, @@ -80,6 +89,9 @@ const LogsQueryPanel = ({ setSelectedDatePickerValue(value) }, [value.from, value.to, value.text, value.isHelper]) + const [open, setOpen] = useState(false) + const [selectedSchema, setSelectedSchema] = useState(logConstants.schemas[0]) + return (
@@ -220,38 +232,64 @@ const LogsQueryPanel = ({
- - {logConstants.schemas.map((schema) => ( - - - Path - , - - Type - , - ]} - body={schema.fields - .sort((a: any, b: any) => a.path - b.path) - .map((field) => ( - - ))} - /> - - ))} - + +
+ + + + + + + + + No source found. + + {logConstants.schemas.map((schema) => ( + { + setSelectedSchema(schema) + setOpen(false) + }} + > + + {schema.name} + + ))} + + + + + +
+ Path + , + + Type + , + ]} + body={selectedSchema.fields.map((field) => ( + + ))} + /> +