@@ -54,7 +54,47 @@ export function CreationControls(props: CreationControlsProps) {
5454
5555 return (
5656 < div className = "flex flex-col gap-2" >
57- { /* First row: Runtime, Branch, SSH */ }
57+ { /* First row: Workspace name with auto-generate checkbox */ }
58+ < div className = "flex items-center gap-2" data-component = "WorkspaceNameGroup" >
59+ < label htmlFor = "workspace-name" className = "text-muted text-xs whitespace-nowrap" >
60+ Name:
61+ </ label >
62+ < div className = "relative max-w-xs flex-1" >
63+ < input
64+ id = "workspace-name"
65+ type = "text"
66+ value = { props . workspaceName }
67+ onChange = { handleNameChange }
68+ placeholder = { props . isGeneratingName ? "Generating..." : "workspace-name" }
69+ disabled = { props . disabled || props . autoGenerateName }
70+ className = { cn (
71+ "bg-separator text-foreground border-border-medium focus:border-accent h-6 w-full rounded border px-2 pr-6 text-xs focus:outline-none disabled:opacity-50" ,
72+ props . nameError && "border-red-500"
73+ ) }
74+ />
75+ { /* Loading indicator when generating */ }
76+ { props . isGeneratingName && (
77+ < div className = "absolute top-1/2 right-1 -translate-y-1/2" >
78+ < Loader2 className = "text-muted h-3 w-3 animate-spin" />
79+ </ div >
80+ ) }
81+ </ div >
82+ { /* Auto-generate checkbox */ }
83+ < label className = "text-muted flex h-6 items-center gap-1 text-[10px] whitespace-nowrap" >
84+ < input
85+ type = "checkbox"
86+ checked = { props . autoGenerateName }
87+ onChange = { ( e ) => props . onAutoGenerateChange ( e . target . checked ) }
88+ disabled = { props . disabled }
89+ className = "h-3 w-3"
90+ />
91+ auto
92+ </ label >
93+ { /* Error display - inline */ }
94+ { props . nameError && < span className = "text-xs text-red-500" > { props . nameError } </ span > }
95+ </ div >
96+
97+ { /* Second row: Runtime, Branch, SSH */ }
5898 < div className = "flex flex-wrap items-center gap-x-3 gap-y-2" >
5999 { /* Runtime Selector - icon-based with tooltips */ }
60100 < RuntimeIconSelector
@@ -68,7 +108,7 @@ export function CreationControls(props: CreationControlsProps) {
68108 { /* Trunk Branch Selector - hidden for Local runtime */ }
69109 { showTrunkBranchSelector && (
70110 < div
71- className = "flex items-center gap-1"
111+ className = "flex h-6 items-center gap-1"
72112 data-component = "TrunkBranchGroup"
73113 data-tutorial = "trunk-branch"
74114 >
@@ -81,7 +121,7 @@ export function CreationControls(props: CreationControlsProps) {
81121 options = { props . branches }
82122 onChange = { props . onTrunkBranchChange }
83123 disabled = { props . disabled }
84- className = "max-w-[120px]"
124+ className = "h-6 max-w-[120px]"
85125 />
86126 </ div >
87127 ) }
@@ -94,51 +134,10 @@ export function CreationControls(props: CreationControlsProps) {
94134 onChange = { ( e ) => props . onSshHostChange ( e . target . value ) }
95135 placeholder = "user@host"
96136 disabled = { props . disabled }
97- className = "bg-separator text-foreground border-border-medium focus:border-accent w-32 rounded border px-1 py-0.5 text-xs focus:outline-none disabled:opacity-50"
137+ className = "bg-separator text-foreground border-border-medium focus:border-accent h-6 w-32 rounded border px-1 text-xs focus:outline-none disabled:opacity-50"
98138 />
99139 ) }
100140 </ div >
101-
102- { /* Second row: Workspace name with auto-generate checkbox */ }
103- < div className = "flex items-center gap-2" data-component = "WorkspaceNameGroup" >
104- < label htmlFor = "workspace-name" className = "text-muted text-xs whitespace-nowrap" >
105- Name:
106- </ label >
107- < div className = "relative max-w-xs flex-1" >
108- < input
109- id = "workspace-name"
110- type = "text"
111- value = { props . workspaceName }
112- onChange = { handleNameChange }
113- placeholder = { props . isGeneratingName ? "Generating..." : "workspace-name" }
114- disabled = { props . disabled || props . autoGenerateName }
115- className = { cn (
116- "bg-separator text-foreground border-border-medium focus:border-accent w-full rounded border px-2 py-0.5 pr-6 text-xs focus:outline-none disabled:opacity-50" ,
117- props . nameError && "border-red-500"
118- ) }
119- />
120- { /* Loading indicator when generating */ }
121- { props . isGeneratingName && (
122- < div className = "absolute top-1/2 right-1 -translate-y-1/2" >
123- < Loader2 className = "text-muted h-3 w-3 animate-spin" />
124- </ div >
125- ) }
126- </ div >
127- { /* Auto-generate checkbox */ }
128- < label className = "text-muted flex items-center gap-1 text-[10px] whitespace-nowrap" >
129- < input
130- type = "checkbox"
131- checked = { props . autoGenerateName }
132- onChange = { ( e ) => props . onAutoGenerateChange ( e . target . checked ) }
133- disabled = { props . disabled }
134- className = "h-3 w-3"
135- />
136- auto
137- </ label >
138- </ div >
139-
140- { /* Error display */ }
141- { props . nameError && < div className = "text-xs text-red-500" > { props . nameError } </ div > }
142141 </ div >
143142 ) ;
144143}
0 commit comments