Skip to content

Commit a7080d5

Browse files
authored
improvement(forking): widen the fork mapping target picker and make it searchable (#6381)
* improvement(forking): widen the fork mapping target picker and make it searchable * fix(forking): stop the truncated-candidates hint promising a search that cannot reach past the cap
1 parent eec3c35 commit a7080d5

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

apps/sim/ee/workspace-forking/components/fork-sync/fork-sync-view.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,12 @@ const NEW_COPY_VALUE = '__new_copy__'
7878
*/
7979
const NEW_TRIGGER_URL_VALUE = '__new_trigger_url__'
8080

81-
/** Fixed target-picker width so every mapping row's control lines up as one column (mirrors General). */
82-
const MAPPING_TARGET_TRIGGER_CLASS = 'w-[240px] flex-shrink-0'
81+
/**
82+
* Fixed target-picker width so every mapping row's control lines up as one column (mirrors
83+
* General). Wide enough to hold a full-length secret key - these are the longest labels the
84+
* picker shows, and clipping them is what makes two same-prefixed keys indistinguishable.
85+
*/
86+
const MAPPING_TARGET_TRIGGER_CLASS = 'w-[320px] flex-shrink-0'
8387

8488
interface DependentBlock {
8589
targetBlockId: string
@@ -400,6 +404,8 @@ function MappingEntry({ controller, group, entry }: MappingEntryProps) {
400404
value={copying ? NEW_COPY_VALUE : target || undefined}
401405
onChange={(value) => controller.setTarget(entry, value)}
402406
placeholder='Select target'
407+
searchable
408+
searchPlaceholder='Search targets'
403409
/>
404410
</div>
405411
</div>
@@ -412,7 +418,7 @@ function MappingEntry({ controller, group, entry }: MappingEntryProps) {
412418
) : null}
413419
{entry.candidatesTruncated ? (
414420
<p className='text-[var(--text-muted)] text-small'>
415-
More options than shown — search by name.
421+
Too many targets to list them all — search covers only the ones shown.
416422
</p>
417423
) : null}
418424
</div>

0 commit comments

Comments
 (0)