Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/web/src/components/settings/ProviderInstanceCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ export function ProviderEnvironmentSection(props: {
<div className="flex min-w-0 flex-col gap-1.5 rounded-lg border p-2">
<div className="flex min-w-0 items-center gap-1.5">
{nameInput}
{source === null ? null : <div className="w-48 shrink-0">{source}</div>}
{source}
{removeButton}
</div>
<div className="flex min-w-0 items-start gap-1.5">
Expand Down
20 changes: 13 additions & 7 deletions apps/web/src/components/settings/SecretSourceInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ export function useSecretSources(environmentId: EnvironmentId): ReadonlyArray<Se
.map(([id, config]) => ({ id, kind: config.kind, label: config.label }));
}

function SourceIcon(props: { readonly icon: ComponentType<{ readonly className?: string }> }) {
return <props.icon className="size-3.5 shrink-0" />;
}

function SourceLabel(props: {
readonly icon: ComponentType<{ readonly className?: string }>;
readonly label: string;
Expand Down Expand Up @@ -195,13 +199,14 @@ export function SecretSourceInput({
setPendingProvider(next === secret?.provider ? null : next);
}}
>
<SelectTrigger size="sm" className="w-full min-w-0" aria-label={`${label} source`}>
<SelectTrigger
size="sm"
className="w-auto min-w-0 shrink-0"
aria-label={`${label} source`}
title={provider === null ? "Value" : providerLabel(provider)}
>
<SelectValue>
{provider === null ? (
<SourceLabel icon={TypeIcon} label="Value" />
) : (
<SourceLabel icon={providerIcon(provider)} label={providerLabel(provider)} />
)}
<SourceIcon icon={provider === null ? TypeIcon : providerIcon(provider)} />
</SelectValue>
</SelectTrigger>
<SelectPopup align="start" alignItemWithTrigger={false}>
Expand Down Expand Up @@ -232,6 +237,7 @@ export function SecretSourceInput({
{...(input.id !== undefined ? { id: input.id } : {})}
size="sm"
font="mono"
className="min-w-0 flex-1"
value={rejectedReference ?? reference}
onCommit={(next) => {
if (next.trim().length === 0) {
Expand Down Expand Up @@ -277,7 +283,7 @@ export function SecretSourceInput({
if (source === null) return valueField;
return (
<div className="flex min-w-0 flex-1 items-start gap-1.5">
<div className="w-28 shrink-0">{source}</div>
{source}
{valueField}
</div>
);
Expand Down
Loading