From 442e40a30b032b67286f180ed894364be2913eba Mon Sep 17 00:00:00 2001 From: Danny White <3104761+dnywh@users.noreply.github.com> Date: Thu, 3 Sep 2026 10:09:44 +1000 Subject: [PATCH] refactor(studio): simplify pipeline advanced settings (#49841) ## What kind of change does this PR introduce? Small Studio UI refactor. ## What is the current behavior? BigQuery-only fields are already conditionally rendered, but repeat that scope in badges. Number inputs also convert non-empty invalid values directly with Number(). ## What is the new behavior? Removes the redundant badges, keeps number fields empty instead of storing NaN, and gives the invalidated-slot menu consistent viewport collision spacing. | Before | After | | --- | --- | | CleanShot 2026-09-02 at 14 40
02@2x | CleanShot 2026-09-02 at 14 40
22@2x | ## To test 1. Open the pipeline creation sheet and expand Advanced settings. 2. Confirm connection pool size and maximum staleness appear only for BigQuery, without BigQuery-only badges. 3. Clear and re-enter the numeric advanced settings. 4. Open Invalidated slot behavior near the viewport edge and confirm the menu remains visible. ## Summary by CodeRabbit * **Bug Fixes** * Improved handling of numeric input in advanced replication settings, including empty and invalid values. * Adjusted the invalidated slot menu positioning for better display. * **UI Improvements** * Simplified labels for connection pool size and maximum staleness settings. --- .../DestinationForm/AdvancedSettings.tsx | 22 +++++-------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/AdvancedSettings.tsx b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/AdvancedSettings.tsx index 877915b1e54..23b147e9699 100644 --- a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/AdvancedSettings.tsx +++ b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/AdvancedSettings.tsx @@ -5,7 +5,6 @@ import { AccordionContent, AccordionItem, AccordionTrigger, - Badge, FormControl, FormField, FormInputGroupInput, @@ -42,8 +41,8 @@ export const AdvancedSettings = ({ }) => { const handleNumberChange = (field: { onChange: (value?: number) => void }) => (e: ChangeEvent) => { - const val = e.target.value - field.onChange(val === '' ? undefined : Number(val)) + const parsed = e.target.valueAsNumber + field.onChange(e.target.value === '' || Number.isNaN(parsed) ? undefined : parsed) } return ( @@ -59,7 +58,6 @@ export const AdvancedSettings = ({ - {/* Batch wait time - applies to all destinations */} {INVALIDATED_SLOT_BEHAVIOR_LABELS[field.value ?? 'error']} - +

Block startup

@@ -188,12 +186,7 @@ export const AdvancedSettings = ({ name="connectionPoolSize" render={({ field }) => ( - Connection pool size - BigQuery only - - } + label="Connection pool size" layout="horizontal" description="Number of BigQuery connections used for destination writes." > @@ -222,12 +215,7 @@ export const AdvancedSettings = ({ name="maxStalenessMins" render={({ field }) => ( - Maximum staleness - BigQuery only - - } + label="Maximum staleness" layout="horizontal" description="Set the maximum age of query results while BigQuery applies ongoing changes, or leave blank for the freshest results." >