Wraps arrays in COALESCE with empty arrays before unnesting in SQL queries to prevent errors when arrays are null. This improves query robustness for edge service and function service flow queries.
* Update QueryOptions.ts
* Create UnifiedLogs_InspectionPanel_Architecture.md
* init new queries
* Create UnifiedLogs_ServiceFlow_Implementation_Plan.md
* Add service flow blocks to UnifiedLogs panel
Introduces ServiceFlowBlocks components to visually represent the service flow in UnifiedLogs, including Origin, Network, PostgREST, Postgres, and Response steps. Adds utility formatters and updates ServiceFlowPanel to render the new blocks with enriched data and loading/error states.
* Enable filterable fields in ServiceFlow blocks
Refactored ServiceFlow blocks to support filterable fields by passing filterFields and table props, updating BlockField to render filterable values as clickable actions, and aligning field configs with filterable IDs. Updated ServiceFlowPanel to use new block names and pass required props. This enhances interactivity and consistency in the UnifiedLogs service flow UI.
* Update ServiceFlowBlocks.tsx
* Enhance Service Flow with enriched fields and filtering
Expanded the Service Flow SQL query to extract 35+ flattened, meaningful fields including request, response, client location, network, headers, and JWT data. Updated the implementation plan to reflect new block architecture, filtering integration, and future enhancements. Added debug logging for enriched and raw log data in ServiceFlowPanel.
* Start adding inspection panel
* Moar logs
* Add Postgres service flow support to Unified Logs
Introduces Postgres as a first-class service flow type in Unified Logs, including SQL query, type definitions, UI blocks, and filtering. Updates ServiceFlow queries, types, and UI components to display enriched Postgres log details and event messages. Also refines filter fields, log type ordering, and minor UI adjustments for clarity and consistency.
* Lots of tidying up, moving blocks into their own files.
* Remove UnifiedLogs architecture and service flow docs
Deleted documentation files related to UnifiedLogs inspection panel architecture, service flow field mapping, implementation plan, and integration example. This cleans up outdated or redundant design and implementation reference materials.
* Refactor service flow blocks to use unified config system
Replaces individual service block components with a generic, config-driven system. Introduces a shared Block component and centralizes block configuration in blockConfigs.ts, reducing duplication and improving maintainability. Updates imports and removes now-unnecessary block files. Also refactors ServiceFlowPanel to use the new block structure and simplifies layer icon logic.
* Refactor ServiceFlow blocks and utilities structure
Consolidates edge service flow SQL queries to reduce duplication, removes ServiceFlowBlocks.tsx in favor of more modular block/component structure, and moves storage-specific utilities to a new utils/storageUtils.ts file. Updates imports in config files and ServiceFlowPanel to reflect the new structure. Type definitions are clarified and extended in types.ts.
* Update ServiceFlow.sql.ts
* Refactor ServiceFlow types for stronger type safety
Replaces generic 'any' types with specific types such as ColumnSchema, QuerySearchParamsType, and SearchParamsType in ServiceFlow components and ServiceFlowPanel. This improves type safety and code clarity, and removes unused metadata and workaround variables from ServiceFlowPanel.
* Remove debug flags and console logs from ServiceFlow components
Eliminated unused DEBUG_SERVICE_FLOW flags and related console logging from ServiceFlow.sql.ts and ServiceFlowPanel.tsx to clean up the codebase and reduce unnecessary output.
* Remove unused log query and filtering functions
Deleted unused functions related to log level filtering, base condition building, and the edge/supavisor logs queries. This cleanup simplifies the UnifiedLogs.queries.ts file by removing legacy or currently unused code.
* revert
* Remove ServiceFlow panel and types, update DataTableToolbar
Deleted the ServiceFlowPanel component and its associated types from the UnifiedLogs interface. Updated DataTableToolbar to toggle between PanelLeftClose and PanelLeftOpen icons based on the open state.
* Remove unused totalRows prop from DataTable
Eliminates the totalRows prop from UnifiedLogs and its context interface, as it is no longer used. This helps clean up the component API and related type definitions.
* Refactor log field configs and unify event message component
Replaces specialized PostgresEventMessage with a generic EventMessage component and updates references accordingly. Consolidates all log field configuration files into serviceFlowFields.ts, removing separate config files for each service. Cleans up unused types and utility imports, and deletes redundant formatters.
* Enhance UnifiedLogs filters and facets handling
Added PATCH to allowed HTTP methods and improved status code rendering in filters. Changed Host, Pathname, and Auth User filters to use dynamic checkbox options populated from facets. Updated SQL queries to provide global facets for hardcoded fields and filtered facets for dynamic fields, and fixed field naming for path/pathname consistency. Improved UI to show an empty state when no filter options are available.
* Fix method options mapping and add debug logs
Corrects the mapping variable name in UnifiedLogs.fields.tsx from 'region' to 'method' for clarity. Adds debug console logs in unified-logs-count-query.ts to inspect count query responses and help diagnose missing data.
* Show empty state for Postgres block with no data
Added logic to display an empty state in the Postgres block when no Postgres data is available in non-Postgres logs. Also updated ServiceFlowPanel to render both PostgREST and Postgres blocks, ensuring the empty state is shown when appropriate.
* Remove Log Details tab from ServiceFlowPanel
The Log Details tab and its associated content have been removed from the ServiceFlowPanel component. This simplifies the UI by focusing on the Overview and Raw JSON tabs.
* Enhance UnifiedLogs filters with status code labels and facet logic
Added human-readable labels for HTTP and Postgres status codes and improved the UnifiedLogs filter UI to display these labels. Refactored the logs count query to avoid self-filtering for facet counts, ensuring accurate facet behavior. Improved filter option rendering for better usability and consistency, and updated input styling for filter search.
* Update UnifiedLogs.queries.ts
* Update UnifiedLogs.queries.ts
* Update apps/studio/components/interfaces/UnifiedLogs/ServiceFlow/components/shared/BlockField.tsx
* Refactor UnifiedLogs layout and improve service type formatting
Refactored UnifiedLogs.tsx to use a more flexible ResizablePanelGroup layout, replaced inline function logs panel with a new LogsListPanel component, and removed unused imports and code. Updated ServiceFlow.sql.ts to simplify JWT payload extraction and added a dedicated query for edge function service flow. Added a utility to format service type strings for display in UnifiedLogs.utils.ts.
* Refactor logs UI and improve service flow handling
Renamed FunctionLogsTab to LogsList and added a new LogsListPanel for displaying function logs in a side panel. Improved ServiceFlowPanel with better panel sizing, conditional query enabling, and UI adjustments. Enhanced EventMessage with badge styling and service type formatting. Updated CollapsibleSection for cleaner layout. Enabled debug mode in unified-log-inspection-query. Updated FilterSideBar to use ResizablePanel for improved layout flexibility.
* Refactor UnifiedLogs UI and ServiceFlow query fields
Removes unused skeletonClassName from BlockFieldConfig and related UI, simplifies ServiceFlow SQL query by returning null for unused JWT fields, and updates UnifiedLogs and LogsListPanel for improved layout and collapsible logs panel. Also adjusts table and log list row heights for better visual consistency.
* Update ServiceFlowHeader.tsx
* Update ServiceFlowHeader.tsx
* Refactor ServiceFlowPanel and header tooltip logic
Replaces custom tooltip implementation in ServiceFlowHeader with ButtonTooltip for navigation buttons. Simplifies serviceFlowType logic in ServiceFlowPanel by removing the getServiceFlowType helper and using direct mapping, reducing code complexity.
* Update UnifiedLogs.constants.tsx
* Remove commented code and add doc comment in UnifiedLogs
Removed an unused commented-out span in UnifiedLogs.fields.tsx and added a documentation comment for the Supabase storage logs query fragment in UnifiedLogs.queries.ts.
* Update UnifiedLogs.tsx
* Remove 'live' level from DataTable components
Eliminated the 'live' level from LEVELS constant and related color utility logic. Also removed commented code and references to 'live' in DataTableFilterControls and LiveRow, streamlining the DataTable component's status handling.
* Update UnifiedLogs.constants.tsx
* cleanup
* remove console logs
* Update status filter parsing to use string arrays
Changed the status filter in UnifiedLogs to parse and validate as arrays of strings instead of numbers. This affects both the search params parser and the column filter schema, aligning the status filter handling with other string-based filters.
---------
Co-authored-by: Alaister Young <a@alaisteryoung.com>
* Update QueryOptions.ts
* Create UnifiedLogs_InspectionPanel_Architecture.md
* init new queries
* Create UnifiedLogs_ServiceFlow_Implementation_Plan.md
* Add service flow blocks to UnifiedLogs panel
Introduces ServiceFlowBlocks components to visually represent the service flow in UnifiedLogs, including Origin, Network, PostgREST, Postgres, and Response steps. Adds utility formatters and updates ServiceFlowPanel to render the new blocks with enriched data and loading/error states.
* Enable filterable fields in ServiceFlow blocks
Refactored ServiceFlow blocks to support filterable fields by passing filterFields and table props, updating BlockField to render filterable values as clickable actions, and aligning field configs with filterable IDs. Updated ServiceFlowPanel to use new block names and pass required props. This enhances interactivity and consistency in the UnifiedLogs service flow UI.
* Update ServiceFlowBlocks.tsx
* Enhance Service Flow with enriched fields and filtering
Expanded the Service Flow SQL query to extract 35+ flattened, meaningful fields including request, response, client location, network, headers, and JWT data. Updated the implementation plan to reflect new block architecture, filtering integration, and future enhancements. Added debug logging for enriched and raw log data in ServiceFlowPanel.
* Start adding inspection panel
* Moar logs
* Add Postgres service flow support to Unified Logs
Introduces Postgres as a first-class service flow type in Unified Logs, including SQL query, type definitions, UI blocks, and filtering. Updates ServiceFlow queries, types, and UI components to display enriched Postgres log details and event messages. Also refines filter fields, log type ordering, and minor UI adjustments for clarity and consistency.
* Lots of tidying up, moving blocks into their own files.
* Remove UnifiedLogs architecture and service flow docs
Deleted documentation files related to UnifiedLogs inspection panel architecture, service flow field mapping, implementation plan, and integration example. This cleans up outdated or redundant design and implementation reference materials.
* Refactor service flow blocks to use unified config system
Replaces individual service block components with a generic, config-driven system. Introduces a shared Block component and centralizes block configuration in blockConfigs.ts, reducing duplication and improving maintainability. Updates imports and removes now-unnecessary block files. Also refactors ServiceFlowPanel to use the new block structure and simplifies layer icon logic.
* Refactor ServiceFlow blocks and utilities structure
Consolidates edge service flow SQL queries to reduce duplication, removes ServiceFlowBlocks.tsx in favor of more modular block/component structure, and moves storage-specific utilities to a new utils/storageUtils.ts file. Updates imports in config files and ServiceFlowPanel to reflect the new structure. Type definitions are clarified and extended in types.ts.
* Update ServiceFlow.sql.ts
* Refactor ServiceFlow types for stronger type safety
Replaces generic 'any' types with specific types such as ColumnSchema, QuerySearchParamsType, and SearchParamsType in ServiceFlow components and ServiceFlowPanel. This improves type safety and code clarity, and removes unused metadata and workaround variables from ServiceFlowPanel.
* Remove debug flags and console logs from ServiceFlow components
Eliminated unused DEBUG_SERVICE_FLOW flags and related console logging from ServiceFlow.sql.ts and ServiceFlowPanel.tsx to clean up the codebase and reduce unnecessary output.
* Remove unused log query and filtering functions
Deleted unused functions related to log level filtering, base condition building, and the edge/supavisor logs queries. This cleanup simplifies the UnifiedLogs.queries.ts file by removing legacy or currently unused code.
* revert
* Remove ServiceFlow panel and types, update DataTableToolbar
Deleted the ServiceFlowPanel component and its associated types from the UnifiedLogs interface. Updated DataTableToolbar to toggle between PanelLeftClose and PanelLeftOpen icons based on the open state.
* Remove unused totalRows prop from DataTable
Eliminates the totalRows prop from UnifiedLogs and its context interface, as it is no longer used. This helps clean up the component API and related type definitions.
* Refactor log field configs and unify event message component
Replaces specialized PostgresEventMessage with a generic EventMessage component and updates references accordingly. Consolidates all log field configuration files into serviceFlowFields.ts, removing separate config files for each service. Cleans up unused types and utility imports, and deletes redundant formatters.
* Show empty state for Postgres block with no data
Added logic to display an empty state in the Postgres block when no Postgres data is available in non-Postgres logs. Also updated ServiceFlowPanel to render both PostgREST and Postgres blocks, ensuring the empty state is shown when appropriate.
* Remove Log Details tab from ServiceFlowPanel
The Log Details tab and its associated content have been removed from the ServiceFlowPanel component. This simplifies the UI by focusing on the Overview and Raw JSON tabs.
* Update UnifiedLogs.queries.ts
* Update UnifiedLogs.queries.ts
* Update apps/studio/components/interfaces/UnifiedLogs/ServiceFlow/components/shared/BlockField.tsx
* Refactor UnifiedLogs layout and improve service type formatting
Refactored UnifiedLogs.tsx to use a more flexible ResizablePanelGroup layout, replaced inline function logs panel with a new LogsListPanel component, and removed unused imports and code. Updated ServiceFlow.sql.ts to simplify JWT payload extraction and added a dedicated query for edge function service flow. Added a utility to format service type strings for display in UnifiedLogs.utils.ts.
* Refactor logs UI and improve service flow handling
Renamed FunctionLogsTab to LogsList and added a new LogsListPanel for displaying function logs in a side panel. Improved ServiceFlowPanel with better panel sizing, conditional query enabling, and UI adjustments. Enhanced EventMessage with badge styling and service type formatting. Updated CollapsibleSection for cleaner layout. Enabled debug mode in unified-log-inspection-query. Updated FilterSideBar to use ResizablePanel for improved layout flexibility.
* Refactor UnifiedLogs UI and ServiceFlow query fields
Removes unused skeletonClassName from BlockFieldConfig and related UI, simplifies ServiceFlow SQL query by returning null for unused JWT fields, and updates UnifiedLogs and LogsListPanel for improved layout and collapsible logs panel. Also adjusts table and log list row heights for better visual consistency.
* Update ServiceFlowHeader.tsx
* Update ServiceFlowHeader.tsx
* Refactor ServiceFlowPanel and header tooltip logic
Replaces custom tooltip implementation in ServiceFlowHeader with ButtonTooltip for navigation buttons. Simplifies serviceFlowType logic in ServiceFlowPanel by removing the getServiceFlowType helper and using direct mapping, reducing code complexity.
* Update UnifiedLogs.constants.tsx
* Remove commented code and add doc comment in UnifiedLogs
Removed an unused commented-out span in UnifiedLogs.fields.tsx and added a documentation comment for the Supabase storage logs query fragment in UnifiedLogs.queries.ts.
* Update UnifiedLogs.tsx
* Remove 'live' level from DataTable components
Eliminated the 'live' level from LEVELS constant and related color utility logic. Also removed commented code and references to 'live' in DataTableFilterControls and LiveRow, streamlining the DataTable component's status handling.
* Update UnifiedLogs.constants.tsx
* cleanup
---------
Co-authored-by: Alaister Young <a@alaisteryoung.com>
* realtime: Limit access to settings based on project
* fix linter
* Fix the realtime layout to work with two flags.
---------
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
* Validate the aiOptInLevel on the server
* Fix another issue when the project and mismatched org.
* Fix a type error.
---------
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
We've noticed some support-like requests being submitted through the feedback
form, so adding a note that that feedback form is not for technical
support.
* Add schema flag to the foreign-schema wrappers.
* Support the new mode in the create wrapper flow.
* Minor CSS tweaks.
* Re-add a missing line.
* Add source schema field.
* Make source and target schema part of the form state.
* Fix the edit mutation.
* Show a warninf for the feature if the wrappers extension is below 0.5.0.
* Bring the SchemaEditor side panel into 21st century and simplify it.
* Use the schema editor in the Create wrapper sheet to create a new schema.
* Minor fixes.
* Fix the badge border in WrapperRow.
* updated the auth email templates doc with .Email and .NewEmail template variables
* fixed a minor detail on the variable description text
* fixed a typo
* feat: improved jwt signing key rotation dialog
* small tweaks
* Minor CSS fixes.
* Minor CSS fixes for the initial dialog for JWT keys.
* Fix the error to be better. when revoking too fast.
---------
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>