Skip to content

Commit ddf783d

Browse files
committed
improvement: terminal height, subblocks
1 parent 0337ef2 commit ddf783d

File tree

9 files changed

+33
-43
lines changed

9 files changed

+33
-43
lines changed

apps/sim/app/_styles/globals.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
--panel-width: 260px;
1212
--toolbar-triggers-height: 300px;
1313
--editor-connections-height: 200px;
14-
--terminal-height: 196px;
14+
--terminal-height: 155px;
1515
}
1616

1717
.sidebar-container {

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/document-tag-entry/document-tag-entry.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -225,18 +225,14 @@ export function DocumentTagEntry({
225225
*/
226226
const renderTagHeader = (tag: DocumentTag, index: number) => (
227227
<div
228-
className='flex cursor-pointer items-center justify-between bg-transparent px-[10px] py-[5px]'
228+
className='flex cursor-pointer items-center justify-between bg-[var(--surface-4)] px-[10px] py-[5px]'
229229
onClick={() => toggleCollapse(tag.id)}
230230
>
231231
<div className='flex min-w-0 flex-1 items-center gap-[8px]'>
232232
<span className='block truncate font-medium text-[14px] text-[var(--text-tertiary)]'>
233233
{tag.tagName || `Tag ${index + 1}`}
234234
</span>
235-
{tag.tagName && (
236-
<Badge className='h-[20px] text-[13px]'>
237-
{FIELD_TYPE_LABELS[tag.fieldType] || 'Text'}
238-
</Badge>
239-
)}
235+
{tag.tagName && <Badge size='sm'>{FIELD_TYPE_LABELS[tag.fieldType] || 'Text'}</Badge>}
240236
</div>
241237
<div className='flex items-center gap-[8px] pl-[8px]' onClick={(e) => e.stopPropagation()}>
242238
<Button
@@ -356,7 +352,7 @@ export function DocumentTagEntry({
356352
value={tag.tagName}
357353
onChange={(value) => updateTag(tag.id, 'tagName', value)}
358354
disabled={isReadOnly || isLoading}
359-
placeholder={isLoading ? 'Loading tags...' : 'Select tag'}
355+
placeholder='Select tag'
360356
/>
361357
</div>
362358

@@ -375,7 +371,7 @@ export function DocumentTagEntry({
375371
key={tag.id}
376372
data-tag-id={tag.id}
377373
className={cn(
378-
'rounded-[4px] border border-[var(--border-1)] bg-[var(--surface-3)] dark:bg-[#1F1F1F]',
374+
'rounded-[4px] border border-[var(--border-1)]',
379375
tag.collapsed ? 'overflow-hidden' : 'overflow-visible'
380376
)}
381377
>

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/eval-input/eval-input.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export function EvalInput({
127127
}
128128

129129
const renderMetricHeader = (metric: EvalMetric, index: number) => (
130-
<div className='flex items-center justify-between overflow-hidden rounded-t-[4px] border-[var(--border-1)] border-b bg-transparent px-[10px] py-[5px]'>
130+
<div className='flex items-center justify-between overflow-hidden rounded-t-[4px] border-[var(--border-1)] border-b bg-[var(--surface-4)] px-[10px] py-[5px]'>
131131
<span className='font-medium text-[14px] text-[var(--text-tertiary)]'>
132132
Metric {index + 1}
133133
</span>
@@ -171,12 +171,12 @@ export function EvalInput({
171171
<div
172172
key={metric.id}
173173
data-metric-id={metric.id}
174-
className='group relative overflow-visible rounded-[4px] border border-[var(--border-1)] bg-[#1F1F1F]'
174+
className='group relative overflow-visible rounded-[4px] border border-[var(--border-1)]'
175175
>
176176
{renderMetricHeader(metric, index)}
177177

178-
<div className='flex flex-col gap-[6px] border-[var(--border-1)] px-[10px] pt-[6px] pb-[10px]'>
179-
<div key={`name-${metric.id}`} className='space-y-[4px]'>
178+
<div className='flex flex-col gap-[8px] border-[var(--border-1)] px-[10px] pt-[6px] pb-[10px]'>
179+
<div key={`name-${metric.id}`} className='flex flex-col gap-[6px]'>
180180
<Label className='text-[13px]'>Name</Label>
181181
<Input
182182
name='name'
@@ -187,7 +187,7 @@ export function EvalInput({
187187
/>
188188
</div>
189189

190-
<div key={`description-${metric.id}`} className='space-y-[4px]'>
190+
<div key={`description-${metric.id}`} className='flex flex-col gap-[6px]'>
191191
<Label className='text-[13px]'>Description</Label>
192192
<div className='relative'>
193193
{(() => {
@@ -254,8 +254,8 @@ export function EvalInput({
254254
</div>
255255
</div>
256256

257-
<div key={`range-${metric.id}`} className='grid grid-cols-2 gap-[6px]'>
258-
<div className='space-y-[4px]'>
257+
<div key={`range-${metric.id}`} className='grid grid-cols-2 gap-[8px]'>
258+
<div className='flex flex-col gap-[6px]'>
259259
<Label className='text-[13px]'>Min Value</Label>
260260
<Input
261261
type='text'
@@ -268,7 +268,7 @@ export function EvalInput({
268268
name='eval-range-min'
269269
/>
270270
</div>
271-
<div className='space-y-[4px]'>
271+
<div className='flex flex-col gap-[6px]'>
272272
<Label className='text-[13px]'>Max Value</Label>
273273
<Input
274274
type='text'

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/input-mapping/input-mapping.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -368,25 +368,25 @@ function InputMappingField({
368368
return (
369369
<div
370370
className={cn(
371-
'rounded-[4px] border border-[var(--border-1)] bg-[var(--surface-3)] dark:bg-[#1F1F1F]',
371+
'rounded-[4px] border border-[var(--border-1)]',
372372
collapsed ? 'overflow-hidden' : 'overflow-visible'
373373
)}
374374
>
375375
<div
376-
className='flex cursor-pointer items-center justify-between bg-transparent px-[10px] py-[5px]'
376+
className='flex cursor-pointer items-center justify-between bg-[var(--surface-4)] px-[10px] py-[5px]'
377377
onClick={onToggleCollapse}
378378
>
379379
<div className='flex min-w-0 flex-1 items-center gap-[8px]'>
380380
<span className='block truncate font-medium text-[14px] text-[var(--text-tertiary)]'>
381381
{fieldName}
382382
</span>
383-
{fieldType && <Badge className='h-[20px] text-[13px]'>{fieldType}</Badge>}
383+
{fieldType && <Badge size='sm'>{fieldType}</Badge>}
384384
</div>
385385
</div>
386386

387387
{!collapsed && (
388-
<div className='flex flex-col gap-[6px] border-[var(--border-1)] border-t px-[10px] pt-[6px] pb-[10px]'>
389-
<div className='space-y-[4px]'>
388+
<div className='flex flex-col gap-[8px] border-[var(--border-1)] border-t px-[10px] pt-[6px] pb-[10px]'>
389+
<div className='flex flex-col gap-[6px]'>
390390
<Label className='text-[13px]'>Value</Label>
391391
<div className='relative'>
392392
<Input

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/knowledge-tag-filters/knowledge-tag-filters.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -218,18 +218,14 @@ export function KnowledgeTagFilters({
218218
*/
219219
const renderFilterHeader = (filter: TagFilter, index: number) => (
220220
<div
221-
className='flex cursor-pointer items-center justify-between bg-transparent px-[10px] py-[5px]'
221+
className='flex cursor-pointer items-center justify-between bg-[var(--surface-4)] px-[10px] py-[5px]'
222222
onClick={() => toggleCollapse(filter.id)}
223223
>
224224
<div className='flex min-w-0 flex-1 items-center gap-[8px]'>
225225
<span className='block truncate font-medium text-[14px] text-[var(--text-tertiary)]'>
226226
{filter.tagName || `Filter ${index + 1}`}
227227
</span>
228-
{filter.tagName && (
229-
<Badge className='h-[20px] text-[13px]'>
230-
{FIELD_TYPE_LABELS[filter.fieldType] || 'Text'}
231-
</Badge>
232-
)}
228+
{filter.tagName && <Badge size='sm'>{FIELD_TYPE_LABELS[filter.fieldType] || 'Text'}</Badge>}
233229
</div>
234230
<div className='flex items-center gap-[8px] pl-[8px]' onClick={(e) => e.stopPropagation()}>
235231
<Button variant='ghost' onClick={addFilter} disabled={isReadOnly} className='h-auto p-0'>
@@ -347,7 +343,7 @@ export function KnowledgeTagFilters({
347343
value={filter.tagName}
348344
onChange={(value) => updateFilter(filter.id, 'tagName', value)}
349345
disabled={isReadOnly || isLoading}
350-
placeholder={isLoading ? 'Loading tags...' : 'Select tag'}
346+
placeholder='Select tag'
351347
/>
352348
</div>
353349

@@ -385,7 +381,7 @@ export function KnowledgeTagFilters({
385381
key={filter.id}
386382
data-filter-id={filter.id}
387383
className={cn(
388-
'rounded-[4px] border border-[var(--border-1)] bg-[var(--surface-3)] dark:bg-[#1F1F1F]',
384+
'rounded-[4px] border border-[var(--border-1)]',
389385
filter.collapsed ? 'overflow-hidden' : 'overflow-visible'
390386
)}
391387
>

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/starter/input-format.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,14 @@ export function FieldFormat({
163163
*/
164164
const renderFieldHeader = (field: Field, index: number) => (
165165
<div
166-
className='flex cursor-pointer items-center justify-between bg-transparent px-[10px] py-[5px]'
166+
className='flex cursor-pointer items-center justify-between bg-[var(--surface-4)] px-[10px] py-[5px]'
167167
onClick={() => toggleCollapse(field.id)}
168168
>
169169
<div className='flex min-w-0 flex-1 items-center gap-[8px]'>
170170
<span className='block truncate font-medium text-[14px] text-[var(--text-tertiary)]'>
171171
{field.name || `${title} ${index + 1}`}
172172
</span>
173-
{field.name && showType && <Badge className='h-[20px] text-[13px]'>{field.type}</Badge>}
173+
{field.name && showType && <Badge size='sm'>{field.type}</Badge>}
174174
</div>
175175
<div className='flex items-center gap-[8px] pl-[8px]' onClick={(e) => e.stopPropagation()}>
176176
<Button variant='ghost' onClick={addField} disabled={isReadOnly} className='h-auto p-0'>
@@ -407,7 +407,7 @@ export function FieldFormat({
407407
key={field.id}
408408
data-field-id={field.id}
409409
className={cn(
410-
'rounded-[4px] border border-[var(--border-1)] bg-[var(--surface-3)] dark:bg-[#1F1F1F]',
410+
'rounded-[4px] border border-[var(--border-1)]',
411411
field.collapsed ? 'overflow-hidden' : 'overflow-visible'
412412
)}
413413
>

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/variables-input/variables-input.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -294,21 +294,19 @@ export function VariablesInput({
294294
key={assignment.id}
295295
data-assignment-id={assignment.id}
296296
className={cn(
297-
'rounded-[4px] border border-[var(--border-1)] bg-[var(--surface-3)] dark:bg-[#1F1F1F]',
297+
'rounded-[4px] border border-[var(--border-1)]',
298298
collapsed ? 'overflow-hidden' : 'overflow-visible'
299299
)}
300300
>
301301
<div
302-
className='flex cursor-pointer items-center justify-between bg-transparent px-[10px] py-[5px]'
302+
className='flex cursor-pointer items-center justify-between bg-[var(--surface-4)] px-[10px] py-[5px]'
303303
onClick={() => toggleCollapse(assignment.id)}
304304
>
305305
<div className='flex min-w-0 flex-1 items-center gap-[8px]'>
306306
<span className='block truncate font-medium text-[14px] text-[var(--text-tertiary)]'>
307307
{assignment.variableName || `Variable ${index + 1}`}
308308
</span>
309-
{assignment.variableName && (
310-
<Badge className='h-[20px] text-[13px]'>{assignment.type}</Badge>
311-
)}
309+
{assignment.variableName && <Badge size='sm'>{assignment.type}</Badge>}
312310
</div>
313311
<div
314312
className='flex items-center gap-[8px] pl-[8px]'
@@ -336,8 +334,8 @@ export function VariablesInput({
336334
</div>
337335

338336
{!collapsed && (
339-
<div className='flex flex-col gap-[6px] border-[var(--border-1)] border-t px-[10px] pt-[6px] pb-[10px]'>
340-
<div className='flex flex-col gap-[4px]'>
337+
<div className='flex flex-col gap-[8px] border-[var(--border-1)] border-t px-[10px] pt-[6px] pb-[10px]'>
338+
<div className='flex flex-col gap-[6px]'>
341339
<Label className='text-[13px]'>Variable</Label>
342340
<Combobox
343341
options={availableVars.map((v) => ({ label: v.name, value: v.id }))}
@@ -348,7 +346,7 @@ export function VariablesInput({
348346
/>
349347
</div>
350348

351-
<div className='space-y-[4px]'>
349+
<div className='flex flex-col gap-[6px]'>
352350
<Label className='text-[13px]'>Value</Label>
353351
{assignment.type === 'object' || assignment.type === 'array' ? (
354352
<div className='relative'>

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/terminal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ import { useWorkflowRegistry } from '@/stores/workflows/registry/store'
5555
*/
5656
const MIN_HEIGHT = 30
5757
const NEAR_MIN_THRESHOLD = 40
58-
const DEFAULT_EXPANDED_HEIGHT = 196
58+
const DEFAULT_EXPANDED_HEIGHT = 155
5959

6060
/**
6161
* Column width constants - numeric values for calculations

apps/sim/stores/terminal/store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ interface TerminalState {
4949
* inside the resize hook to keep the workflow canvas visible.
5050
*/
5151
export const MIN_TERMINAL_HEIGHT = 30
52-
export const DEFAULT_TERMINAL_HEIGHT = 196
52+
export const DEFAULT_TERMINAL_HEIGHT = 155
5353

5454
/**
5555
* Output panel width constraints.

0 commit comments

Comments
 (0)