@@ -29,7 +29,6 @@ type PanelMode = 'form' | 'json';
2929
3030interface CustomServerPanelProps {
3131 spaceId : string ;
32- spaceName : string ;
3332 onClose : ( ) => void ;
3433 onSaved : ( ) => void ;
3534}
@@ -435,7 +434,7 @@ function CustomServerFormBody({
435434 tone = "purple"
436435 title = { t ( 'customServerPanel.form.optionalSection' ) }
437436 subtitle = { t ( 'customServerPanel.form.optionalSectionDesc' ) }
438- defaultOpen = { false }
437+ defaultOpen
439438 testId = "custom-server-optional-section"
440439 >
441440 < div className = "space-y-4" >
@@ -621,7 +620,7 @@ function collectFormValidationErrors(
621620/**
622621 * Slide-in panel for adding a custom server via guided form or JSON editor.
623622 */
624- export function CustomServerPanel ( { spaceId, spaceName , onClose, onSaved } : CustomServerPanelProps ) {
623+ export function CustomServerPanel ( { spaceId, onClose, onSaved } : CustomServerPanelProps ) {
625624 const { t } = useTranslation ( 'servers' ) ;
626625 const { success, error : showError } = useToast ( ) ;
627626
@@ -820,36 +819,31 @@ export function CustomServerPanel({ spaceId, spaceName, onClose, onSaved }: Cust
820819 data-testid = "custom-server-panel"
821820 >
822821 < div className = "flex-shrink-0 p-4 border-b border-[rgb(var(--border))] bg-[rgb(var(--surface-elevated))]" >
823- < div className = "flex items-start justify-between gap-2" >
824- < div className = "flex items-start gap-3 flex-1 min-w-0" >
822+ < div className = "flex items-center justify-between gap-2" >
823+ < div className = "flex items-center gap-3 flex-1 min-w-0" >
825824 < div className = "w-11 h-11 flex-shrink-0 flex items-center justify-center bg-[rgb(var(--background))] rounded-lg border border-[rgb(var(--border-subtle))]" >
826825 < Plus className = "h-5 w-5 text-[rgb(var(--primary))]" />
827826 </ div >
828- < div className = "min-w-0" >
829- < h2 className = "text-lg font-bold text-[rgb(var(--foreground))]" >
830- { t ( 'customServerPanel.title' ) }
831- </ h2 >
832- < p className = "text-xs text-[rgb(var(--muted))] mt-0.5" >
833- { t ( 'customServerPanel.subtitle' , { spaceName } ) }
834- </ p >
835- </ div >
827+ < h2 className = "text-lg font-bold text-[rgb(var(--foreground))] truncate" >
828+ { t ( 'customServerPanel.title' ) }
829+ </ h2 >
830+ </ div >
831+ < div className = "flex items-center gap-2 flex-shrink-0" >
832+ < ModeToggle
833+ mode = { mode }
834+ onChange = { setMode }
835+ formLabel = { t ( 'customServerPanel.modeForm' ) }
836+ jsonLabel = { t ( 'customServerPanel.modeJson' ) }
837+ />
838+ < button
839+ type = "button"
840+ onClick = { onClose }
841+ className = "p-1.5 rounded-lg hover:bg-[rgb(var(--surface-hover))] transition-colors"
842+ aria-label = { t ( 'customServerPanel.closeAria' ) }
843+ >
844+ < X className = "h-5 w-5" />
845+ </ button >
836846 </ div >
837- < button
838- type = "button"
839- onClick = { onClose }
840- className = "p-1.5 rounded-lg hover:bg-[rgb(var(--surface-hover))] transition-colors flex-shrink-0"
841- aria-label = { t ( 'customServerPanel.closeAria' ) }
842- >
843- < X className = "h-5 w-5" />
844- </ button >
845- </ div >
846- < div className = "mt-4" >
847- < ModeToggle
848- mode = { mode }
849- onChange = { setMode }
850- formLabel = { t ( 'customServerPanel.modeForm' ) }
851- jsonLabel = { t ( 'customServerPanel.modeJson' ) }
852- />
853847 </ div >
854848 </ div >
855849
0 commit comments